aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-05-24 04:18:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-02 16:13:33 -0400
commitdb81956cc4a6780e9aeb1e85993096e67dcb0cd3 (patch)
treed36053164b01339922bfe72d4ca4e99f53e1d154 /drivers/net/wireless/wl12xx
parent43163f0f8a11822607c36249c6f55f0613e0d73d (diff)
wl1271: Prevent dropping of TX frames in joins
The wl1271 uses a session counter in CMD_JOIN and TX frame descriptors. This counter is used to determine which frames to drop when the CMD_JOIN is executed. The driver executes CMD_JOIN multiple times upon association and sometimes disassociation, and we don't want any frames to get lost. Fix this by incrementing the session counter only when leaving idle (not every CMD_JOIN as before.) Also, remove the TX flush flag from the CMD_JOIN options. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_cmd.c6
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c5
2 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_cmd.c b/drivers/net/wireless/wl12xx/wl1271_cmd.c
index d7bcce887c41..05b6d8a4aea2 100644
--- a/drivers/net/wireless/wl12xx/wl1271_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1271_cmd.c
@@ -336,12 +336,6 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type)
336 join->channel = wl->channel; 336 join->channel = wl->channel;
337 join->ssid_len = wl->ssid_len; 337 join->ssid_len = wl->ssid_len;
338 memcpy(join->ssid, wl->ssid, wl->ssid_len); 338 memcpy(join->ssid, wl->ssid, wl->ssid_len);
339 join->ctrl = WL1271_JOIN_CMD_CTRL_TX_FLUSH;
340
341 /* increment the session counter */
342 wl->session_counter++;
343 if (wl->session_counter >= SESSION_COUNTER_MAX)
344 wl->session_counter = 0;
345 339
346 join->ctrl |= wl->session_counter << WL1271_JOIN_CMD_TX_SESSION_OFFSET; 340 join->ctrl |= wl->session_counter << WL1271_JOIN_CMD_TX_SESSION_OFFSET;
347 341
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 032cb5de908c..108a3e2a58fd 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1135,6 +1135,11 @@ static int wl1271_dummy_join(struct wl1271 *wl)
1135 1135
1136 memcpy(wl->bssid, dummy_bssid, ETH_ALEN); 1136 memcpy(wl->bssid, dummy_bssid, ETH_ALEN);
1137 1137
1138 /* increment the session counter */
1139 wl->session_counter++;
1140 if (wl->session_counter >= SESSION_COUNTER_MAX)
1141 wl->session_counter = 0;
1142
1138 /* pass through frames from all BSS */ 1143 /* pass through frames from all BSS */
1139 wl1271_configure_filters(wl, FIF_OTHER_BSS); 1144 wl1271_configure_filters(wl, FIF_OTHER_BSS);
1140 1145