mt7603: initialize per-sta per-tid txq

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2016-02-01 19:12:47 +01:00
parent 4ea91d1c39
commit ac6f0a12dc
+9 -1
View File
@@ -160,7 +160,7 @@ mt7603_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
{
struct mt7603_dev *dev = hw->priv;
struct mt7603_sta *msta = (struct mt7603_sta *) sta->drv_priv;
int ret, idx;
int i, ret, idx;
mutex_lock(&dev->mutex);
@@ -170,6 +170,9 @@ mt7603_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
goto out;
}
for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
mt7603_txq_init(dev, sta->txq[i]);
msta->wcid.idx = idx;
mt7603_wtbl_update_cap(dev, sta);
@@ -189,10 +192,15 @@ mt7603_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct mt7603_dev *dev = hw->priv;
struct mt7603_sta *msta = (struct mt7603_sta *) sta->drv_priv;
int idx = msta->wcid.idx;
int i;
mutex_lock(&dev->mutex);
rcu_assign_pointer(dev->wcid[idx], NULL);
mt7603_wtbl_clear(dev, idx);
for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
mt76_txq_remove(&dev->mt76, sta->txq[i]);
mutex_unlock(&dev->mutex);
return 0;