aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi
diff options
context:
space:
mode:
authorLuca Coelho <luciano.coelho@intel.com>2016-05-10 03:30:56 -0400
committerLuca Coelho <luciano.coelho@intel.com>2016-05-10 03:30:56 -0400
commitbae6692c24236d0203f88a444986d86437a858fa (patch)
tree0f9bee1250af3046fa46049736b615b81e60f56e /drivers/net/wireless/intel/iwlwifi
parent46167a8fd4248533ad15867e6988ff20e76de641 (diff)
parent57fbcce37be7c1d2622b56587c10ade00e96afa3 (diff)
Merge tag 'mac80211-next-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next into master
To synchronize with Kalle, here's just a big change that affects all drivers - removing the duplicated enum ieee80211_band and replacing it by enum nl80211_band. On top of that, just a small documentation update.
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/agn.h8
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/dev.h6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/devices.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/lib.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c12
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/main.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/rs.c22
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/rs.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/rx.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/rxon.c10
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/scan.c38
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/sta.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/tx.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-1000.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-2000.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-5000.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-6000.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-7000.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-8000.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-9000.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-config.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c38
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c26
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/coex.c10
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c10
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c16
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mvm.h6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rs.c28
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rs.h4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rx.c4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/scan.c36
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tdls.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tx.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/utils.c4
40 files changed, 178 insertions, 178 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/agn.h b/drivers/net/wireless/intel/iwlwifi/dvm/agn.h
index 9de277c6c420..b79e38734f2f 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/agn.h
@@ -158,7 +158,7 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
158 struct iwl_rxon_context *ctx); 158 struct iwl_rxon_context *ctx);
159void iwl_set_flags_for_band(struct iwl_priv *priv, 159void iwl_set_flags_for_band(struct iwl_priv *priv,
160 struct iwl_rxon_context *ctx, 160 struct iwl_rxon_context *ctx,
161 enum ieee80211_band band, 161 enum nl80211_band band,
162 struct ieee80211_vif *vif); 162 struct ieee80211_vif *vif);
163 163
164/* uCode */ 164/* uCode */
@@ -186,7 +186,7 @@ int iwl_send_statistics_request(struct iwl_priv *priv,
186 u8 flags, bool clear); 186 u8 flags, bool clear);
187 187
188static inline const struct ieee80211_supported_band *iwl_get_hw_mode( 188static inline const struct ieee80211_supported_band *iwl_get_hw_mode(
189 struct iwl_priv *priv, enum ieee80211_band band) 189 struct iwl_priv *priv, enum nl80211_band band)
190{ 190{
191 return priv->hw->wiphy->bands[band]; 191 return priv->hw->wiphy->bands[band];
192} 192}
@@ -198,7 +198,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan);
198#endif 198#endif
199 199
200/* rx */ 200/* rx */
201int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band); 201int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band);
202void iwl_setup_rx_handlers(struct iwl_priv *priv); 202void iwl_setup_rx_handlers(struct iwl_priv *priv);
203void iwl_chswitch_done(struct iwl_priv *priv, bool is_success); 203void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
204 204
@@ -258,7 +258,7 @@ void iwl_cancel_scan_deferred_work(struct iwl_priv *priv);
258int __must_check iwl_scan_initiate(struct iwl_priv *priv, 258int __must_check iwl_scan_initiate(struct iwl_priv *priv,
259 struct ieee80211_vif *vif, 259 struct ieee80211_vif *vif,
260 enum iwl_scan_type scan_type, 260 enum iwl_scan_type scan_type,
261 enum ieee80211_band band); 261 enum nl80211_band band);
262 262
263/* For faster active scanning, scan will move to the next channel if fewer than 263/* For faster active scanning, scan will move to the next channel if fewer than
264 * PLCP_QUIET_THRESH packets are heard on this channel within 264 * PLCP_QUIET_THRESH packets are heard on this channel within
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
index 74c51615244e..f6591c83d636 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c
@@ -335,7 +335,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf,
335 if (!buf) 335 if (!buf)
336 return -ENOMEM; 336 return -ENOMEM;
337 337
338 supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_2GHZ); 338 supp_band = iwl_get_hw_mode(priv, NL80211_BAND_2GHZ);
339 if (supp_band) { 339 if (supp_band) {
340 channels = supp_band->channels; 340 channels = supp_band->channels;
341 341
@@ -358,7 +358,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf,
358 IEEE80211_CHAN_NO_IR ? 358 IEEE80211_CHAN_NO_IR ?
359 "passive only" : "active/passive"); 359 "passive only" : "active/passive");
360 } 360 }
361 supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_5GHZ); 361 supp_band = iwl_get_hw_mode(priv, NL80211_BAND_5GHZ);
362 if (supp_band) { 362 if (supp_band) {
363 channels = supp_band->channels; 363 channels = supp_band->channels;
364 364
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/dev.h b/drivers/net/wireless/intel/iwlwifi/dvm/dev.h
index 1a7ead753eee..8148df61a916 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/dev.h
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/dev.h
@@ -677,7 +677,7 @@ struct iwl_priv {
677 677
678 struct iwl_hw_params hw_params; 678 struct iwl_hw_params hw_params;
679 679
680 enum ieee80211_band band; 680 enum nl80211_band band;
681 u8 valid_contexts; 681 u8 valid_contexts;
682 682
683 void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv, 683 void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv,
@@ -722,11 +722,11 @@ struct iwl_priv {
722 unsigned long scan_start; 722 unsigned long scan_start;
723 unsigned long scan_start_tsf; 723 unsigned long scan_start_tsf;
724 void *scan_cmd; 724 void *scan_cmd;
725 enum ieee80211_band scan_band; 725 enum nl80211_band scan_band;
726 struct cfg80211_scan_request *scan_request; 726 struct cfg80211_scan_request *scan_request;
727 struct ieee80211_vif *scan_vif; 727 struct ieee80211_vif *scan_vif;
728 enum iwl_scan_type scan_type; 728 enum iwl_scan_type scan_type;
729 u8 scan_tx_ant[IEEE80211_NUM_BANDS]; 729 u8 scan_tx_ant[NUM_NL80211_BANDS];
730 u8 mgmt_tx_ant; 730 u8 mgmt_tx_ant;
731 731
732 /* max number of station keys */ 732 /* max number of station keys */
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/devices.c b/drivers/net/wireless/intel/iwlwifi/dvm/devices.c
index cc13c04063a5..f21732ec3b25 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/devices.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/devices.c
@@ -420,7 +420,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv,
420 .data = { &cmd, }, 420 .data = { &cmd, },
421 }; 421 };
422 422
423 cmd.band = priv->band == IEEE80211_BAND_2GHZ; 423 cmd.band = priv->band == NL80211_BAND_2GHZ;
424 ch = ch_switch->chandef.chan->hw_value; 424 ch = ch_switch->chandef.chan->hw_value;
425 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", 425 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
426 ctx->active.channel, ch); 426 ctx->active.channel, ch);
@@ -588,7 +588,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
588 588
589 hcmd.data[0] = cmd; 589 hcmd.data[0] = cmd;
590 590
591 cmd->band = priv->band == IEEE80211_BAND_2GHZ; 591 cmd->band = priv->band == NL80211_BAND_2GHZ;
592 ch = ch_switch->chandef.chan->hw_value; 592 ch = ch_switch->chandef.chan->hw_value;
593 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", 593 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
594 ctx->active.channel, ch); 594 ctx->active.channel, ch);
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
index 1799469268ea..8dda52ae3bb5 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c
@@ -94,7 +94,7 @@ void iwlagn_temperature(struct iwl_priv *priv)
94 iwl_tt_handler(priv); 94 iwl_tt_handler(priv);
95} 95}
96 96
97int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) 97int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band)
98{ 98{
99 int idx = 0; 99 int idx = 0;
100 int band_offset = 0; 100 int band_offset = 0;
@@ -105,7 +105,7 @@ int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band)
105 return idx; 105 return idx;
106 /* Legacy rate format, search for match in table */ 106 /* Legacy rate format, search for match in table */
107 } else { 107 } else {
108 if (band == IEEE80211_BAND_5GHZ) 108 if (band == NL80211_BAND_5GHZ)
109 band_offset = IWL_FIRST_OFDM_RATE; 109 band_offset = IWL_FIRST_OFDM_RATE;
110 for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) 110 for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++)
111 if (iwl_rates[idx].plcp == (rate_n_flags & 0xFF)) 111 if (iwl_rates[idx].plcp == (rate_n_flags & 0xFF))
@@ -878,7 +878,7 @@ u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant, u8 valid)
878 int i; 878 int i;
879 u8 ind = ant; 879 u8 ind = ant;
880 880
881 if (priv->band == IEEE80211_BAND_2GHZ && 881 if (priv->band == NL80211_BAND_2GHZ &&
882 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) 882 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)
883 return 0; 883 return 0;
884 884
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
index c63ea79571ff..8c0719468d00 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c
@@ -202,12 +202,12 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
202 202
203 hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; 203 hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL;
204 204
205 if (priv->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels) 205 if (priv->nvm_data->bands[NL80211_BAND_2GHZ].n_channels)
206 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = 206 priv->hw->wiphy->bands[NL80211_BAND_2GHZ] =
207 &priv->nvm_data->bands[IEEE80211_BAND_2GHZ]; 207 &priv->nvm_data->bands[NL80211_BAND_2GHZ];
208 if (priv->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels) 208 if (priv->nvm_data->bands[NL80211_BAND_5GHZ].n_channels)
209 priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = 209 priv->hw->wiphy->bands[NL80211_BAND_5GHZ] =
210 &priv->nvm_data->bands[IEEE80211_BAND_5GHZ]; 210 &priv->nvm_data->bands[NL80211_BAND_5GHZ];
211 211
212 hw->wiphy->hw_version = priv->trans->hw_id; 212 hw->wiphy->hw_version = priv->trans->hw_id;
213 213
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c
index 614716251c39..37b32a6f60fd 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c
@@ -262,7 +262,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv)
262 rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant); 262 rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant);
263 263
264 /* In mac80211, rates for 5 GHz start at 0 */ 264 /* In mac80211, rates for 5 GHz start at 0 */
265 if (info->band == IEEE80211_BAND_5GHZ) 265 if (info->band == NL80211_BAND_5GHZ)
266 rate += IWL_FIRST_OFDM_RATE; 266 rate += IWL_FIRST_OFDM_RATE;
267 else if (rate >= IWL_FIRST_CCK_RATE && rate <= IWL_LAST_CCK_RATE) 267 else if (rate >= IWL_FIRST_CCK_RATE && rate <= IWL_LAST_CCK_RATE)
268 rate_flags |= RATE_MCS_CCK_MSK; 268 rate_flags |= RATE_MCS_CCK_MSK;
@@ -1117,7 +1117,7 @@ static int iwl_init_drv(struct iwl_priv *priv)
1117 1117
1118 INIT_LIST_HEAD(&priv->calib_results); 1118 INIT_LIST_HEAD(&priv->calib_results);
1119 1119
1120 priv->band = IEEE80211_BAND_2GHZ; 1120 priv->band = NL80211_BAND_2GHZ;
1121 1121
1122 priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold; 1122 priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold;
1123 1123
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
index ee7505537c96..b95c2d76db33 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c
@@ -599,7 +599,7 @@ static u32 rate_n_flags_from_tbl(struct iwl_priv *priv,
599 * fill "search" or "active" tx mode table. 599 * fill "search" or "active" tx mode table.
600 */ 600 */
601static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags, 601static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
602 enum ieee80211_band band, 602 enum nl80211_band band,
603 struct iwl_scale_tbl_info *tbl, 603 struct iwl_scale_tbl_info *tbl,
604 int *rate_idx) 604 int *rate_idx)
605{ 605{
@@ -624,7 +624,7 @@ static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
624 /* legacy rate format */ 624 /* legacy rate format */
625 if (!(rate_n_flags & RATE_MCS_HT_MSK)) { 625 if (!(rate_n_flags & RATE_MCS_HT_MSK)) {
626 if (num_of_ant == 1) { 626 if (num_of_ant == 1) {
627 if (band == IEEE80211_BAND_5GHZ) 627 if (band == NL80211_BAND_5GHZ)
628 tbl->lq_type = LQ_A; 628 tbl->lq_type = LQ_A;
629 else 629 else
630 tbl->lq_type = LQ_G; 630 tbl->lq_type = LQ_G;
@@ -802,7 +802,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta,
802 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { 802 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) {
803 switch_to_legacy = 1; 803 switch_to_legacy = 1;
804 scale_index = rs_ht_to_legacy[scale_index]; 804 scale_index = rs_ht_to_legacy[scale_index];
805 if (lq_sta->band == IEEE80211_BAND_5GHZ) 805 if (lq_sta->band == NL80211_BAND_5GHZ)
806 tbl->lq_type = LQ_A; 806 tbl->lq_type = LQ_A;
807 else 807 else
808 tbl->lq_type = LQ_G; 808 tbl->lq_type = LQ_G;
@@ -821,7 +821,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta,
821 /* Mask with station rate restriction */ 821 /* Mask with station rate restriction */
822 if (is_legacy(tbl->lq_type)) { 822 if (is_legacy(tbl->lq_type)) {
823 /* supp_rates has no CCK bits in A mode */ 823 /* supp_rates has no CCK bits in A mode */
824 if (lq_sta->band == IEEE80211_BAND_5GHZ) 824 if (lq_sta->band == NL80211_BAND_5GHZ)
825 rate_mask = (u16)(rate_mask & 825 rate_mask = (u16)(rate_mask &
826 (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); 826 (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE));
827 else 827 else
@@ -939,7 +939,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
939 table = &lq_sta->lq; 939 table = &lq_sta->lq;
940 tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); 940 tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags);
941 rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, &rs_index); 941 rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, &rs_index);
942 if (priv->band == IEEE80211_BAND_5GHZ) 942 if (priv->band == NL80211_BAND_5GHZ)
943 rs_index -= IWL_FIRST_OFDM_RATE; 943 rs_index -= IWL_FIRST_OFDM_RATE;
944 mac_flags = info->status.rates[0].flags; 944 mac_flags = info->status.rates[0].flags;
945 mac_index = info->status.rates[0].idx; 945 mac_index = info->status.rates[0].idx;
@@ -952,7 +952,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband,
952 * mac80211 HT index is always zero-indexed; we need to move 952 * mac80211 HT index is always zero-indexed; we need to move
953 * HT OFDM rates after CCK rates in 2.4 GHz band 953 * HT OFDM rates after CCK rates in 2.4 GHz band
954 */ 954 */
955 if (priv->band == IEEE80211_BAND_2GHZ) 955 if (priv->band == NL80211_BAND_2GHZ)
956 mac_index += IWL_FIRST_OFDM_RATE; 956 mac_index += IWL_FIRST_OFDM_RATE;
957 } 957 }
958 /* Here we actually compare this rate to the latest LQ command */ 958 /* Here we actually compare this rate to the latest LQ command */
@@ -2284,7 +2284,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv,
2284 2284
2285 /* mask with station rate restriction */ 2285 /* mask with station rate restriction */
2286 if (is_legacy(tbl->lq_type)) { 2286 if (is_legacy(tbl->lq_type)) {
2287 if (lq_sta->band == IEEE80211_BAND_5GHZ) 2287 if (lq_sta->band == NL80211_BAND_5GHZ)
2288 /* supp_rates has no CCK bits in A mode */ 2288 /* supp_rates has no CCK bits in A mode */
2289 rate_scale_index_msk = (u16) (rate_mask & 2289 rate_scale_index_msk = (u16) (rate_mask &
2290 (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); 2290 (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE));
@@ -2721,7 +2721,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2721 /* Get max rate if user set max rate */ 2721 /* Get max rate if user set max rate */
2722 if (lq_sta) { 2722 if (lq_sta) {
2723 lq_sta->max_rate_idx = txrc->max_rate_idx; 2723 lq_sta->max_rate_idx = txrc->max_rate_idx;
2724 if ((sband->band == IEEE80211_BAND_5GHZ) && 2724 if ((sband->band == NL80211_BAND_5GHZ) &&
2725 (lq_sta->max_rate_idx != -1)) 2725 (lq_sta->max_rate_idx != -1))
2726 lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE; 2726 lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE;
2727 if ((lq_sta->max_rate_idx < 0) || 2727 if ((lq_sta->max_rate_idx < 0) ||
@@ -2763,11 +2763,11 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
2763 } else { 2763 } else {
2764 /* Check for invalid rates */ 2764 /* Check for invalid rates */
2765 if ((rate_idx < 0) || (rate_idx >= IWL_RATE_COUNT_LEGACY) || 2765 if ((rate_idx < 0) || (rate_idx >= IWL_RATE_COUNT_LEGACY) ||
2766 ((sband->band == IEEE80211_BAND_5GHZ) && 2766 ((sband->band == NL80211_BAND_5GHZ) &&
2767 (rate_idx < IWL_FIRST_OFDM_RATE))) 2767 (rate_idx < IWL_FIRST_OFDM_RATE)))
2768 rate_idx = rate_lowest_index(sband, sta); 2768 rate_idx = rate_lowest_index(sband, sta);
2769 /* On valid 5 GHz rate, adjust index */ 2769 /* On valid 5 GHz rate, adjust index */
2770 else if (sband->band == IEEE80211_BAND_5GHZ) 2770 else if (sband->band == NL80211_BAND_5GHZ)
2771 rate_idx -= IWL_FIRST_OFDM_RATE; 2771 rate_idx -= IWL_FIRST_OFDM_RATE;
2772 info->control.rates[0].flags = 0; 2772 info->control.rates[0].flags = 0;
2773 } 2773 }
@@ -2880,7 +2880,7 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i
2880 2880
2881 /* Set last_txrate_idx to lowest rate */ 2881 /* Set last_txrate_idx to lowest rate */
2882 lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); 2882 lq_sta->last_txrate_idx = rate_lowest_index(sband, sta);
2883 if (sband->band == IEEE80211_BAND_5GHZ) 2883 if (sband->band == NL80211_BAND_5GHZ)
2884 lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; 2884 lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE;
2885 lq_sta->is_agg = 0; 2885 lq_sta->is_agg = 0;
2886#ifdef CONFIG_MAC80211_DEBUGFS 2886#ifdef CONFIG_MAC80211_DEBUGFS
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rs.h b/drivers/net/wireless/intel/iwlwifi/dvm/rs.h
index c5fe44584613..50c1e951dd2d 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/rs.h
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/rs.h
@@ -355,7 +355,7 @@ struct iwl_lq_sta {
355 u8 action_counter; /* # mode-switch actions tried */ 355 u8 action_counter; /* # mode-switch actions tried */
356 u8 is_green; 356 u8 is_green;
357 u8 is_dup; 357 u8 is_dup;
358 enum ieee80211_band band; 358 enum nl80211_band band;
359 359
360 /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ 360 /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */
361 u32 supp_rates; 361 u32 supp_rates;
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rx.c b/drivers/net/wireless/intel/iwlwifi/dvm/rx.c
index 52ab1e012e8f..dfa2041cfdac 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/rx.c
@@ -686,7 +686,7 @@ static void iwlagn_pass_packet_to_mac80211(struct iwl_priv *priv,
686 686
687 memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats)); 687 memcpy(IEEE80211_SKB_RXCB(skb), stats, sizeof(*stats));
688 688
689 ieee80211_rx_napi(priv->hw, skb, priv->napi); 689 ieee80211_rx_napi(priv->hw, NULL, skb, priv->napi);
690} 690}
691 691
692static u32 iwlagn_translate_rx_status(struct iwl_priv *priv, u32 decrypt_in) 692static u32 iwlagn_translate_rx_status(struct iwl_priv *priv, u32 decrypt_in)
@@ -834,7 +834,7 @@ static void iwlagn_rx_reply_rx(struct iwl_priv *priv,
834 /* rx_status carries information about the packet to mac80211 */ 834 /* rx_status carries information about the packet to mac80211 */
835 rx_status.mactime = le64_to_cpu(phy_res->timestamp); 835 rx_status.mactime = le64_to_cpu(phy_res->timestamp);
836 rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? 836 rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ?
837 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 837 NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
838 rx_status.freq = 838 rx_status.freq =
839 ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), 839 ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel),
840 rx_status.band); 840 rx_status.band);
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c b/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c
index 2d47cb24c48b..b228552184b5 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c
@@ -719,7 +719,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf)
719void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, 719void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
720 struct iwl_rxon_context *ctx) 720 struct iwl_rxon_context *ctx)
721{ 721{
722 enum ieee80211_band band = ch->band; 722 enum nl80211_band band = ch->band;
723 u16 channel = ch->hw_value; 723 u16 channel = ch->hw_value;
724 724
725 if ((le16_to_cpu(ctx->staging.channel) == channel) && 725 if ((le16_to_cpu(ctx->staging.channel) == channel) &&
@@ -727,7 +727,7 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
727 return; 727 return;
728 728
729 ctx->staging.channel = cpu_to_le16(channel); 729 ctx->staging.channel = cpu_to_le16(channel);
730 if (band == IEEE80211_BAND_5GHZ) 730 if (band == NL80211_BAND_5GHZ)
731 ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK; 731 ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK;
732 else 732 else
733 ctx->staging.flags |= RXON_FLG_BAND_24G_MSK; 733 ctx->staging.flags |= RXON_FLG_BAND_24G_MSK;
@@ -740,10 +740,10 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
740 740
741void iwl_set_flags_for_band(struct iwl_priv *priv, 741void iwl_set_flags_for_band(struct iwl_priv *priv,
742 struct iwl_rxon_context *ctx, 742 struct iwl_rxon_context *ctx,
743 enum ieee80211_band band, 743 enum nl80211_band band,
744 struct ieee80211_vif *vif) 744 struct ieee80211_vif *vif)
745{ 745{
746 if (band == IEEE80211_BAND_5GHZ) { 746 if (band == NL80211_BAND_5GHZ) {
747 ctx->staging.flags &= 747 ctx->staging.flags &=
748 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK 748 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK
749 | RXON_FLG_CCK_MSK); 749 | RXON_FLG_CCK_MSK);
@@ -1476,7 +1476,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw,
1476 1476
1477 iwlagn_set_rxon_chain(priv, ctx); 1477 iwlagn_set_rxon_chain(priv, ctx);
1478 1478
1479 if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) 1479 if (bss_conf->use_cts_prot && (priv->band != NL80211_BAND_5GHZ))
1480 ctx->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; 1480 ctx->staging.flags |= RXON_FLG_TGG_PROTECT_MSK;
1481 else 1481 else
1482 ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; 1482 ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
index 81a2ddbe9569..d01766f16175 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c
@@ -312,7 +312,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv,
312 scan_notif->tsf_high, scan_notif->status); 312 scan_notif->tsf_high, scan_notif->status);
313 313
314 IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n", 314 IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n",
315 (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", 315 (priv->scan_band == NL80211_BAND_2GHZ) ? "2.4" : "5.2",
316 jiffies_to_msecs(jiffies - priv->scan_start)); 316 jiffies_to_msecs(jiffies - priv->scan_start));
317 317
318 /* 318 /*
@@ -362,9 +362,9 @@ void iwl_setup_rx_scan_handlers(struct iwl_priv *priv)
362} 362}
363 363
364static u16 iwl_get_active_dwell_time(struct iwl_priv *priv, 364static u16 iwl_get_active_dwell_time(struct iwl_priv *priv,
365 enum ieee80211_band band, u8 n_probes) 365 enum nl80211_band band, u8 n_probes)
366{ 366{
367 if (band == IEEE80211_BAND_5GHZ) 367 if (band == NL80211_BAND_5GHZ)
368 return IWL_ACTIVE_DWELL_TIME_52 + 368 return IWL_ACTIVE_DWELL_TIME_52 +
369 IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); 369 IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1);
370 else 370 else
@@ -431,9 +431,9 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time)
431} 431}
432 432
433static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, 433static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
434 enum ieee80211_band band) 434 enum nl80211_band band)
435{ 435{
436 u16 passive = (band == IEEE80211_BAND_2GHZ) ? 436 u16 passive = (band == NL80211_BAND_2GHZ) ?
437 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : 437 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 :
438 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52; 438 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52;
439 439
@@ -442,7 +442,7 @@ static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
442 442
443/* Return valid, unused, channel for a passive scan to reset the RF */ 443/* Return valid, unused, channel for a passive scan to reset the RF */
444static u8 iwl_get_single_channel_number(struct iwl_priv *priv, 444static u8 iwl_get_single_channel_number(struct iwl_priv *priv,
445 enum ieee80211_band band) 445 enum nl80211_band band)
446{ 446{
447 struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band]; 447 struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band];
448 struct iwl_rxon_context *ctx; 448 struct iwl_rxon_context *ctx;
@@ -470,7 +470,7 @@ static u8 iwl_get_single_channel_number(struct iwl_priv *priv,
470 470
471static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, 471static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
472 struct ieee80211_vif *vif, 472 struct ieee80211_vif *vif,
473 enum ieee80211_band band, 473 enum nl80211_band band,
474 struct iwl_scan_channel *scan_ch) 474 struct iwl_scan_channel *scan_ch)
475{ 475{
476 const struct ieee80211_supported_band *sband; 476 const struct ieee80211_supported_band *sband;
@@ -492,7 +492,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
492 cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME); 492 cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME);
493 /* Set txpower levels to defaults */ 493 /* Set txpower levels to defaults */
494 scan_ch->dsp_atten = 110; 494 scan_ch->dsp_atten = 110;
495 if (band == IEEE80211_BAND_5GHZ) 495 if (band == NL80211_BAND_5GHZ)
496 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; 496 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
497 else 497 else
498 scan_ch->tx_gain = ((1 << 5) | (5 << 3)); 498 scan_ch->tx_gain = ((1 << 5) | (5 << 3));
@@ -505,7 +505,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
505 505
506static int iwl_get_channels_for_scan(struct iwl_priv *priv, 506static int iwl_get_channels_for_scan(struct iwl_priv *priv,
507 struct ieee80211_vif *vif, 507 struct ieee80211_vif *vif,
508 enum ieee80211_band band, 508 enum nl80211_band band,
509 u8 is_active, u8 n_probes, 509 u8 is_active, u8 n_probes,
510 struct iwl_scan_channel *scan_ch) 510 struct iwl_scan_channel *scan_ch)
511{ 511{
@@ -553,7 +553,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv,
553 * power level: 553 * power level:
554 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; 554 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3;
555 */ 555 */
556 if (band == IEEE80211_BAND_5GHZ) 556 if (band == NL80211_BAND_5GHZ)
557 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; 557 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
558 else 558 else
559 scan_ch->tx_gain = ((1 << 5) | (5 << 3)); 559 scan_ch->tx_gain = ((1 << 5) | (5 << 3));
@@ -636,7 +636,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
636 u32 rate_flags = 0; 636 u32 rate_flags = 0;
637 u16 cmd_len = 0; 637 u16 cmd_len = 0;
638 u16 rx_chain = 0; 638 u16 rx_chain = 0;
639 enum ieee80211_band band; 639 enum nl80211_band band;
640 u8 n_probes = 0; 640 u8 n_probes = 0;
641 u8 rx_ant = priv->nvm_data->valid_rx_ant; 641 u8 rx_ant = priv->nvm_data->valid_rx_ant;
642 u8 rate; 642 u8 rate;
@@ -750,7 +750,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
750 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 750 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
751 751
752 switch (priv->scan_band) { 752 switch (priv->scan_band) {
753 case IEEE80211_BAND_2GHZ: 753 case NL80211_BAND_2GHZ:
754 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; 754 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
755 chan_mod = le32_to_cpu( 755 chan_mod = le32_to_cpu(
756 priv->contexts[IWL_RXON_CTX_BSS].active.flags & 756 priv->contexts[IWL_RXON_CTX_BSS].active.flags &
@@ -771,7 +771,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
771 priv->lib->bt_params->advanced_bt_coexist) 771 priv->lib->bt_params->advanced_bt_coexist)
772 scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; 772 scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT;
773 break; 773 break;
774 case IEEE80211_BAND_5GHZ: 774 case NL80211_BAND_5GHZ:
775 rate = IWL_RATE_6M_PLCP; 775 rate = IWL_RATE_6M_PLCP;
776 break; 776 break;
777 default: 777 default:
@@ -809,7 +809,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
809 809
810 band = priv->scan_band; 810 band = priv->scan_band;
811 811
812 if (band == IEEE80211_BAND_2GHZ && 812 if (band == NL80211_BAND_2GHZ &&
813 priv->lib->bt_params && 813 priv->lib->bt_params &&
814 priv->lib->bt_params->advanced_bt_coexist) { 814 priv->lib->bt_params->advanced_bt_coexist) {
815 /* transmit 2.4 GHz probes only on first antenna */ 815 /* transmit 2.4 GHz probes only on first antenna */
@@ -925,16 +925,16 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
925void iwl_init_scan_params(struct iwl_priv *priv) 925void iwl_init_scan_params(struct iwl_priv *priv)
926{ 926{
927 u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1; 927 u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1;
928 if (!priv->scan_tx_ant[IEEE80211_BAND_5GHZ]) 928 if (!priv->scan_tx_ant[NL80211_BAND_5GHZ])
929 priv->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx; 929 priv->scan_tx_ant[NL80211_BAND_5GHZ] = ant_idx;
930 if (!priv->scan_tx_ant[IEEE80211_BAND_2GHZ]) 930 if (!priv->scan_tx_ant[NL80211_BAND_2GHZ])
931 priv->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx; 931 priv->scan_tx_ant[NL80211_BAND_2GHZ] = ant_idx;
932} 932}
933 933
934int __must_check iwl_scan_initiate(struct iwl_priv *priv, 934int __must_check iwl_scan_initiate(struct iwl_priv *priv,
935 struct ieee80211_vif *vif, 935 struct ieee80211_vif *vif,
936 enum iwl_scan_type scan_type, 936 enum iwl_scan_type scan_type,
937 enum ieee80211_band band) 937 enum nl80211_band band)
938{ 938{
939 int ret; 939 int ret;
940 940
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c
index 8e9768a553e4..de6ec9b7ace4 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c
@@ -579,7 +579,7 @@ static void iwl_sta_fill_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
579 579
580 /* Set up the rate scaling to start at selected rate, fall back 580 /* Set up the rate scaling to start at selected rate, fall back
581 * all the way down to 1M in IEEE order, and then spin on 1M */ 581 * all the way down to 1M in IEEE order, and then spin on 1M */
582 if (priv->band == IEEE80211_BAND_5GHZ) 582 if (priv->band == NL80211_BAND_5GHZ)
583 r = IWL_RATE_6M_INDEX; 583 r = IWL_RATE_6M_INDEX;
584 else if (ctx && ctx->vif && ctx->vif->p2p) 584 else if (ctx && ctx->vif && ctx->vif->p2p)
585 r = IWL_RATE_6M_INDEX; 585 r = IWL_RATE_6M_INDEX;
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/tx.c b/drivers/net/wireless/intel/iwlwifi/dvm/tx.c
index 59e2001c39f8..4b97371c3b42 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/tx.c
@@ -81,7 +81,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
81 tx_flags |= TX_CMD_FLG_TSF_MSK; 81 tx_flags |= TX_CMD_FLG_TSF_MSK;
82 else if (ieee80211_is_back_req(fc)) 82 else if (ieee80211_is_back_req(fc))
83 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; 83 tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK;
84 else if (info->band == IEEE80211_BAND_2GHZ && 84 else if (info->band == NL80211_BAND_2GHZ &&
85 priv->lib->bt_params && 85 priv->lib->bt_params &&
86 priv->lib->bt_params->advanced_bt_coexist && 86 priv->lib->bt_params->advanced_bt_coexist &&
87 (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || 87 (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) ||
@@ -177,7 +177,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
177 rate_idx = rate_lowest_index( 177 rate_idx = rate_lowest_index(
178 &priv->nvm_data->bands[info->band], sta); 178 &priv->nvm_data->bands[info->band], sta);
179 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ 179 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */
180 if (info->band == IEEE80211_BAND_5GHZ) 180 if (info->band == NL80211_BAND_5GHZ)
181 rate_idx += IWL_FIRST_OFDM_RATE; 181 rate_idx += IWL_FIRST_OFDM_RATE;
182 /* Get PLCP rate for tx_cmd->rate_n_flags */ 182 /* Get PLCP rate for tx_cmd->rate_n_flags */
183 rate_plcp = iwl_rates[rate_idx].plcp; 183 rate_plcp = iwl_rates[rate_idx].plcp;
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-1000.c b/drivers/net/wireless/intel/iwlwifi/iwl-1000.c
index ef22c3d168fc..5c2aae64d59f 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-1000.c
@@ -64,7 +64,7 @@ static const struct iwl_base_params iwl1000_base_params = {
64static const struct iwl_ht_params iwl1000_ht_params = { 64static const struct iwl_ht_params iwl1000_ht_params = {
65 .ht_greenfield_support = true, 65 .ht_greenfield_support = true,
66 .use_rts_for_aggregation = true, /* use rts/cts protection */ 66 .use_rts_for_aggregation = true, /* use rts/cts protection */
67 .ht40_bands = BIT(IEEE80211_BAND_2GHZ), 67 .ht40_bands = BIT(NL80211_BAND_2GHZ),
68}; 68};
69 69
70static const struct iwl_eeprom_params iwl1000_eeprom_params = { 70static const struct iwl_eeprom_params iwl1000_eeprom_params = {
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-2000.c b/drivers/net/wireless/intel/iwlwifi/iwl-2000.c
index dc246c997084..2e823bdc4757 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-2000.c
@@ -89,7 +89,7 @@ static const struct iwl_base_params iwl2030_base_params = {
89static const struct iwl_ht_params iwl2000_ht_params = { 89static const struct iwl_ht_params iwl2000_ht_params = {
90 .ht_greenfield_support = true, 90 .ht_greenfield_support = true,
91 .use_rts_for_aggregation = true, /* use rts/cts protection */ 91 .use_rts_for_aggregation = true, /* use rts/cts protection */
92 .ht40_bands = BIT(IEEE80211_BAND_2GHZ), 92 .ht40_bands = BIT(NL80211_BAND_2GHZ),
93}; 93};
94 94
95static const struct iwl_eeprom_params iwl20x0_eeprom_params = { 95static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-5000.c b/drivers/net/wireless/intel/iwlwifi/iwl-5000.c
index 4dcdab6781cc..4c3e3cf4c799 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-5000.c
@@ -62,7 +62,7 @@ static const struct iwl_base_params iwl5000_base_params = {
62 62
63static const struct iwl_ht_params iwl5000_ht_params = { 63static const struct iwl_ht_params iwl5000_ht_params = {
64 .ht_greenfield_support = true, 64 .ht_greenfield_support = true,
65 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), 65 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
66}; 66};
67 67
68static const struct iwl_eeprom_params iwl5000_eeprom_params = { 68static const struct iwl_eeprom_params iwl5000_eeprom_params = {
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-6000.c b/drivers/net/wireless/intel/iwlwifi/iwl-6000.c
index 9938f5340ac0..5a7b7e1f0aab 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-6000.c
@@ -110,7 +110,7 @@ static const struct iwl_base_params iwl6000_g2_base_params = {
110static const struct iwl_ht_params iwl6000_ht_params = { 110static const struct iwl_ht_params iwl6000_ht_params = {
111 .ht_greenfield_support = true, 111 .ht_greenfield_support = true,
112 .use_rts_for_aggregation = true, /* use rts/cts protection */ 112 .use_rts_for_aggregation = true, /* use rts/cts protection */
113 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), 113 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
114}; 114};
115 115
116static const struct iwl_eeprom_params iwl6000_eeprom_params = { 116static const struct iwl_eeprom_params iwl6000_eeprom_params = {
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
index b6283c881d42..abd2904ecc48 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c
@@ -156,7 +156,7 @@ static const struct iwl_tt_params iwl7000_high_temp_tt_params = {
156 156
157static const struct iwl_ht_params iwl7000_ht_params = { 157static const struct iwl_ht_params iwl7000_ht_params = {
158 .stbc = true, 158 .stbc = true,
159 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), 159 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
160}; 160};
161 161
162#define IWL_DEVICE_7000_COMMON \ 162#define IWL_DEVICE_7000_COMMON \
@@ -287,7 +287,7 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = {
287static const struct iwl_ht_params iwl7265_ht_params = { 287static const struct iwl_ht_params iwl7265_ht_params = {
288 .stbc = true, 288 .stbc = true,
289 .ldpc = true, 289 .ldpc = true,
290 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), 290 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
291}; 291};
292 292
293const struct iwl_cfg iwl3165_2ac_cfg = { 293const struct iwl_cfg iwl3165_2ac_cfg = {
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
index 0728a288aa3d..a9212a12f4da 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c
@@ -124,7 +124,7 @@ static const struct iwl_base_params iwl8000_base_params = {
124static const struct iwl_ht_params iwl8000_ht_params = { 124static const struct iwl_ht_params iwl8000_ht_params = {
125 .stbc = true, 125 .stbc = true,
126 .ldpc = true, 126 .ldpc = true,
127 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), 127 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
128}; 128};
129 129
130static const struct iwl_tt_params iwl8000_tt_params = { 130static const struct iwl_tt_params iwl8000_tt_params = {
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c
index a3d35aa291a9..b9aca3795f06 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c
@@ -93,7 +93,7 @@ static const struct iwl_base_params iwl9000_base_params = {
93static const struct iwl_ht_params iwl9000_ht_params = { 93static const struct iwl_ht_params iwl9000_ht_params = {
94 .stbc = true, 94 .stbc = true,
95 .ldpc = true, 95 .ldpc = true,
96 .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), 96 .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
97}; 97};
98 98
99static const struct iwl_tt_params iwl9000_tt_params = { 99static const struct iwl_tt_params iwl9000_tt_params = {
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index 08bb4f4e424a..720679889ab3 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -185,7 +185,7 @@ struct iwl_base_params {
185 * @stbc: support Tx STBC and 1*SS Rx STBC 185 * @stbc: support Tx STBC and 1*SS Rx STBC
186 * @ldpc: support Tx/Rx with LDPC 186 * @ldpc: support Tx/Rx with LDPC
187 * @use_rts_for_aggregation: use rts/cts protection for HT traffic 187 * @use_rts_for_aggregation: use rts/cts protection for HT traffic
188 * @ht40_bands: bitmap of bands (using %IEEE80211_BAND_*) that support HT40 188 * @ht40_bands: bitmap of bands (using %NL80211_BAND_*) that support HT40
189 */ 189 */
190struct iwl_ht_params { 190struct iwl_ht_params {
191 enum ieee80211_smps_mode smps_mode; 191 enum ieee80211_smps_mode smps_mode;
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
index c15f5be85197..bf1b69aec813 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
@@ -390,10 +390,10 @@ iwl_eeprom_enh_txp_read_element(struct iwl_nvm_data *data,
390 int n_channels, s8 max_txpower_avg) 390 int n_channels, s8 max_txpower_avg)
391{ 391{
392 int ch_idx; 392 int ch_idx;
393 enum ieee80211_band band; 393 enum nl80211_band band;
394 394
395 band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ? 395 band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ?
396 IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; 396 NL80211_BAND_5GHZ : NL80211_BAND_2GHZ;
397 397
398 for (ch_idx = 0; ch_idx < n_channels; ch_idx++) { 398 for (ch_idx = 0; ch_idx < n_channels; ch_idx++) {
399 struct ieee80211_channel *chan = &data->channels[ch_idx]; 399 struct ieee80211_channel *chan = &data->channels[ch_idx];
@@ -526,7 +526,7 @@ static void iwl_init_band_reference(const struct iwl_cfg *cfg,
526 526
527static void iwl_mod_ht40_chan_info(struct device *dev, 527static void iwl_mod_ht40_chan_info(struct device *dev,
528 struct iwl_nvm_data *data, int n_channels, 528 struct iwl_nvm_data *data, int n_channels,
529 enum ieee80211_band band, u16 channel, 529 enum nl80211_band band, u16 channel,
530 const struct iwl_eeprom_channel *eeprom_ch, 530 const struct iwl_eeprom_channel *eeprom_ch,
531 u8 clear_ht40_extension_channel) 531 u8 clear_ht40_extension_channel)
532{ 532{
@@ -548,7 +548,7 @@ static void iwl_mod_ht40_chan_info(struct device *dev,
548 IWL_DEBUG_EEPROM(dev, 548 IWL_DEBUG_EEPROM(dev,
549 "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm): Ad-Hoc %ssupported\n", 549 "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm): Ad-Hoc %ssupported\n",
550 channel, 550 channel,
551 band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4", 551 band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
552 CHECK_AND_PRINT(IBSS), 552 CHECK_AND_PRINT(IBSS),
553 CHECK_AND_PRINT(ACTIVE), 553 CHECK_AND_PRINT(ACTIVE),
554 CHECK_AND_PRINT(RADAR), 554 CHECK_AND_PRINT(RADAR),
@@ -606,8 +606,8 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
606 n_channels++; 606 n_channels++;
607 607
608 channel->hw_value = eeprom_ch_array[ch_idx]; 608 channel->hw_value = eeprom_ch_array[ch_idx];
609 channel->band = (band == 1) ? IEEE80211_BAND_2GHZ 609 channel->band = (band == 1) ? NL80211_BAND_2GHZ
610 : IEEE80211_BAND_5GHZ; 610 : NL80211_BAND_5GHZ;
611 channel->center_freq = 611 channel->center_freq =
612 ieee80211_channel_to_frequency( 612 ieee80211_channel_to_frequency(
613 channel->hw_value, channel->band); 613 channel->hw_value, channel->band);
@@ -677,15 +677,15 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
677 677
678 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ 678 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */
679 for (band = 6; band <= 7; band++) { 679 for (band = 6; band <= 7; band++) {
680 enum ieee80211_band ieeeband; 680 enum nl80211_band ieeeband;
681 681
682 iwl_init_band_reference(cfg, eeprom, eeprom_size, band, 682 iwl_init_band_reference(cfg, eeprom, eeprom_size, band,
683 &eeprom_ch_count, &eeprom_ch_info, 683 &eeprom_ch_count, &eeprom_ch_info,
684 &eeprom_ch_array); 684 &eeprom_ch_array);
685 685
686 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ 686 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */
687 ieeeband = (band == 6) ? IEEE80211_BAND_2GHZ 687 ieeeband = (band == 6) ? NL80211_BAND_2GHZ
688 : IEEE80211_BAND_5GHZ; 688 : NL80211_BAND_5GHZ;
689 689
690 /* Loop through each band adding each of the channels */ 690 /* Loop through each band adding each of the channels */
691 for (ch_idx = 0; ch_idx < eeprom_ch_count; ch_idx++) { 691 for (ch_idx = 0; ch_idx < eeprom_ch_count; ch_idx++) {
@@ -708,7 +708,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
708 708
709int iwl_init_sband_channels(struct iwl_nvm_data *data, 709int iwl_init_sband_channels(struct iwl_nvm_data *data,
710 struct ieee80211_supported_band *sband, 710 struct ieee80211_supported_band *sband,
711 int n_channels, enum ieee80211_band band) 711 int n_channels, enum nl80211_band band)
712{ 712{
713 struct ieee80211_channel *chan = &data->channels[0]; 713 struct ieee80211_channel *chan = &data->channels[0];
714 int n = 0, idx = 0; 714 int n = 0, idx = 0;
@@ -734,7 +734,7 @@ int iwl_init_sband_channels(struct iwl_nvm_data *data,
734void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, 734void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
735 struct iwl_nvm_data *data, 735 struct iwl_nvm_data *data,
736 struct ieee80211_sta_ht_cap *ht_info, 736 struct ieee80211_sta_ht_cap *ht_info,
737 enum ieee80211_band band, 737 enum nl80211_band band,
738 u8 tx_chains, u8 rx_chains) 738 u8 tx_chains, u8 rx_chains)
739{ 739{
740 int max_bit_rate = 0; 740 int max_bit_rate = 0;
@@ -813,22 +813,22 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
813 int n_used = 0; 813 int n_used = 0;
814 struct ieee80211_supported_band *sband; 814 struct ieee80211_supported_band *sband;
815 815
816 sband = &data->bands[IEEE80211_BAND_2GHZ]; 816 sband = &data->bands[NL80211_BAND_2GHZ];
817 sband->band = IEEE80211_BAND_2GHZ; 817 sband->band = NL80211_BAND_2GHZ;
818 sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; 818 sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS];
819 sband->n_bitrates = N_RATES_24; 819 sband->n_bitrates = N_RATES_24;
820 n_used += iwl_init_sband_channels(data, sband, n_channels, 820 n_used += iwl_init_sband_channels(data, sband, n_channels,
821 IEEE80211_BAND_2GHZ); 821 NL80211_BAND_2GHZ);
822 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_2GHZ, 822 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ,
823 data->valid_tx_ant, data->valid_rx_ant); 823 data->valid_tx_ant, data->valid_rx_ant);
824 824
825 sband = &data->bands[IEEE80211_BAND_5GHZ]; 825 sband = &data->bands[NL80211_BAND_5GHZ];
826 sband->band = IEEE80211_BAND_5GHZ; 826 sband->band = NL80211_BAND_5GHZ;
827 sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; 827 sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS];
828 sband->n_bitrates = N_RATES_52; 828 sband->n_bitrates = N_RATES_52;
829 n_used += iwl_init_sband_channels(data, sband, n_channels, 829 n_used += iwl_init_sband_channels(data, sband, n_channels,
830 IEEE80211_BAND_5GHZ); 830 NL80211_BAND_5GHZ);
831 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_5GHZ, 831 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ,
832 data->valid_tx_ant, data->valid_rx_ant); 832 data->valid_tx_ant, data->valid_rx_ant);
833 833
834 if (n_channels != n_used) 834 if (n_channels != n_used)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h
index ad2b834668ff..53f39a34eca2 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h
@@ -98,7 +98,7 @@ struct iwl_nvm_data {
98 s8 max_tx_pwr_half_dbm; 98 s8 max_tx_pwr_half_dbm;
99 99
100 bool lar_enabled; 100 bool lar_enabled;
101 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; 101 struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
102 struct ieee80211_channel channels[]; 102 struct ieee80211_channel channels[];
103}; 103};
104 104
@@ -133,12 +133,12 @@ int iwl_nvm_check_version(struct iwl_nvm_data *data,
133 133
134int iwl_init_sband_channels(struct iwl_nvm_data *data, 134int iwl_init_sband_channels(struct iwl_nvm_data *data,
135 struct ieee80211_supported_band *sband, 135 struct ieee80211_supported_band *sband,
136 int n_channels, enum ieee80211_band band); 136 int n_channels, enum nl80211_band band);
137 137
138void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, 138void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
139 struct iwl_nvm_data *data, 139 struct iwl_nvm_data *data,
140 struct ieee80211_sta_ht_cap *ht_info, 140 struct ieee80211_sta_ht_cap *ht_info,
141 enum ieee80211_band band, 141 enum nl80211_band band,
142 u8 tx_chains, u8 rx_chains); 142 u8 tx_chains, u8 rx_chains);
143 143
144#endif /* __iwl_eeprom_parse_h__ */ 144#endif /* __iwl_eeprom_parse_h__ */
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 93a689583dff..14743c37d976 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -308,7 +308,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
308 308
309 channel->hw_value = nvm_chan[ch_idx]; 309 channel->hw_value = nvm_chan[ch_idx];
310 channel->band = (ch_idx < num_2ghz_channels) ? 310 channel->band = (ch_idx < num_2ghz_channels) ?
311 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 311 NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
312 channel->center_freq = 312 channel->center_freq =
313 ieee80211_channel_to_frequency( 313 ieee80211_channel_to_frequency(
314 channel->hw_value, channel->band); 314 channel->hw_value, channel->band);
@@ -320,7 +320,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,
320 * is not used in mvm, and is used for backwards compatibility 320 * is not used in mvm, and is used for backwards compatibility
321 */ 321 */
322 channel->max_power = IWL_DEFAULT_MAX_TX_POWER; 322 channel->max_power = IWL_DEFAULT_MAX_TX_POWER;
323 is_5ghz = channel->band == IEEE80211_BAND_5GHZ; 323 is_5ghz = channel->band == NL80211_BAND_5GHZ;
324 324
325 /* don't put limitations in case we're using LAR */ 325 /* don't put limitations in case we're using LAR */
326 if (!lar_supported) 326 if (!lar_supported)
@@ -439,22 +439,22 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg,
439 &ch_section[NVM_CHANNELS_FAMILY_8000], 439 &ch_section[NVM_CHANNELS_FAMILY_8000],
440 lar_supported); 440 lar_supported);
441 441
442 sband = &data->bands[IEEE80211_BAND_2GHZ]; 442 sband = &data->bands[NL80211_BAND_2GHZ];
443 sband->band = IEEE80211_BAND_2GHZ; 443 sband->band = NL80211_BAND_2GHZ;
444 sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; 444 sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS];
445 sband->n_bitrates = N_RATES_24; 445 sband->n_bitrates = N_RATES_24;
446 n_used += iwl_init_sband_channels(data, sband, n_channels, 446 n_used += iwl_init_sband_channels(data, sband, n_channels,
447 IEEE80211_BAND_2GHZ); 447 NL80211_BAND_2GHZ);
448 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_2GHZ, 448 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ,
449 tx_chains, rx_chains); 449 tx_chains, rx_chains);
450 450
451 sband = &data->bands[IEEE80211_BAND_5GHZ]; 451 sband = &data->bands[NL80211_BAND_5GHZ];
452 sband->band = IEEE80211_BAND_5GHZ; 452 sband->band = NL80211_BAND_5GHZ;
453 sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; 453 sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS];
454 sband->n_bitrates = N_RATES_52; 454 sband->n_bitrates = N_RATES_52;
455 n_used += iwl_init_sband_channels(data, sband, n_channels, 455 n_used += iwl_init_sband_channels(data, sband, n_channels,
456 IEEE80211_BAND_5GHZ); 456 NL80211_BAND_5GHZ);
457 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_5GHZ, 457 iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ,
458 tx_chains, rx_chains); 458 tx_chains, rx_chains);
459 if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac) 459 if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac)
460 iwl_init_vht_hw_capab(cfg, data, &sband->vht_cap, 460 iwl_init_vht_hw_capab(cfg, data, &sband->vht_cap,
@@ -781,7 +781,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
781 struct ieee80211_regdomain *regd; 781 struct ieee80211_regdomain *regd;
782 int size_of_regd; 782 int size_of_regd;
783 struct ieee80211_reg_rule *rule; 783 struct ieee80211_reg_rule *rule;
784 enum ieee80211_band band; 784 enum nl80211_band band;
785 int center_freq, prev_center_freq = 0; 785 int center_freq, prev_center_freq = 0;
786 int valid_rules = 0; 786 int valid_rules = 0;
787 bool new_rule; 787 bool new_rule;
@@ -809,7 +809,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
809 for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { 809 for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) {
810 ch_flags = (u16)__le32_to_cpup(channels + ch_idx); 810 ch_flags = (u16)__le32_to_cpup(channels + ch_idx);
811 band = (ch_idx < NUM_2GHZ_CHANNELS) ? 811 band = (ch_idx < NUM_2GHZ_CHANNELS) ?
812 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 812 NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
813 center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx], 813 center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx],
814 band); 814 band);
815 new_rule = false; 815 new_rule = false;
@@ -857,7 +857,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
857 IWL_DEBUG_DEV(dev, IWL_DL_LAR, 857 IWL_DEBUG_DEV(dev, IWL_DL_LAR,
858 "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n", 858 "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n",
859 center_freq, 859 center_freq,
860 band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4", 860 band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
861 CHECK_AND_PRINT_I(VALID), 861 CHECK_AND_PRINT_I(VALID),
862 CHECK_AND_PRINT_I(ACTIVE), 862 CHECK_AND_PRINT_I(ACTIVE),
863 CHECK_AND_PRINT_I(RADAR), 863 CHECK_AND_PRINT_I(RADAR),
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c
index 35cdeca3d61e..a63f5bbb1ba7 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c
@@ -378,7 +378,7 @@ iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif)
378 chanctx_conf = rcu_dereference(vif->chanctx_conf); 378 chanctx_conf = rcu_dereference(vif->chanctx_conf);
379 379
380 if (!chanctx_conf || 380 if (!chanctx_conf ||
381 chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ) { 381 chanctx_conf->def.chan->band != NL80211_BAND_2GHZ) {
382 rcu_read_unlock(); 382 rcu_read_unlock();
383 return BT_COEX_INVALID_LUT; 383 return BT_COEX_INVALID_LUT;
384 } 384 }
@@ -537,7 +537,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
537 537
538 /* If channel context is invalid or not on 2.4GHz .. */ 538 /* If channel context is invalid or not on 2.4GHz .. */
539 if ((!chanctx_conf || 539 if ((!chanctx_conf ||
540 chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ)) { 540 chanctx_conf->def.chan->band != NL80211_BAND_2GHZ)) {
541 if (vif->type == NL80211_IFTYPE_STATION) { 541 if (vif->type == NL80211_IFTYPE_STATION) {
542 /* ... relax constraints and disable rssi events */ 542 /* ... relax constraints and disable rssi events */
543 iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, 543 iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
@@ -857,11 +857,11 @@ bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm)
857} 857}
858 858
859bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, 859bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm,
860 enum ieee80211_band band) 860 enum nl80211_band band)
861{ 861{
862 u32 bt_activity = le32_to_cpu(mvm->last_bt_notif.bt_activity_grading); 862 u32 bt_activity = le32_to_cpu(mvm->last_bt_notif.bt_activity_grading);
863 863
864 if (band != IEEE80211_BAND_2GHZ) 864 if (band != NL80211_BAND_2GHZ)
865 return false; 865 return false;
866 866
867 return bt_activity >= BT_LOW_TRAFFIC; 867 return bt_activity >= BT_LOW_TRAFFIC;
@@ -873,7 +873,7 @@ u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
873 __le16 fc = hdr->frame_control; 873 __le16 fc = hdr->frame_control;
874 bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm); 874 bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm);
875 875
876 if (info->band != IEEE80211_BAND_2GHZ) 876 if (info->band != NL80211_BAND_2GHZ)
877 return 0; 877 return 0;
878 878
879 if (unlikely(mvm->bt_tx_prio)) 879 if (unlikely(mvm->bt_tx_prio))
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
index 3a279d3403ef..fb96bc00f022 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c
@@ -724,9 +724,9 @@ static ssize_t iwl_dbgfs_tof_responder_params_write(struct ieee80211_vif *vif,
724 724
725 ret = kstrtou32(data, 10, &value); 725 ret = kstrtou32(data, 10, &value);
726 if (ret == 0 && value) { 726 if (ret == 0 && value) {
727 enum ieee80211_band band = (cmd->channel_num <= 14) ? 727 enum nl80211_band band = (cmd->channel_num <= 14) ?
728 IEEE80211_BAND_2GHZ : 728 NL80211_BAND_2GHZ :
729 IEEE80211_BAND_5GHZ; 729 NL80211_BAND_5GHZ;
730 struct ieee80211_channel chn = { 730 struct ieee80211_channel chn = {
731 .band = band, 731 .band = band,
732 .center_freq = ieee80211_channel_to_frequency( 732 .center_freq = ieee80211_channel_to_frequency(
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 6ad5c602e84c..9e97cf4ff1c5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -980,7 +980,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm)
980 goto error; 980 goto error;
981 981
982 /* Add all the PHY contexts */ 982 /* Add all the PHY contexts */
983 chan = &mvm->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->channels[0]; 983 chan = &mvm->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[0];
984 cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT); 984 cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT);
985 for (i = 0; i < NUM_PHY_CTX; i++) { 985 for (i = 0; i < NUM_PHY_CTX; i++) {
986 /* 986 /*
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
index 5f950568e92c..456067b2f48d 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
@@ -559,7 +559,7 @@ void iwl_mvm_mac_ctxt_release(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
559 559
560static void iwl_mvm_ack_rates(struct iwl_mvm *mvm, 560static void iwl_mvm_ack_rates(struct iwl_mvm *mvm,
561 struct ieee80211_vif *vif, 561 struct ieee80211_vif *vif,
562 enum ieee80211_band band, 562 enum nl80211_band band,
563 u8 *cck_rates, u8 *ofdm_rates) 563 u8 *cck_rates, u8 *ofdm_rates)
564{ 564{
565 struct ieee80211_supported_band *sband; 565 struct ieee80211_supported_band *sband;
@@ -730,7 +730,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm,
730 rcu_read_lock(); 730 rcu_read_lock();
731 chanctx = rcu_dereference(vif->chanctx_conf); 731 chanctx = rcu_dereference(vif->chanctx_conf);
732 iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band 732 iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band
733 : IEEE80211_BAND_2GHZ, 733 : NL80211_BAND_2GHZ,
734 &cck_ack_rates, &ofdm_ack_rates); 734 &cck_ack_rates, &ofdm_ack_rates);
735 rcu_read_unlock(); 735 rcu_read_unlock();
736 736
@@ -1065,7 +1065,7 @@ static int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm,
1065 cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << 1065 cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) <<
1066 RATE_MCS_ANT_POS); 1066 RATE_MCS_ANT_POS);
1067 1067
1068 if (info->band == IEEE80211_BAND_5GHZ || vif->p2p) { 1068 if (info->band == NL80211_BAND_5GHZ || vif->p2p) {
1069 rate = IWL_FIRST_OFDM_RATE; 1069 rate = IWL_FIRST_OFDM_RATE;
1070 } else { 1070 } else {
1071 rate = IWL_FIRST_CCK_RATE; 1071 rate = IWL_FIRST_CCK_RATE;
@@ -1516,7 +1516,7 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,
1516 rx_status.device_timestamp = le32_to_cpu(sb->system_time); 1516 rx_status.device_timestamp = le32_to_cpu(sb->system_time);
1517 rx_status.band = 1517 rx_status.band =
1518 (sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? 1518 (sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ?
1519 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 1519 NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
1520 rx_status.freq = 1520 rx_status.freq =
1521 ieee80211_channel_to_frequency(le16_to_cpu(sb->channel), 1521 ieee80211_channel_to_frequency(le16_to_cpu(sb->channel),
1522 rx_status.band); 1522 rx_status.band);
@@ -1526,5 +1526,5 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm,
1526 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); 1526 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
1527 1527
1528 /* pass it as regular rx to mac80211 */ 1528 /* pass it as regular rx to mac80211 */
1529 ieee80211_rx_napi(mvm->hw, skb, NULL); 1529 ieee80211_rx_napi(mvm->hw, NULL, skb, NULL);
1530} 1530}
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index 4f5ec495b460..ef91b3770703 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -550,18 +550,18 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
550 else 550 else
551 mvm->max_scans = IWL_MVM_MAX_LMAC_SCANS; 551 mvm->max_scans = IWL_MVM_MAX_LMAC_SCANS;
552 552
553 if (mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels) 553 if (mvm->nvm_data->bands[NL80211_BAND_2GHZ].n_channels)
554 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = 554 hw->wiphy->bands[NL80211_BAND_2GHZ] =
555 &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; 555 &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
556 if (mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels) { 556 if (mvm->nvm_data->bands[NL80211_BAND_5GHZ].n_channels) {
557 hw->wiphy->bands[IEEE80211_BAND_5GHZ] = 557 hw->wiphy->bands[NL80211_BAND_5GHZ] =
558 &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; 558 &mvm->nvm_data->bands[NL80211_BAND_5GHZ];
559 559
560 if (fw_has_capa(&mvm->fw->ucode_capa, 560 if (fw_has_capa(&mvm->fw->ucode_capa,
561 IWL_UCODE_TLV_CAPA_BEAMFORMER) && 561 IWL_UCODE_TLV_CAPA_BEAMFORMER) &&
562 fw_has_api(&mvm->fw->ucode_capa, 562 fw_has_api(&mvm->fw->ucode_capa,
563 IWL_UCODE_TLV_API_LQ_SS_PARAMS)) 563 IWL_UCODE_TLV_API_LQ_SS_PARAMS))
564 hw->wiphy->bands[IEEE80211_BAND_5GHZ]->vht_cap.cap |= 564 hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.cap |=
565 IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE; 565 IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE;
566 } 566 }
567 567
@@ -2911,7 +2911,7 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm,
2911 cpu_to_le32(FW_CMD_ID_AND_COLOR(MAC_INDEX_AUX, 0)), 2911 cpu_to_le32(FW_CMD_ID_AND_COLOR(MAC_INDEX_AUX, 0)),
2912 .sta_id_and_color = cpu_to_le32(mvm->aux_sta.sta_id), 2912 .sta_id_and_color = cpu_to_le32(mvm->aux_sta.sta_id),
2913 /* Set the channel info data */ 2913 /* Set the channel info data */
2914 .channel_info.band = (channel->band == IEEE80211_BAND_2GHZ) ? 2914 .channel_info.band = (channel->band == NL80211_BAND_2GHZ) ?
2915 PHY_BAND_24 : PHY_BAND_5, 2915 PHY_BAND_24 : PHY_BAND_5,
2916 .channel_info.channel = channel->hw_value, 2916 .channel_info.channel = channel->hw_value,
2917 .channel_info.width = PHY_VHT_CHANNEL_MODE20, 2917 .channel_info.width = PHY_VHT_CHANNEL_MODE20,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index 2d685e02d488..85800ba0c667 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1133,9 +1133,9 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm);
1133 1133
1134/* Utils */ 1134/* Utils */
1135int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, 1135int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,
1136 enum ieee80211_band band); 1136 enum nl80211_band band);
1137void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, 1137void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,
1138 enum ieee80211_band band, 1138 enum nl80211_band band,
1139 struct ieee80211_tx_rate *r); 1139 struct ieee80211_tx_rate *r);
1140u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx); 1140u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx);
1141void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm); 1141void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm);
@@ -1468,7 +1468,7 @@ bool iwl_mvm_bt_coex_is_mimo_allowed(struct iwl_mvm *mvm,
1468bool iwl_mvm_bt_coex_is_ant_avail(struct iwl_mvm *mvm, u8 ant); 1468bool iwl_mvm_bt_coex_is_ant_avail(struct iwl_mvm *mvm, u8 ant);
1469bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm); 1469bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm);
1470bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, 1470bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm,
1471 enum ieee80211_band band); 1471 enum nl80211_band band);
1472u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, 1472u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
1473 struct ieee80211_tx_info *info, u8 ac); 1473 struct ieee80211_tx_info *info, u8 ac);
1474 1474
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c
index 6e6a56f2153d..95138830b9f8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c
@@ -147,7 +147,7 @@ static void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm,
147 u8 active_cnt, idle_cnt; 147 u8 active_cnt, idle_cnt;
148 148
149 /* Set the channel info data */ 149 /* Set the channel info data */
150 cmd->ci.band = (chandef->chan->band == IEEE80211_BAND_2GHZ ? 150 cmd->ci.band = (chandef->chan->band == NL80211_BAND_2GHZ ?
151 PHY_BAND_24 : PHY_BAND_5); 151 PHY_BAND_24 : PHY_BAND_5);
152 152
153 cmd->ci.channel = chandef->chan->hw_value; 153 cmd->ci.channel = chandef->chan->hw_value;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 61d0a8cd13f9..81dd2f6a48a5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -829,7 +829,7 @@ static u32 ucode_rate_from_rs_rate(struct iwl_mvm *mvm,
829 829
830/* Convert a ucode rate into an rs_rate object */ 830/* Convert a ucode rate into an rs_rate object */
831static int rs_rate_from_ucode_rate(const u32 ucode_rate, 831static int rs_rate_from_ucode_rate(const u32 ucode_rate,
832 enum ieee80211_band band, 832 enum nl80211_band band,
833 struct rs_rate *rate) 833 struct rs_rate *rate)
834{ 834{
835 u32 ant_msk = ucode_rate & RATE_MCS_ANT_ABC_MSK; 835 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,
848 if (!(ucode_rate & RATE_MCS_HT_MSK) && 848 if (!(ucode_rate & RATE_MCS_HT_MSK) &&
849 !(ucode_rate & RATE_MCS_VHT_MSK)) { 849 !(ucode_rate & RATE_MCS_VHT_MSK)) {
850 if (num_of_ant == 1) { 850 if (num_of_ant == 1) {
851 if (band == IEEE80211_BAND_5GHZ) 851 if (band == NL80211_BAND_5GHZ)
852 rate->type = LQ_LEGACY_A; 852 rate->type = LQ_LEGACY_A;
853 else 853 else
854 rate->type = LQ_LEGACY_G; 854 rate->type = LQ_LEGACY_G;
@@ -1043,7 +1043,7 @@ static void rs_get_lower_rate_down_column(struct iwl_lq_sta *lq_sta,
1043 return; 1043 return;
1044 } else if (is_siso(rate)) { 1044 } else if (is_siso(rate)) {
1045 /* Downgrade to Legacy if we were in SISO */ 1045 /* Downgrade to Legacy if we were in SISO */
1046 if (lq_sta->band == IEEE80211_BAND_5GHZ) 1046 if (lq_sta->band == NL80211_BAND_5GHZ)
1047 rate->type = LQ_LEGACY_A; 1047 rate->type = LQ_LEGACY_A;
1048 else 1048 else
1049 rate->type = LQ_LEGACY_G; 1049 rate->type = LQ_LEGACY_G;
@@ -1850,7 +1850,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm,
1850 rate->ant = column->ant; 1850 rate->ant = column->ant;
1851 1851
1852 if (column->mode == RS_LEGACY) { 1852 if (column->mode == RS_LEGACY) {
1853 if (lq_sta->band == IEEE80211_BAND_5GHZ) 1853 if (lq_sta->band == NL80211_BAND_5GHZ)
1854 rate->type = LQ_LEGACY_A; 1854 rate->type = LQ_LEGACY_A;
1855 else 1855 else
1856 rate->type = LQ_LEGACY_G; 1856 rate->type = LQ_LEGACY_G;
@@ -2020,7 +2020,7 @@ static void rs_get_adjacent_txp(struct iwl_mvm *mvm, int index,
2020} 2020}
2021 2021
2022static bool rs_tpc_allowed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, 2022static bool rs_tpc_allowed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
2023 struct rs_rate *rate, enum ieee80211_band band) 2023 struct rs_rate *rate, enum nl80211_band band)
2024{ 2024{
2025 int index = rate->index; 2025 int index = rate->index;
2026 bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM); 2026 bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM);
@@ -2126,7 +2126,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm,
2126 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); 2126 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
2127 struct ieee80211_vif *vif = mvm_sta->vif; 2127 struct ieee80211_vif *vif = mvm_sta->vif;
2128 struct ieee80211_chanctx_conf *chanctx_conf; 2128 struct ieee80211_chanctx_conf *chanctx_conf;
2129 enum ieee80211_band band; 2129 enum nl80211_band band;
2130 struct iwl_rate_scale_data *window; 2130 struct iwl_rate_scale_data *window;
2131 struct rs_rate *rate = &tbl->rate; 2131 struct rs_rate *rate = &tbl->rate;
2132 enum tpc_action action; 2132 enum tpc_action action;
@@ -2148,7 +2148,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm,
2148 rcu_read_lock(); 2148 rcu_read_lock();
2149 chanctx_conf = rcu_dereference(vif->chanctx_conf); 2149 chanctx_conf = rcu_dereference(vif->chanctx_conf);
2150 if (WARN_ON(!chanctx_conf)) 2150 if (WARN_ON(!chanctx_conf))
2151 band = IEEE80211_NUM_BANDS; 2151 band = NUM_NL80211_BANDS;
2152 else 2152 else
2153 band = chanctx_conf->def.chan->band; 2153 band = chanctx_conf->def.chan->band;
2154 rcu_read_unlock(); 2154 rcu_read_unlock();
@@ -2606,7 +2606,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm,
2606 rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; 2606 rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2;
2607 else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID) 2607 else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID)
2608 rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO; 2608 rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO;
2609 else if (lq_sta->band == IEEE80211_BAND_5GHZ) 2609 else if (lq_sta->band == NL80211_BAND_5GHZ)
2610 rate->type = LQ_LEGACY_A; 2610 rate->type = LQ_LEGACY_A;
2611 else 2611 else
2612 rate->type = LQ_LEGACY_G; 2612 rate->type = LQ_LEGACY_G;
@@ -2623,7 +2623,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm,
2623 } else { 2623 } else {
2624 lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate; 2624 lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate;
2625 2625
2626 if (lq_sta->band == IEEE80211_BAND_5GHZ) { 2626 if (lq_sta->band == NL80211_BAND_5GHZ) {
2627 lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy; 2627 lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy;
2628 lq_sta->optimal_nentries = 2628 lq_sta->optimal_nentries =
2629 ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); 2629 ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
@@ -2679,7 +2679,7 @@ static struct rs_rate *rs_get_optimal_rate(struct iwl_mvm *mvm,
2679static void rs_get_initial_rate(struct iwl_mvm *mvm, 2679static void rs_get_initial_rate(struct iwl_mvm *mvm,
2680 struct ieee80211_sta *sta, 2680 struct ieee80211_sta *sta,
2681 struct iwl_lq_sta *lq_sta, 2681 struct iwl_lq_sta *lq_sta,
2682 enum ieee80211_band band, 2682 enum nl80211_band band,
2683 struct rs_rate *rate) 2683 struct rs_rate *rate)
2684{ 2684{
2685 int i, nentries; 2685 int i, nentries;
@@ -2714,7 +2714,7 @@ static void rs_get_initial_rate(struct iwl_mvm *mvm,
2714 rate->index = find_first_bit(&lq_sta->active_legacy_rate, 2714 rate->index = find_first_bit(&lq_sta->active_legacy_rate,
2715 BITS_PER_LONG); 2715 BITS_PER_LONG);
2716 2716
2717 if (band == IEEE80211_BAND_5GHZ) { 2717 if (band == NL80211_BAND_5GHZ) {
2718 rate->type = LQ_LEGACY_A; 2718 rate->type = LQ_LEGACY_A;
2719 initial_rates = rs_optimal_rates_5ghz_legacy; 2719 initial_rates = rs_optimal_rates_5ghz_legacy;
2720 nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); 2720 nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
@@ -2814,7 +2814,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm,
2814static void rs_initialize_lq(struct iwl_mvm *mvm, 2814static void rs_initialize_lq(struct iwl_mvm *mvm,
2815 struct ieee80211_sta *sta, 2815 struct ieee80211_sta *sta,
2816 struct iwl_lq_sta *lq_sta, 2816 struct iwl_lq_sta *lq_sta,
2817 enum ieee80211_band band, 2817 enum nl80211_band band,
2818 bool init) 2818 bool init)
2819{ 2819{
2820 struct iwl_scale_tbl_info *tbl; 2820 struct iwl_scale_tbl_info *tbl;
@@ -3097,7 +3097,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg)
3097 * Called after adding a new station to initialize rate scaling 3097 * Called after adding a new station to initialize rate scaling
3098 */ 3098 */
3099void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, 3099void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
3100 enum ieee80211_band band, bool init) 3100 enum nl80211_band band, bool init)
3101{ 3101{
3102 int i, j; 3102 int i, j;
3103 struct ieee80211_hw *hw = mvm->hw; 3103 struct ieee80211_hw *hw = mvm->hw;
@@ -3203,7 +3203,7 @@ static void rs_rate_update(void *mvm_r,
3203#ifdef CONFIG_MAC80211_DEBUGFS 3203#ifdef CONFIG_MAC80211_DEBUGFS
3204static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, 3204static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm,
3205 struct iwl_lq_cmd *lq_cmd, 3205 struct iwl_lq_cmd *lq_cmd,
3206 enum ieee80211_band band, 3206 enum nl80211_band band,
3207 u32 ucode_rate) 3207 u32 ucode_rate)
3208{ 3208{
3209 struct rs_rate rate; 3209 struct rs_rate rate;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
index bdb6f2d8d854..90d046fb24a0 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h
@@ -305,7 +305,7 @@ struct iwl_lq_sta {
305 bool stbc_capable; /* Tx STBC is supported by chip and Rx by STA */ 305 bool stbc_capable; /* Tx STBC is supported by chip and Rx by STA */
306 bool bfer_capable; /* Remote supports beamformee and we BFer */ 306 bool bfer_capable; /* Remote supports beamformee and we BFer */
307 307
308 enum ieee80211_band band; 308 enum nl80211_band band;
309 309
310 /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ 310 /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */
311 unsigned long active_legacy_rate; 311 unsigned long active_legacy_rate;
@@ -358,7 +358,7 @@ struct iwl_lq_sta {
358 358
359/* Initialize station's rate scaling information after adding station */ 359/* Initialize station's rate scaling information after adding station */
360void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, 360void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
361 enum ieee80211_band band, bool init); 361 enum nl80211_band band, bool init);
362 362
363/* Notify RS about Tx status */ 363/* Notify RS about Tx status */
364void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, 364void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
index 485cfc1a4daa..263e8a8576b7 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c
@@ -131,7 +131,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
131 fraglen, rxb->truesize); 131 fraglen, rxb->truesize);
132 } 132 }
133 133
134 ieee80211_rx_napi(mvm->hw, skb, napi); 134 ieee80211_rx_napi(mvm->hw, NULL, skb, napi);
135} 135}
136 136
137/* 137/*
@@ -319,7 +319,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi,
319 rx_status->device_timestamp = le32_to_cpu(phy_info->system_timestamp); 319 rx_status->device_timestamp = le32_to_cpu(phy_info->system_timestamp);
320 rx_status->band = 320 rx_status->band =
321 (phy_info->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? 321 (phy_info->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ?
322 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 322 NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
323 rx_status->freq = 323 rx_status->freq =
324 ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel), 324 ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel),
325 rx_status->band); 325 rx_status->band);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index b2bc3d96a13f..651604d18a32 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -210,7 +210,7 @@ static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm,
210 if (iwl_mvm_check_pn(mvm, skb, queue, sta)) 210 if (iwl_mvm_check_pn(mvm, skb, queue, sta))
211 kfree_skb(skb); 211 kfree_skb(skb);
212 else 212 else
213 ieee80211_rx_napi(mvm->hw, skb, napi); 213 ieee80211_rx_napi(mvm->hw, NULL, skb, napi);
214} 214}
215 215
216static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, 216static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm,
@@ -456,8 +456,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi,
456 456
457 rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise); 457 rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise);
458 rx_status->device_timestamp = le32_to_cpu(desc->gp2_on_air_rise); 458 rx_status->device_timestamp = le32_to_cpu(desc->gp2_on_air_rise);
459 rx_status->band = desc->channel > 14 ? IEEE80211_BAND_5GHZ : 459 rx_status->band = desc->channel > 14 ? NL80211_BAND_5GHZ :
460 IEEE80211_BAND_2GHZ; 460 NL80211_BAND_2GHZ;
461 rx_status->freq = ieee80211_channel_to_frequency(desc->channel, 461 rx_status->freq = ieee80211_channel_to_frequency(desc->channel,
462 rx_status->band); 462 rx_status->band);
463 iwl_mvm_get_signal_strength(mvm, desc, rx_status); 463 iwl_mvm_get_signal_strength(mvm, desc, rx_status);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index c1d1be9c5d01..6f609dd5c222 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -163,16 +163,16 @@ static inline __le16 iwl_mvm_scan_rx_chain(struct iwl_mvm *mvm)
163 return cpu_to_le16(rx_chain); 163 return cpu_to_le16(rx_chain);
164} 164}
165 165
166static __le32 iwl_mvm_scan_rxon_flags(enum ieee80211_band band) 166static __le32 iwl_mvm_scan_rxon_flags(enum nl80211_band band)
167{ 167{
168 if (band == IEEE80211_BAND_2GHZ) 168 if (band == NL80211_BAND_2GHZ)
169 return cpu_to_le32(PHY_BAND_24); 169 return cpu_to_le32(PHY_BAND_24);
170 else 170 else
171 return cpu_to_le32(PHY_BAND_5); 171 return cpu_to_le32(PHY_BAND_5);
172} 172}
173 173
174static inline __le32 174static inline __le32
175iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band, 175iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum nl80211_band band,
176 bool no_cck) 176 bool no_cck)
177{ 177{
178 u32 tx_ant; 178 u32 tx_ant;
@@ -182,7 +182,7 @@ iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band,
182 mvm->scan_last_antenna_idx); 182 mvm->scan_last_antenna_idx);
183 tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS; 183 tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS;
184 184
185 if (band == IEEE80211_BAND_2GHZ && !no_cck) 185 if (band == NL80211_BAND_2GHZ && !no_cck)
186 return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK | 186 return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK |
187 tx_ant); 187 tx_ant);
188 else 188 else
@@ -591,14 +591,14 @@ static void iwl_mvm_scan_fill_tx_cmd(struct iwl_mvm *mvm,
591 tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | 591 tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL |
592 TX_CMD_FLG_BT_DIS); 592 TX_CMD_FLG_BT_DIS);
593 tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, 593 tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm,
594 IEEE80211_BAND_2GHZ, 594 NL80211_BAND_2GHZ,
595 no_cck); 595 no_cck);
596 tx_cmd[0].sta_id = mvm->aux_sta.sta_id; 596 tx_cmd[0].sta_id = mvm->aux_sta.sta_id;
597 597
598 tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | 598 tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL |
599 TX_CMD_FLG_BT_DIS); 599 TX_CMD_FLG_BT_DIS);
600 tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, 600 tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm,
601 IEEE80211_BAND_5GHZ, 601 NL80211_BAND_5GHZ,
602 no_cck); 602 no_cck);
603 tx_cmd[1].sta_id = mvm->aux_sta.sta_id; 603 tx_cmd[1].sta_id = mvm->aux_sta.sta_id;
604} 604}
@@ -695,19 +695,19 @@ iwl_mvm_build_scan_probe(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
695 695
696 /* Insert ds parameter set element on 2.4 GHz band */ 696 /* Insert ds parameter set element on 2.4 GHz band */
697 newpos = iwl_mvm_copy_and_insert_ds_elem(mvm, 697 newpos = iwl_mvm_copy_and_insert_ds_elem(mvm,
698 ies->ies[IEEE80211_BAND_2GHZ], 698 ies->ies[NL80211_BAND_2GHZ],
699 ies->len[IEEE80211_BAND_2GHZ], 699 ies->len[NL80211_BAND_2GHZ],
700 pos); 700 pos);
701 params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf); 701 params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf);
702 params->preq.band_data[0].len = cpu_to_le16(newpos - pos); 702 params->preq.band_data[0].len = cpu_to_le16(newpos - pos);
703 pos = newpos; 703 pos = newpos;
704 704
705 memcpy(pos, ies->ies[IEEE80211_BAND_5GHZ], 705 memcpy(pos, ies->ies[NL80211_BAND_5GHZ],
706 ies->len[IEEE80211_BAND_5GHZ]); 706 ies->len[NL80211_BAND_5GHZ]);
707 params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf); 707 params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf);
708 params->preq.band_data[1].len = 708 params->preq.band_data[1].len =
709 cpu_to_le16(ies->len[IEEE80211_BAND_5GHZ]); 709 cpu_to_le16(ies->len[NL80211_BAND_5GHZ]);
710 pos += ies->len[IEEE80211_BAND_5GHZ]; 710 pos += ies->len[NL80211_BAND_5GHZ];
711 711
712 memcpy(pos, ies->common_ies, ies->common_ie_len); 712 memcpy(pos, ies->common_ies, ies->common_ie_len);
713 params->preq.common_data.offset = cpu_to_le16(pos - params->preq.buf); 713 params->preq.common_data.offset = cpu_to_le16(pos - params->preq.buf);
@@ -921,10 +921,10 @@ static __le32 iwl_mvm_scan_config_rates(struct iwl_mvm *mvm)
921 unsigned int rates = 0; 921 unsigned int rates = 0;
922 int i; 922 int i;
923 923
924 band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; 924 band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
925 for (i = 0; i < band->n_bitrates; i++) 925 for (i = 0; i < band->n_bitrates; i++)
926 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); 926 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value);
927 band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; 927 band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ];
928 for (i = 0; i < band->n_bitrates; i++) 928 for (i = 0; i < band->n_bitrates; i++)
929 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); 929 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value);
930 930
@@ -939,8 +939,8 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
939 struct iwl_scan_config *scan_config; 939 struct iwl_scan_config *scan_config;
940 struct ieee80211_supported_band *band; 940 struct ieee80211_supported_band *band;
941 int num_channels = 941 int num_channels =
942 mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels + 942 mvm->nvm_data->bands[NL80211_BAND_2GHZ].n_channels +
943 mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; 943 mvm->nvm_data->bands[NL80211_BAND_5GHZ].n_channels;
944 int ret, i, j = 0, cmd_size; 944 int ret, i, j = 0, cmd_size;
945 struct iwl_host_cmd cmd = { 945 struct iwl_host_cmd cmd = {
946 .id = iwl_cmd_id(SCAN_CFG_CMD, IWL_ALWAYS_LONG_GROUP, 0), 946 .id = iwl_cmd_id(SCAN_CFG_CMD, IWL_ALWAYS_LONG_GROUP, 0),
@@ -994,10 +994,10 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm)
994 IWL_CHANNEL_FLAG_EBS_ADD | 994 IWL_CHANNEL_FLAG_EBS_ADD |
995 IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE; 995 IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE;
996 996
997 band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; 997 band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
998 for (i = 0; i < band->n_channels; i++, j++) 998 for (i = 0; i < band->n_channels; i++, j++)
999 scan_config->channel_array[j] = band->channels[i].hw_value; 999 scan_config->channel_array[j] = band->channels[i].hw_value;
1000 band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; 1000 band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ];
1001 for (i = 0; i < band->n_channels; i++, j++) 1001 for (i = 0; i < band->n_channels; i++, j++)
1002 scan_config->channel_array[j] = band->channels[i].hw_value; 1002 scan_config->channel_array[j] = band->channels[i].hw_value;
1003 1003
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c b/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
index 18711c5de35a..9f160fc58cd0 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c
@@ -444,7 +444,7 @@ iwl_mvm_tdls_config_channel_switch(struct iwl_mvm *mvm,
444 } 444 }
445 445
446 if (chandef) { 446 if (chandef) {
447 cmd.ci.band = (chandef->chan->band == IEEE80211_BAND_2GHZ ? 447 cmd.ci.band = (chandef->chan->band == NL80211_BAND_2GHZ ?
448 PHY_BAND_24 : PHY_BAND_5); 448 PHY_BAND_24 : PHY_BAND_5);
449 cmd.ci.channel = chandef->chan->hw_value; 449 cmd.ci.channel = chandef->chan->hw_value;
450 cmd.ci.width = iwl_mvm_get_channel_width(chandef); 450 cmd.ci.width = iwl_mvm_get_channel_width(chandef);
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index efb9b98c4c98..bd286fca3776 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -359,7 +359,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,
359 &mvm->nvm_data->bands[info->band], sta); 359 &mvm->nvm_data->bands[info->band], sta);
360 360
361 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ 361 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */
362 if (info->band == IEEE80211_BAND_5GHZ) 362 if (info->band == NL80211_BAND_5GHZ)
363 rate_idx += IWL_FIRST_OFDM_RATE; 363 rate_idx += IWL_FIRST_OFDM_RATE;
364 364
365 /* For 2.4 GHZ band, check that there is no need to remap */ 365 /* For 2.4 GHZ band, check that there is no need to remap */
@@ -372,7 +372,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd,
372 iwl_mvm_next_antenna(mvm, iwl_mvm_get_valid_tx_ant(mvm), 372 iwl_mvm_next_antenna(mvm, iwl_mvm_get_valid_tx_ant(mvm),
373 mvm->mgmt_last_antenna_idx); 373 mvm->mgmt_last_antenna_idx);
374 374
375 if (info->band == IEEE80211_BAND_2GHZ && 375 if (info->band == NL80211_BAND_2GHZ &&
376 !iwl_mvm_bt_coex_is_shared_ant_avail(mvm)) 376 !iwl_mvm_bt_coex_is_shared_ant_avail(mvm))
377 rate_flags = mvm->cfg->non_shared_ant << RATE_MCS_ANT_POS; 377 rate_flags = mvm->cfg->non_shared_ant << RATE_MCS_ANT_POS;
378 else 378 else
@@ -1052,7 +1052,7 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status)
1052#endif /* CONFIG_IWLWIFI_DEBUG */ 1052#endif /* CONFIG_IWLWIFI_DEBUG */
1053 1053
1054void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, 1054void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,
1055 enum ieee80211_band band, 1055 enum nl80211_band band,
1056 struct ieee80211_tx_rate *r) 1056 struct ieee80211_tx_rate *r)
1057{ 1057{
1058 if (rate_n_flags & RATE_HT_MCS_GF_MSK) 1058 if (rate_n_flags & RATE_HT_MCS_GF_MSK)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index 486c98541afc..f0ffd62f02d3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -217,14 +217,14 @@ static const u8 fw_rate_idx_to_plcp[IWL_RATE_COUNT] = {
217}; 217};
218 218
219int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, 219int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,
220 enum ieee80211_band band) 220 enum nl80211_band band)
221{ 221{
222 int rate = rate_n_flags & RATE_LEGACY_RATE_MSK; 222 int rate = rate_n_flags & RATE_LEGACY_RATE_MSK;
223 int idx; 223 int idx;
224 int band_offset = 0; 224 int band_offset = 0;
225 225
226 /* Legacy rate format, search for match in table */ 226 /* Legacy rate format, search for match in table */
227 if (band == IEEE80211_BAND_5GHZ) 227 if (band == NL80211_BAND_5GHZ)
228 band_offset = IWL_FIRST_OFDM_RATE; 228 band_offset = IWL_FIRST_OFDM_RATE;
229 for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) 229 for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++)
230 if (fw_rate_idx_to_plcp[idx] == rate) 230 if (fw_rate_idx_to_plcp[idx] == rate)