main: set wcid drop mask based on station sleep/wake events

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2015-08-28 10:00:29 +02:00
parent b6de6a08e4
commit 659530a511
+3
View File
@@ -271,13 +271,16 @@ mt76_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
{
struct mt76_sta *msta = (struct mt76_sta *) sta->drv_priv;
struct mt76_dev *dev = hw->priv;
int idx = msta->wcid.idx;
switch (cmd) {
case STA_NOTIFY_SLEEP:
msta->sleeping = true;
mt76_set(dev, MT_WCID_DROP(idx), MT_WCID_DROP_MASK(idx));
mt76_stop_tx_queues(dev, sta);
break;
case STA_NOTIFY_AWAKE:
mt76_clear(dev, MT_WCID_DROP(idx), MT_WCID_DROP_MASK(idx));
msta->sleeping = false;
break;
}