cfg80211: remove enum ieee80211_band
[cascardo/linux.git] / drivers / net / wireless / intel / iwlwifi / mvm / rs.c
index 61d0a8c..81dd2f6 100644 (file)
@@ -829,7 +829,7 @@ static u32 ucode_rate_from_rs_rate(struct iwl_mvm *mvm,
 
 /* Convert a ucode rate into an rs_rate object */
 static int rs_rate_from_ucode_rate(const u32 ucode_rate,
-                                  enum ieee80211_band band,
+                                  enum nl80211_band band,
                                   struct rs_rate *rate)
 {
        u32 ant_msk = ucode_rate & RATE_MCS_ANT_ABC_MSK;
@@ -848,7 +848,7 @@ static int rs_rate_from_ucode_rate(const u32 ucode_rate,
        if (!(ucode_rate & RATE_MCS_HT_MSK) &&
            !(ucode_rate & RATE_MCS_VHT_MSK)) {
                if (num_of_ant == 1) {
-                       if (band == IEEE80211_BAND_5GHZ)
+                       if (band == NL80211_BAND_5GHZ)
                                rate->type = LQ_LEGACY_A;
                        else
                                rate->type = LQ_LEGACY_G;
@@ -1043,7 +1043,7 @@ static void rs_get_lower_rate_down_column(struct iwl_lq_sta *lq_sta,
                return;
        } else if (is_siso(rate)) {
                /* Downgrade to Legacy if we were in SISO */
-               if (lq_sta->band == IEEE80211_BAND_5GHZ)
+               if (lq_sta->band == NL80211_BAND_5GHZ)
                        rate->type = LQ_LEGACY_A;
                else
                        rate->type = LQ_LEGACY_G;
@@ -1850,7 +1850,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm,
        rate->ant = column->ant;
 
        if (column->mode == RS_LEGACY) {
-               if (lq_sta->band == IEEE80211_BAND_5GHZ)
+               if (lq_sta->band == NL80211_BAND_5GHZ)
                        rate->type = LQ_LEGACY_A;
                else
                        rate->type = LQ_LEGACY_G;
@@ -2020,7 +2020,7 @@ static void rs_get_adjacent_txp(struct iwl_mvm *mvm, int index,
 }
 
 static bool rs_tpc_allowed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
-                          struct rs_rate *rate, enum ieee80211_band band)
+                          struct rs_rate *rate, enum nl80211_band band)
 {
        int index = rate->index;
        bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM);
@@ -2126,7 +2126,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm,
        struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
        struct ieee80211_vif *vif = mvm_sta->vif;
        struct ieee80211_chanctx_conf *chanctx_conf;
-       enum ieee80211_band band;
+       enum nl80211_band band;
        struct iwl_rate_scale_data *window;
        struct rs_rate *rate = &tbl->rate;
        enum tpc_action action;
@@ -2148,7 +2148,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm,
        rcu_read_lock();
        chanctx_conf = rcu_dereference(vif->chanctx_conf);
        if (WARN_ON(!chanctx_conf))
-               band = IEEE80211_NUM_BANDS;
+               band = NUM_NL80211_BANDS;
        else
                band = chanctx_conf->def.chan->band;
        rcu_read_unlock();
@@ -2606,7 +2606,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm,
                rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2;
        else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID)
                rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO;
-       else if (lq_sta->band == IEEE80211_BAND_5GHZ)
+       else if (lq_sta->band == NL80211_BAND_5GHZ)
                rate->type = LQ_LEGACY_A;
        else
                rate->type = LQ_LEGACY_G;
@@ -2623,7 +2623,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm,
        } else {
                lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate;
 
-               if (lq_sta->band == IEEE80211_BAND_5GHZ) {
+               if (lq_sta->band == NL80211_BAND_5GHZ) {
                        lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy;
                        lq_sta->optimal_nentries =
                                ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
@@ -2679,7 +2679,7 @@ static struct rs_rate *rs_get_optimal_rate(struct iwl_mvm *mvm,
 static void rs_get_initial_rate(struct iwl_mvm *mvm,
                                struct ieee80211_sta *sta,
                                struct iwl_lq_sta *lq_sta,
-                               enum ieee80211_band band,
+                               enum nl80211_band band,
                                struct rs_rate *rate)
 {
        int i, nentries;
@@ -2714,7 +2714,7 @@ static void rs_get_initial_rate(struct iwl_mvm *mvm,
        rate->index = find_first_bit(&lq_sta->active_legacy_rate,
                                     BITS_PER_LONG);
 
-       if (band == IEEE80211_BAND_5GHZ) {
+       if (band == NL80211_BAND_5GHZ) {
                rate->type = LQ_LEGACY_A;
                initial_rates = rs_optimal_rates_5ghz_legacy;
                nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
@@ -2814,7 +2814,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm,
 static void rs_initialize_lq(struct iwl_mvm *mvm,
                             struct ieee80211_sta *sta,
                             struct iwl_lq_sta *lq_sta,
-                            enum ieee80211_band band,
+                            enum nl80211_band band,
                             bool init)
 {
        struct iwl_scale_tbl_info *tbl;
@@ -3097,7 +3097,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
  * Called after adding a new station to initialize rate scaling
  */
 void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
-                         enum ieee80211_band band, bool init)
+                         enum nl80211_band band, bool init)
 {
        int i, j;
        struct ieee80211_hw *hw = mvm->hw;
@@ -3203,7 +3203,7 @@ static void rs_rate_update(void *mvm_r,
 #ifdef CONFIG_MAC80211_DEBUGFS
 static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm,
                                            struct iwl_lq_cmd *lq_cmd,
-                                           enum ieee80211_band band,
+                                           enum nl80211_band band,
                                            u32 ucode_rate)
 {
        struct rs_rate rate;