diff options
author | Yogesh Ashok Powar <yogeshp@marvell.com> | 2013-01-07 23:46:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-01-09 14:37:11 -0500 |
commit | 0dd13a48a913f096cb44dbcb6c1daebd94b2cf84 (patch) | |
tree | 26e7e1bdb474ffa3ed0cb909c7334a84f0f817cc /drivers/net | |
parent | 9b0b11fb1e286e03ce911b94844952edd05f554e (diff) |
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 <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 04442c6290a6..fc4d4a442139 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -3935,7 +3935,30 @@ static int mwl8k_cmd_set_new_stn_del(struct ieee80211_hw *hw, | |||
3935 | struct ieee80211_vif *vif, u8 *addr) | 3935 | struct ieee80211_vif *vif, u8 *addr) |
3936 | { | 3936 | { |
3937 | struct mwl8k_cmd_set_new_stn *cmd; | 3937 | struct mwl8k_cmd_set_new_stn *cmd; |
3938 | int rc; | 3938 | struct mwl8k_priv *priv = hw->priv; |
3939 | int rc, i; | ||
3940 | u8 idx; | ||
3941 | |||
3942 | spin_lock(&priv->stream_lock); | ||
3943 | /* Destroy any active ampdu streams for this sta */ | ||
3944 | for (i = 0; i < MWL8K_NUM_AMPDU_STREAMS; i++) { | ||
3945 | struct mwl8k_ampdu_stream *s; | ||
3946 | s = &priv->ampdu[i]; | ||
3947 | if (s->state != AMPDU_NO_STREAM) { | ||
3948 | if (memcmp(s->sta->addr, addr, ETH_ALEN) == 0) { | ||
3949 | if (s->state == AMPDU_STREAM_ACTIVE) { | ||
3950 | idx = s->idx; | ||
3951 | spin_unlock(&priv->stream_lock); | ||
3952 | mwl8k_destroy_ba(hw, idx); | ||
3953 | spin_lock(&priv->stream_lock); | ||
3954 | } else if (s->state == AMPDU_STREAM_NEW) { | ||
3955 | mwl8k_remove_stream(hw, s); | ||
3956 | } | ||
3957 | } | ||
3958 | } | ||
3959 | } | ||
3960 | |||
3961 | spin_unlock(&priv->stream_lock); | ||
3939 | 3962 | ||
3940 | cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); | 3963 | cmd = kzalloc(sizeof(*cmd), GFP_KERNEL); |
3941 | if (cmd == NULL) | 3964 | if (cmd == NULL) |