diff options
author | Avinash Patil <patila@marvell.com> | 2012-08-03 21:06:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-08-06 15:12:56 -0400 |
commit | 3e238a1167cc5693a0d97b946100d74d75b72680 (patch) | |
tree | 1b3f88303946c47d7560b1f32e73857865420e04 /drivers/net | |
parent | 5a009adf32d28bacc02da2ddeb69765848266ce1 (diff) |
mwifiex: cleanup TX/RX BA tables for uAP
Cleanup TX/RX BA tables when AP receives deauthentication from
associated station. During BSS_IDLE event, all wmm queues, BA
streams created for AP interface are deleted.
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/mwifiex/11n.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n_rxreorder.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/11n_rxreorder.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/uap_event.c | 5 |
5 files changed, 58 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c index e535c937628b..d2732736f864 100644 --- a/drivers/net/wireless/mwifiex/11n.c +++ b/drivers/net/wireless/mwifiex/11n.c | |||
@@ -726,3 +726,29 @@ int mwifiex_get_tx_ba_stream_tbl(struct mwifiex_private *priv, | |||
726 | 726 | ||
727 | return count; | 727 | return count; |
728 | } | 728 | } |
729 | |||
730 | /* | ||
731 | * This function retrieves the entry for specific tx BA stream table by RA and | ||
732 | * deletes it. | ||
733 | */ | ||
734 | void mwifiex_del_tx_ba_stream_tbl_by_ra(struct mwifiex_private *priv, u8 *ra) | ||
735 | { | ||
736 | struct mwifiex_tx_ba_stream_tbl *tbl, *tmp; | ||
737 | unsigned long flags; | ||
738 | |||
739 | if (!ra) | ||
740 | return; | ||
741 | |||
742 | spin_lock_irqsave(&priv->tx_ba_stream_tbl_lock, flags); | ||
743 | list_for_each_entry_safe(tbl, tmp, &priv->tx_ba_stream_tbl_ptr, list) { | ||
744 | if (!memcmp(tbl->ra, ra, ETH_ALEN)) { | ||
745 | spin_unlock_irqrestore(&priv->tx_ba_stream_tbl_lock, | ||
746 | flags); | ||
747 | mwifiex_11n_delete_tx_ba_stream_tbl_entry(priv, tbl); | ||
748 | spin_lock_irqsave(&priv->tx_ba_stream_tbl_lock, flags); | ||
749 | } | ||
750 | } | ||
751 | spin_unlock_irqrestore(&priv->tx_ba_stream_tbl_lock, flags); | ||
752 | |||
753 | return; | ||
754 | } | ||
diff --git a/drivers/net/wireless/mwifiex/11n.h b/drivers/net/wireless/mwifiex/11n.h index 6d2edb4c2ad2..67c087cf9dc7 100644 --- a/drivers/net/wireless/mwifiex/11n.h +++ b/drivers/net/wireless/mwifiex/11n.h | |||
@@ -69,6 +69,7 @@ int mwifiex_cmd_recfg_tx_buf(struct mwifiex_private *priv, | |||
69 | int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd, | 69 | int mwifiex_cmd_amsdu_aggr_ctrl(struct host_cmd_ds_command *cmd, |
70 | int cmd_action, | 70 | int cmd_action, |
71 | struct mwifiex_ds_11n_amsdu_aggr_ctrl *aa_ctrl); | 71 | struct mwifiex_ds_11n_amsdu_aggr_ctrl *aa_ctrl); |
72 | void mwifiex_del_tx_ba_stream_tbl_by_ra(struct mwifiex_private *priv, u8 *ra); | ||
72 | 73 | ||
73 | /* | 74 | /* |
74 | * This function checks whether AMPDU is allowed or not for a particular TID. | 75 | * This function checks whether AMPDU is allowed or not for a particular TID. |
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.c b/drivers/net/wireless/mwifiex/11n_rxreorder.c index e43d27dc06bf..24e2582b467c 100644 --- a/drivers/net/wireless/mwifiex/11n_rxreorder.c +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.c | |||
@@ -176,6 +176,31 @@ mwifiex_11n_get_rx_reorder_tbl(struct mwifiex_private *priv, int tid, u8 *ta) | |||
176 | return NULL; | 176 | return NULL; |
177 | } | 177 | } |
178 | 178 | ||
179 | /* This function retrieves the pointer to an entry in Rx reordering | ||
180 | * table which matches the given TA and deletes it. | ||
181 | */ | ||
182 | void mwifiex_11n_del_rx_reorder_tbl_by_ta(struct mwifiex_private *priv, u8 *ta) | ||
183 | { | ||
184 | struct mwifiex_rx_reorder_tbl *tbl, *tmp; | ||
185 | unsigned long flags; | ||
186 | |||
187 | if (!ta) | ||
188 | return; | ||
189 | |||
190 | spin_lock_irqsave(&priv->rx_reorder_tbl_lock, flags); | ||
191 | list_for_each_entry_safe(tbl, tmp, &priv->rx_reorder_tbl_ptr, list) { | ||
192 | if (!memcmp(tbl->ta, ta, ETH_ALEN)) { | ||
193 | spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, | ||
194 | flags); | ||
195 | mwifiex_del_rx_reorder_entry(priv, tbl); | ||
196 | spin_lock_irqsave(&priv->rx_reorder_tbl_lock, flags); | ||
197 | } | ||
198 | } | ||
199 | spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, flags); | ||
200 | |||
201 | return; | ||
202 | } | ||
203 | |||
179 | /* | 204 | /* |
180 | * This function finds the last sequence number used in the packets | 205 | * This function finds the last sequence number used in the packets |
181 | * buffered in Rx reordering table. | 206 | * buffered in Rx reordering table. |
diff --git a/drivers/net/wireless/mwifiex/11n_rxreorder.h b/drivers/net/wireless/mwifiex/11n_rxreorder.h index 13ecb6101e23..72848591691a 100644 --- a/drivers/net/wireless/mwifiex/11n_rxreorder.h +++ b/drivers/net/wireless/mwifiex/11n_rxreorder.h | |||
@@ -72,5 +72,6 @@ struct mwifiex_rx_reorder_tbl *mwifiex_11n_get_rxreorder_tbl(struct | |||
72 | u8 *ta); | 72 | u8 *ta); |
73 | struct mwifiex_rx_reorder_tbl * | 73 | struct mwifiex_rx_reorder_tbl * |
74 | mwifiex_11n_get_rx_reorder_tbl(struct mwifiex_private *priv, int tid, u8 *ta); | 74 | mwifiex_11n_get_rx_reorder_tbl(struct mwifiex_private *priv, int tid, u8 *ta); |
75 | void mwifiex_11n_del_rx_reorder_tbl_by_ta(struct mwifiex_private *priv, u8 *ta); | ||
75 | 76 | ||
76 | #endif /* _MWIFIEX_11N_RXREORDER_H_ */ | 77 | #endif /* _MWIFIEX_11N_RXREORDER_H_ */ |
diff --git a/drivers/net/wireless/mwifiex/uap_event.c b/drivers/net/wireless/mwifiex/uap_event.c index a10bd95aec12..14d4f04201b9 100644 --- a/drivers/net/wireless/mwifiex/uap_event.c +++ b/drivers/net/wireless/mwifiex/uap_event.c | |||
@@ -226,10 +226,15 @@ int mwifiex_process_uap_event(struct mwifiex_private *priv) | |||
226 | MWIFIEX_UAP_EVENT_EXTRA_HEADER; | 226 | MWIFIEX_UAP_EVENT_EXTRA_HEADER; |
227 | cfg80211_del_sta(priv->netdev, deauth_mac, GFP_KERNEL); | 227 | cfg80211_del_sta(priv->netdev, deauth_mac, GFP_KERNEL); |
228 | 228 | ||
229 | if (priv->ap_11n_enabled) { | ||
230 | mwifiex_11n_del_rx_reorder_tbl_by_ta(priv, deauth_mac); | ||
231 | mwifiex_del_tx_ba_stream_tbl_by_ra(priv, deauth_mac); | ||
232 | } | ||
229 | mwifiex_del_sta_entry(priv, deauth_mac); | 233 | mwifiex_del_sta_entry(priv, deauth_mac); |
230 | break; | 234 | break; |
231 | case EVENT_UAP_BSS_IDLE: | 235 | case EVENT_UAP_BSS_IDLE: |
232 | priv->media_connected = false; | 236 | priv->media_connected = false; |
237 | mwifiex_clean_txrx(priv); | ||
233 | mwifiex_del_all_sta_list(priv); | 238 | mwifiex_del_all_sta_list(priv); |
234 | break; | 239 | break; |
235 | case EVENT_UAP_BSS_ACTIVE: | 240 | case EVENT_UAP_BSS_ACTIVE: |