aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl1251/main.c
diff options
context:
space:
mode:
authorJarkko Nikula <jhnikula@gmail.com>2011-04-04 04:04:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 15:34:14 -0400
commita0bbb58bcb70295ff05f870c93d34f9fbe614204 (patch)
tree63eaefe05ef883aef37a4b6ecd121ae0ec9f0471 /drivers/net/wireless/wl1251/main.c
parentffbd308dce898a857de76d17cc05748505cf4ece (diff)
wl1251: Prepare for idle mode support
RFC for WL1251 idle mode support brought a few issues that are worth to update before adding the idle mode support. Since the idle mode can reuse the code that is now used in Power Save Mode (PSM), the flag psm in struct wl1251 is changed to variable station_mode to be able to distinguish between PSM and idle modes. As the station mode is different than the power power save mode command that is sent to chip, the enum wl1251_cmd_ps_mod values are used only when communicating with the chip and new enum wl1251_station_mode values are used inside the driver. Confusing comment about psm and elp relation is removed since the PSM is actually activated by putting the chip into Entreme Low Power (ELP) mode. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Kalle Valo <kvalo@adurom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl1251/main.c')
-rw-r--r--drivers/net/wireless/wl1251/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl1251/main.c b/drivers/net/wireless/wl1251/main.c
index 12c9e635a6d6..04a054915dbe 100644
--- a/drivers/net/wireless/wl1251/main.c
+++ b/drivers/net/wireless/wl1251/main.c
@@ -497,7 +497,7 @@ static void wl1251_op_stop(struct ieee80211_hw *hw)
497 wl->rx_last_id = 0; 497 wl->rx_last_id = 0;
498 wl->next_tx_complete = 0; 498 wl->next_tx_complete = 0;
499 wl->elp = false; 499 wl->elp = false;
500 wl->psm = 0; 500 wl->station_mode = STATION_ACTIVE_MODE;
501 wl->tx_queue_stopped = false; 501 wl->tx_queue_stopped = false;
502 wl->power_level = WL1251_DEFAULT_POWER_LEVEL; 502 wl->power_level = WL1251_DEFAULT_POWER_LEVEL;
503 wl->rssi_thold = 0; 503 wl->rssi_thold = 0;
@@ -632,7 +632,7 @@ static int wl1251_op_config(struct ieee80211_hw *hw, u32 changed)
632 632
633 wl->psm_requested = false; 633 wl->psm_requested = false;
634 634
635 if (wl->psm) { 635 if (wl->station_mode != STATION_ACTIVE_MODE) {
636 ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE); 636 ret = wl1251_ps_set_mode(wl, STATION_ACTIVE_MODE);
637 if (ret < 0) 637 if (ret < 0)
638 goto out_sleep; 638 goto out_sleep;
@@ -1384,7 +1384,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void)
1384 wl->rx_config = WL1251_DEFAULT_RX_CONFIG; 1384 wl->rx_config = WL1251_DEFAULT_RX_CONFIG;
1385 wl->rx_filter = WL1251_DEFAULT_RX_FILTER; 1385 wl->rx_filter = WL1251_DEFAULT_RX_FILTER;
1386 wl->elp = false; 1386 wl->elp = false;
1387 wl->psm = 0; 1387 wl->station_mode = STATION_ACTIVE_MODE;
1388 wl->psm_requested = false; 1388 wl->psm_requested = false;
1389 wl->tx_queue_stopped = false; 1389 wl->tx_queue_stopped = false;
1390 wl->power_level = WL1251_DEFAULT_POWER_LEVEL; 1390 wl->power_level = WL1251_DEFAULT_POWER_LEVEL;