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>
This commit is contained in:

committed by
John W. Linville

parent
d5f4cf71f7
commit
c15d20c1d1
@@ -173,6 +173,7 @@ struct iwl_cfg iwl1000_bgn_cfg = {
|
|||||||
.use_rts_for_ht = true, /* use rts/cts protection */
|
.use_rts_for_ht = true, /* use rts/cts protection */
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
.support_ct_kill_exit = true,
|
.support_ct_kill_exit = true,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iwl_cfg iwl1000_bg_cfg = {
|
struct iwl_cfg iwl1000_bg_cfg = {
|
||||||
|
@@ -2238,6 +2238,7 @@ struct iwl_cfg iwl4965_agn_cfg = {
|
|||||||
.broken_powersave = true,
|
.broken_powersave = true,
|
||||||
.led_compensation = 61,
|
.led_compensation = 61,
|
||||||
.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Module firmware */
|
/* Module firmware */
|
||||||
|
@@ -1597,6 +1597,7 @@ struct iwl_cfg iwl5300_agn_cfg = {
|
|||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iwl_cfg iwl5100_bg_cfg = {
|
struct iwl_cfg iwl5100_bg_cfg = {
|
||||||
@@ -1666,6 +1667,7 @@ struct iwl_cfg iwl5100_agn_cfg = {
|
|||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iwl_cfg iwl5350_agn_cfg = {
|
struct iwl_cfg iwl5350_agn_cfg = {
|
||||||
@@ -1689,6 +1691,7 @@ struct iwl_cfg iwl5350_agn_cfg = {
|
|||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iwl_cfg iwl5150_agn_cfg = {
|
struct iwl_cfg iwl5150_agn_cfg = {
|
||||||
@@ -1712,6 +1715,7 @@ struct iwl_cfg iwl5150_agn_cfg = {
|
|||||||
.ht_greenfield_support = true,
|
.ht_greenfield_support = true,
|
||||||
.led_compensation = 51,
|
.led_compensation = 51,
|
||||||
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
.chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX));
|
||||||
|
@@ -306,6 +306,7 @@ struct iwl_cfg iwl6000i_2agn_cfg = {
|
|||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
.support_ct_kill_exit = true,
|
.support_ct_kill_exit = true,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iwl_cfg iwl6000i_2abg_cfg = {
|
struct iwl_cfg iwl6000i_2abg_cfg = {
|
||||||
@@ -394,7 +395,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
|
|||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
.support_ct_kill_exit = true,
|
.support_ct_kill_exit = true,
|
||||||
.support_sm_ps = true,
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DYNAMIC,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iwl_cfg iwl6050_2abg_cfg = {
|
struct iwl_cfg iwl6050_2abg_cfg = {
|
||||||
@@ -454,6 +455,7 @@ struct iwl_cfg iwl6000_3agn_cfg = {
|
|||||||
.supports_idle = true,
|
.supports_idle = true,
|
||||||
.adv_thermal_throttle = true,
|
.adv_thermal_throttle = true,
|
||||||
.support_ct_kill_exit = true,
|
.support_ct_kill_exit = true,
|
||||||
|
.sm_ps_mode = WLAN_HT_CAP_SM_PS_DISABLED,
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
|
MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX));
|
||||||
|
@@ -3135,10 +3135,6 @@ static int iwl_init_drv(struct iwl_priv *priv)
|
|||||||
priv->band = IEEE80211_BAND_2GHZ;
|
priv->band = IEEE80211_BAND_2GHZ;
|
||||||
|
|
||||||
priv->iw_mode = NL80211_IFTYPE_STATION;
|
priv->iw_mode = NL80211_IFTYPE_STATION;
|
||||||
if (priv->cfg->support_sm_ps)
|
|
||||||
priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DYNAMIC;
|
|
||||||
else
|
|
||||||
priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED;
|
|
||||||
|
|
||||||
/* Choose which receivers/antennas to use */
|
/* Choose which receivers/antennas to use */
|
||||||
if (priv->cfg->ops->hcmd->set_rxon_chain)
|
if (priv->cfg->ops->hcmd->set_rxon_chain)
|
||||||
|
@@ -449,13 +449,8 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
|
|||||||
if (priv->cfg->ht_greenfield_support)
|
if (priv->cfg->ht_greenfield_support)
|
||||||
ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
|
ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD;
|
||||||
ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
|
ht_info->cap |= IEEE80211_HT_CAP_SGI_20;
|
||||||
if (priv->cfg->support_sm_ps)
|
|
||||||
ht_info->cap |= (IEEE80211_HT_CAP_SM_PS &
|
ht_info->cap |= (IEEE80211_HT_CAP_SM_PS &
|
||||||
(WLAN_HT_CAP_SM_PS_DYNAMIC << 2));
|
(priv->cfg->sm_ps_mode << 2));
|
||||||
else
|
|
||||||
ht_info->cap |= (IEEE80211_HT_CAP_SM_PS &
|
|
||||||
(WLAN_HT_CAP_SM_PS_DISABLED << 2));
|
|
||||||
|
|
||||||
max_bit_rate = MAX_BIT_RATE_20_MHZ;
|
max_bit_rate = MAX_BIT_RATE_20_MHZ;
|
||||||
if (priv->hw_params.ht40_channel & BIT(band)) {
|
if (priv->hw_params.ht40_channel & BIT(band)) {
|
||||||
ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
ht_info->cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
|
||||||
@@ -1010,26 +1005,24 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
|
|||||||
int idle_cnt = active_cnt;
|
int idle_cnt = active_cnt;
|
||||||
bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status);
|
bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status);
|
||||||
|
|
||||||
if (priv->cfg->support_sm_ps) {
|
|
||||||
/* # Rx chains when idling and maybe trying to save power */
|
/* # Rx chains when idling and maybe trying to save power */
|
||||||
switch (priv->current_ht_config.sm_ps) {
|
switch (priv->cfg->sm_ps_mode) {
|
||||||
case WLAN_HT_CAP_SM_PS_STATIC:
|
case WLAN_HT_CAP_SM_PS_STATIC:
|
||||||
|
idle_cnt = (is_cam) ? active_cnt : IWL_NUM_IDLE_CHAINS_SINGLE;
|
||||||
|
break;
|
||||||
case WLAN_HT_CAP_SM_PS_DYNAMIC:
|
case WLAN_HT_CAP_SM_PS_DYNAMIC:
|
||||||
idle_cnt = (is_cam) ? IWL_NUM_IDLE_CHAINS_DUAL :
|
idle_cnt = (is_cam) ? IWL_NUM_IDLE_CHAINS_DUAL :
|
||||||
IWL_NUM_IDLE_CHAINS_SINGLE;
|
IWL_NUM_IDLE_CHAINS_SINGLE;
|
||||||
break;
|
break;
|
||||||
case WLAN_HT_CAP_SM_PS_DISABLED:
|
case WLAN_HT_CAP_SM_PS_DISABLED:
|
||||||
idle_cnt = (is_cam) ? active_cnt :
|
|
||||||
IWL_NUM_IDLE_CHAINS_SINGLE;
|
|
||||||
break;
|
break;
|
||||||
case WLAN_HT_CAP_SM_PS_INVALID:
|
case WLAN_HT_CAP_SM_PS_INVALID:
|
||||||
default:
|
default:
|
||||||
IWL_ERR(priv, "invalid sm_ps mode %d\n",
|
IWL_ERR(priv, "invalid sm_ps mode %u\n",
|
||||||
priv->current_ht_config.sm_ps);
|
priv->cfg->sm_ps_mode);
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return idle_cnt;
|
return idle_cnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -228,7 +228,7 @@ struct iwl_mod_params {
|
|||||||
* @chain_noise_num_beacons: number of beacons used to compute chain noise
|
* @chain_noise_num_beacons: number of beacons used to compute chain noise
|
||||||
* @adv_thermal_throttle: support advance thermal throttle
|
* @adv_thermal_throttle: support advance thermal throttle
|
||||||
* @support_ct_kill_exit: support ct kill exit condition
|
* @support_ct_kill_exit: support ct kill exit condition
|
||||||
* @support_sm_ps: support spatial multiplexing power save
|
* @sm_ps_mode: spatial multiplexing power save mode
|
||||||
* @support_wimax_coexist: support wimax/wifi co-exist
|
* @support_wimax_coexist: support wimax/wifi co-exist
|
||||||
*
|
*
|
||||||
* We enable the driver to be backward compatible wrt API version. The
|
* We enable the driver to be backward compatible wrt API version. The
|
||||||
@@ -285,7 +285,7 @@ struct iwl_cfg {
|
|||||||
const bool supports_idle;
|
const bool supports_idle;
|
||||||
bool adv_thermal_throttle;
|
bool adv_thermal_throttle;
|
||||||
bool support_ct_kill_exit;
|
bool support_ct_kill_exit;
|
||||||
bool support_sm_ps;
|
u8 sm_ps_mode;
|
||||||
const bool support_wimax_coexist;
|
const bool support_wimax_coexist;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -511,7 +511,6 @@ struct iwl_ht_config {
|
|||||||
bool is_ht;
|
bool is_ht;
|
||||||
bool is_40mhz;
|
bool is_40mhz;
|
||||||
bool single_chain_sufficient;
|
bool single_chain_sufficient;
|
||||||
u8 sm_ps;
|
|
||||||
/* BSS related data */
|
/* BSS related data */
|
||||||
u8 extension_chan_offset;
|
u8 extension_chan_offset;
|
||||||
u8 ht_protection;
|
u8 ht_protection;
|
||||||
|
Reference in New Issue
Block a user