wl12xx: Enable beacon early termination in 2.4GHz band only
authorShahar Levi <shahar_levi@ti.com>
Mon, 16 May 2011 12:35:30 +0000 (15:35 +0300)
committerLuciano Coelho <coelho@ti.com>
Mon, 27 Jun 2011 07:15:51 +0000 (10:15 +0300)
Beacon early termination doesn't help much in the 5GHz band and masks
channel switch IE Beacons.  Thus, change the code to use BET only in
2.4GHz.

[Reworded the commit log slightly -- Luca.]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/wl12xx/event.c
drivers/net/wireless/wl12xx/ps.c

index 0c60ffea414de34c26de78c954be28e66dc04c18..a16dee58a6647678dbf6a1bbbee4a0dc30c927b1 100644 (file)
@@ -133,10 +133,13 @@ static int wl1271_event_ps_report(struct wl1271 *wl,
                if (ret < 0)
                        break;
 
-               /* enable beacon early termination */
-               ret = wl1271_acx_bet_enable(wl, true);
-               if (ret < 0)
-                       break;
+               /*
+                * BET has only a minor effect in 5GHz and masks
+                * channel switch IEs, so we only enable BET on 2.4GHz
+               */
+               if (wl->band == IEEE80211_BAND_2GHZ)
+                       /* enable beacon early termination */
+                       ret = wl1271_acx_bet_enable(wl, true);
 
                if (wl->ps_compl) {
                        complete(wl->ps_compl);
index b59b67711a177ea6ca1160d5789a9efc62144ebe..d3e377d7fe62fa7ce0cc586c12be6063d6abd0dd 100644 (file)
@@ -169,9 +169,11 @@ int wl1271_ps_set_mode(struct wl1271 *wl, enum wl1271_cmd_ps_mode mode,
                wl1271_debug(DEBUG_PSM, "leaving psm");
 
                /* disable beacon early termination */
-               ret = wl1271_acx_bet_enable(wl, false);
-               if (ret < 0)
-                       return ret;
+               if (wl->band == IEEE80211_BAND_2GHZ) {
+                       ret = wl1271_acx_bet_enable(wl, false);
+                       if (ret < 0)
+                               return ret;
+               }
 
                /* disable beacon filtering */
                ret = wl1271_acx_beacon_filter_opt(wl, false);