summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/main.c
diff options
context:
space:
mode:
authorYair Shapira <yair.shapira@ti.com>2013-09-17 18:41:21 +0300
committerLuciano Coelho <luciano.coelho@intel.com>2013-09-30 21:12:18 +0300
commitdd491ffbaad83ccd6c99851a3c2d4b1ed75211fc (patch)
tree49851cdc90eecaf04806043d2ceaacc129180dd9 /drivers/net/wireless/ti/wlcore/main.c
parent187e52cc3c9f5ee64136f8b5c4edcb4cf94693e7 (diff)
wlcore: add new plt power-mode: CHIP_AWAKE
Under this mode the chip is powered on including sdio but no FW is downloaded and run, interrupts are not enabled, etc... This mode is intended to allow RTTT to bridge sdio as a transport to the chip. Driver only provides sdio access using the dev_mem debugfs file. Some fixes done to the code that ensures that PLT mode and normal driver power mode (ifconfig/add_interface) are mutually excluded. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/main.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 3c7b8a4e74d1..7a1a435fa625 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1062,7 +1062,8 @@ int wl1271_plt_start(struct wl1271 *wl, const enum plt_mode plt_mode)
static const char* const PLT_MODE[] = {
"PLT_OFF",
"PLT_ON",
- "PLT_FEM_DETECT"
+ "PLT_FEM_DETECT",
+ "PLT_CHIP_AWAKE"
};
int ret;
@@ -1088,9 +1089,11 @@ int wl1271_plt_start(struct wl1271 *wl, const enum plt_mode plt_mode)
if (ret < 0)
goto power_off;
- ret = wl->ops->plt_init(wl);
- if (ret < 0)
- goto power_off;
+ if (plt_mode != PLT_CHIP_AWAKE) {
+ ret = wl->ops->plt_init(wl);
+ if (ret < 0)
+ goto power_off;
+ }
wl->state = WLCORE_STATE_ON;
wl1271_notice("firmware booted in PLT mode %s (%s)",
@@ -2419,6 +2422,11 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
int ret = 0;
u8 role_type;
+ if (wl->plt) {
+ wl1271_error("Adding Interface not allowed while in PLT mode");
+ return -EBUSY;
+ }
+
vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER |
IEEE80211_VIF_SUPPORTS_CQM_RSSI;