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
+1
-14
@@ -135,19 +135,6 @@ static int mt76x2_set_antenna(struct ieee80211_hw *hw, u32 tx_ant,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mt76x2_get_antenna(struct ieee80211_hw *hw, u32 *tx_ant,
|
||||
u32 *rx_ant)
|
||||
{
|
||||
struct mt76x02_dev *dev = hw->priv;
|
||||
|
||||
mutex_lock(&dev->mt76.mutex);
|
||||
*tx_ant = dev->mt76.antenna_mask;
|
||||
*rx_ant = dev->mt76.antenna_mask;
|
||||
mutex_unlock(&dev->mt76.mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const struct ieee80211_ops mt76x2_ops = {
|
||||
.tx = mt76x02_tx,
|
||||
.start = mt76x2_start,
|
||||
@@ -172,7 +159,7 @@ const struct ieee80211_ops mt76x2_ops = {
|
||||
.get_survey = mt76_get_survey,
|
||||
.set_tim = mt76_set_tim,
|
||||
.set_antenna = mt76x2_set_antenna,
|
||||
.get_antenna = mt76x2_get_antenna,
|
||||
.get_antenna = mt76_get_antenna,
|
||||
.set_rts_threshold = mt76x02_set_rts_threshold,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user