mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: move mt76_get_antenna in mt76_core module
Move mt76_get_antenna in mac80211.c in order to be reused by all drivers. Initialize .get_antenna function pointer for mt76x0, mt7603, mt7615 and mt76x2u drivers Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
7121e163c0
commit
db78ee08d9
+13
@@ -1037,3 +1037,16 @@ void mt76_sw_scan_complete(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
|
||||
clear_bit(MT76_SCANNING, &dev->state);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_sw_scan_complete);
|
||||
|
||||
int mt76_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant)
|
||||
{
|
||||
struct mt76_dev *dev = hw->priv;
|
||||
|
||||
mutex_lock(&dev->mutex);
|
||||
*tx_ant = dev->antenna_mask;
|
||||
*rx_ant = dev->antenna_mask;
|
||||
mutex_unlock(&dev->mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76_get_antenna);
|
||||
|
||||
Reference in New Issue
Block a user