wl1271: Implement beacon early termination support
[linux-2.6.git] / drivers / net / wireless / wl12xx / wl1271_ps.c
index bb8745d9bd64764b066d65ca72eb0f740c12e3f4..507cd91d7eed3418a2c69e57fe98410b23031242 100644 (file)
@@ -130,6 +130,11 @@ int wl1271_ps_set_mode(struct wl1271 *wl, enum wl1271_cmd_ps_mode mode)
                if (ret < 0)
                        return ret;
 
+               /* enable beacon early termination */
+               ret = wl1271_acx_bet_enable(wl, true);
+               if (ret < 0)
+                       return ret;
+
                ret = wl1271_cmd_ps_mode(wl, STATION_POWER_SAVE_MODE);
                if (ret < 0)
                        return ret;
@@ -147,6 +152,11 @@ int wl1271_ps_set_mode(struct wl1271 *wl, enum wl1271_cmd_ps_mode mode)
                if (ret < 0)
                        return ret;
 
+               /* disable beacon early termination */
+               ret = wl1271_acx_bet_enable(wl, false);
+               if (ret < 0)
+                       return ret;
+
                /* disable beacon filtering */
                ret = wl1271_acx_beacon_filter_opt(wl, false);
                if (ret < 0)