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:
Lorenzo Bianconi
2019-11-20 12:27:21 +01:00
committed by Felix Fietkau
parent 7121e163c0
commit db78ee08d9
8 changed files with 20 additions and 14 deletions
+13
View File
@@ -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);