mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x0: pci: add get_survey support
Move mt76x02_update_channel routine in mt76x02-lib module in order to be reused by mt76x0 driver adding get_survey support Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
da129c9508
commit
eab7ab1450
@@ -735,3 +735,21 @@ void mt76x02_tx_complete_skb(struct mt76_dev *mdev, struct mt76_queue *q,
|
||||
dev_kfree_skb_any(e->skb);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_tx_complete_skb);
|
||||
|
||||
void mt76x02_update_channel(struct mt76_dev *mdev)
|
||||
{
|
||||
struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76);
|
||||
struct mt76_channel_state *state;
|
||||
u32 active, busy;
|
||||
|
||||
state = mt76_channel_state(&dev->mt76, dev->mt76.chandef.chan);
|
||||
|
||||
busy = mt76_rr(dev, MT_CH_BUSY);
|
||||
active = busy + mt76_rr(dev, MT_CH_IDLE);
|
||||
|
||||
spin_lock_bh(&dev->mt76.cc_lock);
|
||||
state->cc_busy += busy;
|
||||
state->cc_active += active;
|
||||
spin_unlock_bh(&dev->mt76.cc_lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mt76x02_update_channel);
|
||||
|
||||
Reference in New Issue
Block a user