Commit de27e64e authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville

iwlwifi: make use of conf_is_ht*() helpers

Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ecf70441
...@@ -1130,7 +1130,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, ...@@ -1130,7 +1130,7 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv,
s32 rate; s32 rate;
s8 is_green = lq_sta->is_green; s8 is_green = lq_sta->is_green;
if (!conf->ht.enabled || !sta->ht_cap.ht_supported) if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported)
return -1; return -1;
if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2) if (((sta->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >> 2)
...@@ -1197,7 +1197,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv, ...@@ -1197,7 +1197,7 @@ static int rs_switch_to_siso(struct iwl_priv *priv,
u8 is_green = lq_sta->is_green; u8 is_green = lq_sta->is_green;
s32 rate; s32 rate;
if (!conf->ht.enabled || !sta->ht_cap.ht_supported) if (!conf_is_ht(conf) || !sta->ht_cap.ht_supported)
return -1; return -1;
IWL_DEBUG_RATE("LQ: try to switch to SISO\n"); IWL_DEBUG_RATE("LQ: try to switch to SISO\n");
...@@ -1997,7 +1997,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, ...@@ -1997,7 +1997,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
* stay with best antenna legacy modulation for a while * stay with best antenna legacy modulation for a while
* before next round of mode comparisons. */ * before next round of mode comparisons. */
tbl1 = &(lq_sta->lq_info[lq_sta->active_tbl]); tbl1 = &(lq_sta->lq_info[lq_sta->active_tbl]);
if (is_legacy(tbl1->lq_type) && !conf->ht.enabled && if (is_legacy(tbl1->lq_type) && !conf_is_ht(conf) &&
lq_sta->action_counter >= 1) { lq_sta->action_counter >= 1) {
lq_sta->action_counter = 0; lq_sta->action_counter = 0;
IWL_DEBUG_RATE("LQ: STAY in legacy table\n"); IWL_DEBUG_RATE("LQ: STAY in legacy table\n");
......
...@@ -522,9 +522,9 @@ static void iwl_ht_conf(struct iwl_priv *priv, ...@@ -522,9 +522,9 @@ static void iwl_ht_conf(struct iwl_priv *priv,
*/ */
iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE; iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE;
if (priv->hw->conf.ht.channel_type == NL80211_CHAN_HT40MINUS) if (conf_is_ht40_minus(&priv->hw->conf))
iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_BELOW; iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
else if(priv->hw->conf.ht.channel_type == NL80211_CHAN_HT40PLUS) else if (conf_is_ht40_plus(&priv->hw->conf))
iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_ABOVE; iwl_conf->extension_chan_offset = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
/* If no above or below channel supplied disable FAT channel */ /* If no above or below channel supplied disable FAT channel */
...@@ -2546,7 +2546,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) ...@@ -2546,7 +2546,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
IWL_DEBUG_MAC80211("enter to channel %d\n", conf->channel->hw_value); IWL_DEBUG_MAC80211("enter to channel %d\n", conf->channel->hw_value);
priv->current_ht_config.is_ht = conf->ht.enabled; priv->current_ht_config.is_ht = conf_is_ht(conf);
if (conf->radio_enabled && iwl_radio_kill_sw_enable_radio(priv)) { if (conf->radio_enabled && iwl_radio_kill_sw_enable_radio(priv)) {
IWL_DEBUG_MAC80211("leave - RF-KILL - waiting for uCode\n"); IWL_DEBUG_MAC80211("leave - RF-KILL - waiting for uCode\n");
......
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