mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
mwl8k: Delete ampdu streams with state AMPDU_STREAM_NEW in sta remove
When a station deauths, we do not delete the streams with state AMPDU_STREAM_NEW and these remain created forever. Fix this issue by removing such streams in the driver Signed-off-by: Nishant Sarmukadam <[email protected]> Signed-off-by: Yogesh Ashok Powar <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
9b0b11fb1e
commit
0dd13a48a9
1 changed files with 24 additions and 1 deletions
|
|
@ -3935,7 +3935,30 @@ static int mwl8k_cmd_set_new_stn_del(struct ieee80211_hw *hw,
|
|||
struct ieee80211_vif *vif, u8 *addr)
|
||||
{
|
||||
struct mwl8k_cmd_set_new_stn *cmd;
|
||||
int rc;
|
||||
struct mwl8k_priv *priv = hw->priv;
|
||||
int rc, i;
|
||||
u8 idx;
|
||||
|
||||
spin_lock(&priv->stream_lock);
|
||||
/* Destroy any active ampdu streams for this sta */
|
||||
for (i = 0; i < MWL8K_NUM_AMPDU_STREAMS; i++) {
|
||||
struct mwl8k_ampdu_stream *s;
|
||||
s = &priv->ampdu[i];
|
||||
if (s->state != AMPDU_NO_STREAM) {
|
||||
if (memcmp(s->sta->addr, addr, ETH_ALEN) == 0) {
|
||||
if (s->state == AMPDU_STREAM_ACTIVE) {
|
||||
idx = s->idx;
|
||||
spin_unlock(&priv->stream_lock);
|
||||
mwl8k_destroy_ba(hw, idx);
|
||||
spin_lock(&priv->stream_lock);
|
||||
} else if (s->state == AMPDU_STREAM_NEW) {
|
||||
mwl8k_remove_stream(hw, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock(&priv->stream_lock);
|
||||
|
||||
cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
|
||||
if (cmd == NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue