diff options
author | Luciano Coelho <coelho@ti.com> | 2011-11-30 08:07:20 -0500 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-04-12 01:43:58 -0400 |
commit | 441101f67818cf5aaba7081fb05c8604a55c0949 (patch) | |
tree | 7eaf3168babf87a4529b6e9ca5c3e930f43e3f12 /drivers/net/wireless/ti | |
parent | 4263c5f27c0403ad750c4f2509e5396e630b6e6e (diff) |
wlcore: add quirk to disable ELP
ELP is a very complicated process in the firmware. Due to its
complexity, in some early firmware revisions, the ELP feature is
disabled. To support this cases, this patch adds a quirk that
disables ELP mode.
When ELP is not supported, do not attempt to enter ELP when requested by
the driver.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/boot.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/init.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/ps.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore.h | 3 |
4 files changed, 17 insertions, 9 deletions
diff --git a/drivers/net/wireless/ti/wlcore/boot.c b/drivers/net/wireless/ti/wlcore/boot.c index 3cb75db39b9e..2aae201f776d 100644 --- a/drivers/net/wireless/ti/wlcore/boot.c +++ b/drivers/net/wireless/ti/wlcore/boot.c | |||
@@ -408,11 +408,6 @@ int wlcore_boot_run_firmware(struct wl1271 *wl) | |||
408 | wl1271_debug(DEBUG_MAILBOX, "MBOX ptrs: 0x%x 0x%x", | 408 | wl1271_debug(DEBUG_MAILBOX, "MBOX ptrs: 0x%x 0x%x", |
409 | wl->mbox_ptr[0], wl->mbox_ptr[1]); | 409 | wl->mbox_ptr[0], wl->mbox_ptr[1]); |
410 | 410 | ||
411 | /* | ||
412 | * TODO: wl12xx used to set the partition here, but it seems | ||
413 | * that it can be done later. Make sure this is okay. | ||
414 | */ | ||
415 | |||
416 | wl1271_boot_fw_version(wl); | 411 | wl1271_boot_fw_version(wl); |
417 | 412 | ||
418 | /* | 413 | /* |
diff --git a/drivers/net/wireless/ti/wlcore/init.c b/drivers/net/wireless/ti/wlcore/init.c index c146d8ed3054..d8c22351a73e 100644 --- a/drivers/net/wireless/ti/wlcore/init.c +++ b/drivers/net/wireless/ti/wlcore/init.c | |||
@@ -581,10 +581,17 @@ int wl1271_init_vif_specific(struct wl1271 *wl, struct ieee80211_vif *vif) | |||
581 | if (ret < 0) | 581 | if (ret < 0) |
582 | return ret; | 582 | return ret; |
583 | } else if (!wl->sta_count) { | 583 | } else if (!wl->sta_count) { |
584 | /* Configure for ELP power saving */ | 584 | if (wl->quirks & WLCORE_QUIRK_NO_ELP) { |
585 | ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_ELP); | 585 | /* Configure for power always on */ |
586 | if (ret < 0) | 586 | ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_CAM); |
587 | return ret; | 587 | if (ret < 0) |
588 | return ret; | ||
589 | } else { | ||
590 | /* Configure for ELP power saving */ | ||
591 | ret = wl1271_acx_sleep_auth(wl, WL1271_PSM_ELP); | ||
592 | if (ret < 0) | ||
593 | return ret; | ||
594 | } | ||
588 | } | 595 | } |
589 | } | 596 | } |
590 | 597 | ||
diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c index cfeb114843ee..756eee2257b4 100644 --- a/drivers/net/wireless/ti/wlcore/ps.c +++ b/drivers/net/wireless/ti/wlcore/ps.c | |||
@@ -73,6 +73,9 @@ void wl1271_ps_elp_sleep(struct wl1271 *wl) | |||
73 | { | 73 | { |
74 | struct wl12xx_vif *wlvif; | 74 | struct wl12xx_vif *wlvif; |
75 | 75 | ||
76 | if (wl->quirks & WLCORE_QUIRK_NO_ELP) | ||
77 | return; | ||
78 | |||
76 | /* we shouldn't get consecutive sleep requests */ | 79 | /* we shouldn't get consecutive sleep requests */ |
77 | if (WARN_ON(test_and_set_bit(WL1271_FLAG_ELP_REQUESTED, &wl->flags))) | 80 | if (WARN_ON(test_and_set_bit(WL1271_FLAG_ELP_REQUESTED, &wl->flags))) |
78 | return; | 81 | return; |
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index 984dda731344..66c33b8c0119 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h | |||
@@ -324,6 +324,9 @@ int wlcore_free_hw(struct wl1271 *wl); | |||
324 | /* Older firmwares use an old NVS format */ | 324 | /* Older firmwares use an old NVS format */ |
325 | #define WLCORE_QUIRK_LEGACY_NVS BIT(5) | 325 | #define WLCORE_QUIRK_LEGACY_NVS BIT(5) |
326 | 326 | ||
327 | /* Some firmwares may not support ELP */ | ||
328 | #define WLCORE_QUIRK_NO_ELP BIT(6) | ||
329 | |||
327 | /* TODO: move to the lower drivers when all usages are abstracted */ | 330 | /* TODO: move to the lower drivers when all usages are abstracted */ |
328 | #define CHIP_ID_1271_PG10 (0x4030101) | 331 | #define CHIP_ID_1271_PG10 (0x4030101) |
329 | #define CHIP_ID_1271_PG20 (0x4030111) | 332 | #define CHIP_ID_1271_PG20 (0x4030111) |