aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-09-11 13:38:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:32 -0400
commitfad95bf59bf14f72e7d45d3887044e88b8584637 (patch)
treecec3d3e9354b95abc2d2db8de7112f77ff6c5889 /drivers/net
parentf2d0d0e2bab7a325071dbaba3bef51c90868e1e6 (diff)
iwlwifi: clean up ht config naming
Daniel Halperin pointed out that the naming here is rather inconsistent with at least 3 different names being used for one thing in different contexts. Rename the struct to iwl_ht_config (rather than iwl_ht_info) and use ht_conf as a variable for it. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c48
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h4
4 files changed, 28 insertions, 28 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index 346dc06fa7b7..18af37c964cb 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -662,7 +662,7 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
662 * there are no non-GF stations present in the BSS. 662 * there are no non-GF stations present in the BSS.
663 */ 663 */
664static inline u8 rs_use_green(struct ieee80211_sta *sta, 664static inline u8 rs_use_green(struct ieee80211_sta *sta,
665 struct iwl_ht_info *ht_conf) 665 struct iwl_ht_config *ht_conf)
666{ 666{
667 return (sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD) && 667 return (sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD) &&
668 !(ht_conf->non_GF_STA_present); 668 !(ht_conf->non_GF_STA_present);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index c09475105c52..9d01fde92cc6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -634,9 +634,9 @@ static u8 iwl_is_channel_extension(struct iwl_priv *priv,
634u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv, 634u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
635 struct ieee80211_sta_ht_cap *sta_ht_inf) 635 struct ieee80211_sta_ht_cap *sta_ht_inf)
636{ 636{
637 struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config; 637 struct iwl_ht_config *ht_conf = &priv->current_ht_config;
638 638
639 if (!iwl_ht_conf->is_ht || !iwl_ht_conf->is_40mhz) 639 if (!ht_conf->is_ht || !ht_conf->is_40mhz)
640 return 0; 640 return 0;
641 641
642 /* We do not check for IEEE80211_HT_CAP_SUP_WIDTH_20_40 642 /* We do not check for IEEE80211_HT_CAP_SUP_WIDTH_20_40
@@ -652,7 +652,7 @@ u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
652#endif 652#endif
653 return iwl_is_channel_extension(priv, priv->band, 653 return iwl_is_channel_extension(priv, priv->band,
654 le16_to_cpu(priv->staging_rxon.channel), 654 le16_to_cpu(priv->staging_rxon.channel),
655 iwl_ht_conf->extension_chan_offset); 655 ht_conf->extension_chan_offset);
656} 656}
657EXPORT_SYMBOL(iwl_is_ht40_tx_allowed); 657EXPORT_SYMBOL(iwl_is_ht40_tx_allowed);
658 658
@@ -876,11 +876,11 @@ u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv)
876} 876}
877EXPORT_SYMBOL(iwl_rate_get_lowest_plcp); 877EXPORT_SYMBOL(iwl_rate_get_lowest_plcp);
878 878
879void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info) 879void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf)
880{ 880{
881 struct iwl_rxon_cmd *rxon = &priv->staging_rxon; 881 struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
882 882
883 if (!ht_info->is_ht) { 883 if (!ht_conf->is_ht) {
884 rxon->flags &= ~(RXON_FLG_CHANNEL_MODE_MSK | 884 rxon->flags &= ~(RXON_FLG_CHANNEL_MODE_MSK |
885 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK | 885 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK |
886 RXON_FLG_HT40_PROT_MSK | 886 RXON_FLG_HT40_PROT_MSK |
@@ -891,7 +891,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
891 /* FIXME: if the definition of ht_protection changed, the "translation" 891 /* FIXME: if the definition of ht_protection changed, the "translation"
892 * will be needed for rxon->flags 892 * will be needed for rxon->flags
893 */ 893 */
894 rxon->flags |= cpu_to_le32(ht_info->ht_protection << RXON_FLG_HT_OPERATING_MODE_POS); 894 rxon->flags |= cpu_to_le32(ht_conf->ht_protection << RXON_FLG_HT_OPERATING_MODE_POS);
895 895
896 /* Set up channel bandwidth: 896 /* Set up channel bandwidth:
897 * 20 MHz only, 20/40 mixed or pure 40 if ht40 ok */ 897 * 20 MHz only, 20/40 mixed or pure 40 if ht40 ok */
@@ -900,10 +900,10 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
900 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK); 900 RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK);
901 if (iwl_is_ht40_tx_allowed(priv, NULL)) { 901 if (iwl_is_ht40_tx_allowed(priv, NULL)) {
902 /* pure ht40 */ 902 /* pure ht40 */
903 if (ht_info->ht_protection == IEEE80211_HT_OP_MODE_PROTECTION_20MHZ) { 903 if (ht_conf->ht_protection == IEEE80211_HT_OP_MODE_PROTECTION_20MHZ) {
904 rxon->flags |= RXON_FLG_CHANNEL_MODE_PURE_40; 904 rxon->flags |= RXON_FLG_CHANNEL_MODE_PURE_40;
905 /* Note: control channel is opposite of extension channel */ 905 /* Note: control channel is opposite of extension channel */
906 switch (ht_info->extension_chan_offset) { 906 switch (ht_conf->extension_chan_offset) {
907 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: 907 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
908 rxon->flags &= ~RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK; 908 rxon->flags &= ~RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK;
909 break; 909 break;
@@ -913,7 +913,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
913 } 913 }
914 } else { 914 } else {
915 /* Note: control channel is opposite of extension channel */ 915 /* Note: control channel is opposite of extension channel */
916 switch (ht_info->extension_chan_offset) { 916 switch (ht_conf->extension_chan_offset) {
917 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE: 917 case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
918 rxon->flags &= ~(RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK); 918 rxon->flags &= ~(RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK);
919 rxon->flags |= RXON_FLG_CHANNEL_MODE_MIXED; 919 rxon->flags |= RXON_FLG_CHANNEL_MODE_MIXED;
@@ -939,11 +939,11 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
939 IWL_DEBUG_ASSOC(priv, "supported HT rate 0x%X 0x%X 0x%X " 939 IWL_DEBUG_ASSOC(priv, "supported HT rate 0x%X 0x%X 0x%X "
940 "rxon flags 0x%X operation mode :0x%X " 940 "rxon flags 0x%X operation mode :0x%X "
941 "extension channel offset 0x%x\n", 941 "extension channel offset 0x%x\n",
942 ht_info->mcs.rx_mask[0], 942 ht_conf->mcs.rx_mask[0],
943 ht_info->mcs.rx_mask[1], 943 ht_conf->mcs.rx_mask[1],
944 ht_info->mcs.rx_mask[2], 944 ht_conf->mcs.rx_mask[2],
945 le32_to_cpu(rxon->flags), ht_info->ht_protection, 945 le32_to_cpu(rxon->flags), ht_conf->ht_protection,
946 ht_info->extension_chan_offset); 946 ht_conf->extension_chan_offset);
947 return; 947 return;
948} 948}
949EXPORT_SYMBOL(iwl_set_rxon_ht); 949EXPORT_SYMBOL(iwl_set_rxon_ht);
@@ -2228,13 +2228,13 @@ EXPORT_SYMBOL(iwl_mac_conf_tx);
2228static void iwl_ht_conf(struct iwl_priv *priv, 2228static void iwl_ht_conf(struct iwl_priv *priv,
2229 struct ieee80211_bss_conf *bss_conf) 2229 struct ieee80211_bss_conf *bss_conf)
2230{ 2230{
2231 struct ieee80211_sta_ht_cap *ht_conf; 2231 struct iwl_ht_config *ht_conf = &priv->current_ht_config;
2232 struct iwl_ht_info *iwl_conf = &priv->current_ht_config; 2232 struct ieee80211_sta_ht_cap *ht_cap;
2233 struct ieee80211_sta *sta; 2233 struct ieee80211_sta *sta;
2234 2234
2235 IWL_DEBUG_MAC80211(priv, "enter: \n"); 2235 IWL_DEBUG_MAC80211(priv, "enter: \n");
2236 2236
2237 if (!iwl_conf->is_ht) 2237 if (!ht_conf->is_ht)
2238 return; 2238 return;
2239 2239
2240 2240
@@ -2250,15 +2250,15 @@ static void iwl_ht_conf(struct iwl_priv *priv,
2250 rcu_read_unlock(); 2250 rcu_read_unlock();
2251 return; 2251 return;
2252 } 2252 }
2253 ht_conf = &sta->ht_cap; 2253 ht_cap = &sta->ht_cap;
2254 2254
2255 iwl_conf->sm_ps = (u8)((ht_conf->cap & IEEE80211_HT_CAP_SM_PS) >> 2); 2255 ht_conf->sm_ps = (u8)((ht_cap->cap & IEEE80211_HT_CAP_SM_PS) >> 2);
2256 2256
2257 memcpy(&iwl_conf->mcs, &ht_conf->mcs, 16); 2257 memcpy(&ht_conf->mcs, &ht_cap->mcs, 16);
2258 2258
2259 iwl_conf->ht_protection = 2259 ht_conf->ht_protection =
2260 bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_PROTECTION; 2260 bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_PROTECTION;
2261 iwl_conf->non_GF_STA_present = 2261 ht_conf->non_GF_STA_present =
2262 !!(bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT); 2262 !!(bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT);
2263 2263
2264 rcu_read_unlock(); 2264 rcu_read_unlock();
@@ -2568,7 +2568,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
2568 struct iwl_priv *priv = hw->priv; 2568 struct iwl_priv *priv = hw->priv;
2569 const struct iwl_channel_info *ch_info; 2569 const struct iwl_channel_info *ch_info;
2570 struct ieee80211_conf *conf = &hw->conf; 2570 struct ieee80211_conf *conf = &hw->conf;
2571 struct iwl_ht_info *ht_conf = &priv->current_ht_config; 2571 struct iwl_ht_config *ht_conf = &priv->current_ht_config;
2572 unsigned long flags = 0; 2572 unsigned long flags = 0;
2573 int ret = 0; 2573 int ret = 0;
2574 u16 ch; 2574 u16 ch;
@@ -2735,7 +2735,7 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
2735 IWL_DEBUG_MAC80211(priv, "enter\n"); 2735 IWL_DEBUG_MAC80211(priv, "enter\n");
2736 2736
2737 spin_lock_irqsave(&priv->lock, flags); 2737 spin_lock_irqsave(&priv->lock, flags);
2738 memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_info)); 2738 memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_config));
2739 spin_unlock_irqrestore(&priv->lock, flags); 2739 spin_unlock_irqrestore(&priv->lock, flags);
2740 2740
2741 iwl_reset_qos(priv); 2741 iwl_reset_qos(priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 79ea42531e28..a2ee95028c6e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -277,7 +277,7 @@ int iwl_check_rxon_cmd(struct iwl_priv *priv);
277int iwl_full_rxon_required(struct iwl_priv *priv); 277int iwl_full_rxon_required(struct iwl_priv *priv);
278void iwl_set_rxon_chain(struct iwl_priv *priv); 278void iwl_set_rxon_chain(struct iwl_priv *priv);
279int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch); 279int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch);
280void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info); 280void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
281u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv, 281u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
282 struct ieee80211_sta_ht_cap *sta_ht_inf); 282 struct ieee80211_sta_ht_cap *sta_ht_inf);
283void iwl_set_flags_for_band(struct iwl_priv *priv, enum ieee80211_band band); 283void iwl_set_flags_for_band(struct iwl_priv *priv, enum ieee80211_band band);
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 961d53440034..e161f8d1766e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -502,7 +502,7 @@ union iwl_ht_rate_supp {
502#define CFG_HT_MPDU_DENSITY_4USEC (0x5) 502#define CFG_HT_MPDU_DENSITY_4USEC (0x5)
503#define CFG_HT_MPDU_DENSITY_DEF CFG_HT_MPDU_DENSITY_4USEC 503#define CFG_HT_MPDU_DENSITY_DEF CFG_HT_MPDU_DENSITY_4USEC
504 504
505struct iwl_ht_info { 505struct iwl_ht_config {
506 /* self configuration data */ 506 /* self configuration data */
507 bool is_ht; 507 bool is_ht;
508 bool is_40mhz; 508 bool is_40mhz;
@@ -1077,7 +1077,7 @@ struct iwl_priv {
1077 struct iwl_chain_noise_data chain_noise_data; 1077 struct iwl_chain_noise_data chain_noise_data;
1078 __le16 sensitivity_tbl[HD_TABLE_SIZE]; 1078 __le16 sensitivity_tbl[HD_TABLE_SIZE];
1079 1079
1080 struct iwl_ht_info current_ht_config; 1080 struct iwl_ht_config current_ht_config;
1081 u8 last_phy_res[100]; 1081 u8 last_phy_res[100];
1082 1082
1083 /* Rate scaling data */ 1083 /* Rate scaling data */