]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
iwlwifi: clean up ht config naming
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 11 Sep 2009 17:38:15 +0000 (10:38 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Oct 2009 20:39:32 +0000 (16:39 -0400)
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>
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-core.h
drivers/net/wireless/iwlwifi/iwl-dev.h

index 346dc06fa7b77f79f5cdd986653e19b8d547bf56..18af37c964cbbc4d73131945301b73adbd491944 100644 (file)
@@ -662,7 +662,7 @@ static int rs_toggle_antenna(u32 valid_ant, u32 *rate_n_flags,
  * there are no non-GF stations present in the BSS.
  */
 static inline u8 rs_use_green(struct ieee80211_sta *sta,
-                             struct iwl_ht_info *ht_conf)
+                             struct iwl_ht_config *ht_conf)
 {
        return (sta->ht_cap.cap & IEEE80211_HT_CAP_GRN_FLD) &&
                !(ht_conf->non_GF_STA_present);
index c09475105c5245ed86b9bbb28e6fb7dffaaf897f..9d01fde92cc621afbecbc394fe415c7e9a768ded 100644 (file)
@@ -634,9 +634,9 @@ static u8 iwl_is_channel_extension(struct iwl_priv *priv,
 u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
                         struct ieee80211_sta_ht_cap *sta_ht_inf)
 {
-       struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config;
+       struct iwl_ht_config *ht_conf = &priv->current_ht_config;
 
-       if (!iwl_ht_conf->is_ht || !iwl_ht_conf->is_40mhz)
+       if (!ht_conf->is_ht || !ht_conf->is_40mhz)
                return 0;
 
        /* 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,
 #endif
        return iwl_is_channel_extension(priv, priv->band,
                        le16_to_cpu(priv->staging_rxon.channel),
-                       iwl_ht_conf->extension_chan_offset);
+                       ht_conf->extension_chan_offset);
 }
 EXPORT_SYMBOL(iwl_is_ht40_tx_allowed);
 
@@ -876,11 +876,11 @@ u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv)
 }
 EXPORT_SYMBOL(iwl_rate_get_lowest_plcp);
 
-void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
+void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf)
 {
        struct iwl_rxon_cmd *rxon = &priv->staging_rxon;
 
-       if (!ht_info->is_ht) {
+       if (!ht_conf->is_ht) {
                rxon->flags &= ~(RXON_FLG_CHANNEL_MODE_MSK |
                        RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK |
                        RXON_FLG_HT40_PROT_MSK |
@@ -891,7 +891,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
        /* FIXME: if the definition of ht_protection changed, the "translation"
         * will be needed for rxon->flags
         */
-       rxon->flags |= cpu_to_le32(ht_info->ht_protection << RXON_FLG_HT_OPERATING_MODE_POS);
+       rxon->flags |= cpu_to_le32(ht_conf->ht_protection << RXON_FLG_HT_OPERATING_MODE_POS);
 
        /* Set up channel bandwidth:
         * 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)
                         RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK);
        if (iwl_is_ht40_tx_allowed(priv, NULL)) {
                /* pure ht40 */
-               if (ht_info->ht_protection == IEEE80211_HT_OP_MODE_PROTECTION_20MHZ) {
+               if (ht_conf->ht_protection == IEEE80211_HT_OP_MODE_PROTECTION_20MHZ) {
                        rxon->flags |= RXON_FLG_CHANNEL_MODE_PURE_40;
                        /* Note: control channel is opposite of extension channel */
-                       switch (ht_info->extension_chan_offset) {
+                       switch (ht_conf->extension_chan_offset) {
                        case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                                rxon->flags &= ~RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK;
                                break;
@@ -913,7 +913,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
                        }
                } else {
                        /* Note: control channel is opposite of extension channel */
-                       switch (ht_info->extension_chan_offset) {
+                       switch (ht_conf->extension_chan_offset) {
                        case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                                rxon->flags &= ~(RXON_FLG_CTRL_CHANNEL_LOC_HI_MSK);
                                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)
        IWL_DEBUG_ASSOC(priv, "supported HT rate 0x%X 0x%X 0x%X "
                        "rxon flags 0x%X operation mode :0x%X "
                        "extension channel offset 0x%x\n",
-                       ht_info->mcs.rx_mask[0],
-                       ht_info->mcs.rx_mask[1],
-                       ht_info->mcs.rx_mask[2],
-                       le32_to_cpu(rxon->flags), ht_info->ht_protection,
-                       ht_info->extension_chan_offset);
+                       ht_conf->mcs.rx_mask[0],
+                       ht_conf->mcs.rx_mask[1],
+                       ht_conf->mcs.rx_mask[2],
+                       le32_to_cpu(rxon->flags), ht_conf->ht_protection,
+                       ht_conf->extension_chan_offset);
        return;
 }
 EXPORT_SYMBOL(iwl_set_rxon_ht);
@@ -2228,13 +2228,13 @@ EXPORT_SYMBOL(iwl_mac_conf_tx);
 static void iwl_ht_conf(struct iwl_priv *priv,
                            struct ieee80211_bss_conf *bss_conf)
 {
-       struct ieee80211_sta_ht_cap *ht_conf;
-       struct iwl_ht_info *iwl_conf = &priv->current_ht_config;
+       struct iwl_ht_config *ht_conf = &priv->current_ht_config;
+       struct ieee80211_sta_ht_cap *ht_cap;
        struct ieee80211_sta *sta;
 
        IWL_DEBUG_MAC80211(priv, "enter: \n");
 
-       if (!iwl_conf->is_ht)
+       if (!ht_conf->is_ht)
                return;
 
 
@@ -2250,15 +2250,15 @@ static void iwl_ht_conf(struct iwl_priv *priv,
                rcu_read_unlock();
                return;
        }
-       ht_conf = &sta->ht_cap;
+       ht_cap = &sta->ht_cap;
 
-       iwl_conf->sm_ps = (u8)((ht_conf->cap & IEEE80211_HT_CAP_SM_PS) >> 2);
+       ht_conf->sm_ps = (u8)((ht_cap->cap & IEEE80211_HT_CAP_SM_PS) >> 2);
 
-       memcpy(&iwl_conf->mcs, &ht_conf->mcs, 16);
+       memcpy(&ht_conf->mcs, &ht_cap->mcs, 16);
 
-       iwl_conf->ht_protection =
+       ht_conf->ht_protection =
                bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_PROTECTION;
-       iwl_conf->non_GF_STA_present =
+       ht_conf->non_GF_STA_present =
                !!(bss_conf->ht_operation_mode & IEEE80211_HT_OP_MODE_NON_GF_STA_PRSNT);
 
        rcu_read_unlock();
@@ -2568,7 +2568,7 @@ int iwl_mac_config(struct ieee80211_hw *hw, u32 changed)
        struct iwl_priv *priv = hw->priv;
        const struct iwl_channel_info *ch_info;
        struct ieee80211_conf *conf = &hw->conf;
-       struct iwl_ht_info *ht_conf = &priv->current_ht_config;
+       struct iwl_ht_config *ht_conf = &priv->current_ht_config;
        unsigned long flags = 0;
        int ret = 0;
        u16 ch;
@@ -2735,7 +2735,7 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
        IWL_DEBUG_MAC80211(priv, "enter\n");
 
        spin_lock_irqsave(&priv->lock, flags);
-       memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_info));
+       memset(&priv->current_ht_config, 0, sizeof(struct iwl_ht_config));
        spin_unlock_irqrestore(&priv->lock, flags);
 
        iwl_reset_qos(priv);
index 79ea42531e283bfc6172919d61c1dead4c60eccc..a2ee95028c6e0020f5ae1d0e2d57ff42d5c0c737 100644 (file)
@@ -277,7 +277,7 @@ int iwl_check_rxon_cmd(struct iwl_priv *priv);
 int iwl_full_rxon_required(struct iwl_priv *priv);
 void iwl_set_rxon_chain(struct iwl_priv *priv);
 int iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch);
-void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info);
+void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf);
 u8 iwl_is_ht40_tx_allowed(struct iwl_priv *priv,
                         struct ieee80211_sta_ht_cap *sta_ht_inf);
 void iwl_set_flags_for_band(struct iwl_priv *priv, enum ieee80211_band band);
index 961d534400346399fb899474195fda67b6244a4a..e161f8d1766e37b4a10af7cd7e5a07a01a9e929c 100644 (file)
@@ -502,7 +502,7 @@ union iwl_ht_rate_supp {
 #define CFG_HT_MPDU_DENSITY_4USEC   (0x5)
 #define CFG_HT_MPDU_DENSITY_DEF CFG_HT_MPDU_DENSITY_4USEC
 
-struct iwl_ht_info {
+struct iwl_ht_config {
        /* self configuration data */
        bool is_ht;
        bool is_40mhz;
@@ -1077,7 +1077,7 @@ struct iwl_priv {
        struct iwl_chain_noise_data chain_noise_data;
        __le16 sensitivity_tbl[HD_TABLE_SIZE];
 
-       struct iwl_ht_info current_ht_config;
+       struct iwl_ht_config current_ht_config;
        u8 last_phy_res[100];
 
        /* Rate scaling data */