diff options
author | Arik Nemtsov <arik@wizery.com> | 2011-08-25 05:43:17 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-09-14 06:15:19 -0400 |
commit | f1acea9a9d48174f982e14a7a488b208d39d825f (patch) | |
tree | f585625badfb454d7377cd41653f6b93b0c78657 /drivers | |
parent | f4d3b6ab5e78fbdf3c27123cc29c44ff3d626c59 (diff) |
wl12xx: AP mode - clean BA and queue state in tx_reset
Reset the BA state of all connected stations and explicitly clear the
Tx queues. The latter is needed for clearing dummy packets from
tx_queue_count.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.h | 3 |
3 files changed, 14 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 1127a3ee36e3..45cd10ab3aac 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -3757,11 +3757,14 @@ static int wl1271_allocate_sta(struct wl1271 *wl, | |||
3757 | return 0; | 3757 | return 0; |
3758 | } | 3758 | } |
3759 | 3759 | ||
3760 | static void wl1271_free_sta(struct wl1271 *wl, u8 hlid) | 3760 | void wl1271_free_sta(struct wl1271 *wl, u8 hlid) |
3761 | { | 3761 | { |
3762 | int id = hlid - WL1271_AP_STA_HLID_START; | 3762 | int id = hlid - WL1271_AP_STA_HLID_START; |
3763 | 3763 | ||
3764 | if (WARN_ON(!test_bit(id, wl->ap_hlid_map))) | 3764 | if (hlid < WL1271_AP_STA_HLID_START) |
3765 | return; | ||
3766 | |||
3767 | if (!test_bit(id, wl->ap_hlid_map)) | ||
3765 | return; | 3768 | return; |
3766 | 3769 | ||
3767 | clear_bit(id, wl->ap_hlid_map); | 3770 | clear_bit(id, wl->ap_hlid_map); |
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 2bf31302b975..9d4157ce0950 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -891,6 +891,7 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues) | |||
891 | /* TX failure */ | 891 | /* TX failure */ |
892 | if (wl->bss_type == BSS_TYPE_AP_BSS) { | 892 | if (wl->bss_type == BSS_TYPE_AP_BSS) { |
893 | for (i = 0; i < AP_MAX_LINKS; i++) { | 893 | for (i = 0; i < AP_MAX_LINKS; i++) { |
894 | wl1271_free_sta(wl, i); | ||
894 | wl1271_tx_reset_link_queues(wl, i); | 895 | wl1271_tx_reset_link_queues(wl, i); |
895 | wl->links[i].allocated_pkts = 0; | 896 | wl->links[i].allocated_pkts = 0; |
896 | wl->links[i].prev_freed_pkts = 0; | 897 | wl->links[i].prev_freed_pkts = 0; |
@@ -910,10 +911,14 @@ void wl1271_tx_reset(struct wl1271 *wl, bool reset_tx_queues) | |||
910 | ieee80211_tx_status_ni(wl->hw, skb); | 911 | ieee80211_tx_status_ni(wl->hw, skb); |
911 | } | 912 | } |
912 | } | 913 | } |
913 | wl->tx_queue_count[i] = 0; | ||
914 | } | 914 | } |
915 | |||
916 | wl->ba_rx_bitmap = 0; | ||
915 | } | 917 | } |
916 | 918 | ||
919 | for (i = 0; i < NUM_TX_QUEUES; i++) | ||
920 | wl->tx_queue_count[i] = 0; | ||
921 | |||
917 | wl->stopped_queues_map = 0; | 922 | wl->stopped_queues_map = 0; |
918 | 923 | ||
919 | /* | 924 | /* |
diff --git a/drivers/net/wireless/wl12xx/tx.h b/drivers/net/wireless/wl12xx/tx.h index 5c0fbbe5b42f..d6fdbf904a09 100644 --- a/drivers/net/wireless/wl12xx/tx.h +++ b/drivers/net/wireless/wl12xx/tx.h | |||
@@ -216,4 +216,7 @@ void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid); | |||
216 | void wl1271_handle_tx_low_watermark(struct wl1271 *wl); | 216 | void wl1271_handle_tx_low_watermark(struct wl1271 *wl); |
217 | bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb); | 217 | bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb); |
218 | 218 | ||
219 | /* from main.c */ | ||
220 | void wl1271_free_sta(struct wl1271 *wl, u8 hlid); | ||
221 | |||
219 | #endif | 222 | #endif |