diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-09-02 23:26:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-09-11 15:53:31 -0400 |
commit | 12837be1c127e6fba2e3f916a18fc202a9889af2 (patch) | |
tree | 0ec518735544283908c9980cac88f86f4aa5a3b7 | |
parent | 00c5ae2fa0f8191a1b204e71f0ee11359e3b2c06 (diff) |
iwlwifi: rename ps_mode to sm_ps
This patch renames iwl_priv.ps_mode for clearer
iwl_priv.current_ht_config.sm_ps (spatial multiplexing power save).
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 |
3 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 27ddf6cb1c6e..78902da3d516 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -564,8 +564,6 @@ static void iwl4965_ht_conf(struct iwl_priv *priv, | |||
564 | if (!iwl_conf->is_ht) | 564 | if (!iwl_conf->is_ht) |
565 | return; | 565 | return; |
566 | 566 | ||
567 | priv->ps_mode = (u8)((ht_conf->cap & IEEE80211_HT_CAP_SM_PS) >> 2); | ||
568 | |||
569 | if (ht_conf->cap & IEEE80211_HT_CAP_SGI_20) | 567 | if (ht_conf->cap & IEEE80211_HT_CAP_SGI_20) |
570 | iwl_conf->sgf |= HT_SHORT_GI_20MHZ; | 568 | iwl_conf->sgf |= HT_SHORT_GI_20MHZ; |
571 | if (ht_conf->cap & IEEE80211_HT_CAP_SGI_40) | 569 | if (ht_conf->cap & IEEE80211_HT_CAP_SGI_40) |
@@ -586,6 +584,8 @@ static void iwl4965_ht_conf(struct iwl_priv *priv, | |||
586 | iwl_conf->supported_chan_width = 0; | 584 | iwl_conf->supported_chan_width = 0; |
587 | } | 585 | } |
588 | 586 | ||
587 | iwl_conf->sm_ps = (u8)((ht_conf->cap & IEEE80211_HT_CAP_SM_PS) >> 2); | ||
588 | |||
589 | memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16); | 589 | memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16); |
590 | 590 | ||
591 | iwl_conf->control_channel = ht_bss_conf->primary_channel; | 591 | iwl_conf->control_channel = ht_bss_conf->primary_channel; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 789556db6842..dbeaca15dda5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -709,7 +709,8 @@ static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) | |||
709 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); | 709 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); |
710 | 710 | ||
711 | /* # of Rx chains to use when expecting MIMO. */ | 711 | /* # of Rx chains to use when expecting MIMO. */ |
712 | if (is_single || (!is_cam && (priv->ps_mode == WLAN_HT_CAP_SM_PS_STATIC))) | 712 | if (is_single || (!is_cam && (priv->current_ht_config.sm_ps == |
713 | WLAN_HT_CAP_SM_PS_STATIC))) | ||
713 | return 2; | 714 | return 2; |
714 | else | 715 | else |
715 | return 3; | 716 | return 3; |
@@ -720,7 +721,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) | |||
720 | int idle_cnt; | 721 | int idle_cnt; |
721 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); | 722 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); |
722 | /* # Rx chains when idling and maybe trying to save power */ | 723 | /* # Rx chains when idling and maybe trying to save power */ |
723 | switch (priv->ps_mode) { | 724 | switch (priv->current_ht_config.sm_ps) { |
724 | case WLAN_HT_CAP_SM_PS_STATIC: | 725 | case WLAN_HT_CAP_SM_PS_STATIC: |
725 | case WLAN_HT_CAP_SM_PS_DYNAMIC: | 726 | case WLAN_HT_CAP_SM_PS_DYNAMIC: |
726 | idle_cnt = (is_cam) ? 2 : 1; | 727 | idle_cnt = (is_cam) ? 2 : 1; |
@@ -730,7 +731,8 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) | |||
730 | break; | 731 | break; |
731 | case WLAN_HT_CAP_SM_PS_INVALID: | 732 | case WLAN_HT_CAP_SM_PS_INVALID: |
732 | default: | 733 | default: |
733 | IWL_ERROR("invalide mimo ps mode %d\n", priv->ps_mode); | 734 | IWL_ERROR("invalide mimo ps mode %d\n", |
735 | priv->current_ht_config.sm_ps); | ||
734 | WARN_ON(1); | 736 | WARN_ON(1); |
735 | idle_cnt = -1; | 737 | idle_cnt = -1; |
736 | break; | 738 | break; |
@@ -912,7 +914,7 @@ int iwl_init_drv(struct iwl_priv *priv) | |||
912 | priv->iw_mode = IEEE80211_IF_TYPE_STA; | 914 | priv->iw_mode = IEEE80211_IF_TYPE_STA; |
913 | 915 | ||
914 | priv->use_ant_b_for_management_frame = 1; /* start with ant B */ | 916 | priv->use_ant_b_for_management_frame = 1; /* start with ant B */ |
915 | priv->ps_mode = WLAN_HT_CAP_SM_PS_DISABLED; | 917 | priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED; |
916 | 918 | ||
917 | /* Choose which receivers/antennas to use */ | 919 | /* Choose which receivers/antennas to use */ |
918 | iwl_set_rxon_chain(priv); | 920 | iwl_set_rxon_chain(priv); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index f302e93b7798..7934f56f7292 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -406,6 +406,7 @@ struct iwl_ht_info { | |||
406 | /* self configuration data */ | 406 | /* self configuration data */ |
407 | u8 is_ht; | 407 | u8 is_ht; |
408 | u8 supported_chan_width; | 408 | u8 supported_chan_width; |
409 | u8 sm_ps; | ||
409 | u8 is_green_field; | 410 | u8 is_green_field; |
410 | u8 sgf; /* HT_SHORT_GI_* short guard interval */ | 411 | u8 sgf; /* HT_SHORT_GI_* short guard interval */ |
411 | u8 max_amsdu_size; | 412 | u8 max_amsdu_size; |
@@ -990,7 +991,6 @@ struct iwl_priv { | |||
990 | * hardware */ | 991 | * hardware */ |
991 | u16 assoc_id; | 992 | u16 assoc_id; |
992 | u16 assoc_capability; | 993 | u16 assoc_capability; |
993 | u8 ps_mode; | ||
994 | 994 | ||
995 | struct iwl_qos_info qos_data; | 995 | struct iwl_qos_info qos_data; |
996 | 996 | ||