diff options
-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) |