@@ -69,6 +69,7 @@ static int mt76x0_add_interface(struct ieee80211_hw *hw,
69
69
mvif -> idx = idx ;
70
70
mvif -> group_wcid .idx = GROUP_WCID (idx );
71
71
mvif -> group_wcid .hw_key_idx = -1 ;
72
+ mt76x02_txq_init (& dev -> mt76 , vif -> txq );
72
73
73
74
return 0 ;
74
75
}
@@ -81,6 +82,7 @@ static void mt76x0_remove_interface(struct ieee80211_hw *hw,
81
82
unsigned int wcid = mvif -> group_wcid .idx ;
82
83
83
84
dev -> wcid_mask [wcid / BITS_PER_LONG ] &= ~BIT (wcid % BITS_PER_LONG );
85
+ mt76_txq_remove (& dev -> mt76 , vif -> txq );
84
86
}
85
87
86
88
static int mt76x0_config (struct ieee80211_hw * hw , u32 changed )
@@ -163,6 +165,7 @@ mt76x0_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
163
165
struct mt76x02_vif * mvif = (struct mt76x02_vif * ) vif -> drv_priv ;
164
166
int ret = 0 ;
165
167
int idx = 0 ;
168
+ int i ;
166
169
167
170
mutex_lock (& dev -> mt76 .mutex );
168
171
@@ -178,6 +181,8 @@ mt76x0_sta_add(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
178
181
mt76x02_mac_wcid_set_drop (& dev -> mt76 , idx , false);
179
182
mt76_clear (dev , MT_WCID_DROP (idx ), MT_WCID_DROP_MASK (idx ));
180
183
rcu_assign_pointer (dev -> wcid [idx ], & msta -> wcid );
184
+ for (i = 0 ; i < ARRAY_SIZE (sta -> txq ); i ++ )
185
+ mt76x02_txq_init (& dev -> mt76 , sta -> txq [i ]);
181
186
mt76x0_mac_set_ampdu_factor (dev );
182
187
183
188
out :
@@ -193,11 +198,14 @@ mt76x0_sta_remove(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
193
198
struct mt76x0_dev * dev = hw -> priv ;
194
199
struct mt76_sta * msta = (struct mt76_sta * ) sta -> drv_priv ;
195
200
int idx = msta -> wcid .idx ;
201
+ int i ;
196
202
197
203
mutex_lock (& dev -> mt76 .mutex );
198
204
rcu_assign_pointer (dev -> wcid [idx ], NULL );
199
205
mt76x02_mac_wcid_set_drop (& dev -> mt76 , idx , true);
200
206
mt76_wcid_free (dev -> wcid_mask , idx );
207
+ for (i = 0 ; i < ARRAY_SIZE (sta -> txq ); i ++ )
208
+ mt76_txq_remove (& dev -> mt76 , sta -> txq [i ]);
201
209
mt76x02_mac_wcid_setup (& dev -> mt76 , idx , 0 , NULL );
202
210
mt76x0_mac_set_ampdu_factor (dev );
203
211
mutex_unlock (& dev -> mt76 .mutex );
0 commit comments