Commit 00c5ae2f authored by Tomas Winkler's avatar Tomas Winkler Committed by John W. Linville

mac80211: change MIMO_PS to SM_PS

This patch follows 11n spec naming more rigorously replacing MIMO_PS
with SM_PS (Spatial Multiplexing Power Save).

(Originally submitted as 4 patches, "mac80211: change MIMO_PS to SM_PS",
"iwlwifi: change MIMO_PS to SM_PS", "ath9k: change MIMO_PS to SM_PS",
and "iwlwifi: remove double definition of SM PS". -- JWL)
Signed-off-by: default avatarRon Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1e493d19
...@@ -224,7 +224,7 @@ static void setup_ht_cap(struct ieee80211_ht_info *ht_info) ...@@ -224,7 +224,7 @@ static void setup_ht_cap(struct ieee80211_ht_info *ht_info)
ht_info->ht_supported = 1; ht_info->ht_supported = 1;
ht_info->cap = (u16)IEEE80211_HT_CAP_SUP_WIDTH ht_info->cap = (u16)IEEE80211_HT_CAP_SUP_WIDTH
|(u16)IEEE80211_HT_CAP_MIMO_PS |(u16)IEEE80211_HT_CAP_SM_PS
|(u16)IEEE80211_HT_CAP_SGI_40 |(u16)IEEE80211_HT_CAP_SGI_40
|(u16)IEEE80211_HT_CAP_DSSSCCK40; |(u16)IEEE80211_HT_CAP_DSSSCCK40;
......
...@@ -1153,8 +1153,8 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, ...@@ -1153,8 +1153,8 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
!sta->ht_info.ht_supported) !sta->ht_info.ht_supported)
return -1; return -1;
if (((sta->ht_info.cap & IEEE80211_HT_CAP_MIMO_PS) >> 2) if (((sta->ht_info.cap & IEEE80211_HT_CAP_SM_PS) >> 2)
== IWL_MIMO_PS_STATIC) == WLAN_HT_CAP_SM_PS_STATIC)
return -1; return -1;
/* Need both Tx chains/antennas to support MIMO */ /* Need both Tx chains/antennas to support MIMO */
......
...@@ -564,7 +564,7 @@ static void iwl4965_ht_conf(struct iwl_priv *priv, ...@@ -564,7 +564,7 @@ static void iwl4965_ht_conf(struct iwl_priv *priv,
if (!iwl_conf->is_ht) if (!iwl_conf->is_ht)
return; return;
priv->ps_mode = (u8)((ht_conf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2); priv->ps_mode = (u8)((ht_conf->cap & IEEE80211_HT_CAP_SM_PS) >> 2);
if (ht_conf->cap & IEEE80211_HT_CAP_SGI_20) if (ht_conf->cap & IEEE80211_HT_CAP_SGI_20)
iwl_conf->sgf |= HT_SHORT_GI_20MHZ; iwl_conf->sgf |= HT_SHORT_GI_20MHZ;
......
...@@ -399,8 +399,8 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv, ...@@ -399,8 +399,8 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
ht_info->cap |= (u16)IEEE80211_HT_CAP_GRN_FLD; ht_info->cap |= (u16)IEEE80211_HT_CAP_GRN_FLD;
ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_20; ht_info->cap |= (u16)IEEE80211_HT_CAP_SGI_20;
ht_info->cap |= (u16)(IEEE80211_HT_CAP_MIMO_PS & ht_info->cap |= (u16)(IEEE80211_HT_CAP_SM_PS &
(IWL_MIMO_PS_NONE << 2)); (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.fat_channel & BIT(band)) { if (priv->hw_params.fat_channel & BIT(band)) {
...@@ -709,7 +709,7 @@ static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) ...@@ -709,7 +709,7 @@ static int iwl_get_active_rx_chain_count(struct iwl_priv *priv)
bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status);
/* # of Rx chains to use when expecting MIMO. */ /* # of Rx chains to use when expecting MIMO. */
if (is_single || (!is_cam && (priv->ps_mode == IWL_MIMO_PS_STATIC))) if (is_single || (!is_cam && (priv->ps_mode == WLAN_HT_CAP_SM_PS_STATIC)))
return 2; return 2;
else else
return 3; return 3;
...@@ -721,14 +721,14 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) ...@@ -721,14 +721,14 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt)
bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status);
/* # Rx chains when idling and maybe trying to save power */ /* # Rx chains when idling and maybe trying to save power */
switch (priv->ps_mode) { switch (priv->ps_mode) {
case IWL_MIMO_PS_STATIC: case WLAN_HT_CAP_SM_PS_STATIC:
case IWL_MIMO_PS_DYNAMIC: case WLAN_HT_CAP_SM_PS_DYNAMIC:
idle_cnt = (is_cam) ? 2 : 1; idle_cnt = (is_cam) ? 2 : 1;
break; break;
case IWL_MIMO_PS_NONE: case WLAN_HT_CAP_SM_PS_DISABLED:
idle_cnt = (is_cam) ? active_cnt : 1; idle_cnt = (is_cam) ? active_cnt : 1;
break; break;
case IWL_MIMO_PS_INVALID: case WLAN_HT_CAP_SM_PS_INVALID:
default: default:
IWL_ERROR("invalide mimo ps mode %d\n", priv->ps_mode); IWL_ERROR("invalide mimo ps mode %d\n", priv->ps_mode);
WARN_ON(1); WARN_ON(1);
...@@ -912,7 +912,7 @@ int iwl_init_drv(struct iwl_priv *priv) ...@@ -912,7 +912,7 @@ int iwl_init_drv(struct iwl_priv *priv)
priv->iw_mode = IEEE80211_IF_TYPE_STA; priv->iw_mode = IEEE80211_IF_TYPE_STA;
priv->use_ant_b_for_management_frame = 1; /* start with ant B */ priv->use_ant_b_for_management_frame = 1; /* start with ant B */
priv->ps_mode = IWL_MIMO_PS_NONE; priv->ps_mode = WLAN_HT_CAP_SM_PS_DISABLED;
/* Choose which receivers/antennas to use */ /* Choose which receivers/antennas to use */
iwl_set_rxon_chain(priv); iwl_set_rxon_chain(priv);
......
...@@ -644,11 +644,6 @@ struct iwl_kw { ...@@ -644,11 +644,6 @@ struct iwl_kw {
#define IWL_CHANNEL_WIDTH_20MHZ 0 #define IWL_CHANNEL_WIDTH_20MHZ 0
#define IWL_CHANNEL_WIDTH_40MHZ 1 #define IWL_CHANNEL_WIDTH_40MHZ 1
#define IWL_MIMO_PS_STATIC 0
#define IWL_MIMO_PS_NONE 3
#define IWL_MIMO_PS_DYNAMIC 1
#define IWL_MIMO_PS_INVALID 2
#define IWL_OPERATION_MODE_AUTO 0 #define IWL_OPERATION_MODE_AUTO 0
#define IWL_OPERATION_MODE_HT_ONLY 1 #define IWL_OPERATION_MODE_HT_ONLY 1
#define IWL_OPERATION_MODE_MIXED 2 #define IWL_OPERATION_MODE_MIXED 2
......
...@@ -191,20 +191,20 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index, ...@@ -191,20 +191,20 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index,
if (!sta_ht_inf || !sta_ht_inf->ht_supported) if (!sta_ht_inf || !sta_ht_inf->ht_supported)
goto done; goto done;
mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2; mimo_ps_mode = (sta_ht_inf->cap & IEEE80211_HT_CAP_SM_PS) >> 2;
sta_flags = priv->stations[index].sta.station_flags; sta_flags = priv->stations[index].sta.station_flags;
sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK); sta_flags &= ~(STA_FLG_RTS_MIMO_PROT_MSK | STA_FLG_MIMO_DIS_MSK);
switch (mimo_ps_mode) { switch (mimo_ps_mode) {
case WLAN_HT_CAP_MIMO_PS_STATIC: case WLAN_HT_CAP_SM_PS_STATIC:
sta_flags |= STA_FLG_MIMO_DIS_MSK; sta_flags |= STA_FLG_MIMO_DIS_MSK;
break; break;
case WLAN_HT_CAP_MIMO_PS_DYNAMIC: case WLAN_HT_CAP_SM_PS_DYNAMIC:
sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK; sta_flags |= STA_FLG_RTS_MIMO_PROT_MSK;
break; break;
case WLAN_HT_CAP_MIMO_PS_DISABLED: case WLAN_HT_CAP_SM_PS_DISABLED:
break; break;
default: default:
IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode); IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode);
......
...@@ -708,7 +708,7 @@ struct ieee80211_ht_addt_info { ...@@ -708,7 +708,7 @@ struct ieee80211_ht_addt_info {
/* 802.11n HT capabilities masks */ /* 802.11n HT capabilities masks */
#define IEEE80211_HT_CAP_SUP_WIDTH 0x0002 #define IEEE80211_HT_CAP_SUP_WIDTH 0x0002
#define IEEE80211_HT_CAP_MIMO_PS 0x000C #define IEEE80211_HT_CAP_SM_PS 0x000C
#define IEEE80211_HT_CAP_GRN_FLD 0x0010 #define IEEE80211_HT_CAP_GRN_FLD 0x0010
#define IEEE80211_HT_CAP_SGI_20 0x0020 #define IEEE80211_HT_CAP_SGI_20 0x0020
#define IEEE80211_HT_CAP_SGI_40 0x0040 #define IEEE80211_HT_CAP_SGI_40 0x0040
...@@ -737,11 +737,11 @@ struct ieee80211_ht_addt_info { ...@@ -737,11 +737,11 @@ struct ieee80211_ht_addt_info {
#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 #define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004
#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 #define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010
/* MIMO Power Save Modes */ /* Spatial Multiplexing Power Save Modes */
#define WLAN_HT_CAP_MIMO_PS_STATIC 0 #define WLAN_HT_CAP_SM_PS_STATIC 0
#define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1 #define WLAN_HT_CAP_SM_PS_DYNAMIC 1
#define WLAN_HT_CAP_MIMO_PS_INVALID 2 #define WLAN_HT_CAP_SM_PS_INVALID 2
#define WLAN_HT_CAP_MIMO_PS_DISABLED 3 #define WLAN_HT_CAP_SM_PS_DISABLED 3
/* Authentication algorithms */ /* Authentication algorithms */
#define WLAN_AUTH_OPEN 0 #define WLAN_AUTH_OPEN 0
......
...@@ -1140,8 +1140,8 @@ u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht, ...@@ -1140,8 +1140,8 @@ u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht,
ht_conf.ht_supported = 1; ht_conf.ht_supported = 1;
ht_conf.cap = req_ht_cap->cap & sband->ht_info.cap; ht_conf.cap = req_ht_cap->cap & sband->ht_info.cap;
ht_conf.cap &= ~(IEEE80211_HT_CAP_MIMO_PS); ht_conf.cap &= ~(IEEE80211_HT_CAP_SM_PS);
ht_conf.cap |= sband->ht_info.cap & IEEE80211_HT_CAP_MIMO_PS; ht_conf.cap |= sband->ht_info.cap & IEEE80211_HT_CAP_SM_PS;
ht_bss_conf.primary_channel = req_bss_cap->primary_channel; ht_bss_conf.primary_channel = req_bss_cap->primary_channel;
ht_bss_conf.bss_cap = req_bss_cap->bss_cap; ht_bss_conf.bss_cap = req_bss_cap->bss_cap;
ht_bss_conf.bss_op_mode = req_bss_cap->bss_op_mode; ht_bss_conf.bss_op_mode = req_bss_cap->bss_op_mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment