diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-09-25 17:24:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-07 16:39:36 -0400 |
commit | 78f5fb7fc6c2c668a12fd6892c18baa20e4ffd27 (patch) | |
tree | 50ad00e040b791711926b43d5da466bfa71a0bbe | |
parent | d8c07e7a84950b5fdef424c6dabe6bed3a9ffa19 (diff) |
iwlwifi: support idle for 6000 series hw
Using powersave while idle saves a lot of power, but
we've had problems with this on some cards (5150 has
been reported to be problematic). However, on the new
6000 series we're seeing no problems, so for now let
that hardware benefit from idle mode, we can look at
the problems with other hardware one by one and then
enable those once we figure out the problems.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-power.c | 3 |
4 files changed, 16 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index ad5d77c96494..6f4ee27e07c9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -254,6 +254,7 @@ struct iwl_cfg iwl6000h_2agn_cfg = { | |||
254 | .led_compensation = 51, | 254 | .led_compensation = 51, |
255 | .use_rts_for_ht = true, /* use rts/cts protection */ | 255 | .use_rts_for_ht = true, /* use rts/cts protection */ |
256 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 256 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
257 | .supports_idle = true, | ||
257 | }; | 258 | }; |
258 | 259 | ||
259 | struct iwl_cfg iwl6000h_2abg_cfg = { | 260 | struct iwl_cfg iwl6000h_2abg_cfg = { |
@@ -276,6 +277,7 @@ struct iwl_cfg iwl6000h_2abg_cfg = { | |||
276 | .ht_greenfield_support = true, | 277 | .ht_greenfield_support = true, |
277 | .led_compensation = 51, | 278 | .led_compensation = 51, |
278 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 279 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
280 | .supports_idle = true, | ||
279 | }; | 281 | }; |
280 | 282 | ||
281 | struct iwl_cfg iwl6000h_2bg_cfg = { | 283 | struct iwl_cfg iwl6000h_2bg_cfg = { |
@@ -298,6 +300,7 @@ struct iwl_cfg iwl6000h_2bg_cfg = { | |||
298 | .ht_greenfield_support = true, | 300 | .ht_greenfield_support = true, |
299 | .led_compensation = 51, | 301 | .led_compensation = 51, |
300 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 302 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
303 | .supports_idle = true, | ||
301 | }; | 304 | }; |
302 | 305 | ||
303 | /* | 306 | /* |
@@ -324,6 +327,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = { | |||
324 | .led_compensation = 51, | 327 | .led_compensation = 51, |
325 | .use_rts_for_ht = true, /* use rts/cts protection */ | 328 | .use_rts_for_ht = true, /* use rts/cts protection */ |
326 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 329 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
330 | .supports_idle = true, | ||
327 | }; | 331 | }; |
328 | 332 | ||
329 | struct iwl_cfg iwl6000i_2abg_cfg = { | 333 | struct iwl_cfg iwl6000i_2abg_cfg = { |
@@ -346,6 +350,7 @@ struct iwl_cfg iwl6000i_2abg_cfg = { | |||
346 | .ht_greenfield_support = true, | 350 | .ht_greenfield_support = true, |
347 | .led_compensation = 51, | 351 | .led_compensation = 51, |
348 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 352 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
353 | .supports_idle = true, | ||
349 | }; | 354 | }; |
350 | 355 | ||
351 | struct iwl_cfg iwl6000i_2bg_cfg = { | 356 | struct iwl_cfg iwl6000i_2bg_cfg = { |
@@ -368,6 +373,7 @@ struct iwl_cfg iwl6000i_2bg_cfg = { | |||
368 | .ht_greenfield_support = true, | 373 | .ht_greenfield_support = true, |
369 | .led_compensation = 51, | 374 | .led_compensation = 51, |
370 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 375 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
376 | .supports_idle = true, | ||
371 | }; | 377 | }; |
372 | 378 | ||
373 | struct iwl_cfg iwl6050_2agn_cfg = { | 379 | struct iwl_cfg iwl6050_2agn_cfg = { |
@@ -391,6 +397,7 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
391 | .led_compensation = 51, | 397 | .led_compensation = 51, |
392 | .use_rts_for_ht = true, /* use rts/cts protection */ | 398 | .use_rts_for_ht = true, /* use rts/cts protection */ |
393 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 399 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
400 | .supports_idle = true, | ||
394 | }; | 401 | }; |
395 | 402 | ||
396 | struct iwl_cfg iwl6050_2abg_cfg = { | 403 | struct iwl_cfg iwl6050_2abg_cfg = { |
@@ -413,6 +420,7 @@ struct iwl_cfg iwl6050_2abg_cfg = { | |||
413 | .ht_greenfield_support = true, | 420 | .ht_greenfield_support = true, |
414 | .led_compensation = 51, | 421 | .led_compensation = 51, |
415 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 422 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
423 | .supports_idle = true, | ||
416 | }; | 424 | }; |
417 | 425 | ||
418 | struct iwl_cfg iwl6000_3agn_cfg = { | 426 | struct iwl_cfg iwl6000_3agn_cfg = { |
@@ -436,6 +444,7 @@ struct iwl_cfg iwl6000_3agn_cfg = { | |||
436 | .led_compensation = 51, | 444 | .led_compensation = 51, |
437 | .use_rts_for_ht = true, /* use rts/cts protection */ | 445 | .use_rts_for_ht = true, /* use rts/cts protection */ |
438 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 446 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
447 | .supports_idle = true, | ||
439 | }; | 448 | }; |
440 | 449 | ||
441 | struct iwl_cfg iwl6050_3agn_cfg = { | 450 | struct iwl_cfg iwl6050_3agn_cfg = { |
@@ -459,6 +468,7 @@ struct iwl_cfg iwl6050_3agn_cfg = { | |||
459 | .led_compensation = 51, | 468 | .led_compensation = 51, |
460 | .use_rts_for_ht = true, /* use rts/cts protection */ | 469 | .use_rts_for_ht = true, /* use rts/cts protection */ |
461 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 470 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
471 | .supports_idle = true, | ||
462 | }; | 472 | }; |
463 | 473 | ||
464 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 474 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index e97b104ba1d5..1cf2e04fe3f9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -2650,7 +2650,8 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2650 | iwl_set_rate(priv); | 2650 | iwl_set_rate(priv); |
2651 | } | 2651 | } |
2652 | 2652 | ||
2653 | if (changed & IEEE80211_CONF_CHANGE_PS) { | 2653 | if (changed & (IEEE80211_CONF_CHANGE_PS | |
2654 | IEEE80211_CONF_CHANGE_IDLE)) { | ||
2654 | ret = iwl_power_update_mode(priv, false); | 2655 | ret = iwl_power_update_mode(priv, false); |
2655 | if (ret) | 2656 | if (ret) |
2656 | IWL_DEBUG_MAC80211(priv, "Error setting sleep level\n"); | 2657 | IWL_DEBUG_MAC80211(priv, "Error setting sleep level\n"); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index b66bf7b4b0a4..744f0cac6859 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -265,6 +265,7 @@ struct iwl_cfg { | |||
265 | const bool broken_powersave; | 265 | const bool broken_powersave; |
266 | bool use_rts_for_ht; | 266 | bool use_rts_for_ht; |
267 | int chain_noise_num_beacons; | 267 | int chain_noise_num_beacons; |
268 | const bool supports_idle; | ||
268 | }; | 269 | }; |
269 | 270 | ||
270 | /*************************** | 271 | /*************************** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 60be976afff8..e50d77bd7aad 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -294,6 +294,9 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) | |||
294 | 294 | ||
295 | if (priv->cfg->broken_powersave) | 295 | if (priv->cfg->broken_powersave) |
296 | iwl_power_sleep_cam_cmd(priv, &cmd); | 296 | iwl_power_sleep_cam_cmd(priv, &cmd); |
297 | else if (priv->cfg->supports_idle && | ||
298 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) | ||
299 | iwl_static_sleep_cmd(priv, &cmd, IWL_POWER_INDEX_5, 20); | ||
297 | else if (tt->state >= IWL_TI_1) | 300 | else if (tt->state >= IWL_TI_1) |
298 | iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper); | 301 | iwl_static_sleep_cmd(priv, &cmd, tt->tt_power_mode, dtimper); |
299 | else if (!enabled) | 302 | else if (!enabled) |