wl1271: Prevent dropping of TX frames in joins
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>
Mon, 24 May 2010 08:18:15 +0000 (11:18 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jun 2010 20:13:33 +0000 (16:13 -0400)
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>
drivers/net/wireless/wl12xx/wl1271_cmd.c
drivers/net/wireless/wl12xx/wl1271_main.c

index d7bcce887c4138a604f734dc0ed21367e1dfef34..05b6d8a4aea298702c079392bf842cfceeef098d 100644 (file)
@@ -336,12 +336,6 @@ int wl1271_cmd_join(struct wl1271 *wl, u8 bss_type)
        join->channel = wl->channel;
        join->ssid_len = wl->ssid_len;
        memcpy(join->ssid, wl->ssid, wl->ssid_len);
-       join->ctrl = WL1271_JOIN_CMD_CTRL_TX_FLUSH;
-
-       /* increment the session counter */
-       wl->session_counter++;
-       if (wl->session_counter >= SESSION_COUNTER_MAX)
-               wl->session_counter = 0;
 
        join->ctrl |= wl->session_counter << WL1271_JOIN_CMD_TX_SESSION_OFFSET;
 
index 032cb5de908cbdebcf7048fcd0fec89b1fbe9c04..108a3e2a58fd57bd1f57afdfe2bbfea05bc7c6ad 100644 (file)
@@ -1135,6 +1135,11 @@ static int wl1271_dummy_join(struct wl1271 *wl)
 
        memcpy(wl->bssid, dummy_bssid, ETH_ALEN);
 
+       /* increment the session counter */
+       wl->session_counter++;
+       if (wl->session_counter >= SESSION_COUNTER_MAX)
+               wl->session_counter = 0;
+
        /* pass through frames from all BSS */
        wl1271_configure_filters(wl, FIF_OTHER_BSS);
 
This page took 0.028868 seconds and 5 git commands to generate.