aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel
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
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')
-rw-r--r--drivers/net/wireless/intel/ipw2x00/ipw2100.c8
-rw-r--r--drivers/net/wireless/intel/ipw2x00/ipw2200.c12
-rw-r--r--drivers/net/wireless/intel/iwlegacy/3945-mac.c30
-rw-r--r--drivers/net/wireless/intel/iwlegacy/3945-rs.c22
-rw-r--r--drivers/net/wireless/intel/iwlegacy/3945.c20
-rw-r--r--drivers/net/wireless/intel/iwlegacy/4965-mac.c41
-rw-r--r--drivers/net/wireless/intel/iwlegacy/4965-rs.c22
-rw-r--r--drivers/net/wireless/intel/iwlegacy/4965.c6
-rw-r--r--drivers/net/wireless/intel/iwlegacy/4965.h2
-rw-r--r--drivers/net/wireless/intel/iwlegacy/common.c92
-rw-r--r--drivers/net/wireless/intel/iwlegacy/common.h30
-rw-r--r--drivers/net/wireless/intel/iwlegacy/debug.c4
-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
52 files changed, 326 insertions, 319 deletions
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
index f93a7f71c047..e1e42ed6c412 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c
@@ -1913,7 +1913,7 @@ static int ipw2100_wdev_init(struct net_device *dev)
1913 if (geo->bg_channels) { 1913 if (geo->bg_channels) {
1914 struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; 1914 struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band;
1915 1915
1916 bg_band->band = IEEE80211_BAND_2GHZ; 1916 bg_band->band = NL80211_BAND_2GHZ;
1917 bg_band->n_channels = geo->bg_channels; 1917 bg_band->n_channels = geo->bg_channels;
1918 bg_band->channels = kcalloc(geo->bg_channels, 1918 bg_band->channels = kcalloc(geo->bg_channels,
1919 sizeof(struct ieee80211_channel), 1919 sizeof(struct ieee80211_channel),
@@ -1924,7 +1924,7 @@ static int ipw2100_wdev_init(struct net_device *dev)
1924 } 1924 }
1925 /* translate geo->bg to bg_band.channels */ 1925 /* translate geo->bg to bg_band.channels */
1926 for (i = 0; i < geo->bg_channels; i++) { 1926 for (i = 0; i < geo->bg_channels; i++) {
1927 bg_band->channels[i].band = IEEE80211_BAND_2GHZ; 1927 bg_band->channels[i].band = NL80211_BAND_2GHZ;
1928 bg_band->channels[i].center_freq = geo->bg[i].freq; 1928 bg_band->channels[i].center_freq = geo->bg[i].freq;
1929 bg_band->channels[i].hw_value = geo->bg[i].channel; 1929 bg_band->channels[i].hw_value = geo->bg[i].channel;
1930 bg_band->channels[i].max_power = geo->bg[i].max_power; 1930 bg_band->channels[i].max_power = geo->bg[i].max_power;
@@ -1945,7 +1945,7 @@ static int ipw2100_wdev_init(struct net_device *dev)
1945 bg_band->bitrates = ipw2100_bg_rates; 1945 bg_band->bitrates = ipw2100_bg_rates;
1946 bg_band->n_bitrates = RATE_COUNT; 1946 bg_band->n_bitrates = RATE_COUNT;
1947 1947
1948 wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band; 1948 wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band;
1949 } 1949 }
1950 1950
1951 wdev->wiphy->cipher_suites = ipw_cipher_suites; 1951 wdev->wiphy->cipher_suites = ipw_cipher_suites;
@@ -3521,7 +3521,7 @@ static void ipw2100_msg_free(struct ipw2100_priv *priv)
3521static ssize_t show_pci(struct device *d, struct device_attribute *attr, 3521static ssize_t show_pci(struct device *d, struct device_attribute *attr,
3522 char *buf) 3522 char *buf)
3523{ 3523{
3524 struct pci_dev *pci_dev = container_of(d, struct pci_dev, dev); 3524 struct pci_dev *pci_dev = to_pci_dev(d);
3525 char *out = buf; 3525 char *out = buf;
3526 int i, j; 3526 int i, j;
3527 u32 val; 3527 u32 val;
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index ed0adaf1eec4..dac13cf42e9f 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -11359,7 +11359,7 @@ static int ipw_wdev_init(struct net_device *dev)
11359 if (geo->bg_channels) { 11359 if (geo->bg_channels) {
11360 struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; 11360 struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band;
11361 11361
11362 bg_band->band = IEEE80211_BAND_2GHZ; 11362 bg_band->band = NL80211_BAND_2GHZ;
11363 bg_band->n_channels = geo->bg_channels; 11363 bg_band->n_channels = geo->bg_channels;
11364 bg_band->channels = kcalloc(geo->bg_channels, 11364 bg_band->channels = kcalloc(geo->bg_channels,
11365 sizeof(struct ieee80211_channel), 11365 sizeof(struct ieee80211_channel),
@@ -11370,7 +11370,7 @@ static int ipw_wdev_init(struct net_device *dev)
11370 } 11370 }
11371 /* translate geo->bg to bg_band.channels */ 11371 /* translate geo->bg to bg_band.channels */
11372 for (i = 0; i < geo->bg_channels; i++) { 11372 for (i = 0; i < geo->bg_channels; i++) {
11373 bg_band->channels[i].band = IEEE80211_BAND_2GHZ; 11373 bg_band->channels[i].band = NL80211_BAND_2GHZ;
11374 bg_band->channels[i].center_freq = geo->bg[i].freq; 11374 bg_band->channels[i].center_freq = geo->bg[i].freq;
11375 bg_band->channels[i].hw_value = geo->bg[i].channel; 11375 bg_band->channels[i].hw_value = geo->bg[i].channel;
11376 bg_band->channels[i].max_power = geo->bg[i].max_power; 11376 bg_band->channels[i].max_power = geo->bg[i].max_power;
@@ -11391,14 +11391,14 @@ static int ipw_wdev_init(struct net_device *dev)
11391 bg_band->bitrates = ipw2200_bg_rates; 11391 bg_band->bitrates = ipw2200_bg_rates;
11392 bg_band->n_bitrates = ipw2200_num_bg_rates; 11392 bg_band->n_bitrates = ipw2200_num_bg_rates;
11393 11393
11394 wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band; 11394 wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band;
11395 } 11395 }
11396 11396
11397 /* fill-out priv->ieee->a_band */ 11397 /* fill-out priv->ieee->a_band */
11398 if (geo->a_channels) { 11398 if (geo->a_channels) {
11399 struct ieee80211_supported_band *a_band = &priv->ieee->a_band; 11399 struct ieee80211_supported_band *a_band = &priv->ieee->a_band;
11400 11400
11401 a_band->band = IEEE80211_BAND_5GHZ; 11401 a_band->band = NL80211_BAND_5GHZ;
11402 a_band->n_channels = geo->a_channels; 11402 a_band->n_channels = geo->a_channels;
11403 a_band->channels = kcalloc(geo->a_channels, 11403 a_band->channels = kcalloc(geo->a_channels,
11404 sizeof(struct ieee80211_channel), 11404 sizeof(struct ieee80211_channel),
@@ -11409,7 +11409,7 @@ static int ipw_wdev_init(struct net_device *dev)
11409 } 11409 }
11410 /* translate geo->a to a_band.channels */ 11410 /* translate geo->a to a_band.channels */
11411 for (i = 0; i < geo->a_channels; i++) { 11411 for (i = 0; i < geo->a_channels; i++) {
11412 a_band->channels[i].band = IEEE80211_BAND_5GHZ; 11412 a_band->channels[i].band = NL80211_BAND_5GHZ;
11413 a_band->channels[i].center_freq = geo->a[i].freq; 11413 a_band->channels[i].center_freq = geo->a[i].freq;
11414 a_band->channels[i].hw_value = geo->a[i].channel; 11414 a_band->channels[i].hw_value = geo->a[i].channel;
11415 a_band->channels[i].max_power = geo->a[i].max_power; 11415 a_band->channels[i].max_power = geo->a[i].max_power;
@@ -11430,7 +11430,7 @@ static int ipw_wdev_init(struct net_device *dev)
11430 a_band->bitrates = ipw2200_a_rates; 11430 a_band->bitrates = ipw2200_a_rates;
11431 a_band->n_bitrates = ipw2200_num_a_rates; 11431 a_band->n_bitrates = ipw2200_num_a_rates;
11432 11432
11433 wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = a_band; 11433 wdev->wiphy->bands[NL80211_BAND_5GHZ] = a_band;
11434 } 11434 }
11435 11435
11436 wdev->wiphy->cipher_suites = ipw_cipher_suites; 11436 wdev->wiphy->cipher_suites = ipw_cipher_suites;
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
index af1b3e6839fa..466912eb2d87 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
@@ -1547,7 +1547,7 @@ il3945_irq_tasklet(struct il_priv *il)
1547} 1547}
1548 1548
1549static int 1549static int
1550il3945_get_channels_for_scan(struct il_priv *il, enum ieee80211_band band, 1550il3945_get_channels_for_scan(struct il_priv *il, enum nl80211_band band,
1551 u8 is_active, u8 n_probes, 1551 u8 is_active, u8 n_probes,
1552 struct il3945_scan_channel *scan_ch, 1552 struct il3945_scan_channel *scan_ch,
1553 struct ieee80211_vif *vif) 1553 struct ieee80211_vif *vif)
@@ -1618,7 +1618,7 @@ il3945_get_channels_for_scan(struct il_priv *il, enum ieee80211_band band,
1618 /* scan_pwr_info->tpc.dsp_atten; */ 1618 /* scan_pwr_info->tpc.dsp_atten; */
1619 1619
1620 /*scan_pwr_info->tpc.tx_gain; */ 1620 /*scan_pwr_info->tpc.tx_gain; */
1621 if (band == IEEE80211_BAND_5GHZ) 1621 if (band == NL80211_BAND_5GHZ)
1622 scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3; 1622 scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3;
1623 else { 1623 else {
1624 scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3)); 1624 scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3));
@@ -2534,7 +2534,7 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
2534 }; 2534 };
2535 struct il3945_scan_cmd *scan; 2535 struct il3945_scan_cmd *scan;
2536 u8 n_probes = 0; 2536 u8 n_probes = 0;
2537 enum ieee80211_band band; 2537 enum nl80211_band band;
2538 bool is_active = false; 2538 bool is_active = false;
2539 int ret; 2539 int ret;
2540 u16 len; 2540 u16 len;
@@ -2615,14 +2615,14 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
2615 /* flags + rate selection */ 2615 /* flags + rate selection */
2616 2616
2617 switch (il->scan_band) { 2617 switch (il->scan_band) {
2618 case IEEE80211_BAND_2GHZ: 2618 case NL80211_BAND_2GHZ:
2619 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; 2619 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
2620 scan->tx_cmd.rate = RATE_1M_PLCP; 2620 scan->tx_cmd.rate = RATE_1M_PLCP;
2621 band = IEEE80211_BAND_2GHZ; 2621 band = NL80211_BAND_2GHZ;
2622 break; 2622 break;
2623 case IEEE80211_BAND_5GHZ: 2623 case NL80211_BAND_5GHZ:
2624 scan->tx_cmd.rate = RATE_6M_PLCP; 2624 scan->tx_cmd.rate = RATE_6M_PLCP;
2625 band = IEEE80211_BAND_5GHZ; 2625 band = NL80211_BAND_5GHZ;
2626 break; 2626 break;
2627 default: 2627 default:
2628 IL_WARN("Invalid scan band\n"); 2628 IL_WARN("Invalid scan band\n");
@@ -3507,7 +3507,7 @@ il3945_init_drv(struct il_priv *il)
3507 3507
3508 il->ieee_channels = NULL; 3508 il->ieee_channels = NULL;
3509 il->ieee_rates = NULL; 3509 il->ieee_rates = NULL;
3510 il->band = IEEE80211_BAND_2GHZ; 3510 il->band = NL80211_BAND_2GHZ;
3511 3511
3512 il->iw_mode = NL80211_IFTYPE_STATION; 3512 il->iw_mode = NL80211_IFTYPE_STATION;
3513 il->missed_beacon_threshold = IL_MISSED_BEACON_THRESHOLD_DEF; 3513 il->missed_beacon_threshold = IL_MISSED_BEACON_THRESHOLD_DEF;
@@ -3582,13 +3582,13 @@ il3945_setup_mac(struct il_priv *il)
3582 /* Default value; 4 EDCA QOS priorities */ 3582 /* Default value; 4 EDCA QOS priorities */
3583 hw->queues = 4; 3583 hw->queues = 4;
3584 3584
3585 if (il->bands[IEEE80211_BAND_2GHZ].n_channels) 3585 if (il->bands[NL80211_BAND_2GHZ].n_channels)
3586 il->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = 3586 il->hw->wiphy->bands[NL80211_BAND_2GHZ] =
3587 &il->bands[IEEE80211_BAND_2GHZ]; 3587 &il->bands[NL80211_BAND_2GHZ];
3588 3588
3589 if (il->bands[IEEE80211_BAND_5GHZ].n_channels) 3589 if (il->bands[NL80211_BAND_5GHZ].n_channels)
3590 il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = 3590 il->hw->wiphy->bands[NL80211_BAND_5GHZ] =
3591 &il->bands[IEEE80211_BAND_5GHZ]; 3591 &il->bands[NL80211_BAND_5GHZ];
3592 3592
3593 il_leds_init(il); 3593 il_leds_init(il);
3594 3594
@@ -3761,7 +3761,7 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3761 goto out_release_irq; 3761 goto out_release_irq;
3762 } 3762 }
3763 3763
3764 il_set_rxon_channel(il, &il->bands[IEEE80211_BAND_2GHZ].channels[5]); 3764 il_set_rxon_channel(il, &il->bands[NL80211_BAND_2GHZ].channels[5]);
3765 il3945_setup_deferred_work(il); 3765 il3945_setup_deferred_work(il);
3766 il3945_setup_handlers(il); 3766 il3945_setup_handlers(il);
3767 il_power_initialize(il); 3767 il_power_initialize(il);
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-rs.c b/drivers/net/wireless/intel/iwlegacy/3945-rs.c
index 76b0729ade17..03ad9b8b55f4 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945-rs.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945-rs.c
@@ -97,7 +97,7 @@ static struct il3945_tpt_entry il3945_tpt_table_g[] = {
97#define RATE_RETRY_TH 15 97#define RATE_RETRY_TH 15
98 98
99static u8 99static u8
100il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band) 100il3945_get_rate_idx_by_rssi(s32 rssi, enum nl80211_band band)
101{ 101{
102 u32 idx = 0; 102 u32 idx = 0;
103 u32 table_size = 0; 103 u32 table_size = 0;
@@ -107,11 +107,11 @@ il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band)
107 rssi = IL_MIN_RSSI_VAL; 107 rssi = IL_MIN_RSSI_VAL;
108 108
109 switch (band) { 109 switch (band) {
110 case IEEE80211_BAND_2GHZ: 110 case NL80211_BAND_2GHZ:
111 tpt_table = il3945_tpt_table_g; 111 tpt_table = il3945_tpt_table_g;
112 table_size = ARRAY_SIZE(il3945_tpt_table_g); 112 table_size = ARRAY_SIZE(il3945_tpt_table_g);
113 break; 113 break;
114 case IEEE80211_BAND_5GHZ: 114 case NL80211_BAND_5GHZ:
115 tpt_table = il3945_tpt_table_a; 115 tpt_table = il3945_tpt_table_a;
116 table_size = ARRAY_SIZE(il3945_tpt_table_a); 116 table_size = ARRAY_SIZE(il3945_tpt_table_a);
117 break; 117 break;
@@ -380,7 +380,7 @@ il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id)
380 380
381 il->_3945.sta_supp_rates = sta->supp_rates[sband->band]; 381 il->_3945.sta_supp_rates = sta->supp_rates[sband->band];
382 /* For 5 GHz band it start at IL_FIRST_OFDM_RATE */ 382 /* For 5 GHz band it start at IL_FIRST_OFDM_RATE */
383 if (sband->band == IEEE80211_BAND_5GHZ) { 383 if (sband->band == NL80211_BAND_5GHZ) {
384 rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; 384 rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE;
385 il->_3945.sta_supp_rates <<= IL_FIRST_OFDM_RATE; 385 il->_3945.sta_supp_rates <<= IL_FIRST_OFDM_RATE;
386 } 386 }
@@ -541,7 +541,7 @@ il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband,
541 541
542static u16 542static u16
543il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask, 543il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask,
544 enum ieee80211_band band) 544 enum nl80211_band band)
545{ 545{
546 u8 high = RATE_INVALID; 546 u8 high = RATE_INVALID;
547 u8 low = RATE_INVALID; 547 u8 low = RATE_INVALID;
@@ -549,7 +549,7 @@ il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask,
549 549
550 /* 802.11A walks to the next literal adjacent rate in 550 /* 802.11A walks to the next literal adjacent rate in
551 * the rate table */ 551 * the rate table */
552 if (unlikely(band == IEEE80211_BAND_5GHZ)) { 552 if (unlikely(band == NL80211_BAND_5GHZ)) {
553 int i; 553 int i;
554 u32 mask; 554 u32 mask;
555 555
@@ -657,14 +657,14 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
657 657
658 /* get user max rate if set */ 658 /* get user max rate if set */
659 max_rate_idx = txrc->max_rate_idx; 659 max_rate_idx = txrc->max_rate_idx;
660 if (sband->band == IEEE80211_BAND_5GHZ && max_rate_idx != -1) 660 if (sband->band == NL80211_BAND_5GHZ && max_rate_idx != -1)
661 max_rate_idx += IL_FIRST_OFDM_RATE; 661 max_rate_idx += IL_FIRST_OFDM_RATE;
662 if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT) 662 if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT)
663 max_rate_idx = -1; 663 max_rate_idx = -1;
664 664
665 idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1); 665 idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1);
666 666
667 if (sband->band == IEEE80211_BAND_5GHZ) 667 if (sband->band == NL80211_BAND_5GHZ)
668 rate_mask = rate_mask << IL_FIRST_OFDM_RATE; 668 rate_mask = rate_mask << IL_FIRST_OFDM_RATE;
669 669
670 spin_lock_irqsave(&rs_sta->lock, flags); 670 spin_lock_irqsave(&rs_sta->lock, flags);
@@ -806,7 +806,7 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
806 806
807out: 807out:
808 808
809 if (sband->band == IEEE80211_BAND_5GHZ) { 809 if (sband->band == NL80211_BAND_5GHZ) {
810 if (WARN_ON_ONCE(idx < IL_FIRST_OFDM_RATE)) 810 if (WARN_ON_ONCE(idx < IL_FIRST_OFDM_RATE))
811 idx = IL_FIRST_OFDM_RATE; 811 idx = IL_FIRST_OFDM_RATE;
812 rs_sta->last_txrate_idx = idx; 812 rs_sta->last_txrate_idx = idx;
@@ -935,7 +935,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
935 935
936 rs_sta->tgg = 0; 936 rs_sta->tgg = 0;
937 switch (il->band) { 937 switch (il->band) {
938 case IEEE80211_BAND_2GHZ: 938 case NL80211_BAND_2GHZ:
939 /* TODO: this always does G, not a regression */ 939 /* TODO: this always does G, not a regression */
940 if (il->active.flags & RXON_FLG_TGG_PROTECT_MSK) { 940 if (il->active.flags & RXON_FLG_TGG_PROTECT_MSK) {
941 rs_sta->tgg = 1; 941 rs_sta->tgg = 1;
@@ -943,7 +943,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
943 } else 943 } else
944 rs_sta->expected_tpt = il3945_expected_tpt_g; 944 rs_sta->expected_tpt = il3945_expected_tpt_g;
945 break; 945 break;
946 case IEEE80211_BAND_5GHZ: 946 case NL80211_BAND_5GHZ:
947 rs_sta->expected_tpt = il3945_expected_tpt_a; 947 rs_sta->expected_tpt = il3945_expected_tpt_a;
948 break; 948 break;
949 default: 949 default:
diff --git a/drivers/net/wireless/intel/iwlegacy/3945.c b/drivers/net/wireless/intel/iwlegacy/3945.c
index 93bdf684babe..7bcedbb53d94 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945.c
@@ -255,13 +255,13 @@ il3945_rs_next_rate(struct il_priv *il, int rate)
255 int next_rate = il3945_get_prev_ieee_rate(rate); 255 int next_rate = il3945_get_prev_ieee_rate(rate);
256 256
257 switch (il->band) { 257 switch (il->band) {
258 case IEEE80211_BAND_5GHZ: 258 case NL80211_BAND_5GHZ:
259 if (rate == RATE_12M_IDX) 259 if (rate == RATE_12M_IDX)
260 next_rate = RATE_9M_IDX; 260 next_rate = RATE_9M_IDX;
261 else if (rate == RATE_6M_IDX) 261 else if (rate == RATE_6M_IDX)
262 next_rate = RATE_6M_IDX; 262 next_rate = RATE_6M_IDX;
263 break; 263 break;
264 case IEEE80211_BAND_2GHZ: 264 case NL80211_BAND_2GHZ:
265 if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) && 265 if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) &&
266 il_is_associated(il)) { 266 il_is_associated(il)) {
267 if (rate == RATE_11M_IDX) 267 if (rate == RATE_11M_IDX)
@@ -349,7 +349,7 @@ il3945_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb)
349 349
350 /* Fill the MRR chain with some info about on-chip retransmissions */ 350 /* Fill the MRR chain with some info about on-chip retransmissions */
351 rate_idx = il3945_hwrate_to_plcp_idx(tx_resp->rate); 351 rate_idx = il3945_hwrate_to_plcp_idx(tx_resp->rate);
352 if (info->band == IEEE80211_BAND_5GHZ) 352 if (info->band == NL80211_BAND_5GHZ)
353 rate_idx -= IL_FIRST_OFDM_RATE; 353 rate_idx -= IL_FIRST_OFDM_RATE;
354 354
355 fail = tx_resp->failure_frame; 355 fail = tx_resp->failure_frame;
@@ -554,14 +554,14 @@ il3945_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb)
554 rx_status.mactime = le64_to_cpu(rx_end->timestamp); 554 rx_status.mactime = le64_to_cpu(rx_end->timestamp);
555 rx_status.band = 555 rx_status.band =
556 (rx_hdr-> 556 (rx_hdr->
557 phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? IEEE80211_BAND_2GHZ : 557 phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? NL80211_BAND_2GHZ :
558 IEEE80211_BAND_5GHZ; 558 NL80211_BAND_5GHZ;
559 rx_status.freq = 559 rx_status.freq =
560 ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel), 560 ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel),
561 rx_status.band); 561 rx_status.band);
562 562
563 rx_status.rate_idx = il3945_hwrate_to_plcp_idx(rx_hdr->rate); 563 rx_status.rate_idx = il3945_hwrate_to_plcp_idx(rx_hdr->rate);
564 if (rx_status.band == IEEE80211_BAND_5GHZ) 564 if (rx_status.band == NL80211_BAND_5GHZ)
565 rx_status.rate_idx -= IL_FIRST_OFDM_RATE; 565 rx_status.rate_idx -= IL_FIRST_OFDM_RATE;
566 566
567 rx_status.antenna = 567 rx_status.antenna =
@@ -1409,7 +1409,7 @@ il3945_send_tx_power(struct il_priv *il)
1409 1409
1410 chan = le16_to_cpu(il->active.channel); 1410 chan = le16_to_cpu(il->active.channel);
1411 1411
1412 txpower.band = (il->band == IEEE80211_BAND_5GHZ) ? 0 : 1; 1412 txpower.band = (il->band == NL80211_BAND_5GHZ) ? 0 : 1;
1413 ch_info = il_get_channel_info(il, il->band, chan); 1413 ch_info = il_get_channel_info(il, il->band, chan);
1414 if (!ch_info) { 1414 if (!ch_info) {
1415 IL_ERR("Failed to get channel info for channel %d [%d]\n", chan, 1415 IL_ERR("Failed to get channel info for channel %d [%d]\n", chan,
@@ -2310,7 +2310,7 @@ il3945_manage_ibss_station(struct il_priv *il, struct ieee80211_vif *vif,
2310 2310
2311 il3945_sync_sta(il, vif_priv->ibss_bssid_sta_id, 2311 il3945_sync_sta(il, vif_priv->ibss_bssid_sta_id,
2312 (il->band == 2312 (il->band ==
2313 IEEE80211_BAND_5GHZ) ? RATE_6M_PLCP : 2313 NL80211_BAND_5GHZ) ? RATE_6M_PLCP :
2314 RATE_1M_PLCP); 2314 RATE_1M_PLCP);
2315 il3945_rate_scale_init(il->hw, vif_priv->ibss_bssid_sta_id); 2315 il3945_rate_scale_init(il->hw, vif_priv->ibss_bssid_sta_id);
2316 2316
@@ -2343,7 +2343,7 @@ il3945_init_hw_rate_table(struct il_priv *il)
2343 } 2343 }
2344 2344
2345 switch (il->band) { 2345 switch (il->band) {
2346 case IEEE80211_BAND_5GHZ: 2346 case NL80211_BAND_5GHZ:
2347 D_RATE("Select A mode rate scale\n"); 2347 D_RATE("Select A mode rate scale\n");
2348 /* If one of the following CCK rates is used, 2348 /* If one of the following CCK rates is used,
2349 * have it fall back to the 6M OFDM rate */ 2349 * have it fall back to the 6M OFDM rate */
@@ -2359,7 +2359,7 @@ il3945_init_hw_rate_table(struct il_priv *il)
2359 il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx; 2359 il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx;
2360 break; 2360 break;
2361 2361
2362 case IEEE80211_BAND_2GHZ: 2362 case NL80211_BAND_2GHZ:
2363 D_RATE("Select B/G mode rate scale\n"); 2363 D_RATE("Select B/G mode rate scale\n");
2364 /* If an OFDM rate is used, have it fall back to the 2364 /* If an OFDM rate is used, have it fall back to the
2365 * 1M CCK rates */ 2365 * 1M CCK rates */
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
index b75f4ef3cdc7..a91d170a614b 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
@@ -457,7 +457,7 @@ il4965_rxq_stop(struct il_priv *il)
457} 457}
458 458
459int 459int
460il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) 460il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band)
461{ 461{
462 int idx = 0; 462 int idx = 0;
463 int band_offset = 0; 463 int band_offset = 0;
@@ -468,7 +468,7 @@ il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band)
468 return idx; 468 return idx;
469 /* Legacy rate format, search for match in table */ 469 /* Legacy rate format, search for match in table */
470 } else { 470 } else {
471 if (band == IEEE80211_BAND_5GHZ) 471 if (band == NL80211_BAND_5GHZ)
472 band_offset = IL_FIRST_OFDM_RATE; 472 band_offset = IL_FIRST_OFDM_RATE;
473 for (idx = band_offset; idx < RATE_COUNT_LEGACY; idx++) 473 for (idx = band_offset; idx < RATE_COUNT_LEGACY; idx++)
474 if (il_rates[idx].plcp == (rate_n_flags & 0xFF)) 474 if (il_rates[idx].plcp == (rate_n_flags & 0xFF))
@@ -688,8 +688,8 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb)
688 rx_status.mactime = le64_to_cpu(phy_res->timestamp); 688 rx_status.mactime = le64_to_cpu(phy_res->timestamp);
689 rx_status.band = 689 rx_status.band =
690 (phy_res-> 690 (phy_res->
691 phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? IEEE80211_BAND_2GHZ : 691 phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? NL80211_BAND_2GHZ :
692 IEEE80211_BAND_5GHZ; 692 NL80211_BAND_5GHZ;
693 rx_status.freq = 693 rx_status.freq =
694 ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), 694 ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel),
695 rx_status.band); 695 rx_status.band);
@@ -766,7 +766,7 @@ il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb)
766 766
767static int 767static int
768il4965_get_channels_for_scan(struct il_priv *il, struct ieee80211_vif *vif, 768il4965_get_channels_for_scan(struct il_priv *il, struct ieee80211_vif *vif,
769 enum ieee80211_band band, u8 is_active, 769 enum nl80211_band band, u8 is_active,
770 u8 n_probes, struct il_scan_channel *scan_ch) 770 u8 n_probes, struct il_scan_channel *scan_ch)
771{ 771{
772 struct ieee80211_channel *chan; 772 struct ieee80211_channel *chan;
@@ -822,7 +822,7 @@ il4965_get_channels_for_scan(struct il_priv *il, struct ieee80211_vif *vif,
822 * power level: 822 * power level:
823 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; 823 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3;
824 */ 824 */
825 if (band == IEEE80211_BAND_5GHZ) 825 if (band == NL80211_BAND_5GHZ)
826 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; 826 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
827 else 827 else
828 scan_ch->tx_gain = ((1 << 5) | (5 << 3)); 828 scan_ch->tx_gain = ((1 << 5) | (5 << 3));
@@ -870,7 +870,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
870 u32 rate_flags = 0; 870 u32 rate_flags = 0;
871 u16 cmd_len; 871 u16 cmd_len;
872 u16 rx_chain = 0; 872 u16 rx_chain = 0;
873 enum ieee80211_band band; 873 enum nl80211_band band;
874 u8 n_probes = 0; 874 u8 n_probes = 0;
875 u8 rx_ant = il->hw_params.valid_rx_ant; 875 u8 rx_ant = il->hw_params.valid_rx_ant;
876 u8 rate; 876 u8 rate;
@@ -944,7 +944,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
944 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; 944 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
945 945
946 switch (il->scan_band) { 946 switch (il->scan_band) {
947 case IEEE80211_BAND_2GHZ: 947 case NL80211_BAND_2GHZ:
948 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; 948 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
949 chan_mod = 949 chan_mod =
950 le32_to_cpu(il->active.flags & RXON_FLG_CHANNEL_MODE_MSK) >> 950 le32_to_cpu(il->active.flags & RXON_FLG_CHANNEL_MODE_MSK) >>
@@ -956,7 +956,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif)
956 rate_flags = RATE_MCS_CCK_MSK; 956 rate_flags = RATE_MCS_CCK_MSK;
957 } 957 }
958 break; 958 break;
959 case IEEE80211_BAND_5GHZ: 959 case NL80211_BAND_5GHZ:
960 rate = RATE_6M_PLCP; 960 rate = RATE_6M_PLCP;
961 break; 961 break;
962 default: 962 default:
@@ -1590,7 +1590,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il,
1590 || rate_idx > RATE_COUNT_LEGACY) 1590 || rate_idx > RATE_COUNT_LEGACY)
1591 rate_idx = rate_lowest_index(&il->bands[info->band], sta); 1591 rate_idx = rate_lowest_index(&il->bands[info->band], sta);
1592 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ 1592 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */
1593 if (info->band == IEEE80211_BAND_5GHZ) 1593 if (info->band == NL80211_BAND_5GHZ)
1594 rate_idx += IL_FIRST_OFDM_RATE; 1594 rate_idx += IL_FIRST_OFDM_RATE;
1595 /* Get PLCP rate for tx_cmd->rate_n_flags */ 1595 /* Get PLCP rate for tx_cmd->rate_n_flags */
1596 rate_plcp = il_rates[rate_idx].plcp; 1596 rate_plcp = il_rates[rate_idx].plcp;
@@ -3051,7 +3051,7 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id)
3051 } 3051 }
3052 /* Set up the rate scaling to start at selected rate, fall back 3052 /* Set up the rate scaling to start at selected rate, fall back
3053 * all the way down to 1M in IEEE order, and then spin on 1M */ 3053 * all the way down to 1M in IEEE order, and then spin on 1M */
3054 if (il->band == IEEE80211_BAND_5GHZ) 3054 if (il->band == NL80211_BAND_5GHZ)
3055 r = RATE_6M_IDX; 3055 r = RATE_6M_IDX;
3056 else 3056 else
3057 r = RATE_1M_IDX; 3057 r = RATE_1M_IDX;
@@ -5553,6 +5553,7 @@ __il4965_up(struct il_priv *il)
5553 5553
5554 il4965_prepare_card_hw(il); 5554 il4965_prepare_card_hw(il);
5555 if (!il->hw_ready) { 5555 if (!il->hw_ready) {
5556 il_dealloc_bcast_stations(il);
5556 IL_ERR("HW not ready\n"); 5557 IL_ERR("HW not ready\n");
5557 return -EIO; 5558 return -EIO;
5558 } 5559 }
@@ -5564,6 +5565,7 @@ __il4965_up(struct il_priv *il)
5564 set_bit(S_RFKILL, &il->status); 5565 set_bit(S_RFKILL, &il->status);
5565 wiphy_rfkill_set_hw_state(il->hw->wiphy, true); 5566 wiphy_rfkill_set_hw_state(il->hw->wiphy, true);
5566 5567
5568 il_dealloc_bcast_stations(il);
5567 il_enable_rfkill_int(il); 5569 il_enable_rfkill_int(il);
5568 IL_WARN("Radio disabled by HW RF Kill switch\n"); 5570 IL_WARN("Radio disabled by HW RF Kill switch\n");
5569 return 0; 5571 return 0;
@@ -5577,6 +5579,7 @@ __il4965_up(struct il_priv *il)
5577 ret = il4965_hw_nic_init(il); 5579 ret = il4965_hw_nic_init(il);
5578 if (ret) { 5580 if (ret) {
5579 IL_ERR("Unable to init nic\n"); 5581 IL_ERR("Unable to init nic\n");
5582 il_dealloc_bcast_stations(il);
5580 return ret; 5583 return ret;
5581 } 5584 }
5582 5585
@@ -5787,12 +5790,12 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length)
5787 5790
5788 hw->max_listen_interval = IL_CONN_MAX_LISTEN_INTERVAL; 5791 hw->max_listen_interval = IL_CONN_MAX_LISTEN_INTERVAL;
5789 5792
5790 if (il->bands[IEEE80211_BAND_2GHZ].n_channels) 5793 if (il->bands[NL80211_BAND_2GHZ].n_channels)
5791 il->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = 5794 il->hw->wiphy->bands[NL80211_BAND_2GHZ] =
5792 &il->bands[IEEE80211_BAND_2GHZ]; 5795 &il->bands[NL80211_BAND_2GHZ];
5793 if (il->bands[IEEE80211_BAND_5GHZ].n_channels) 5796 if (il->bands[NL80211_BAND_5GHZ].n_channels)
5794 il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = 5797 il->hw->wiphy->bands[NL80211_BAND_5GHZ] =
5795 &il->bands[IEEE80211_BAND_5GHZ]; 5798 &il->bands[NL80211_BAND_5GHZ];
5796 5799
5797 il_leds_init(il); 5800 il_leds_init(il);
5798 5801
@@ -6365,7 +6368,7 @@ il4965_init_drv(struct il_priv *il)
6365 6368
6366 il->ieee_channels = NULL; 6369 il->ieee_channels = NULL;
6367 il->ieee_rates = NULL; 6370 il->ieee_rates = NULL;
6368 il->band = IEEE80211_BAND_2GHZ; 6371 il->band = NL80211_BAND_2GHZ;
6369 6372
6370 il->iw_mode = NL80211_IFTYPE_STATION; 6373 il->iw_mode = NL80211_IFTYPE_STATION;
6371 il->current_ht_config.smps = IEEE80211_SMPS_STATIC; 6374 il->current_ht_config.smps = IEEE80211_SMPS_STATIC;
@@ -6477,7 +6480,7 @@ il4965_set_hw_params(struct il_priv *il)
6477 il->hw_params.max_data_size = IL49_RTC_DATA_SIZE; 6480 il->hw_params.max_data_size = IL49_RTC_DATA_SIZE;
6478 il->hw_params.max_inst_size = IL49_RTC_INST_SIZE; 6481 il->hw_params.max_inst_size = IL49_RTC_INST_SIZE;
6479 il->hw_params.max_bsm_size = BSM_SRAM_SIZE; 6482 il->hw_params.max_bsm_size = BSM_SRAM_SIZE;
6480 il->hw_params.ht40_channel = BIT(IEEE80211_BAND_5GHZ); 6483 il->hw_params.ht40_channel = BIT(NL80211_BAND_5GHZ);
6481 6484
6482 il->hw_params.rx_wrt_ptr_reg = FH49_RSCSR_CHNL0_WPTR; 6485 il->hw_params.rx_wrt_ptr_reg = FH49_RSCSR_CHNL0_WPTR;
6483 6486
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
index bac60b2bc3f0..a867ae7f4095 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
@@ -549,7 +549,7 @@ il4965_rate_n_flags_from_tbl(struct il_priv *il, struct il_scale_tbl_info *tbl,
549 */ 549 */
550static int 550static int
551il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, 551il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
552 enum ieee80211_band band, 552 enum nl80211_band band,
553 struct il_scale_tbl_info *tbl, int *rate_idx) 553 struct il_scale_tbl_info *tbl, int *rate_idx)
554{ 554{
555 u32 ant_msk = (rate_n_flags & RATE_MCS_ANT_ABC_MSK); 555 u32 ant_msk = (rate_n_flags & RATE_MCS_ANT_ABC_MSK);
@@ -574,7 +574,7 @@ il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
574 /* legacy rate format */ 574 /* legacy rate format */
575 if (!(rate_n_flags & RATE_MCS_HT_MSK)) { 575 if (!(rate_n_flags & RATE_MCS_HT_MSK)) {
576 if (il4965_num_of_ant == 1) { 576 if (il4965_num_of_ant == 1) {
577 if (band == IEEE80211_BAND_5GHZ) 577 if (band == NL80211_BAND_5GHZ)
578 tbl->lq_type = LQ_A; 578 tbl->lq_type = LQ_A;
579 else 579 else
580 tbl->lq_type = LQ_G; 580 tbl->lq_type = LQ_G;
@@ -743,7 +743,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta,
743 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) { 743 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) {
744 switch_to_legacy = 1; 744 switch_to_legacy = 1;
745 scale_idx = rs_ht_to_legacy[scale_idx]; 745 scale_idx = rs_ht_to_legacy[scale_idx];
746 if (lq_sta->band == IEEE80211_BAND_5GHZ) 746 if (lq_sta->band == NL80211_BAND_5GHZ)
747 tbl->lq_type = LQ_A; 747 tbl->lq_type = LQ_A;
748 else 748 else
749 tbl->lq_type = LQ_G; 749 tbl->lq_type = LQ_G;
@@ -762,7 +762,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta,
762 /* Mask with station rate restriction */ 762 /* Mask with station rate restriction */
763 if (is_legacy(tbl->lq_type)) { 763 if (is_legacy(tbl->lq_type)) {
764 /* supp_rates has no CCK bits in A mode */ 764 /* supp_rates has no CCK bits in A mode */
765 if (lq_sta->band == IEEE80211_BAND_5GHZ) 765 if (lq_sta->band == NL80211_BAND_5GHZ)
766 rate_mask = 766 rate_mask =
767 (u16) (rate_mask & 767 (u16) (rate_mask &
768 (lq_sta->supp_rates << IL_FIRST_OFDM_RATE)); 768 (lq_sta->supp_rates << IL_FIRST_OFDM_RATE));
@@ -851,7 +851,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband,
851 table = &lq_sta->lq; 851 table = &lq_sta->lq;
852 tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); 852 tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags);
853 il4965_rs_get_tbl_info_from_mcs(tx_rate, il->band, &tbl_type, &rs_idx); 853 il4965_rs_get_tbl_info_from_mcs(tx_rate, il->band, &tbl_type, &rs_idx);
854 if (il->band == IEEE80211_BAND_5GHZ) 854 if (il->band == NL80211_BAND_5GHZ)
855 rs_idx -= IL_FIRST_OFDM_RATE; 855 rs_idx -= IL_FIRST_OFDM_RATE;
856 mac_flags = info->status.rates[0].flags; 856 mac_flags = info->status.rates[0].flags;
857 mac_idx = info->status.rates[0].idx; 857 mac_idx = info->status.rates[0].idx;
@@ -864,7 +864,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband,
864 * mac80211 HT idx is always zero-idxed; we need to move 864 * mac80211 HT idx is always zero-idxed; we need to move
865 * HT OFDM rates after CCK rates in 2.4 GHz band 865 * HT OFDM rates after CCK rates in 2.4 GHz band
866 */ 866 */
867 if (il->band == IEEE80211_BAND_2GHZ) 867 if (il->band == NL80211_BAND_2GHZ)
868 mac_idx += IL_FIRST_OFDM_RATE; 868 mac_idx += IL_FIRST_OFDM_RATE;
869 } 869 }
870 /* Here we actually compare this rate to the latest LQ command */ 870 /* Here we actually compare this rate to the latest LQ command */
@@ -1816,7 +1816,7 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb,
1816 1816
1817 /* mask with station rate restriction */ 1817 /* mask with station rate restriction */
1818 if (is_legacy(tbl->lq_type)) { 1818 if (is_legacy(tbl->lq_type)) {
1819 if (lq_sta->band == IEEE80211_BAND_5GHZ) 1819 if (lq_sta->band == NL80211_BAND_5GHZ)
1820 /* supp_rates has no CCK bits in A mode */ 1820 /* supp_rates has no CCK bits in A mode */
1821 rate_scale_idx_msk = 1821 rate_scale_idx_msk =
1822 (u16) (rate_mask & 1822 (u16) (rate_mask &
@@ -2212,7 +2212,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
2212 /* Get max rate if user set max rate */ 2212 /* Get max rate if user set max rate */
2213 if (lq_sta) { 2213 if (lq_sta) {
2214 lq_sta->max_rate_idx = txrc->max_rate_idx; 2214 lq_sta->max_rate_idx = txrc->max_rate_idx;
2215 if (sband->band == IEEE80211_BAND_5GHZ && 2215 if (sband->band == NL80211_BAND_5GHZ &&
2216 lq_sta->max_rate_idx != -1) 2216 lq_sta->max_rate_idx != -1)
2217 lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; 2217 lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE;
2218 if (lq_sta->max_rate_idx < 0 || 2218 if (lq_sta->max_rate_idx < 0 ||
@@ -2258,11 +2258,11 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
2258 } else { 2258 } else {
2259 /* Check for invalid rates */ 2259 /* Check for invalid rates */
2260 if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY || 2260 if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY ||
2261 (sband->band == IEEE80211_BAND_5GHZ && 2261 (sband->band == NL80211_BAND_5GHZ &&
2262 rate_idx < IL_FIRST_OFDM_RATE)) 2262 rate_idx < IL_FIRST_OFDM_RATE))
2263 rate_idx = rate_lowest_index(sband, sta); 2263 rate_idx = rate_lowest_index(sband, sta);
2264 /* On valid 5 GHz rate, adjust idx */ 2264 /* On valid 5 GHz rate, adjust idx */
2265 else if (sband->band == IEEE80211_BAND_5GHZ) 2265 else if (sband->band == NL80211_BAND_5GHZ)
2266 rate_idx -= IL_FIRST_OFDM_RATE; 2266 rate_idx -= IL_FIRST_OFDM_RATE;
2267 info->control.rates[0].flags = 0; 2267 info->control.rates[0].flags = 0;
2268 } 2268 }
@@ -2362,7 +2362,7 @@ il4965_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id)
2362 2362
2363 /* Set last_txrate_idx to lowest rate */ 2363 /* Set last_txrate_idx to lowest rate */
2364 lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); 2364 lq_sta->last_txrate_idx = rate_lowest_index(sband, sta);
2365 if (sband->band == IEEE80211_BAND_5GHZ) 2365 if (sband->band == NL80211_BAND_5GHZ)
2366 lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; 2366 lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE;
2367 lq_sta->is_agg = 0; 2367 lq_sta->is_agg = 0;
2368 2368
diff --git a/drivers/net/wireless/intel/iwlegacy/4965.c b/drivers/net/wireless/intel/iwlegacy/4965.c
index fe47db9c20cd..c3c638ed0ed7 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965.c
@@ -1267,7 +1267,7 @@ il4965_send_tx_power(struct il_priv *il)
1267 "TX Power requested while scanning!\n")) 1267 "TX Power requested while scanning!\n"))
1268 return -EAGAIN; 1268 return -EAGAIN;
1269 1269
1270 band = il->band == IEEE80211_BAND_2GHZ; 1270 band = il->band == NL80211_BAND_2GHZ;
1271 1271
1272 is_ht40 = iw4965_is_ht40_channel(il->active.flags); 1272 is_ht40 = iw4965_is_ht40_channel(il->active.flags);
1273 1273
@@ -1480,7 +1480,7 @@ il4965_hw_channel_switch(struct il_priv *il,
1480 u8 switch_count; 1480 u8 switch_count;
1481 u16 beacon_interval = le16_to_cpu(il->timing.beacon_interval); 1481 u16 beacon_interval = le16_to_cpu(il->timing.beacon_interval);
1482 struct ieee80211_vif *vif = il->vif; 1482 struct ieee80211_vif *vif = il->vif;
1483 band = (il->band == IEEE80211_BAND_2GHZ); 1483 band = (il->band == NL80211_BAND_2GHZ);
1484 1484
1485 if (WARN_ON_ONCE(vif == NULL)) 1485 if (WARN_ON_ONCE(vif == NULL))
1486 return -EIO; 1486 return -EIO;
@@ -1918,7 +1918,7 @@ struct il_cfg il4965_cfg = {
1918 * Force use of chains B and C for scan RX on 5 GHz band 1918 * Force use of chains B and C for scan RX on 5 GHz band
1919 * because the device has off-channel reception on chain A. 1919 * because the device has off-channel reception on chain A.
1920 */ 1920 */
1921 .scan_rx_antennas[IEEE80211_BAND_5GHZ] = ANT_BC, 1921 .scan_rx_antennas[NL80211_BAND_5GHZ] = ANT_BC,
1922 1922
1923 .eeprom_size = IL4965_EEPROM_IMG_SIZE, 1923 .eeprom_size = IL4965_EEPROM_IMG_SIZE,
1924 .num_of_queues = IL49_NUM_QUEUES, 1924 .num_of_queues = IL49_NUM_QUEUES,
diff --git a/drivers/net/wireless/intel/iwlegacy/4965.h b/drivers/net/wireless/intel/iwlegacy/4965.h
index e432715e02d8..527e8b531aed 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965.h
+++ b/drivers/net/wireless/intel/iwlegacy/4965.h
@@ -68,7 +68,7 @@ void il4965_rx_replenish(struct il_priv *il);
68void il4965_rx_replenish_now(struct il_priv *il); 68void il4965_rx_replenish_now(struct il_priv *il);
69void il4965_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq); 69void il4965_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq);
70int il4965_rxq_stop(struct il_priv *il); 70int il4965_rxq_stop(struct il_priv *il);
71int il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band); 71int il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band);
72void il4965_rx_handle(struct il_priv *il); 72void il4965_rx_handle(struct il_priv *il);
73 73
74/* tx */ 74/* tx */
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index eb5cb603bc52..eb24b9241bb2 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -723,10 +723,9 @@ il_eeprom_init(struct il_priv *il)
723 sz = il->cfg->eeprom_size; 723 sz = il->cfg->eeprom_size;
724 D_EEPROM("NVM size = %d\n", sz); 724 D_EEPROM("NVM size = %d\n", sz);
725 il->eeprom = kzalloc(sz, GFP_KERNEL); 725 il->eeprom = kzalloc(sz, GFP_KERNEL);
726 if (!il->eeprom) { 726 if (!il->eeprom)
727 ret = -ENOMEM; 727 return -ENOMEM;
728 goto alloc_err; 728
729 }
730 e = (__le16 *) il->eeprom; 729 e = (__le16 *) il->eeprom;
731 730
732 il->ops->apm_init(il); 731 il->ops->apm_init(il);
@@ -778,7 +777,6 @@ err:
778 il_eeprom_free(il); 777 il_eeprom_free(il);
779 /* Reset chip to save power until we load uCode during "up". */ 778 /* Reset chip to save power until we load uCode during "up". */
780 il_apm_stop(il); 779 il_apm_stop(il);
781alloc_err:
782 return ret; 780 return ret;
783} 781}
784EXPORT_SYMBOL(il_eeprom_init); 782EXPORT_SYMBOL(il_eeprom_init);
@@ -862,7 +860,7 @@ il_init_band_reference(const struct il_priv *il, int eep_band,
862 * Does not set up a command, or touch hardware. 860 * Does not set up a command, or touch hardware.
863 */ 861 */
864static int 862static int
865il_mod_ht40_chan_info(struct il_priv *il, enum ieee80211_band band, u16 channel, 863il_mod_ht40_chan_info(struct il_priv *il, enum nl80211_band band, u16 channel,
866 const struct il_eeprom_channel *eeprom_ch, 864 const struct il_eeprom_channel *eeprom_ch,
867 u8 clear_ht40_extension_channel) 865 u8 clear_ht40_extension_channel)
868{ 866{
@@ -947,7 +945,7 @@ il_init_channel_map(struct il_priv *il)
947 ch_info->channel = eeprom_ch_idx[ch]; 945 ch_info->channel = eeprom_ch_idx[ch];
948 ch_info->band = 946 ch_info->band =
949 (band == 947 (band ==
950 1) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 948 1) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
951 949
952 /* permanently store EEPROM's channel regulatory flags 950 /* permanently store EEPROM's channel regulatory flags
953 * and max power in channel info database. */ 951 * and max power in channel info database. */
@@ -1005,14 +1003,14 @@ il_init_channel_map(struct il_priv *il)
1005 1003
1006 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ 1004 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */
1007 for (band = 6; band <= 7; band++) { 1005 for (band = 6; band <= 7; band++) {
1008 enum ieee80211_band ieeeband; 1006 enum nl80211_band ieeeband;
1009 1007
1010 il_init_band_reference(il, band, &eeprom_ch_count, 1008 il_init_band_reference(il, band, &eeprom_ch_count,
1011 &eeprom_ch_info, &eeprom_ch_idx); 1009 &eeprom_ch_info, &eeprom_ch_idx);
1012 1010
1013 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ 1011 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */
1014 ieeeband = 1012 ieeeband =
1015 (band == 6) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 1013 (band == 6) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
1016 1014
1017 /* Loop through each band adding each of the channels */ 1015 /* Loop through each band adding each of the channels */
1018 for (ch = 0; ch < eeprom_ch_count; ch++) { 1016 for (ch = 0; ch < eeprom_ch_count; ch++) {
@@ -1050,19 +1048,19 @@ EXPORT_SYMBOL(il_free_channel_map);
1050 * Based on band and channel number. 1048 * Based on band and channel number.
1051 */ 1049 */
1052const struct il_channel_info * 1050const struct il_channel_info *
1053il_get_channel_info(const struct il_priv *il, enum ieee80211_band band, 1051il_get_channel_info(const struct il_priv *il, enum nl80211_band band,
1054 u16 channel) 1052 u16 channel)
1055{ 1053{
1056 int i; 1054 int i;
1057 1055
1058 switch (band) { 1056 switch (band) {
1059 case IEEE80211_BAND_5GHZ: 1057 case NL80211_BAND_5GHZ:
1060 for (i = 14; i < il->channel_count; i++) { 1058 for (i = 14; i < il->channel_count; i++) {
1061 if (il->channel_info[i].channel == channel) 1059 if (il->channel_info[i].channel == channel)
1062 return &il->channel_info[i]; 1060 return &il->channel_info[i];
1063 } 1061 }
1064 break; 1062 break;
1065 case IEEE80211_BAND_2GHZ: 1063 case NL80211_BAND_2GHZ:
1066 if (channel >= 1 && channel <= 14) 1064 if (channel >= 1 && channel <= 14)
1067 return &il->channel_info[channel - 1]; 1065 return &il->channel_info[channel - 1];
1068 break; 1066 break;
@@ -1459,7 +1457,7 @@ il_hdl_scan_complete(struct il_priv *il, struct il_rx_buf *rxb)
1459 clear_bit(S_SCAN_HW, &il->status); 1457 clear_bit(S_SCAN_HW, &il->status);
1460 1458
1461 D_SCAN("Scan on %sGHz took %dms\n", 1459 D_SCAN("Scan on %sGHz took %dms\n",
1462 (il->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", 1460 (il->scan_band == NL80211_BAND_2GHZ) ? "2.4" : "5.2",
1463 jiffies_to_msecs(jiffies - il->scan_start)); 1461 jiffies_to_msecs(jiffies - il->scan_start));
1464 1462
1465 queue_work(il->workqueue, &il->scan_completed); 1463 queue_work(il->workqueue, &il->scan_completed);
@@ -1477,10 +1475,10 @@ il_setup_rx_scan_handlers(struct il_priv *il)
1477EXPORT_SYMBOL(il_setup_rx_scan_handlers); 1475EXPORT_SYMBOL(il_setup_rx_scan_handlers);
1478 1476
1479u16 1477u16
1480il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, 1478il_get_active_dwell_time(struct il_priv *il, enum nl80211_band band,
1481 u8 n_probes) 1479 u8 n_probes)
1482{ 1480{
1483 if (band == IEEE80211_BAND_5GHZ) 1481 if (band == NL80211_BAND_5GHZ)
1484 return IL_ACTIVE_DWELL_TIME_52 + 1482 return IL_ACTIVE_DWELL_TIME_52 +
1485 IL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); 1483 IL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1);
1486 else 1484 else
@@ -1490,14 +1488,14 @@ il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band,
1490EXPORT_SYMBOL(il_get_active_dwell_time); 1488EXPORT_SYMBOL(il_get_active_dwell_time);
1491 1489
1492u16 1490u16
1493il_get_passive_dwell_time(struct il_priv *il, enum ieee80211_band band, 1491il_get_passive_dwell_time(struct il_priv *il, enum nl80211_band band,
1494 struct ieee80211_vif *vif) 1492 struct ieee80211_vif *vif)
1495{ 1493{
1496 u16 value; 1494 u16 value;
1497 1495
1498 u16 passive = 1496 u16 passive =
1499 (band == 1497 (band ==
1500 IEEE80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE + 1498 NL80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE +
1501 IL_PASSIVE_DWELL_TIME_24 : IL_PASSIVE_DWELL_BASE + 1499 IL_PASSIVE_DWELL_TIME_24 : IL_PASSIVE_DWELL_BASE +
1502 IL_PASSIVE_DWELL_TIME_52; 1500 IL_PASSIVE_DWELL_TIME_52;
1503 1501
@@ -1522,10 +1520,10 @@ void
1522il_init_scan_params(struct il_priv *il) 1520il_init_scan_params(struct il_priv *il)
1523{ 1521{
1524 u8 ant_idx = fls(il->hw_params.valid_tx_ant) - 1; 1522 u8 ant_idx = fls(il->hw_params.valid_tx_ant) - 1;
1525 if (!il->scan_tx_ant[IEEE80211_BAND_5GHZ]) 1523 if (!il->scan_tx_ant[NL80211_BAND_5GHZ])
1526 il->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx; 1524 il->scan_tx_ant[NL80211_BAND_5GHZ] = ant_idx;
1527 if (!il->scan_tx_ant[IEEE80211_BAND_2GHZ]) 1525 if (!il->scan_tx_ant[NL80211_BAND_2GHZ])
1528 il->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx; 1526 il->scan_tx_ant[NL80211_BAND_2GHZ] = ant_idx;
1529} 1527}
1530EXPORT_SYMBOL(il_init_scan_params); 1528EXPORT_SYMBOL(il_init_scan_params);
1531 1529
@@ -2005,7 +2003,7 @@ il_prep_station(struct il_priv *il, const u8 *addr, bool is_ap,
2005 il_set_ht_add_station(il, sta_id, sta); 2003 il_set_ht_add_station(il, sta_id, sta);
2006 2004
2007 /* 3945 only */ 2005 /* 3945 only */
2008 rate = (il->band == IEEE80211_BAND_5GHZ) ? RATE_6M_PLCP : RATE_1M_PLCP; 2006 rate = (il->band == NL80211_BAND_5GHZ) ? RATE_6M_PLCP : RATE_1M_PLCP;
2009 /* Turn on both antennas for the station... */ 2007 /* Turn on both antennas for the station... */
2010 station->sta.rate_n_flags = cpu_to_le16(rate | RATE_MCS_ANT_AB_MSK); 2008 station->sta.rate_n_flags = cpu_to_le16(rate | RATE_MCS_ANT_AB_MSK);
2011 2009
@@ -2794,8 +2792,10 @@ il_tx_queue_free(struct il_priv *il, int txq_id)
2794 il_tx_queue_unmap(il, txq_id); 2792 il_tx_queue_unmap(il, txq_id);
2795 2793
2796 /* De-alloc array of command/tx buffers */ 2794 /* De-alloc array of command/tx buffers */
2797 for (i = 0; i < TFD_TX_CMD_SLOTS; i++) 2795 if (txq->cmd) {
2798 kfree(txq->cmd[i]); 2796 for (i = 0; i < TFD_TX_CMD_SLOTS; i++)
2797 kfree(txq->cmd[i]);
2798 }
2799 2799
2800 /* De-alloc circular buffer of TFDs */ 2800 /* De-alloc circular buffer of TFDs */
2801 if (txq->q.n_bd) 2801 if (txq->q.n_bd)
@@ -2873,8 +2873,10 @@ il_cmd_queue_free(struct il_priv *il)
2873 il_cmd_queue_unmap(il); 2873 il_cmd_queue_unmap(il);
2874 2874
2875 /* De-alloc array of command/tx buffers */ 2875 /* De-alloc array of command/tx buffers */
2876 for (i = 0; i <= TFD_CMD_SLOTS; i++) 2876 if (txq->cmd) {
2877 kfree(txq->cmd[i]); 2877 for (i = 0; i <= TFD_CMD_SLOTS; i++)
2878 kfree(txq->cmd[i]);
2879 }
2878 2880
2879 /* De-alloc circular buffer of TFDs */ 2881 /* De-alloc circular buffer of TFDs */
2880 if (txq->q.n_bd) 2882 if (txq->q.n_bd)
@@ -3080,7 +3082,9 @@ err:
3080 kfree(txq->cmd[i]); 3082 kfree(txq->cmd[i]);
3081out_free_arrays: 3083out_free_arrays:
3082 kfree(txq->meta); 3084 kfree(txq->meta);
3085 txq->meta = NULL;
3083 kfree(txq->cmd); 3086 kfree(txq->cmd);
3087 txq->cmd = NULL;
3084 3088
3085 return -ENOMEM; 3089 return -ENOMEM;
3086} 3090}
@@ -3378,7 +3382,7 @@ EXPORT_SYMBOL(il_bcast_addr);
3378static void 3382static void
3379il_init_ht_hw_capab(const struct il_priv *il, 3383il_init_ht_hw_capab(const struct il_priv *il,
3380 struct ieee80211_sta_ht_cap *ht_info, 3384 struct ieee80211_sta_ht_cap *ht_info,
3381 enum ieee80211_band band) 3385 enum nl80211_band band)
3382{ 3386{
3383 u16 max_bit_rate = 0; 3387 u16 max_bit_rate = 0;
3384 u8 rx_chains_num = il->hw_params.rx_chains_num; 3388 u8 rx_chains_num = il->hw_params.rx_chains_num;
@@ -3439,8 +3443,8 @@ il_init_geos(struct il_priv *il)
3439 int i = 0; 3443 int i = 0;
3440 s8 max_tx_power = 0; 3444 s8 max_tx_power = 0;
3441 3445
3442 if (il->bands[IEEE80211_BAND_2GHZ].n_bitrates || 3446 if (il->bands[NL80211_BAND_2GHZ].n_bitrates ||
3443 il->bands[IEEE80211_BAND_5GHZ].n_bitrates) { 3447 il->bands[NL80211_BAND_5GHZ].n_bitrates) {
3444 D_INFO("Geography modes already initialized.\n"); 3448 D_INFO("Geography modes already initialized.\n");
3445 set_bit(S_GEO_CONFIGURED, &il->status); 3449 set_bit(S_GEO_CONFIGURED, &il->status);
3446 return 0; 3450 return 0;
@@ -3461,23 +3465,23 @@ il_init_geos(struct il_priv *il)
3461 } 3465 }
3462 3466
3463 /* 5.2GHz channels start after the 2.4GHz channels */ 3467 /* 5.2GHz channels start after the 2.4GHz channels */
3464 sband = &il->bands[IEEE80211_BAND_5GHZ]; 3468 sband = &il->bands[NL80211_BAND_5GHZ];
3465 sband->channels = &channels[ARRAY_SIZE(il_eeprom_band_1)]; 3469 sband->channels = &channels[ARRAY_SIZE(il_eeprom_band_1)];
3466 /* just OFDM */ 3470 /* just OFDM */
3467 sband->bitrates = &rates[IL_FIRST_OFDM_RATE]; 3471 sband->bitrates = &rates[IL_FIRST_OFDM_RATE];
3468 sband->n_bitrates = RATE_COUNT_LEGACY - IL_FIRST_OFDM_RATE; 3472 sband->n_bitrates = RATE_COUNT_LEGACY - IL_FIRST_OFDM_RATE;
3469 3473
3470 if (il->cfg->sku & IL_SKU_N) 3474 if (il->cfg->sku & IL_SKU_N)
3471 il_init_ht_hw_capab(il, &sband->ht_cap, IEEE80211_BAND_5GHZ); 3475 il_init_ht_hw_capab(il, &sband->ht_cap, NL80211_BAND_5GHZ);
3472 3476
3473 sband = &il->bands[IEEE80211_BAND_2GHZ]; 3477 sband = &il->bands[NL80211_BAND_2GHZ];
3474 sband->channels = channels; 3478 sband->channels = channels;
3475 /* OFDM & CCK */ 3479 /* OFDM & CCK */
3476 sband->bitrates = rates; 3480 sband->bitrates = rates;
3477 sband->n_bitrates = RATE_COUNT_LEGACY; 3481 sband->n_bitrates = RATE_COUNT_LEGACY;
3478 3482
3479 if (il->cfg->sku & IL_SKU_N) 3483 if (il->cfg->sku & IL_SKU_N)
3480 il_init_ht_hw_capab(il, &sband->ht_cap, IEEE80211_BAND_2GHZ); 3484 il_init_ht_hw_capab(il, &sband->ht_cap, NL80211_BAND_2GHZ);
3481 3485
3482 il->ieee_channels = channels; 3486 il->ieee_channels = channels;
3483 il->ieee_rates = rates; 3487 il->ieee_rates = rates;
@@ -3528,7 +3532,7 @@ il_init_geos(struct il_priv *il)
3528 il->tx_power_user_lmt = max_tx_power; 3532 il->tx_power_user_lmt = max_tx_power;
3529 il->tx_power_next = max_tx_power; 3533 il->tx_power_next = max_tx_power;
3530 3534
3531 if (il->bands[IEEE80211_BAND_5GHZ].n_channels == 0 && 3535 if (il->bands[NL80211_BAND_5GHZ].n_channels == 0 &&
3532 (il->cfg->sku & IL_SKU_A)) { 3536 (il->cfg->sku & IL_SKU_A)) {
3533 IL_INFO("Incorrectly detected BG card as ABG. " 3537 IL_INFO("Incorrectly detected BG card as ABG. "
3534 "Please send your PCI ID 0x%04X:0x%04X to maintainer.\n", 3538 "Please send your PCI ID 0x%04X:0x%04X to maintainer.\n",
@@ -3537,8 +3541,8 @@ il_init_geos(struct il_priv *il)
3537 } 3541 }
3538 3542
3539 IL_INFO("Tunable channels: %d 802.11bg, %d 802.11a channels\n", 3543 IL_INFO("Tunable channels: %d 802.11bg, %d 802.11a channels\n",
3540 il->bands[IEEE80211_BAND_2GHZ].n_channels, 3544 il->bands[NL80211_BAND_2GHZ].n_channels,
3541 il->bands[IEEE80211_BAND_5GHZ].n_channels); 3545 il->bands[NL80211_BAND_5GHZ].n_channels);
3542 3546
3543 set_bit(S_GEO_CONFIGURED, &il->status); 3547 set_bit(S_GEO_CONFIGURED, &il->status);
3544 3548
@@ -3559,7 +3563,7 @@ il_free_geos(struct il_priv *il)
3559EXPORT_SYMBOL(il_free_geos); 3563EXPORT_SYMBOL(il_free_geos);
3560 3564
3561static bool 3565static bool
3562il_is_channel_extension(struct il_priv *il, enum ieee80211_band band, 3566il_is_channel_extension(struct il_priv *il, enum nl80211_band band,
3563 u16 channel, u8 extension_chan_offset) 3567 u16 channel, u8 extension_chan_offset)
3564{ 3568{
3565 const struct il_channel_info *ch_info; 3569 const struct il_channel_info *ch_info;
@@ -3922,14 +3926,14 @@ EXPORT_SYMBOL(il_set_rxon_ht);
3922 3926
3923/* Return valid, unused, channel for a passive scan to reset the RF */ 3927/* Return valid, unused, channel for a passive scan to reset the RF */
3924u8 3928u8
3925il_get_single_channel_number(struct il_priv *il, enum ieee80211_band band) 3929il_get_single_channel_number(struct il_priv *il, enum nl80211_band band)
3926{ 3930{
3927 const struct il_channel_info *ch_info; 3931 const struct il_channel_info *ch_info;
3928 int i; 3932 int i;
3929 u8 channel = 0; 3933 u8 channel = 0;
3930 u8 min, max; 3934 u8 min, max;
3931 3935
3932 if (band == IEEE80211_BAND_5GHZ) { 3936 if (band == NL80211_BAND_5GHZ) {
3933 min = 14; 3937 min = 14;
3934 max = il->channel_count; 3938 max = il->channel_count;
3935 } else { 3939 } else {
@@ -3961,14 +3965,14 @@ EXPORT_SYMBOL(il_get_single_channel_number);
3961int 3965int
3962il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch) 3966il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch)
3963{ 3967{
3964 enum ieee80211_band band = ch->band; 3968 enum nl80211_band band = ch->band;
3965 u16 channel = ch->hw_value; 3969 u16 channel = ch->hw_value;
3966 3970
3967 if (le16_to_cpu(il->staging.channel) == channel && il->band == band) 3971 if (le16_to_cpu(il->staging.channel) == channel && il->band == band)
3968 return 0; 3972 return 0;
3969 3973
3970 il->staging.channel = cpu_to_le16(channel); 3974 il->staging.channel = cpu_to_le16(channel);
3971 if (band == IEEE80211_BAND_5GHZ) 3975 if (band == NL80211_BAND_5GHZ)
3972 il->staging.flags &= ~RXON_FLG_BAND_24G_MSK; 3976 il->staging.flags &= ~RXON_FLG_BAND_24G_MSK;
3973 else 3977 else
3974 il->staging.flags |= RXON_FLG_BAND_24G_MSK; 3978 il->staging.flags |= RXON_FLG_BAND_24G_MSK;
@@ -3982,10 +3986,10 @@ il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch)
3982EXPORT_SYMBOL(il_set_rxon_channel); 3986EXPORT_SYMBOL(il_set_rxon_channel);
3983 3987
3984void 3988void
3985il_set_flags_for_band(struct il_priv *il, enum ieee80211_band band, 3989il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
3986 struct ieee80211_vif *vif) 3990 struct ieee80211_vif *vif)
3987{ 3991{
3988 if (band == IEEE80211_BAND_5GHZ) { 3992 if (band == NL80211_BAND_5GHZ) {
3989 il->staging.flags &= 3993 il->staging.flags &=
3990 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK | 3994 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK |
3991 RXON_FLG_CCK_MSK); 3995 RXON_FLG_CCK_MSK);
@@ -5411,7 +5415,7 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
5411 5415
5412 if (changes & BSS_CHANGED_ERP_CTS_PROT) { 5416 if (changes & BSS_CHANGED_ERP_CTS_PROT) {
5413 D_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot); 5417 D_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot);
5414 if (bss_conf->use_cts_prot && il->band != IEEE80211_BAND_5GHZ) 5418 if (bss_conf->use_cts_prot && il->band != NL80211_BAND_5GHZ)
5415 il->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; 5419 il->staging.flags |= RXON_FLG_TGG_PROTECT_MSK;
5416 else 5420 else
5417 il->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; 5421 il->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
diff --git a/drivers/net/wireless/intel/iwlegacy/common.h b/drivers/net/wireless/intel/iwlegacy/common.h
index ce52cf114fde..726ede391cb9 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.h
+++ b/drivers/net/wireless/intel/iwlegacy/common.h
@@ -432,7 +432,7 @@ u16 il_eeprom_query16(const struct il_priv *il, size_t offset);
432int il_init_channel_map(struct il_priv *il); 432int il_init_channel_map(struct il_priv *il);
433void il_free_channel_map(struct il_priv *il); 433void il_free_channel_map(struct il_priv *il);
434const struct il_channel_info *il_get_channel_info(const struct il_priv *il, 434const struct il_channel_info *il_get_channel_info(const struct il_priv *il,
435 enum ieee80211_band band, 435 enum nl80211_band band,
436 u16 channel); 436 u16 channel);
437 437
438#define IL_NUM_SCAN_RATES (2) 438#define IL_NUM_SCAN_RATES (2)
@@ -497,7 +497,7 @@ struct il_channel_info {
497 497
498 u8 group_idx; /* 0-4, maps channel to group1/2/3/4/5 */ 498 u8 group_idx; /* 0-4, maps channel to group1/2/3/4/5 */
499 u8 band_idx; /* 0-4, maps channel to band1/2/3/4/5 */ 499 u8 band_idx; /* 0-4, maps channel to band1/2/3/4/5 */
500 enum ieee80211_band band; 500 enum nl80211_band band;
501 501
502 /* HT40 channel info */ 502 /* HT40 channel info */
503 s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */ 503 s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */
@@ -811,7 +811,7 @@ struct il_sensitivity_ranges {
811 * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR 811 * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR
812 * @max_stations: 812 * @max_stations:
813 * @ht40_channel: is 40MHz width possible in band 2.4 813 * @ht40_channel: is 40MHz width possible in band 2.4
814 * BIT(IEEE80211_BAND_5GHZ) BIT(IEEE80211_BAND_5GHZ) 814 * BIT(NL80211_BAND_5GHZ) BIT(NL80211_BAND_5GHZ)
815 * @sw_crypto: 0 for hw, 1 for sw 815 * @sw_crypto: 0 for hw, 1 for sw
816 * @max_xxx_size: for ucode uses 816 * @max_xxx_size: for ucode uses
817 * @ct_kill_threshold: temperature threshold 817 * @ct_kill_threshold: temperature threshold
@@ -1141,13 +1141,13 @@ struct il_priv {
1141 struct list_head free_frames; 1141 struct list_head free_frames;
1142 int frames_count; 1142 int frames_count;
1143 1143
1144 enum ieee80211_band band; 1144 enum nl80211_band band;
1145 int alloc_rxb_page; 1145 int alloc_rxb_page;
1146 1146
1147 void (*handlers[IL_CN_MAX]) (struct il_priv *il, 1147 void (*handlers[IL_CN_MAX]) (struct il_priv *il,
1148 struct il_rx_buf *rxb); 1148 struct il_rx_buf *rxb);
1149 1149
1150 struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; 1150 struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
1151 1151
1152 /* spectrum measurement report caching */ 1152 /* spectrum measurement report caching */
1153 struct il_spectrum_notification measure_report; 1153 struct il_spectrum_notification measure_report;
@@ -1176,10 +1176,10 @@ struct il_priv {
1176 unsigned long scan_start; 1176 unsigned long scan_start;
1177 unsigned long scan_start_tsf; 1177 unsigned long scan_start_tsf;
1178 void *scan_cmd; 1178 void *scan_cmd;
1179 enum ieee80211_band scan_band; 1179 enum nl80211_band scan_band;
1180 struct cfg80211_scan_request *scan_request; 1180 struct cfg80211_scan_request *scan_request;
1181 struct ieee80211_vif *scan_vif; 1181 struct ieee80211_vif *scan_vif;
1182 u8 scan_tx_ant[IEEE80211_NUM_BANDS]; 1182 u8 scan_tx_ant[NUM_NL80211_BANDS];
1183 u8 mgmt_tx_ant; 1183 u8 mgmt_tx_ant;
1184 1184
1185 /* spinlock */ 1185 /* spinlock */
@@ -1479,7 +1479,7 @@ il_is_channel_radar(const struct il_channel_info *ch_info)
1479static inline u8 1479static inline u8
1480il_is_channel_a_band(const struct il_channel_info *ch_info) 1480il_is_channel_a_band(const struct il_channel_info *ch_info)
1481{ 1481{
1482 return ch_info->band == IEEE80211_BAND_5GHZ; 1482 return ch_info->band == NL80211_BAND_5GHZ;
1483} 1483}
1484 1484
1485static inline int 1485static inline int
@@ -1673,7 +1673,7 @@ struct il_cfg {
1673 /* params not likely to change within a device family */ 1673 /* params not likely to change within a device family */
1674 struct il_base_params *base_params; 1674 struct il_base_params *base_params;
1675 /* params likely to change within a device family */ 1675 /* params likely to change within a device family */
1676 u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; 1676 u8 scan_rx_antennas[NUM_NL80211_BANDS];
1677 enum il_led_mode led_mode; 1677 enum il_led_mode led_mode;
1678 1678
1679 int eeprom_size; 1679 int eeprom_size;
@@ -1707,9 +1707,9 @@ void il_set_rxon_hwcrypto(struct il_priv *il, int hw_decrypt);
1707int il_check_rxon_cmd(struct il_priv *il); 1707int il_check_rxon_cmd(struct il_priv *il);
1708int il_full_rxon_required(struct il_priv *il); 1708int il_full_rxon_required(struct il_priv *il);
1709int il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch); 1709int il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch);
1710void il_set_flags_for_band(struct il_priv *il, enum ieee80211_band band, 1710void il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
1711 struct ieee80211_vif *vif); 1711 struct ieee80211_vif *vif);
1712u8 il_get_single_channel_number(struct il_priv *il, enum ieee80211_band band); 1712u8 il_get_single_channel_number(struct il_priv *il, enum nl80211_band band);
1713void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf); 1713void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf);
1714bool il_is_ht40_tx_allowed(struct il_priv *il, 1714bool il_is_ht40_tx_allowed(struct il_priv *il,
1715 struct ieee80211_sta_ht_cap *ht_cap); 1715 struct ieee80211_sta_ht_cap *ht_cap);
@@ -1793,9 +1793,9 @@ int il_force_reset(struct il_priv *il, bool external);
1793u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, 1793u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
1794 const u8 *ta, const u8 *ie, int ie_len, int left); 1794 const u8 *ta, const u8 *ie, int ie_len, int left);
1795void il_setup_rx_scan_handlers(struct il_priv *il); 1795void il_setup_rx_scan_handlers(struct il_priv *il);
1796u16 il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, 1796u16 il_get_active_dwell_time(struct il_priv *il, enum nl80211_band band,
1797 u8 n_probes); 1797 u8 n_probes);
1798u16 il_get_passive_dwell_time(struct il_priv *il, enum ieee80211_band band, 1798u16 il_get_passive_dwell_time(struct il_priv *il, enum nl80211_band band,
1799 struct ieee80211_vif *vif); 1799 struct ieee80211_vif *vif);
1800void il_setup_scan_deferred_work(struct il_priv *il); 1800void il_setup_scan_deferred_work(struct il_priv *il);
1801void il_cancel_scan_deferred_work(struct il_priv *il); 1801void il_cancel_scan_deferred_work(struct il_priv *il);
@@ -1955,7 +1955,7 @@ il_commit_rxon(struct il_priv *il)
1955} 1955}
1956 1956
1957static inline const struct ieee80211_supported_band * 1957static inline const struct ieee80211_supported_band *
1958il_get_hw_mode(struct il_priv *il, enum ieee80211_band band) 1958il_get_hw_mode(struct il_priv *il, enum nl80211_band band)
1959{ 1959{
1960 return il->hw->wiphy->bands[band]; 1960 return il->hw->wiphy->bands[band];
1961} 1961}
@@ -2813,7 +2813,7 @@ struct il_lq_sta {
2813 u8 action_counter; /* # mode-switch actions tried */ 2813 u8 action_counter; /* # mode-switch actions tried */
2814 u8 is_green; 2814 u8 is_green;
2815 u8 is_dup; 2815 u8 is_dup;
2816 enum ieee80211_band band; 2816 enum nl80211_band band;
2817 2817
2818 /* The following are bitmaps of rates; RATE_6M_MASK, etc. */ 2818 /* The following are bitmaps of rates; RATE_6M_MASK, etc. */
2819 u32 supp_rates; 2819 u32 supp_rates;
diff --git a/drivers/net/wireless/intel/iwlegacy/debug.c b/drivers/net/wireless/intel/iwlegacy/debug.c
index 908b9f4fef6f..6fc6b7ff9849 100644
--- a/drivers/net/wireless/intel/iwlegacy/debug.c
+++ b/drivers/net/wireless/intel/iwlegacy/debug.c
@@ -544,7 +544,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count,
544 return -ENOMEM; 544 return -ENOMEM;
545 } 545 }
546 546
547 supp_band = il_get_hw_mode(il, IEEE80211_BAND_2GHZ); 547 supp_band = il_get_hw_mode(il, NL80211_BAND_2GHZ);
548 if (supp_band) { 548 if (supp_band) {
549 channels = supp_band->channels; 549 channels = supp_band->channels;
550 550
@@ -571,7 +571,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count,
571 flags & IEEE80211_CHAN_NO_IR ? 571 flags & IEEE80211_CHAN_NO_IR ?
572 "passive only" : "active/passive"); 572 "passive only" : "active/passive");
573 } 573 }
574 supp_band = il_get_hw_mode(il, IEEE80211_BAND_5GHZ); 574 supp_band = il_get_hw_mode(il, NL80211_BAND_5GHZ);
575 if (supp_band) { 575 if (supp_band) {
576 channels = supp_band->channels; 576 channels = supp_band->channels;
577 577
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)