mt7603: avoid unnecessary wtbl writes for ps-filter

Only clear the skip_tx flag if powersave mode is enabled

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2018-11-16 12:41:17 +01:00
parent 41931e43ab
commit d0fdf01a95
+3 -2
View File
@@ -885,8 +885,9 @@ int mt7603_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
if (!wcid) {
wcid = &dev->global_sta.wcid;
} else {
if (info->flags & (IEEE80211_TX_CTL_NO_PS_BUFFER |
IEEE80211_TX_CTL_CLEAR_PS_FILT))
if ((info->flags & (IEEE80211_TX_CTL_NO_PS_BUFFER |
IEEE80211_TX_CTL_CLEAR_PS_FILT)) &&
test_bit(MT_WCID_FLAG_PS, &wcid->flags))
mt7603_wtbl_set_skip_tx(dev, wcid->idx, false);
}