void mt76x02_sta_ps(struct mt76_dev *mdev, struct ieee80211_sta *sta, bool ps) { struct mt76x02_dev *dev = container_of(mdev, struct mt76x02_dev, mt76); struct mt76x02_sta *msta = (struct mt76x02_sta *)sta->drv_priv; int idx = msta->wcid.idx; mt76_stop_tx_queues(&dev->mt76, sta, true); mt76x02_mac_wcid_set_drop(dev, idx, ps); }
static void mt76_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif, enum sta_notify_cmd cmd, struct ieee80211_sta *sta) { struct mt76_sta *msta = (struct mt76_sta *) sta->drv_priv; struct mt76_dev *dev = hw->priv; switch (cmd) { case STA_NOTIFY_SLEEP: msta->sleeping = true; mt76_stop_tx_queues(dev, sta); break; case STA_NOTIFY_AWAKE: msta->sleeping = false; break; } }
static void mt7603_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif, enum sta_notify_cmd cmd, struct ieee80211_sta *sta) { struct mt7603_dev *dev = hw->priv; struct mt7603_sta *msta = (struct mt7603_sta *) sta->drv_priv; int idx = msta->wcid.idx; switch (cmd) { case STA_NOTIFY_SLEEP: mt7603_wtbl_set_ps(dev, idx, true); mt76_stop_tx_queues(&dev->mt76, sta); break; case STA_NOTIFY_AWAKE: mt7603_wtbl_set_ps(dev, idx, false); break; } }