diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-04-03 21:52:48 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-04-24 20:29:55 +0300 |
commit | 11b2a25f02b700027aa89ff27c807ec756df01f6 (patch) | |
tree | 32dd3a12a4650748ce30f21138d40f4372c5acf7 /drivers/net/wireless/mediatek | |
parent | 00dfae9a0ab7594b77d39725ebff677900695d70 (diff) |
mt76: stop tx queues from the driver callback instead of common code
Allows the driver to control whether to send a BlockAckReq after waking
up. MT76x2 needs this set to true, for MT7603 (to be submitted later)
it needs to be false.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mac80211.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mac80211.c b/drivers/net/wireless/mediatek/mt76/mac80211.c index 4f30cdcd2b53..962ed8234065 100644 --- a/drivers/net/wireless/mediatek/mt76/mac80211.c +++ b/drivers/net/wireless/mediatek/mt76/mac80211.c @@ -541,12 +541,10 @@ mt76_check_ps(struct mt76_dev *dev, struct sk_buff *skb) if (!!test_bit(MT_WCID_FLAG_PS, &wcid->flags) == ps) return; - if (ps) { + if (ps) set_bit(MT_WCID_FLAG_PS, &wcid->flags); - mt76_stop_tx_queues(dev, sta, true); - } else { + else clear_bit(MT_WCID_FLAG_PS, &wcid->flags); - } ieee80211_sta_ps_transition(sta, ps); dev->drv->sta_ps(dev, sta, ps); diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c index 73c127f92613..81c58f865c64 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c @@ -321,6 +321,7 @@ mt76x2_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps) struct mt76x2_dev *dev = container_of(mdev, struct mt76x2_dev, mt76); int idx = msta->wcid.idx; + mt76_stop_tx_queues(&dev->mt76, sta, true); mt76x2_mac_wcid_set_drop(dev, idx, ps); } |