diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-11-20 15:04:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-23 17:05:32 -0500 |
commit | c15d20c1d19616f73b6fee4befd254d0c37b4d87 (patch) | |
tree | b16523ddd960392e3aab3e01241e4d222fb7c7a1 | |
parent | d5f4cf71f7b70e13f96cc8aac65b390707d5d80b (diff) |
iwlwifi: set sm_ps_mode as part of cfg parameters
Setting "Spatial multiplexing Power Save" as part of
per device configuration parameter.
Report to uCode based on priv->conf setting, so driver can
have more control of how different devices should operate
in power save mode.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
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-1000.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-4965.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 45 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 1 |
8 files changed, 30 insertions, 34 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 8f82537045bf..8414178bcff4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -173,6 +173,7 @@ struct iwl_cfg iwl1000_bgn_cfg = { | |||
173 | .use_rts_for_ht = true, /* use rts/cts protection */ | 173 | .use_rts_for_ht = true, /* use rts/cts protection */ |
174 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 174 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
175 | .support_ct_kill_exit = true, | 175 | .support_ct_kill_exit = true, |
176 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
176 | }; | 177 | }; |
177 | 178 | ||
178 | struct iwl_cfg iwl1000_bg_cfg = { | 179 | struct iwl_cfg iwl1000_bg_cfg = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 1e58c49dd768..d1fab4e19204 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -2238,6 +2238,7 @@ struct iwl_cfg iwl4965_agn_cfg = { | |||
2238 | .broken_powersave = true, | 2238 | .broken_powersave = true, |
2239 | .led_compensation = 61, | 2239 | .led_compensation = 61, |
2240 | .chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS, | 2240 | .chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS, |
2241 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
2241 | }; | 2242 | }; |
2242 | 2243 | ||
2243 | /* Module firmware */ | 2244 | /* Module firmware */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 570eaa08531f..90c7b897736d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -1597,6 +1597,7 @@ struct iwl_cfg iwl5300_agn_cfg = { | |||
1597 | .ht_greenfield_support = true, | 1597 | .ht_greenfield_support = true, |
1598 | .led_compensation = 51, | 1598 | .led_compensation = 51, |
1599 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1599 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1600 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1600 | }; | 1601 | }; |
1601 | 1602 | ||
1602 | struct iwl_cfg iwl5100_bg_cfg = { | 1603 | struct iwl_cfg iwl5100_bg_cfg = { |
@@ -1666,6 +1667,7 @@ struct iwl_cfg iwl5100_agn_cfg = { | |||
1666 | .ht_greenfield_support = true, | 1667 | .ht_greenfield_support = true, |
1667 | .led_compensation = 51, | 1668 | .led_compensation = 51, |
1668 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1669 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1670 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1669 | }; | 1671 | }; |
1670 | 1672 | ||
1671 | struct iwl_cfg iwl5350_agn_cfg = { | 1673 | struct iwl_cfg iwl5350_agn_cfg = { |
@@ -1689,6 +1691,7 @@ struct iwl_cfg iwl5350_agn_cfg = { | |||
1689 | .ht_greenfield_support = true, | 1691 | .ht_greenfield_support = true, |
1690 | .led_compensation = 51, | 1692 | .led_compensation = 51, |
1691 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1693 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1694 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1692 | }; | 1695 | }; |
1693 | 1696 | ||
1694 | struct iwl_cfg iwl5150_agn_cfg = { | 1697 | struct iwl_cfg iwl5150_agn_cfg = { |
@@ -1712,6 +1715,7 @@ struct iwl_cfg iwl5150_agn_cfg = { | |||
1712 | .ht_greenfield_support = true, | 1715 | .ht_greenfield_support = true, |
1713 | .led_compensation = 51, | 1716 | .led_compensation = 51, |
1714 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 1717 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
1718 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
1715 | }; | 1719 | }; |
1716 | 1720 | ||
1717 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); | 1721 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 4ab9897f4fe1..74e571049273 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -306,6 +306,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = { | |||
306 | .supports_idle = true, | 306 | .supports_idle = true, |
307 | .adv_thermal_throttle = true, | 307 | .adv_thermal_throttle = true, |
308 | .support_ct_kill_exit = true, | 308 | .support_ct_kill_exit = true, |
309 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
309 | }; | 310 | }; |
310 | 311 | ||
311 | struct iwl_cfg iwl6000i_2abg_cfg = { | 312 | struct iwl_cfg iwl6000i_2abg_cfg = { |
@@ -394,7 +395,7 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
394 | .supports_idle = true, | 395 | .supports_idle = true, |
395 | .adv_thermal_throttle = true, | 396 | .adv_thermal_throttle = true, |
396 | .support_ct_kill_exit = true, | 397 | .support_ct_kill_exit = true, |
397 | .support_sm_ps = true, | 398 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DYNAMIC, |
398 | }; | 399 | }; |
399 | 400 | ||
400 | struct iwl_cfg iwl6050_2abg_cfg = { | 401 | struct iwl_cfg iwl6050_2abg_cfg = { |
@@ -454,6 +455,7 @@ struct iwl_cfg iwl6000_3agn_cfg = { | |||
454 | .supports_idle = true, | 455 | .supports_idle = true, |
455 | .adv_thermal_throttle = true, | 456 | .adv_thermal_throttle = true, |
456 | .support_ct_kill_exit = true, | 457 | .support_ct_kill_exit = true, |
458 | .sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED, | ||
457 | }; | 459 | }; |
458 | 460 | ||
459 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 461 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c41ec5e258b1..7301aa73ab7e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3135,10 +3135,6 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
3135 | priv->band = IEEE80211_BAND_2GHZ; | 3135 | priv->band = IEEE80211_BAND_2GHZ; |
3136 | 3136 | ||
3137 | priv->iw_mode = NL80211_IFTYPE_STATION; | 3137 | priv->iw_mode = NL80211_IFTYPE_STATION; |
3138 | if (priv->cfg->support_sm_ps) | ||
3139 | priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DYNAMIC; | ||
3140 | else | ||
3141 | priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED; | ||
3142 | 3138 | ||
3143 | /* Choose which receivers/antennas to use */ | 3139 | /* Choose which receivers/antennas to use */ |
3144 | if (priv->cfg->ops->hcmd->set_rxon_chain) | 3140 | if (priv->cfg->ops->hcmd->set_rxon_chain) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 7ac6b369890a..dbe41cf8943c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -449,13 +449,8 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv, | |||
449 | if (priv->cfg->ht_greenfield_support) | 449 | if (priv->cfg->ht_greenfield_support) |
450 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; | 450 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; |
451 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; | 451 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; |
452 | if (priv->cfg->support_sm_ps) | 452 | ht_info->cap |= (IEEE80211_HT_CAP_SM_PS & |
453 | ht_info->cap |= (IEEE80211_HT_CAP_SM_PS & | 453 | (priv->cfg->sm_ps_mode << 2)); |
454 | (WLAN_HT_CAP_SM_PS_DYNAMIC << 2)); | ||
455 | else | ||
456 | ht_info->cap |= (IEEE80211_HT_CAP_SM_PS & | ||
457 | (WLAN_HT_CAP_SM_PS_DISABLED << 2)); | ||
458 | |||
459 | max_bit_rate = MAX_BIT_RATE_20_MHZ; | 454 | max_bit_rate = MAX_BIT_RATE_20_MHZ; |
460 | if (priv->hw_params.ht40_channel & BIT(band)) { | 455 | if (priv->hw_params.ht40_channel & BIT(band)) { |
461 | ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 456 | ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
@@ -1010,25 +1005,23 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) | |||
1010 | int idle_cnt = active_cnt; | 1005 | int idle_cnt = active_cnt; |
1011 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); | 1006 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); |
1012 | 1007 | ||
1013 | if (priv->cfg->support_sm_ps) { | 1008 | /* # Rx chains when idling and maybe trying to save power */ |
1014 | /* # Rx chains when idling and maybe trying to save power */ | 1009 | switch (priv->cfg->sm_ps_mode) { |
1015 | switch (priv->current_ht_config.sm_ps) { | 1010 | case WLAN_HT_CAP_SM_PS_STATIC: |
1016 | case WLAN_HT_CAP_SM_PS_STATIC: | 1011 | idle_cnt = (is_cam) ? active_cnt : IWL_NUM_IDLE_CHAINS_SINGLE; |
1017 | case WLAN_HT_CAP_SM_PS_DYNAMIC: | 1012 | break; |
1018 | idle_cnt = (is_cam) ? IWL_NUM_IDLE_CHAINS_DUAL : | 1013 | case WLAN_HT_CAP_SM_PS_DYNAMIC: |
1019 | IWL_NUM_IDLE_CHAINS_SINGLE; | 1014 | idle_cnt = (is_cam) ? IWL_NUM_IDLE_CHAINS_DUAL : |
1020 | break; | 1015 | IWL_NUM_IDLE_CHAINS_SINGLE; |
1021 | case WLAN_HT_CAP_SM_PS_DISABLED: | 1016 | break; |
1022 | idle_cnt = (is_cam) ? active_cnt : | 1017 | case WLAN_HT_CAP_SM_PS_DISABLED: |
1023 | IWL_NUM_IDLE_CHAINS_SINGLE; | 1018 | break; |
1024 | break; | 1019 | case WLAN_HT_CAP_SM_PS_INVALID: |
1025 | case WLAN_HT_CAP_SM_PS_INVALID: | 1020 | default: |
1026 | default: | 1021 | IWL_ERR(priv, "invalid sm_ps mode %u\n", |
1027 | IWL_ERR(priv, "invalid sm_ps mode %d\n", | 1022 | priv->cfg->sm_ps_mode); |
1028 | priv->current_ht_config.sm_ps); | 1023 | WARN_ON(1); |
1029 | WARN_ON(1); | 1024 | break; |
1030 | break; | ||
1031 | } | ||
1032 | } | 1025 | } |
1033 | return idle_cnt; | 1026 | return idle_cnt; |
1034 | } | 1027 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index f271663c1d2f..334da64d968d 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -228,7 +228,7 @@ struct iwl_mod_params { | |||
228 | * @chain_noise_num_beacons: number of beacons used to compute chain noise | 228 | * @chain_noise_num_beacons: number of beacons used to compute chain noise |
229 | * @adv_thermal_throttle: support advance thermal throttle | 229 | * @adv_thermal_throttle: support advance thermal throttle |
230 | * @support_ct_kill_exit: support ct kill exit condition | 230 | * @support_ct_kill_exit: support ct kill exit condition |
231 | * @support_sm_ps: support spatial multiplexing power save | 231 | * @sm_ps_mode: spatial multiplexing power save mode |
232 | * @support_wimax_coexist: support wimax/wifi co-exist | 232 | * @support_wimax_coexist: support wimax/wifi co-exist |
233 | * | 233 | * |
234 | * We enable the driver to be backward compatible wrt API version. The | 234 | * We enable the driver to be backward compatible wrt API version. The |
@@ -285,7 +285,7 @@ struct iwl_cfg { | |||
285 | const bool supports_idle; | 285 | const bool supports_idle; |
286 | bool adv_thermal_throttle; | 286 | bool adv_thermal_throttle; |
287 | bool support_ct_kill_exit; | 287 | bool support_ct_kill_exit; |
288 | bool support_sm_ps; | 288 | u8 sm_ps_mode; |
289 | const bool support_wimax_coexist; | 289 | const bool support_wimax_coexist; |
290 | }; | 290 | }; |
291 | 291 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index f1601cfebc29..1c1ed4bfcb08 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -511,7 +511,6 @@ struct iwl_ht_config { | |||
511 | bool is_ht; | 511 | bool is_ht; |
512 | bool is_40mhz; | 512 | bool is_40mhz; |
513 | bool single_chain_sufficient; | 513 | bool single_chain_sufficient; |
514 | u8 sm_ps; | ||
515 | /* BSS related data */ | 514 | /* BSS related data */ |
516 | u8 extension_chan_offset; | 515 | u8 extension_chan_offset; |
517 | u8 ht_protection; | 516 | u8 ht_protection; |