mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7921: add flush operation
add flush operation to make sure cfg80211_mlme_deauth is able to flush the deauthtication frame into air immediately. Co-developed-by: YN Chen <[email protected]> Signed-off-by: YN Chen <[email protected]> Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -1120,6 +1120,15 @@ static void mt7921_set_rekey_data(struct ieee80211_hw *hw,
|
||||
}
|
||||
#endif /* CONFIG_PM */
|
||||
|
||||
static void mt7921_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
u32 queues, bool drop)
|
||||
{
|
||||
struct mt7921_dev *dev = mt7921_hw_dev(hw);
|
||||
|
||||
wait_event_timeout(dev->mt76.tx_wait, !mt76_has_tx_pending(&dev->mphy),
|
||||
HZ / 2);
|
||||
}
|
||||
|
||||
const struct ieee80211_ops mt7921_ops = {
|
||||
.tx = mt7921_tx,
|
||||
.start = mt7921_start,
|
||||
@@ -1158,4 +1167,5 @@ const struct ieee80211_ops mt7921_ops = {
|
||||
.set_wakeup = mt7921_set_wakeup,
|
||||
.set_rekey_data = mt7921_set_rekey_data,
|
||||
#endif /* CONFIG_PM */
|
||||
.flush = mt7921_flush,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user