History

Merge tag 'mac80211-next-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg says: ==================== 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. ====================

David S. Miller committed 10 years ago

Commit 71bbe252 parents 7d45a04 57fbcce230 files · +1456 −1443Browse files

Unified · Split

230 files
  1. Documentation/DocBook/80211.tmpl +0 −1
  2. drivers/net/wireless/admtek/adm8211.c +2 −2
  3. drivers/net/wireless/ath/ar5523/ar5523.c +2 −2
  4. drivers/net/wireless/ath/ath.h +1 −1
  5. drivers/net/wireless/ath/ath10k/core.h +1 −1
  6. drivers/net/wireless/ath/ath10k/htt_rx.c +4 −4
  7. drivers/net/wireless/ath/ath10k/mac.c +34 −34
  8. drivers/net/wireless/ath/ath10k/wmi.c +4 −4
  9. drivers/net/wireless/ath/ath5k/ani.c +1 −1
  10. drivers/net/wireless/ath/ath5k/ath5k.h +5 −5
  11. drivers/net/wireless/ath/ath5k/attach.c +4 −4
  12. drivers/net/wireless/ath/ath5k/base.c +16 −16
  13. drivers/net/wireless/ath/ath5k/debug.c +3 −3
  14. drivers/net/wireless/ath/ath5k/pcu.c +3 −3
  15. drivers/net/wireless/ath/ath5k/phy.c +15 −15
  16. drivers/net/wireless/ath/ath5k/qcu.c +4 −4
  17. drivers/net/wireless/ath/ath5k/reset.c +3 −3
  18. drivers/net/wireless/ath/ath6kl/cfg80211.c +11 −11
  19. drivers/net/wireless/ath/ath6kl/core.h +1 −1
  20. drivers/net/wireless/ath/ath6kl/wmi.c +11 −11
  21. drivers/net/wireless/ath/ath6kl/wmi.h +1 −1
  22. drivers/net/wireless/ath/ath9k/calib.c +3 −3
  23. drivers/net/wireless/ath/ath9k/channel.c +4 −4
  24. drivers/net/wireless/ath/ath9k/common-init.c +14 −14
  25. drivers/net/wireless/ath/ath9k/common.c +2 −2
  26. drivers/net/wireless/ath/ath9k/debug_sta.c +3 −3
  27. drivers/net/wireless/ath/ath9k/dynack.c +1 −1
  28. drivers/net/wireless/ath/ath9k/htc_drv_init.c +4 −4
  29. drivers/net/wireless/ath/ath9k/htc_drv_main.c +6 −6
  30. drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +1 −1
  31. drivers/net/wireless/ath/ath9k/init.c +6 −6
  32. drivers/net/wireless/ath/ath9k/main.c +2 −2
  33. drivers/net/wireless/ath/ath9k/xmit.c +2 −2
  34. drivers/net/wireless/ath/carl9170/mac.c +6 −6
  35. drivers/net/wireless/ath/carl9170/main.c +3 −3
  36. drivers/net/wireless/ath/carl9170/phy.c +9 −9
  37. drivers/net/wireless/ath/carl9170/rx.c +1 −1
  38. drivers/net/wireless/ath/carl9170/tx.c +4 −4
  39. drivers/net/wireless/ath/regd.c +8 −8
  40. drivers/net/wireless/ath/regd.h +1 −1
  41. drivers/net/wireless/ath/wcn36xx/main.c +6 −6
  42. drivers/net/wireless/ath/wcn36xx/smd.c +2 −2
  43. drivers/net/wireless/ath/wcn36xx/txrx.c +1 −1
  44. drivers/net/wireless/ath/wil6210/cfg80211.c +2 −2
  45. drivers/net/wireless/ath/wil6210/netdev.c +1 −1
  46. drivers/net/wireless/ath/wil6210/wmi.c +1 −1
  47. drivers/net/wireless/atmel/at76c50x-usb.c +3 −3
  48. drivers/net/wireless/atmel/atmel.c +1 −1
  49. drivers/net/wireless/broadcom/b43/b43.h +2 −2
  50. drivers/net/wireless/broadcom/b43/main.c +17 −17
  51. drivers/net/wireless/broadcom/b43/phy_ac.c +1 −1
  52. drivers/net/wireless/broadcom/b43/phy_common.c +1 −1
  53. drivers/net/wireless/broadcom/b43/phy_ht.c +8 −8
  54. drivers/net/wireless/broadcom/b43/phy_lcn.c +5 −5
  55. drivers/net/wireless/broadcom/b43/phy_lp.c +15 −15
  56. drivers/net/wireless/broadcom/b43/phy_n.c +88 −88
  57. drivers/net/wireless/broadcom/b43/tables_lpphy.c +7 −7
  58. drivers/net/wireless/broadcom/b43/tables_nphy.c +8 −8
  59. drivers/net/wireless/broadcom/b43/tables_phy_lcn.c +1 −1
  60. drivers/net/wireless/broadcom/b43/xmit.c +4 −4
  61. drivers/net/wireless/broadcom/b43legacy/main.c +6 −6
  62. drivers/net/wireless/broadcom/b43legacy/xmit.c +1 −1
  63. drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +37 −37
  64. drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +4 −4
  65. drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c +5 −5
  66. drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +8 −8
  67. drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c +2 −2
  68. drivers/net/wireless/cisco/airo.c +3 −3
  69. drivers/net/wireless/intel/ipw2x00/ipw2100.c +3 −3
  70. drivers/net/wireless/intel/ipw2x00/ipw2200.c +6 −6
  71. drivers/net/wireless/intel/iwlegacy/3945-mac.c +15 −15
  72. drivers/net/wireless/intel/iwlegacy/3945-rs.c +11 −11
  73. drivers/net/wireless/intel/iwlegacy/3945.c +10 −10
  74. drivers/net/wireless/intel/iwlegacy/4965-mac.c +19 −19
  75. drivers/net/wireless/intel/iwlegacy/4965-rs.c +11 −11
  76. drivers/net/wireless/intel/iwlegacy/4965.c +3 −3
  77. drivers/net/wireless/intel/iwlegacy/4965.h +1 −1
  78. drivers/net/wireless/intel/iwlegacy/common.c +35 −35
  79. drivers/net/wireless/intel/iwlegacy/common.h +15 −15
  80. drivers/net/wireless/intel/iwlegacy/debug.c +2 −2
  81. drivers/net/wireless/intel/iwlwifi/dvm/agn.h +4 −4
  82. drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c +2 −2
  83. drivers/net/wireless/intel/iwlwifi/dvm/dev.h +3 −3
  84. drivers/net/wireless/intel/iwlwifi/dvm/devices.c +2 −2
  85. drivers/net/wireless/intel/iwlwifi/dvm/lib.c +3 −3
  86. drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c +6 −6
  87. drivers/net/wireless/intel/iwlwifi/dvm/main.c +2 −2
  88. drivers/net/wireless/intel/iwlwifi/dvm/rs.c +11 −11
  89. drivers/net/wireless/intel/iwlwifi/dvm/rs.h +1 −1
  90. drivers/net/wireless/intel/iwlwifi/dvm/rx.c +1 −1
  91. drivers/net/wireless/intel/iwlwifi/dvm/rxon.c +5 −5
  92. drivers/net/wireless/intel/iwlwifi/dvm/scan.c +19 −19
  93. drivers/net/wireless/intel/iwlwifi/dvm/sta.c +1 −1
  94. drivers/net/wireless/intel/iwlwifi/dvm/tx.c +2 −2
  95. drivers/net/wireless/intel/iwlwifi/iwl-1000.c +1 −1
  96. drivers/net/wireless/intel/iwlwifi/iwl-2000.c +1 −1
  97. drivers/net/wireless/intel/iwlwifi/iwl-5000.c +1 −1
  98. drivers/net/wireless/intel/iwlwifi/iwl-6000.c +1 −1
  99. drivers/net/wireless/intel/iwlwifi/iwl-7000.c +2 −2
  100. drivers/net/wireless/intel/iwlwifi/iwl-8000.c +1 −1
  101. drivers/net/wireless/intel/iwlwifi/iwl-9000.c +1 −1
  102. drivers/net/wireless/intel/iwlwifi/iwl-config.h +1 −1
  103. drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c +19 −19
  104. drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h +3 −3
  105. drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +13 −13
  106. drivers/net/wireless/intel/iwlwifi/mvm/coex.c +5 −5
  107. drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +3 −3
  108. drivers/net/wireless/intel/iwlwifi/mvm/fw.c +1 −1
  109. drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +4 −4
  110. drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +8 −8
  111. drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +3 −3
  112. drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c +1 −1
  113. drivers/net/wireless/intel/iwlwifi/mvm/rs.c +14 −14
  114. drivers/net/wireless/intel/iwlwifi/mvm/rs.h +2 −2
  115. drivers/net/wireless/intel/iwlwifi/mvm/rx.c +1 −1
  116. drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +2 −2
  117. drivers/net/wireless/intel/iwlwifi/mvm/scan.c +18 −18
  118. drivers/net/wireless/intel/iwlwifi/mvm/tdls.c +1 −1
  119. drivers/net/wireless/intel/iwlwifi/mvm/tx.c +3 −3
  120. drivers/net/wireless/intel/iwlwifi/mvm/utils.c +2 −2
  121. drivers/net/wireless/intersil/orinoco/cfg.c +3 −3
  122. drivers/net/wireless/intersil/orinoco/hw.c +1 −1
  123. drivers/net/wireless/intersil/orinoco/scan.c +2 −2
  124. drivers/net/wireless/intersil/p54/eeprom.c +16 −16
  125. drivers/net/wireless/intersil/p54/main.c +2 −2
  126. drivers/net/wireless/intersil/p54/p54.h +1 −1
  127. drivers/net/wireless/intersil/p54/txrx.c +2 −2
  128. drivers/net/wireless/mac80211_hwsim.c +7 −7
  129. drivers/net/wireless/marvell/libertas/cfg.c +5 −5
  130. drivers/net/wireless/marvell/libertas/cmd.c +2 −2
  131. drivers/net/wireless/marvell/libertas_tf/main.c +2 −2
  132. drivers/net/wireless/marvell/mwifiex/cfg80211.c +17 −17
  133. drivers/net/wireless/marvell/mwifiex/cfp.c +6 −6
  134. drivers/net/wireless/marvell/mwifiex/scan.c +4 −4
  135. drivers/net/wireless/marvell/mwifiex/uap_cmd.c +1 −1
  136. drivers/net/wireless/marvell/mwl8k.c +44 −44
  137. drivers/net/wireless/mediatek/mt7601u/init.c +2 −2
  138. drivers/net/wireless/ralink/rt2x00/rt2800lib.c +15 −15
  139. drivers/net/wireless/ralink/rt2x00/rt2x00.h +2 −2
  140. drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +20 −20
  141. drivers/net/wireless/ralink/rt2x00/rt61pci.c +11 −11
  142. drivers/net/wireless/ralink/rt2x00/rt73usb.c +11 −11
  143. drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c +4 −4
  144. drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c +2 −2
  145. drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c +15 −15
  146. drivers/net/wireless/realtek/rtlwifi/base.c +22 −22
  147. drivers/net/wireless/realtek/rtlwifi/regd.c +8 −8
  148. drivers/net/wireless/realtek/rtlwifi/wifi.h +1 −1
  149. drivers/net/wireless/rndis_wlan.c +2 −2
  150. drivers/net/wireless/rsi/rsi_91x_mac80211.c +50 −50
  151. drivers/net/wireless/rsi/rsi_91x_mgmt.c +4 −4
  152. drivers/net/wireless/rsi/rsi_91x_pkt.c +1 −1
  153. drivers/net/wireless/rsi/rsi_main.h +1 −1
  154. drivers/net/wireless/st/cw1200/main.c +5 −5
  155. drivers/net/wireless/st/cw1200/scan.c +1 −1
  156. drivers/net/wireless/st/cw1200/sta.c +3 −3
  157. drivers/net/wireless/st/cw1200/txrx.c +1 −1
  158. drivers/net/wireless/st/cw1200/wsm.c +2 −2
  159. drivers/net/wireless/ti/wl1251/main.c +1 −1
  160. drivers/net/wireless/ti/wl1251/rx.c +1 −1
  161. drivers/net/wireless/ti/wl12xx/main.c +4 −4
  162. drivers/net/wireless/ti/wl12xx/scan.c +10 −10
  163. drivers/net/wireless/ti/wl18xx/cmd.c +3 −3
  164. drivers/net/wireless/ti/wl18xx/event.c +3 −3
  165. drivers/net/wireless/ti/wl18xx/main.c +11 −11
  166. drivers/net/wireless/ti/wl18xx/scan.c +4 −4
  167. drivers/net/wireless/ti/wl18xx/tx.c +1 −1
  168. drivers/net/wireless/ti/wlcore/cmd.c +18 −18
  169. drivers/net/wireless/ti/wlcore/cmd.h +3 −3
  170. drivers/net/wireless/ti/wlcore/main.c +16 −16
  171. drivers/net/wireless/ti/wlcore/ps.c +2 −2
  172. drivers/net/wireless/ti/wlcore/rx.c +2 −2
  173. drivers/net/wireless/ti/wlcore/rx.h +1 −1
  174. drivers/net/wireless/ti/wlcore/scan.c +7 −7
  175. drivers/net/wireless/ti/wlcore/tx.c +1 −1
  176. drivers/net/wireless/ti/wlcore/tx.h +2 −2
  177. drivers/net/wireless/ti/wlcore/wlcore.h +2 −2
  178. drivers/net/wireless/ti/wlcore/wlcore_i.h +1 −1
  179. drivers/net/wireless/wl3501_cs.c +1 −1
  180. drivers/net/wireless/zydas/zd1211rw/zd_mac.c +2 −2
  181. drivers/staging/rtl8723au/core/rtw_mlme_ext.c +2 −2
  182. drivers/staging/rtl8723au/include/ieee80211.h +1 −1
  183. drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +27 −27
  184. drivers/staging/vt6655/channel.c +2 −2
  185. drivers/staging/vt6655/device_main.c +2 −2
  186. drivers/staging/vt6655/rxtx.c +1 −1
  187. drivers/staging/vt6656/channel.c +2 −2
  188. drivers/staging/vt6656/int.c +1 −1
  189. drivers/staging/vt6656/main_usb.c +1 −1
  190. drivers/staging/vt6656/rxtx.c +1 −1
  191. drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +5 −5
  192. drivers/staging/wlan-ng/cfg80211.c +3 −3
  193. include/net/cfg80211.h +35 −35
  194. include/net/mac80211.h +6 −6
  195. include/uapi/linux/nl80211.h +17 −3
  196. net/mac80211/cfg.c +7 −7
  197. net/mac80211/debugfs_netdev.c +6 −6
  198. net/mac80211/ibss.c +5 −5
  199. net/mac80211/ieee80211_i.h +17 −17
  200. net/mac80211/iface.c +1 −1
  201. net/mac80211/main.c +3 −3
  202. net/mac80211/mesh.c +5 −5
  203. net/mac80211/mesh_plink.c +5 −5
  204. net/mac80211/mlme.c +7 −7
  205. net/mac80211/rate.c +1 −1
  206. net/mac80211/rc80211_minstrel.c +3 −3
  207. net/mac80211/rc80211_minstrel_ht.c +2 −2
  208. net/mac80211/rx.c +3 −3
  209. net/mac80211/scan.c +6 −6
  210. net/mac80211/spectmgmt.c +2 −2
  211. net/mac80211/tdls.c +9 −9
  212. net/mac80211/trace.h +3 −3
  213. net/mac80211/tx.c +7 −7
  214. net/mac80211/util.c +12 −12
  215. net/mac80211/vht.c +2 −2
  216. net/wireless/chan.c +1 −1
  217. net/wireless/core.c +4 −4
  218. net/wireless/debugfs.c +2 −2
  219. net/wireless/ibss.c +3 −3
  220. net/wireless/mesh.c +2 −2
  221. net/wireless/mlme.c +1 −1
  222. net/wireless/nl80211.c +22 −22
  223. net/wireless/rdev-ops.h +1 −1
  224. net/wireless/reg.c +15 −15
  225. net/wireless/reg.h +1 −1
  226. net/wireless/scan.c +7 −7
  227. net/wireless/sme.c +3 −3
  228. net/wireless/trace.h +10 −10
  229. net/wireless/util.c +20 −20
  230. net/wireless/wext-compat.c +7 −7
Documentation/DocBook/80211.tmpl+0−1
@@ -75,7 +75,6 @@ · 74 unmodified lines
7575 <chapter>
7676 <title>Device registration</title>
7777 !Pinclude/net/cfg80211.h Device registration
78−!Finclude/net/cfg80211.h ieee80211_band
7978 !Finclude/net/cfg80211.h ieee80211_channel_flags
8079 !Finclude/net/cfg80211.h ieee80211_channel
8180 !Finclude/net/cfg80211.h ieee80211_rate_flags
drivers/net/wireless/admtek/adm8211.c+2−2
@@ -440,7 +440,7 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev) · 439 unmodified lines
440440 rx_status.rate_idx = rate;
441441
442442 rx_status.freq = adm8211_channels[priv->channel - 1].center_freq;
443− rx_status.band = IEEE80211_BAND_2GHZ;
443+ rx_status.band = NL80211_BAND_2GHZ;
444444
445445 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
446446 ieee80211_rx_irqsafe(dev, skb);
@@ -1894,7 +1894,7 @@ static int adm8211_probe(struct pci_dev *pdev, · 1447 unmodified lines
18941894
18951895 priv->channel = 1;
18961896
1897− dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
1897+ dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
18981898
18991899 err = ieee80211_register_hw(dev);
19001900 if (err) {
drivers/net/wireless/ath/ar5523/ar5523.c+2−2
@@ -1471,12 +1471,12 @@ static int ar5523_init_modes(struct ar5523 *ar) · 1470 unmodified lines
14711471 memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels));
14721472 memcpy(ar->rates, ar5523_rates, sizeof(ar5523_rates));
14731473
1474− ar->band.band = IEEE80211_BAND_2GHZ;
1474+ ar->band.band = NL80211_BAND_2GHZ;
14751475 ar->band.channels = ar->channels;
14761476 ar->band.n_channels = ARRAY_SIZE(ar5523_channels);
14771477 ar->band.bitrates = ar->rates;
14781478 ar->band.n_bitrates = ARRAY_SIZE(ar5523_rates);
1479− ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &ar->band;
1479+ ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = &ar->band;
14801480 return 0;
14811481 }
14821482
drivers/net/wireless/ath/ath.h+1−1
@@ -185,7 +185,7 @@ struct ath_common { · 184 unmodified lines
185185 bool bt_ant_diversity;
186186
187187 int last_rssi;
188− struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
188+ struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
189189 };
190190
191191 static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common)
drivers/net/wireless/ath/ath10k/core.h+1−1
@@ -765,7 +765,7 @@ struct ath10k { · 764 unmodified lines
765765 } scan;
766766
767767 struct {
768− struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
768+ struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
769769 } mac;
770770
771771 /* should never be NULL; needed for regular htt rx */
drivers/net/wireless/ath/ath10k/htt_rx.c+4−4
@@ -2182,9 +2182,9 @@ static void ath10k_htt_rx_tx_mode_switch_ind(struct ath10k *ar, · 2181 unmodified lines
21822182 ath10k_mac_tx_push_pending(ar);
21832183 }
21842184
2185−static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode)
2185+static inline enum nl80211_band phy_mode_to_band(u32 phy_mode)
21862186 {
2187− enum ieee80211_band band;
2187+ enum nl80211_band band;
21882188
21892189 switch (phy_mode) {
21902190 case MODE_11A:
@@ -2193,7 +2193,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) · 2 unmodified lines
21932193 case MODE_11AC_VHT20:
21942194 case MODE_11AC_VHT40:
21952195 case MODE_11AC_VHT80:
2196− band = IEEE80211_BAND_5GHZ;
2196+ band = NL80211_BAND_5GHZ;
21972197 break;
21982198 case MODE_11G:
21992199 case MODE_11B:
@@ -2204,7 +2204,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) · 4 unmodified lines
22042204 case MODE_11AC_VHT40_2G:
22052205 case MODE_11AC_VHT80_2G:
22062206 default:
2207− band = IEEE80211_BAND_2GHZ;
2207+ band = NL80211_BAND_2GHZ;
22082208 }
22092209
22102210 return band;
drivers/net/wireless/ath/ath10k/mac.c+34−34
@@ -482,7 +482,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) · 481 unmodified lines
482482 enum wmi_phy_mode phymode = MODE_UNKNOWN;
483483
484484 switch (chandef->chan->band) {
485− case IEEE80211_BAND_2GHZ:
485+ case NL80211_BAND_2GHZ:
486486 switch (chandef->width) {
487487 case NL80211_CHAN_WIDTH_20_NOHT:
488488 if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM)
@@ -505,7 +505,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) · 16 unmodified lines
505505 break;
506506 }
507507 break;
508− case IEEE80211_BAND_5GHZ:
508+ case NL80211_BAND_5GHZ:
509509 switch (chandef->width) {
510510 case NL80211_CHAN_WIDTH_20_NOHT:
511511 phymode = MODE_11A;
@@ -2055,7 +2055,7 @@ static void ath10k_peer_assoc_h_rates(struct ath10k *ar, · 1543 unmodified lines
20552055 struct cfg80211_chan_def def;
20562056 const struct ieee80211_supported_band *sband;
20572057 const struct ieee80211_rate *rates;
2058− enum ieee80211_band band;
2058+ enum nl80211_band band;
20592059 u32 ratemask;
20602060 u8 rate;
20612061 int i;
@@ -2115,7 +2115,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, · 53 unmodified lines
21152115 const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
21162116 struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
21172117 struct cfg80211_chan_def def;
2118− enum ieee80211_band band;
2118+ enum nl80211_band band;
21192119 const u8 *ht_mcs_mask;
21202120 const u16 *vht_mcs_mask;
21212121 int i, n;
@@ -2339,7 +2339,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, · 217 unmodified lines
23392339 const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
23402340 struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
23412341 struct cfg80211_chan_def def;
2342− enum ieee80211_band band;
2342+ enum nl80211_band band;
23432343 const u16 *vht_mcs_mask;
23442344 u8 ampdu_factor;
23452345
@@ -2357,7 +2357,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, · 11 unmodified lines
23572357
23582358 arg->peer_flags |= ar->wmi.peer_flags->vht;
23592359
2360− if (def.chan->band == IEEE80211_BAND_2GHZ)
2360+ if (def.chan->band == NL80211_BAND_2GHZ)
23612361 arg->peer_flags |= ar->wmi.peer_flags->vht_2g;
23622362
23632363 arg->peer_vht_caps = vht_cap->cap;
@@ -2426,7 +2426,7 @@ static void ath10k_peer_assoc_h_qos(struct ath10k *ar, · 62 unmodified lines
24262426
24272427 static bool ath10k_mac_sta_has_ofdm_only(struct ieee80211_sta *sta)
24282428 {
2429− return sta->supp_rates[IEEE80211_BAND_2GHZ] >>
2429+ return sta->supp_rates[NL80211_BAND_2GHZ] >>
24302430 ATH10K_MAC_FIRST_OFDM_RATE_IDX;
24312431 }
24322432
@@ -2437,7 +2437,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, · 4 unmodified lines
24372437 {
24382438 struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
24392439 struct cfg80211_chan_def def;
2440− enum ieee80211_band band;
2440+ enum nl80211_band band;
24412441 const u8 *ht_mcs_mask;
24422442 const u16 *vht_mcs_mask;
24432443 enum wmi_phy_mode phymode = MODE_UNKNOWN;
@@ -2450,7 +2450,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, · 6 unmodified lines
24502450 vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs;
24512451
24522452 switch (band) {
2453− case IEEE80211_BAND_2GHZ:
2453+ case NL80211_BAND_2GHZ:
24542454 if (sta->vht_cap.vht_supported &&
24552455 !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
24562456 if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
@@ -2470,7 +2470,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, · 13 unmodified lines
24702470 }
24712471
24722472 break;
2473− case IEEE80211_BAND_5GHZ:
2473+ case NL80211_BAND_5GHZ:
24742474 /*
24752475 * Check VHT first.
24762476 */
@@ -2848,7 +2848,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 371 unmodified lines
28482848 {
28492849 struct ieee80211_hw *hw = ar->hw;
28502850 struct ieee80211_supported_band **bands;
2851− enum ieee80211_band band;
2851+ enum nl80211_band band;
28522852 struct ieee80211_channel *channel;
28532853 struct wmi_scan_chan_list_arg arg = {0};
28542854 struct wmi_channel_arg *ch;
@@ -2860,7 +2860,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 5 unmodified lines
28602860 lockdep_assert_held(&ar->conf_mutex);
28612861
28622862 bands = hw->wiphy->bands;
2863− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
2863+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
28642864 if (!bands[band])
28652865 continue;
28662866
@@ -2879,7 +2879,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 12 unmodified lines
28792879 return -ENOMEM;
28802880
28812881 ch = arg.channels;
2882− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
2882+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
28832883 if (!bands[band])
28842884 continue;
28852885
@@ -2917,7 +2917,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 31 unmodified lines
29172917 /* FIXME: why use only legacy modes, why not any
29182918 * HT/VHT modes? Would that even make any
29192919 * difference? */
2920− if (channel->band == IEEE80211_BAND_2GHZ)
2920+ if (channel->band == NL80211_BAND_2GHZ)
29212921 ch->mode = MODE_11G;
29222922 else
29232923 ch->mode = MODE_11A;
@@ -4254,14 +4254,14 @@ static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar) · 1330 unmodified lines
42544254 vht_cap = ath10k_create_vht_cap(ar);
42554255
42564256 if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
4257− band = &ar->mac.sbands[IEEE80211_BAND_2GHZ];
4257+ band = &ar->mac.sbands[NL80211_BAND_2GHZ];
42584258 band->ht_cap = ht_cap;
42594259
42604260 /* Enable the VHT support at 2.4 GHz */
42614261 band->vht_cap = vht_cap;
42624262 }
42634263 if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) {
4264− band = &ar->mac.sbands[IEEE80211_BAND_5GHZ];
4264+ band = &ar->mac.sbands[NL80211_BAND_5GHZ];
42654265 band->ht_cap = ht_cap;
42664266 band->vht_cap = vht_cap;
42674267 }
@@ -5595,7 +5595,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) · 1327 unmodified lines
55955595 struct ath10k_sta *arsta;
55965596 struct ieee80211_sta *sta;
55975597 struct cfg80211_chan_def def;
5598− enum ieee80211_band band;
5598+ enum nl80211_band band;
55995599 const u8 *ht_mcs_mask;
56005600 const u16 *vht_mcs_mask;
56015601 u32 changed, bw, nss, smps;
@@ -6394,14 +6394,14 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, · 792 unmodified lines
63946394
63956395 mutex_lock(&ar->conf_mutex);
63966396
6397− sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ];
6397+ sband = hw->wiphy->bands[NL80211_BAND_2GHZ];
63986398 if (sband && idx >= sband->n_channels) {
63996399 idx -= sband->n_channels;
64006400 sband = NULL;
64016401 }
64026402
64036403 if (!sband)
6404− sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ];
6404+ sband = hw->wiphy->bands[NL80211_BAND_5GHZ];
64056405
64066406 if (!sband || idx >= sband->n_channels) {
64076407 ret = -ENOENT;
@@ -6424,7 +6424,7 @@ exit: · 16 unmodified lines
64246424
64256425 static bool
64266426 ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar,
6427− enum ieee80211_band band,
6427+ enum nl80211_band band,
64286428 const struct cfg80211_bitrate_mask *mask)
64296429 {
64306430 int num_rates = 0;
@@ -6443,7 +6443,7 @@ ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, · 12 unmodified lines
64436443
64446444 static bool
64456445 ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar,
6446− enum ieee80211_band band,
6446+ enum nl80211_band band,
64476447 const struct cfg80211_bitrate_mask *mask,
64486448 int *nss)
64496449 {
@@ -6492,7 +6492,7 @@ ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, · 42 unmodified lines
64926492
64936493 static int
64946494 ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar,
6495− enum ieee80211_band band,
6495+ enum nl80211_band band,
64966496 const struct cfg80211_bitrate_mask *mask,
64976497 u8 *rate, u8 *nss)
64986498 {
@@ -6593,7 +6593,7 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif, · 94 unmodified lines
65936593
65946594 static bool
65956595 ath10k_mac_can_set_bitrate_mask(struct ath10k *ar,
6596− enum ieee80211_band band,
6596+ enum nl80211_band band,
65976597 const struct cfg80211_bitrate_mask *mask)
65986598 {
65996599 int i;
@@ -6645,7 +6645,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, · 45 unmodified lines
66456645 struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
66466646 struct cfg80211_chan_def def;
66476647 struct ath10k *ar = arvif->ar;
6648− enum ieee80211_band band;
6648+ enum nl80211_band band;
66496649 const u8 *ht_mcs_mask;
66506650 const u16 *vht_mcs_mask;
66516651 u8 rate;
@@ -7275,7 +7275,7 @@ static const struct ieee80211_ops ath10k_ops = { · 623 unmodified lines
72757275 };
72767276
72777277 #define CHAN2G(_channel, _freq, _flags) { \
7278− .band = IEEE80211_BAND_2GHZ, \
7278+ .band = NL80211_BAND_2GHZ, \
72797279 .hw_value = (_channel), \
72807280 .center_freq = (_freq), \
72817281 .flags = (_flags), \
@@ -7284,7 +7284,7 @@ static const struct ieee80211_ops ath10k_ops = { · 2 unmodified lines
72847284 }
72857285
72867286 #define CHAN5G(_channel, _freq, _flags) { \
7287− .band = IEEE80211_BAND_5GHZ, \
7287+ .band = NL80211_BAND_5GHZ, \
72887288 .hw_value = (_channel), \
72897289 .center_freq = (_freq), \
72907290 .flags = (_flags), \
@@ -7604,13 +7604,13 @@ int ath10k_mac_register(struct ath10k *ar) · 313 unmodified lines
76047604 goto err_free;
76057605 }
76067606
7607− band = &ar->mac.sbands[IEEE80211_BAND_2GHZ];
7607+ band = &ar->mac.sbands[NL80211_BAND_2GHZ];
76087608 band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels);
76097609 band->channels = channels;
76107610 band->n_bitrates = ath10k_g_rates_size;
76117611 band->bitrates = ath10k_g_rates;
76127612
7613− ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = band;
7613+ ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = band;
76147614 }
76157615
76167616 if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) {
@@ -7622,12 +7622,12 @@ int ath10k_mac_register(struct ath10k *ar) · 5 unmodified lines
76227622 goto err_free;
76237623 }
76247624
7625− band = &ar->mac.sbands[IEEE80211_BAND_5GHZ];
7625+ band = &ar->mac.sbands[NL80211_BAND_5GHZ];
76267626 band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels);
76277627 band->channels = channels;
76287628 band->n_bitrates = ath10k_a_rates_size;
76297629 band->bitrates = ath10k_a_rates;
7630− ar->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band;
7630+ ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
76317631 }
76327632
76337633 ath10k_mac_setup_ht_vht_cap(ar);
@@ -7815,8 +7815,8 @@ err_dfs_detector_exit: · 181 unmodified lines
78157815 ar->dfs_detector->exit(ar->dfs_detector);
78167816
78177817 err_free:
7818− kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
7819− kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
7818+ kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
7819+ kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels);
78207820
78217821 SET_IEEE80211_DEV(ar->hw, NULL);
78227822 return ret;
@@ -7829,8 +7829,8 @@ void ath10k_mac_unregister(struct ath10k *ar) · 6 unmodified lines
78297829 if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
78307830 ar->dfs_detector->exit(ar->dfs_detector);
78317831
7832− kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
7833− kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
7832+ kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
7833+ kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels);
78347834
78357835 SET_IEEE80211_DEV(ar->hw, NULL);
78367836 }
drivers/net/wireless/ath/ath10k/wmi.c+4−4
@@ -2281,9 +2281,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) · 2280 unmodified lines
22812281 * of mgmt rx.
22822282 */
22832283 if (channel >= 1 && channel <= 14) {
2284− status->band = IEEE80211_BAND_2GHZ;
2284+ status->band = NL80211_BAND_2GHZ;
22852285 } else if (channel >= 36 && channel <= 165) {
2286− status->band = IEEE80211_BAND_5GHZ;
2286+ status->band = NL80211_BAND_5GHZ;
22872287 } else {
22882288 /* Shouldn't happen unless list of advertised channels to
22892289 * mac80211 has been changed.
@@ -2293,7 +2293,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) · 3 unmodified lines
22932293 return 0;
22942294 }
22952295
2296− if (phy_mode == MODE_11B && status->band == IEEE80211_BAND_5GHZ)
2296+ if (phy_mode == MODE_11B && status->band == NL80211_BAND_5GHZ)
22972297 ath10k_dbg(ar, ATH10K_DBG_MGMT, "wmi mgmt rx 11b (CCK) on 5GHz\n");
22982298
22992299 sband = &ar->mac.sbands[status->band];
@@ -2352,7 +2352,7 @@ static int freq_to_idx(struct ath10k *ar, int freq) · 52 unmodified lines
23522352 struct ieee80211_supported_band *sband;
23532353 int band, ch, idx = 0;
23542354
2355− for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {
2355+ for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) {
23562356 sband = ar->hw->wiphy->bands[band];
23572357 if (!sband)
23582358 continue;
drivers/net/wireless/ath/ath5k/ani.c+1−1
@@ -279,7 +279,7 @@ ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as, · 278 unmodified lines
279279 if (as->firstep_level < ATH5K_ANI_MAX_FIRSTEP_LVL)
280280 ath5k_ani_set_firstep_level(ah, as->firstep_level + 1);
281281 return;
282− } else if (ah->ah_current_channel->band == IEEE80211_BAND_2GHZ) {
282+ } else if (ah->ah_current_channel->band == NL80211_BAND_2GHZ) {
283283 /* beacon RSSI is low. in B/G mode turn of OFDM weak signal
284284 * detect and zero firstep level to maximize CCK sensitivity */
285285 ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI,
drivers/net/wireless/ath/ath5k/ath5k.h+5−5
@@ -1265,10 +1265,10 @@ struct ath5k_hw { · 1264 unmodified lines
12651265 void __iomem *iobase; /* address of the device */
12661266 struct mutex lock; /* dev-level lock */
12671267 struct ieee80211_hw *hw; /* IEEE 802.11 common */
1268− struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
1268+ struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
12691269 struct ieee80211_channel channels[ATH_CHAN_MAX];
1270− struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
1271− s8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
1270+ struct ieee80211_rate rates[NUM_NL80211_BANDS][AR5K_MAX_RATES];
1271+ s8 rate_idx[NUM_NL80211_BANDS][AR5K_MAX_RATES];
12721272 enum nl80211_iftype opmode;
12731273
12741274 #ifdef CONFIG_ATH5K_DEBUG
@@ -1532,7 +1532,7 @@ int ath5k_eeprom_mode_from_channel(struct ath5k_hw *ah, · 257 unmodified lines
15321532
15331533 /* Protocol Control Unit Functions */
15341534 /* Helpers */
1535−int ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum ieee80211_band band,
1535+int ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum nl80211_band band,
15361536 int len, struct ieee80211_rate *rate, bool shortpre);
15371537 unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah);
15381538 unsigned int ath5k_hw_get_default_sifs(struct ath5k_hw *ah);
@@ -1611,7 +1611,7 @@ int ath5k_hw_write_initvals(struct ath5k_hw *ah, u8 mode, bool change_channel); · 72 unmodified lines
16111611
16121612 /* PHY functions */
16131613 /* Misc PHY functions */
1614−u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band);
1614+u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, enum nl80211_band band);
16151615 int ath5k_hw_phy_disable(struct ath5k_hw *ah);
16161616 /* Gain_F optimization */
16171617 enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah);
drivers/net/wireless/ath/ath5k/attach.c+4−4
@@ -152,7 +152,7 @@ int ath5k_hw_init(struct ath5k_hw *ah) · 151 unmodified lines
152152 ah->ah_phy_revision = ath5k_hw_reg_read(ah, AR5K_PHY_CHIP_ID) &
153153 0xffffffff;
154154 ah->ah_radio_5ghz_revision = ath5k_hw_radio_revision(ah,
155− IEEE80211_BAND_5GHZ);
155+ NL80211_BAND_5GHZ);
156156
157157 /* Try to identify radio chip based on its srev */
158158 switch (ah->ah_radio_5ghz_revision & 0xf0) {
@@ -160,14 +160,14 @@ int ath5k_hw_init(struct ath5k_hw *ah) · 1 unmodified line
160160 ah->ah_radio = AR5K_RF5111;
161161 ah->ah_single_chip = false;
162162 ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah,
163− IEEE80211_BAND_2GHZ);
163+ NL80211_BAND_2GHZ);
164164 break;
165165 case AR5K_SREV_RAD_5112:
166166 case AR5K_SREV_RAD_2112:
167167 ah->ah_radio = AR5K_RF5112;
168168 ah->ah_single_chip = false;
169169 ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah,
170− IEEE80211_BAND_2GHZ);
170+ NL80211_BAND_2GHZ);
171171 break;
172172 case AR5K_SREV_RAD_2413:
173173 ah->ah_radio = AR5K_RF2413;
@@ -204,7 +204,7 @@ int ath5k_hw_init(struct ath5k_hw *ah) · 30 unmodified lines
204204 ah->ah_radio = AR5K_RF5111;
205205 ah->ah_single_chip = false;
206206 ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah,
207− IEEE80211_BAND_2GHZ);
207+ NL80211_BAND_2GHZ);
208208 } else if (ah->ah_mac_version == (AR5K_SREV_AR2425 >> 4) ||
209209 ah->ah_mac_version == (AR5K_SREV_AR2417 >> 4) ||
210210 ah->ah_phy_revision == AR5K_SREV_PHY_2425) {
drivers/net/wireless/ath/ath5k/base.c+16−16
@@ -268,15 +268,15 @@ static void ath5k_reg_notifier(struct wiphy *wiphy, · 267 unmodified lines
268268 * Returns true for the channel numbers used.
269269 */
270270 #ifdef CONFIG_ATH5K_TEST_CHANNELS
271−static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
271+static bool ath5k_is_standard_channel(short chan, enum nl80211_band band)
272272 {
273273 return true;
274274 }
275275
276276 #else
277−static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
277+static bool ath5k_is_standard_channel(short chan, enum nl80211_band band)
278278 {
279− if (band == IEEE80211_BAND_2GHZ && chan <= 14)
279+ if (band == NL80211_BAND_2GHZ && chan <= 14)
280280 return true;
281281
282282 return /* UNII 1,2 */
@@ -297,18 +297,18 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels, · 14 unmodified lines
297297 unsigned int mode, unsigned int max)
298298 {
299299 unsigned int count, size, freq, ch;
300− enum ieee80211_band band;
300+ enum nl80211_band band;
301301
302302 switch (mode) {
303303 case AR5K_MODE_11A:
304304 /* 1..220, but 2GHz frequencies are filtered by check_channel */
305305 size = 220;
306− band = IEEE80211_BAND_5GHZ;
306+ band = NL80211_BAND_5GHZ;
307307 break;
308308 case AR5K_MODE_11B:
309309 case AR5K_MODE_11G:
310310 size = 26;
311− band = IEEE80211_BAND_2GHZ;
311+ band = NL80211_BAND_2GHZ;
312312 break;
313313 default:
314314 ATH5K_WARN(ah, "bad mode, not copying channels\n");
@@ -363,13 +363,13 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 48 unmodified lines
363363 int max_c, count_c = 0;
364364 int i;
365365
366− BUILD_BUG_ON(ARRAY_SIZE(ah->sbands) < IEEE80211_NUM_BANDS);
366+ BUILD_BUG_ON(ARRAY_SIZE(ah->sbands) < NUM_NL80211_BANDS);
367367 max_c = ARRAY_SIZE(ah->channels);
368368
369369 /* 2GHz band */
370− sband = &ah->sbands[IEEE80211_BAND_2GHZ];
371− sband->band = IEEE80211_BAND_2GHZ;
372− sband->bitrates = &ah->rates[IEEE80211_BAND_2GHZ][0];
370+ sband = &ah->sbands[NL80211_BAND_2GHZ];
371+ sband->band = NL80211_BAND_2GHZ;
372+ sband->bitrates = &ah->rates[NL80211_BAND_2GHZ][0];
373373
374374 if (test_bit(AR5K_MODE_11G, ah->ah_capabilities.cap_mode)) {
375375 /* G mode */
@@ -381,7 +381,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 5 unmodified lines
381381 sband->n_channels = ath5k_setup_channels(ah, sband->channels,
382382 AR5K_MODE_11G, max_c);
383383
384− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
384+ hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
385385 count_c = sband->n_channels;
386386 max_c -= count_c;
387387 } else if (test_bit(AR5K_MODE_11B, ah->ah_capabilities.cap_mode)) {
@@ -407,7 +407,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 19 unmodified lines
407407 sband->n_channels = ath5k_setup_channels(ah, sband->channels,
408408 AR5K_MODE_11B, max_c);
409409
410− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
410+ hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
411411 count_c = sband->n_channels;
412412 max_c -= count_c;
413413 }
@@ -415,9 +415,9 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 1 unmodified line
415415
416416 /* 5GHz band, A mode */
417417 if (test_bit(AR5K_MODE_11A, ah->ah_capabilities.cap_mode)) {
418− sband = &ah->sbands[IEEE80211_BAND_5GHZ];
419− sband->band = IEEE80211_BAND_5GHZ;
420− sband->bitrates = &ah->rates[IEEE80211_BAND_5GHZ][0];
418+ sband = &ah->sbands[NL80211_BAND_5GHZ];
419+ sband->band = NL80211_BAND_5GHZ;
420+ sband->bitrates = &ah->rates[NL80211_BAND_5GHZ][0];
421421
422422 memcpy(sband->bitrates, &ath5k_rates[4],
423423 sizeof(struct ieee80211_rate) * 8);
@@ -427,7 +427,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 3 unmodified lines
427427 sband->n_channels = ath5k_setup_channels(ah, sband->channels,
428428 AR5K_MODE_11A, max_c);
429429
430− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
430+ hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
431431 }
432432 ath5k_setup_rate_idx(ah, sband);
433433
drivers/net/wireless/ath/ath5k/debug.c+3−3
@@ -1043,14 +1043,14 @@ ath5k_debug_dump_bands(struct ath5k_hw *ah) · 1042 unmodified lines
10431043
10441044 BUG_ON(!ah->sbands);
10451045
1046− for (b = 0; b < IEEE80211_NUM_BANDS; b++) {
1046+ for (b = 0; b < NUM_NL80211_BANDS; b++) {
10471047 struct ieee80211_supported_band *band = &ah->sbands[b];
10481048 char bname[6];
10491049 switch (band->band) {
1050− case IEEE80211_BAND_2GHZ:
1050+ case NL80211_BAND_2GHZ:
10511051 strcpy(bname, "2 GHz");
10521052 break;
1053− case IEEE80211_BAND_5GHZ:
1053+ case NL80211_BAND_5GHZ:
10541054 strcpy(bname, "5 GHz");
10551055 break;
10561056 default:
drivers/net/wireless/ath/ath5k/pcu.c+3−3
@@ -110,7 +110,7 @@ static const unsigned int ack_rates_high[] = · 109 unmodified lines
110110 * bwmodes.
111111 */
112112 int
113−ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum ieee80211_band band,
113+ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum nl80211_band band,
114114 int len, struct ieee80211_rate *rate, bool shortpre)
115115 {
116116 int sifs, preamble, plcp_bits, sym_time;
@@ -221,7 +221,7 @@ ath5k_hw_get_default_sifs(struct ath5k_hw *ah) · 104 unmodified lines
221221 case AR5K_BWMODE_DEFAULT:
222222 sifs = AR5K_INIT_SIFS_DEFAULT_BG;
223223 default:
224− if (channel->band == IEEE80211_BAND_5GHZ)
224+ if (channel->band == NL80211_BAND_5GHZ)
225225 sifs = AR5K_INIT_SIFS_DEFAULT_A;
226226 break;
227227 }
@@ -279,7 +279,7 @@ ath5k_hw_write_rate_duration(struct ath5k_hw *ah) · 51 unmodified lines
279279 struct ieee80211_rate *rate;
280280 unsigned int i;
281281 /* 802.11g covers both OFDM and CCK */
282− u8 band = IEEE80211_BAND_2GHZ;
282+ u8 band = NL80211_BAND_2GHZ;
283283
284284 /* Write rate duration table */
285285 for (i = 0; i < ah->sbands[band].n_bitrates; i++) {
drivers/net/wireless/ath/ath5k/phy.c+15−15
@@ -75,13 +75,13 @@ · 74 unmodified lines
7575 /**
7676 * ath5k_hw_radio_revision() - Get the PHY Chip revision
7777 * @ah: The &struct ath5k_hw
78− * @band: One of enum ieee80211_band
78+ * @band: One of enum nl80211_band
7979 *
8080 * Returns the revision number of a 2GHz, 5GHz or single chip
8181 * radio.
8282 */
8383 u16
84−ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band)
84+ath5k_hw_radio_revision(struct ath5k_hw *ah, enum nl80211_band band)
8585 {
8686 unsigned int i;
8787 u32 srev;
@@ -91,10 +91,10 @@ ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band) · 3 unmodified lines
9191 * Set the radio chip access register
9292 */
9393 switch (band) {
94− case IEEE80211_BAND_2GHZ:
94+ case NL80211_BAND_2GHZ:
9595 ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_2GHZ, AR5K_PHY(0));
9696 break;
97− case IEEE80211_BAND_5GHZ:
97+ case NL80211_BAND_5GHZ:
9898 ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_5GHZ, AR5K_PHY(0));
9999 break;
100100 default:
@@ -138,11 +138,11 @@ ath5k_channel_ok(struct ath5k_hw *ah, struct ieee80211_channel *channel) · 37 unmodified lines
138138 u16 freq = channel->center_freq;
139139
140140 /* Check if the channel is in our supported range */
141− if (channel->band == IEEE80211_BAND_2GHZ) {
141+ if (channel->band == NL80211_BAND_2GHZ) {
142142 if ((freq >= ah->ah_capabilities.cap_range.range_2ghz_min) &&
143143 (freq <= ah->ah_capabilities.cap_range.range_2ghz_max))
144144 return true;
145− } else if (channel->band == IEEE80211_BAND_5GHZ)
145+ } else if (channel->band == NL80211_BAND_5GHZ)
146146 if ((freq >= ah->ah_capabilities.cap_range.range_5ghz_min) &&
147147 (freq <= ah->ah_capabilities.cap_range.range_5ghz_max))
148148 return true;
@@ -743,7 +743,7 @@ done: · 594 unmodified lines
743743 /**
744744 * ath5k_hw_rfgain_init() - Write initial RF gain settings to hw
745745 * @ah: The &struct ath5k_hw
746− * @band: One of enum ieee80211_band
746+ * @band: One of enum nl80211_band
747747 *
748748 * Write initial RF gain table to set the RF sensitivity.
749749 *
@@ -751,7 +751,7 @@ done: · 1 unmodified line
751751 * with Gain_F calibration
752752 */
753753 static int
754−ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum ieee80211_band band)
754+ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum nl80211_band band)
755755 {
756756 const struct ath5k_ini_rfgain *ath5k_rfg;
757757 unsigned int i, size, index;
@@ -786,7 +786,7 @@ ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum ieee80211_band band) · 28 unmodified lines
786786 return -EINVAL;
787787 }
788788
789− index = (band == IEEE80211_BAND_2GHZ) ? 1 : 0;
789+ index = (band == NL80211_BAND_2GHZ) ? 1 : 0;
790790
791791 for (i = 0; i < size; i++) {
792792 AR5K_REG_WAIT(i);
@@ -917,7 +917,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, · 124 unmodified lines
917917 }
918918
919919 /* Set Output and Driver bias current (OB/DB) */
920− if (channel->band == IEEE80211_BAND_2GHZ) {
920+ if (channel->band == NL80211_BAND_2GHZ) {
921921
922922 if (channel->hw_value == AR5K_MODE_11B)
923923 ee_mode = AR5K_EEPROM_MODE_11B;
@@ -944,7 +944,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, · 20 unmodified lines
944944 AR5K_RF_DB_2GHZ, true);
945945
946946 /* RF5111 always needs OB/DB for 5GHz, even if we use 2GHz */
947− } else if ((channel->band == IEEE80211_BAND_5GHZ) ||
947+ } else if ((channel->band == NL80211_BAND_5GHZ) ||
948948 (ah->ah_radio == AR5K_RF5111)) {
949949
950950 /* For 11a, Turbo and XR we need to choose
@@ -1145,7 +1145,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, · 194 unmodified lines
11451145 }
11461146
11471147 if (ah->ah_radio == AR5K_RF5413 &&
1148− channel->band == IEEE80211_BAND_2GHZ) {
1148+ channel->band == NL80211_BAND_2GHZ) {
11491149
11501150 ath5k_hw_rfb_op(ah, rf_regs, 1, AR5K_RF_DERBY_CHAN_SEL_MODE,
11511151 true);
@@ -1270,7 +1270,7 @@ ath5k_hw_rf5111_channel(struct ath5k_hw *ah, · 118 unmodified lines
12701270 */
12711271 data0 = data1 = 0;
12721272
1273− if (channel->band == IEEE80211_BAND_2GHZ) {
1273+ if (channel->band == NL80211_BAND_2GHZ) {
12741274 /* Map 2GHz channel to 5GHz Atheros channel ID */
12751275 ret = ath5k_hw_rf5111_chan2athchan(
12761276 ieee80211_frequency_to_channel(channel->center_freq),
@@ -1919,7 +1919,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah, · 642 unmodified lines
19191919 /* Convert current frequency to fbin value (the same way channels
19201920 * are stored on EEPROM, check out ath5k_eeprom_bin2freq) and scale
19211921 * up by 2 so we can compare it later */
1922− if (channel->band == IEEE80211_BAND_2GHZ) {
1922+ if (channel->band == NL80211_BAND_2GHZ) {
19231923 chan_fbin = (channel->center_freq - 2300) * 10;
19241924 freq_band = AR5K_EEPROM_BAND_2GHZ;
19251925 } else {
@@ -1983,7 +1983,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah, · 57 unmodified lines
19831983 symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 4;
19841984 break;
19851985 default:
1986− if (channel->band == IEEE80211_BAND_5GHZ) {
1986+ if (channel->band == NL80211_BAND_5GHZ) {
19871987 /* Both sample_freq and chip_freq are 40MHz */
19881988 spur_delta_phase = (spur_offset << 17) / 25;
19891989 spur_freq_sigma_delta =
drivers/net/wireless/ath/ath5k/qcu.c+4−4
@@ -559,7 +559,7 @@ ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue) · 558 unmodified lines
559559 int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time)
560560 {
561561 struct ieee80211_channel *channel = ah->ah_current_channel;
562− enum ieee80211_band band;
562+ enum nl80211_band band;
563563 struct ieee80211_supported_band *sband;
564564 struct ieee80211_rate *rate;
565565 u32 ack_tx_time, eifs, eifs_clock, sifs, sifs_clock;
@@ -596,10 +596,10 @@ int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time) · 30 unmodified lines
596596 *
597597 * Also we have different lowest rate for 802.11a
598598 */
599− if (channel->band == IEEE80211_BAND_5GHZ)
600− band = IEEE80211_BAND_5GHZ;
599+ if (channel->band == NL80211_BAND_5GHZ)
600+ band = NL80211_BAND_5GHZ;
601601 else
602− band = IEEE80211_BAND_2GHZ;
602+ band = NL80211_BAND_2GHZ;
603603
604604 switch (ah->ah_bwmode) {
605605 case AR5K_BWMODE_5MHZ:
drivers/net/wireless/ath/ath5k/reset.c+3−3
@@ -752,7 +752,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel) · 751 unmodified lines
752752 clock = AR5K_PHY_PLL_RF5111; /*Zero*/
753753 }
754754
755− if (channel->band == IEEE80211_BAND_2GHZ) {
755+ if (channel->band == NL80211_BAND_2GHZ) {
756756 mode |= AR5K_PHY_MODE_FREQ_2GHZ;
757757 clock |= AR5K_PHY_PLL_44MHZ;
758758
@@ -771,7 +771,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel) · 12 unmodified lines
771771 else
772772 mode |= AR5K_PHY_MODE_MOD_DYN;
773773 }
774− } else if (channel->band == IEEE80211_BAND_5GHZ) {
774+ } else if (channel->band == NL80211_BAND_5GHZ) {
775775 mode |= (AR5K_PHY_MODE_FREQ_5GHZ |
776776 AR5K_PHY_MODE_MOD_OFDM);
777777
@@ -906,7 +906,7 @@ ath5k_hw_tweak_initval_settings(struct ath5k_hw *ah, · 128 unmodified lines
906906 u32 data;
907907 ath5k_hw_reg_write(ah, AR5K_PHY_CCKTXCTL_WORLD,
908908 AR5K_PHY_CCKTXCTL);
909− if (channel->band == IEEE80211_BAND_5GHZ)
909+ if (channel->band == NL80211_BAND_5GHZ)
910910 data = 0xffb81020;
911911 else
912912 data = 0xffb80d20;
drivers/net/wireless/ath/ath6kl/cfg80211.c+11−11
@@ -34,7 +34,7 @@ · 33 unmodified lines
3434 }
3535
3636 #define CHAN2G(_channel, _freq, _flags) { \
37− .band = IEEE80211_BAND_2GHZ, \
37+ .band = NL80211_BAND_2GHZ, \
3838 .hw_value = (_channel), \
3939 .center_freq = (_freq), \
4040 .flags = (_flags), \
@@ -43,7 +43,7 @@ · 2 unmodified lines
4343 }
4444
4545 #define CHAN5G(_channel, _flags) { \
46− .band = IEEE80211_BAND_5GHZ, \
46+ .band = NL80211_BAND_5GHZ, \
4747 .hw_value = (_channel), \
4848 .center_freq = 5000 + (5 * (_channel)), \
4949 .flags = (_flags), \
@@ -2583,7 +2583,7 @@ void ath6kl_check_wow_status(struct ath6kl *ar) · 2533 unmodified lines
25832583 }
25842584 #endif
25852585
2586−static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum ieee80211_band band,
2586+static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum nl80211_band band,
25872587 bool ht_enable)
25882588 {
25892589 struct ath6kl_htcap *htcap = &vif->htcap[band];
@@ -2594,7 +2594,7 @@ static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum ieee80211_band band, · 4 unmodified lines
25942594 if (ht_enable) {
25952595 /* Set default ht capabilities */
25962596 htcap->ht_enable = true;
2597− htcap->cap_info = (band == IEEE80211_BAND_2GHZ) ?
2597+ htcap->cap_info = (band == NL80211_BAND_2GHZ) ?
25982598 ath6kl_g_htcap : ath6kl_a_htcap;
25992599 htcap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K;
26002600 } else /* Disable ht */
@@ -2609,7 +2609,7 @@ static int ath6kl_restore_htcap(struct ath6kl_vif *vif) · 8 unmodified lines
26092609 struct wiphy *wiphy = vif->ar->wiphy;
26102610 int band, ret = 0;
26112611
2612− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
2612+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
26132613 if (!wiphy->bands[band])
26142614 continue;
26152615
@@ -3530,7 +3530,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy, · 914 unmodified lines
35303530 struct regulatory_request *request)
35313531 {
35323532 struct ath6kl *ar = wiphy_priv(wiphy);
3533− u32 rates[IEEE80211_NUM_BANDS];
3533+ u32 rates[NUM_NL80211_BANDS];
35343534 int ret, i;
35353535
35363536 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
@@ -3555,7 +3555,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy, · 18 unmodified lines
35553555 * changed.
35563556 */
35573557
3558− for (i = 0; i < IEEE80211_NUM_BANDS; i++)
3558+ for (i = 0; i < NUM_NL80211_BANDS; i++)
35593559 if (wiphy->bands[i])
35603560 rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1;
35613561
@@ -3791,8 +3791,8 @@ struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name, · 229 unmodified lines
37913791 vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL;
37923792 vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME;
37933793 vif->bg_scan_period = 0;
3794− vif->htcap[IEEE80211_BAND_2GHZ].ht_enable = true;
3795− vif->htcap[IEEE80211_BAND_5GHZ].ht_enable = true;
3794+ vif->htcap[NL80211_BAND_2GHZ].ht_enable = true;
3795+ vif->htcap[NL80211_BAND_5GHZ].ht_enable = true;
37963796
37973797 memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN);
37983798 if (fw_vif_idx != 0) {
@@ -3943,9 +3943,9 @@ int ath6kl_cfg80211_init(struct ath6kl *ar) · 144 unmodified lines
39433943 wiphy->available_antennas_rx = ar->hw.rx_ant;
39443944
39453945 if (band_2gig)
3946− wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz;
3946+ wiphy->bands[NL80211_BAND_2GHZ] = &ath6kl_band_2ghz;
39473947 if (band_5gig)
3948− wiphy->bands[IEEE80211_BAND_5GHZ] = &ath6kl_band_5ghz;
3948+ wiphy->bands[NL80211_BAND_5GHZ] = &ath6kl_band_5ghz;
39493949
39503950 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
39513951
drivers/net/wireless/ath/ath6kl/core.h+1−1
@@ -623,7 +623,7 @@ struct ath6kl_vif { · 622 unmodified lines
623623 struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
624624 struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1];
625625 struct aggr_info *aggr_cntxt;
626− struct ath6kl_htcap htcap[IEEE80211_NUM_BANDS];
626+ struct ath6kl_htcap htcap[NUM_NL80211_BANDS];
627627
628628 struct timer_list disconnect_timer;
629629 struct timer_list sched_scan_timer;
drivers/net/wireless/ath/ath6kl/wmi.c+11−11
@@ -2048,7 +2048,7 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx, · 2047 unmodified lines
20482048 sc->no_cck = cpu_to_le32(no_cck);
20492049 sc->num_ch = num_chan;
20502050
2051− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
2051+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
20522052 sband = ar->wiphy->bands[band];
20532053
20542054 if (!sband)
@@ -2770,10 +2770,10 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, · 715 unmodified lines
27702770 memset(&ratemask, 0, sizeof(ratemask));
27712771
27722772 /* only check 2.4 and 5 GHz bands, skip the rest */
2773− for (band = 0; band <= IEEE80211_BAND_5GHZ; band++) {
2773+ for (band = 0; band <= NL80211_BAND_5GHZ; band++) {
27742774 /* copy legacy rate mask */
27752775 ratemask[band] = mask->control[band].legacy;
2776− if (band == IEEE80211_BAND_5GHZ)
2776+ if (band == NL80211_BAND_5GHZ)
27772777 ratemask[band] =
27782778 mask->control[band].legacy << 4;
27792779
@@ -2799,9 +2799,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, · 19 unmodified lines
27992799 if (mode == WMI_RATES_MODE_11A ||
28002800 mode == WMI_RATES_MODE_11A_HT20 ||
28012801 mode == WMI_RATES_MODE_11A_HT40)
2802− band = IEEE80211_BAND_5GHZ;
2802+ band = NL80211_BAND_5GHZ;
28032803 else
2804− band = IEEE80211_BAND_2GHZ;
2804+ band = NL80211_BAND_2GHZ;
28052805 cmd->ratemask[mode] = cpu_to_le64(ratemask[band]);
28062806 }
28072807
@@ -2822,10 +2822,10 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx, · 14 unmodified lines
28222822 memset(&ratemask, 0, sizeof(ratemask));
28232823
28242824 /* only check 2.4 and 5 GHz bands, skip the rest */
2825− for (band = 0; band <= IEEE80211_BAND_5GHZ; band++) {
2825+ for (band = 0; band <= NL80211_BAND_5GHZ; band++) {
28262826 /* copy legacy rate mask */
28272827 ratemask[band] = mask->control[band].legacy;
2828− if (band == IEEE80211_BAND_5GHZ)
2828+ if (band == NL80211_BAND_5GHZ)
28292829 ratemask[band] =
28302830 mask->control[band].legacy << 4;
28312831
@@ -2849,9 +2849,9 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx, · 17 unmodified lines
28492849 if (mode == WMI_RATES_MODE_11A ||
28502850 mode == WMI_RATES_MODE_11A_HT20 ||
28512851 mode == WMI_RATES_MODE_11A_HT40)
2852− band = IEEE80211_BAND_5GHZ;
2852+ band = NL80211_BAND_5GHZ;
28532853 else
2854− band = IEEE80211_BAND_2GHZ;
2854+ band = NL80211_BAND_2GHZ;
28552855 cmd->ratemask[mode] = cpu_to_le32(ratemask[band]);
28562856 }
28572857
@@ -3174,7 +3174,7 @@ int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx, · 316 unmodified lines
31743174 }
31753175
31763176 int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx,
3177− enum ieee80211_band band,
3177+ enum nl80211_band band,
31783178 struct ath6kl_htcap *htcap)
31793179 {
31803180 struct sk_buff *skb;
@@ -3187,7 +3187,7 @@ int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, · 6 unmodified lines
31873187 cmd = (struct wmi_set_htcap_cmd *) skb->data;
31883188
31893189 /*
3190− * NOTE: Band in firmware matches enum ieee80211_band, it is unlikely
3190+ * NOTE: Band in firmware matches enum nl80211_band, it is unlikely
31913191 * this will be changed in firmware. If at all there is any change in
31923192 * band value, the host needs to be fixed.
31933193 */
drivers/net/wireless/ath/ath6kl/wmi.h+1−1
@@ -2628,7 +2628,7 @@ int ath6kl_wmi_set_wmm_txop(struct wmi *wmi, u8 if_idx, enum wmi_txop_cfg cfg); · 2627 unmodified lines
26282628 int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx,
26292629 u8 keep_alive_intvl);
26302630 int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx,
2631− enum ieee80211_band band,
2631+ enum nl80211_band band,
26322632 struct ath6kl_htcap *htcap);
26332633 int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len);
26342634
drivers/net/wireless/ath/ath9k/calib.c+3−3
@@ -145,14 +145,14 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah, · 144 unmodified lines
145145 }
146146
147147 static bool ath9k_hw_get_nf_thresh(struct ath_hw *ah,
148− enum ieee80211_band band,
148+ enum nl80211_band band,
149149 int16_t *nft)
150150 {
151151 switch (band) {
152− case IEEE80211_BAND_5GHZ:
152+ case NL80211_BAND_5GHZ:
153153 *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_5);
154154 break;
155− case IEEE80211_BAND_2GHZ:
155+ case NL80211_BAND_2GHZ:
156156 *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_2);
157157 break;
158158 default:
drivers/net/wireless/ath/ath9k/channel.c+4−4
@@ -107,9 +107,9 @@ void ath_chanctx_init(struct ath_softc *sc) · 106 unmodified lines
107107 struct ieee80211_channel *chan;
108108 int i, j;
109109
110− sband = &common->sbands[IEEE80211_BAND_2GHZ];
110+ sband = &common->sbands[NL80211_BAND_2GHZ];
111111 if (!sband->n_channels)
112− sband = &common->sbands[IEEE80211_BAND_5GHZ];
112+ sband = &common->sbands[NL80211_BAND_5GHZ];
113113
114114 chan = &sband->channels[0];
115115 for (i = 0; i < ATH9K_NUM_CHANCTX; i++) {
@@ -1333,9 +1333,9 @@ void ath9k_offchannel_init(struct ath_softc *sc) · 1217 unmodified lines
13331333 struct ieee80211_channel *chan;
13341334 int i;
13351335
1336− sband = &common->sbands[IEEE80211_BAND_2GHZ];
1336+ sband = &common->sbands[NL80211_BAND_2GHZ];
13371337 if (!sband->n_channels)
1338− sband = &common->sbands[IEEE80211_BAND_5GHZ];
1338+ sband = &common->sbands[NL80211_BAND_5GHZ];
13391339
13401340 chan = &sband->channels[0];
13411341
drivers/net/wireless/ath/ath9k/common-init.c+14−14
@@ -19,14 +19,14 @@ · 18 unmodified lines
1919 #include "common.h"
2020
2121 #define CHAN2G(_freq, _idx) { \
22− .band = IEEE80211_BAND_2GHZ, \
22+ .band = NL80211_BAND_2GHZ, \
2323 .center_freq = (_freq), \
2424 .hw_value = (_idx), \
2525 .max_power = 20, \
2626 }
2727
2828 #define CHAN5G(_freq, _idx) { \
29− .band = IEEE80211_BAND_5GHZ, \
29+ .band = NL80211_BAND_5GHZ, \
3030 .center_freq = (_freq), \
3131 .hw_value = (_idx), \
3232 .max_power = 20, \
@@ -139,12 +139,12 @@ int ath9k_cmn_init_channels_rates(struct ath_common *common) · 106 unmodified lines
139139
140140 memcpy(channels, ath9k_2ghz_chantable,
141141 sizeof(ath9k_2ghz_chantable));
142− common->sbands[IEEE80211_BAND_2GHZ].channels = channels;
143− common->sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ;
144− common->sbands[IEEE80211_BAND_2GHZ].n_channels =
142+ common->sbands[NL80211_BAND_2GHZ].channels = channels;
143+ common->sbands[NL80211_BAND_2GHZ].band = NL80211_BAND_2GHZ;
144+ common->sbands[NL80211_BAND_2GHZ].n_channels =
145145 ARRAY_SIZE(ath9k_2ghz_chantable);
146− common->sbands[IEEE80211_BAND_2GHZ].bitrates = ath9k_legacy_rates;
147− common->sbands[IEEE80211_BAND_2GHZ].n_bitrates =
146+ common->sbands[NL80211_BAND_2GHZ].bitrates = ath9k_legacy_rates;
147+ common->sbands[NL80211_BAND_2GHZ].n_bitrates =
148148 ARRAY_SIZE(ath9k_legacy_rates);
149149 }
150150
@@ -156,13 +156,13 @@ int ath9k_cmn_init_channels_rates(struct ath_common *common) · 5 unmodified lines
156156
157157 memcpy(channels, ath9k_5ghz_chantable,
158158 sizeof(ath9k_5ghz_chantable));
159− common->sbands[IEEE80211_BAND_5GHZ].channels = channels;
160− common->sbands[IEEE80211_BAND_5GHZ].band = IEEE80211_BAND_5GHZ;
161− common->sbands[IEEE80211_BAND_5GHZ].n_channels =
159+ common->sbands[NL80211_BAND_5GHZ].channels = channels;
160+ common->sbands[NL80211_BAND_5GHZ].band = NL80211_BAND_5GHZ;
161+ common->sbands[NL80211_BAND_5GHZ].n_channels =
162162 ARRAY_SIZE(ath9k_5ghz_chantable);
163− common->sbands[IEEE80211_BAND_5GHZ].bitrates =
163+ common->sbands[NL80211_BAND_5GHZ].bitrates =
164164 ath9k_legacy_rates + 4;
165− common->sbands[IEEE80211_BAND_5GHZ].n_bitrates =
165+ common->sbands[NL80211_BAND_5GHZ].n_bitrates =
166166 ARRAY_SIZE(ath9k_legacy_rates) - 4;
167167 }
168168 return 0;
@@ -236,9 +236,9 @@ void ath9k_cmn_reload_chainmask(struct ath_hw *ah) · 67 unmodified lines
236236
237237 if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
238238 ath9k_cmn_setup_ht_cap(ah,
239− &common->sbands[IEEE80211_BAND_2GHZ].ht_cap);
239+ &common->sbands[NL80211_BAND_2GHZ].ht_cap);
240240 if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
241241 ath9k_cmn_setup_ht_cap(ah,
242− &common->sbands[IEEE80211_BAND_5GHZ].ht_cap);
242+ &common->sbands[NL80211_BAND_5GHZ].ht_cap);
243243 }
244244 EXPORT_SYMBOL(ath9k_cmn_reload_chainmask);
drivers/net/wireless/ath/ath9k/common.c+2−2
@@ -173,7 +173,7 @@ int ath9k_cmn_process_rate(struct ath_common *common, · 172 unmodified lines
173173 struct ieee80211_rx_status *rxs)
174174 {
175175 struct ieee80211_supported_band *sband;
176− enum ieee80211_band band;
176+ enum nl80211_band band;
177177 unsigned int i = 0;
178178 struct ath_hw *ah = common->ah;
179179
@@ -305,7 +305,7 @@ static void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan, · 125 unmodified lines
305305 ichan->channel = chan->center_freq;
306306 ichan->chan = chan;
307307
308− if (chan->band == IEEE80211_BAND_5GHZ)
308+ if (chan->band == NL80211_BAND_5GHZ)
309309 flags |= CHANNEL_5GHZ;
310310
311311 switch (chandef->width) {
drivers/net/wireless/ath/ath9k/debug_sta.c+3−3
@@ -139,7 +139,7 @@ void ath_debug_rate_stats(struct ath_softc *sc, · 138 unmodified lines
139139 }
140140
141141 if (IS_OFDM_RATE(rs->rs_rate)) {
142− if (ah->curchan->chan->band == IEEE80211_BAND_2GHZ)
142+ if (ah->curchan->chan->band == NL80211_BAND_2GHZ)
143143 rstats->ofdm_stats[rxs->rate_idx - 4].ofdm_cnt++;
144144 else
145145 rstats->ofdm_stats[rxs->rate_idx].ofdm_cnt++;
@@ -173,7 +173,7 @@ static ssize_t read_file_node_recv(struct file *file, char __user *user_buf, · 27 unmodified lines
173173 struct ath_hw *ah = sc->sc_ah;
174174 struct ath_rx_rate_stats *rstats;
175175 struct ieee80211_sta *sta = an->sta;
176− enum ieee80211_band band;
176+ enum nl80211_band band;
177177 u32 len = 0, size = 4096;
178178 char *buf;
179179 size_t retval;
@@ -206,7 +206,7 @@ static ssize_t read_file_node_recv(struct file *file, char __user *user_buf, · 26 unmodified lines
206206 len += scnprintf(buf + len, size - len, "\n");
207207
208208 legacy:
209− if (band == IEEE80211_BAND_2GHZ) {
209+ if (band == NL80211_BAND_2GHZ) {
210210 PRINT_CCK_RATE("CCK-1M/LP", 0, false);
211211 PRINT_CCK_RATE("CCK-2M/LP", 1, false);
212212 PRINT_CCK_RATE("CCK-5.5M/LP", 2, false);
drivers/net/wireless/ath/ath9k/dynack.c+1−1
@@ -212,7 +212,7 @@ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb, · 211 unmodified lines
212212 struct ieee80211_tx_rate *rates = info->status.rates;
213213
214214 rate = &common->sbands[info->band].bitrates[rates[ridx].idx];
215− if (info->band == IEEE80211_BAND_2GHZ &&
215+ if (info->band == NL80211_BAND_2GHZ &&
216216 !(rate->flags & IEEE80211_RATE_ERP_G))
217217 phy = WLAN_RC_PHY_CCK;
218218 else
drivers/net/wireless/ath/ath9k/htc_drv_init.c+4−4
@@ -765,11 +765,11 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv, · 764 unmodified lines
765765 sizeof(struct htc_frame_hdr) + 4;
766766
767767 if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
768− hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
769− &common->sbands[IEEE80211_BAND_2GHZ];
768+ hw->wiphy->bands[NL80211_BAND_2GHZ] =
769+ &common->sbands[NL80211_BAND_2GHZ];
770770 if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
771− hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
772− &common->sbands[IEEE80211_BAND_5GHZ];
771+ hw->wiphy->bands[NL80211_BAND_5GHZ] =
772+ &common->sbands[NL80211_BAND_5GHZ];
773773
774774 ath9k_cmn_reload_chainmask(ah);
775775
drivers/net/wireless/ath/ath9k/htc_drv_main.c+6−6
@@ -1770,8 +1770,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, · 1769 unmodified lines
17701770 memset(&tmask, 0, sizeof(struct ath9k_htc_target_rate_mask));
17711771
17721772 tmask.vif_index = avp->index;
1773− tmask.band = IEEE80211_BAND_2GHZ;
1774− tmask.mask = cpu_to_be32(mask->control[IEEE80211_BAND_2GHZ].legacy);
1773+ tmask.band = NL80211_BAND_2GHZ;
1774+ tmask.mask = cpu_to_be32(mask->control[NL80211_BAND_2GHZ].legacy);
17751775
17761776 WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask);
17771777 if (ret) {
@@ -1781,8 +1781,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, · 3 unmodified lines
17811781 goto out;
17821782 }
17831783
1784− tmask.band = IEEE80211_BAND_5GHZ;
1785− tmask.mask = cpu_to_be32(mask->control[IEEE80211_BAND_5GHZ].legacy);
1784+ tmask.band = NL80211_BAND_5GHZ;
1785+ tmask.mask = cpu_to_be32(mask->control[NL80211_BAND_5GHZ].legacy);
17861786
17871787 WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask);
17881788 if (ret) {
@@ -1793,8 +1793,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, · 4 unmodified lines
17931793 }
17941794
17951795 ath_dbg(common, CONFIG, "Set bitrate masks: 0x%x, 0x%x\n",
1796− mask->control[IEEE80211_BAND_2GHZ].legacy,
1797− mask->control[IEEE80211_BAND_5GHZ].legacy);
1796+ mask->control[NL80211_BAND_2GHZ].legacy,
1797+ mask->control[NL80211_BAND_5GHZ].legacy);
17981798 out:
17991799 return ret;
18001800 }
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c+1−1
@@ -494,7 +494,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv, · 493 unmodified lines
494494 if (txs->ts_flags & ATH9K_HTC_TXSTAT_SGI)
495495 rate->flags |= IEEE80211_TX_RC_SHORT_GI;
496496 } else {
497− if (cur_conf->chandef.chan->band == IEEE80211_BAND_5GHZ)
497+ if (cur_conf->chandef.chan->band == NL80211_BAND_5GHZ)
498498 rate->idx += 4; /* No CCK rates */
499499 }
500500
drivers/net/wireless/ath/ath9k/init.c+6−6
@@ -705,9 +705,9 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc) · 704 unmodified lines
705705 struct ath9k_channel *curchan = ah->curchan;
706706
707707 if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
708− ath9k_init_band_txpower(sc, IEEE80211_BAND_2GHZ);
708+ ath9k_init_band_txpower(sc, NL80211_BAND_2GHZ);
709709 if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
710− ath9k_init_band_txpower(sc, IEEE80211_BAND_5GHZ);
710+ ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ);
711711
712712 ah->curchan = curchan;
713713 }
@@ -879,11 +879,11 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) · 165 unmodified lines
879879 sc->ant_tx = hw->wiphy->available_antennas_tx;
880880
881881 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
882− hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
883− &common->sbands[IEEE80211_BAND_2GHZ];
882+ hw->wiphy->bands[NL80211_BAND_2GHZ] =
883+ &common->sbands[NL80211_BAND_2GHZ];
884884 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
885− hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
886− &common->sbands[IEEE80211_BAND_5GHZ];
885+ hw->wiphy->bands[NL80211_BAND_5GHZ] =
886+ &common->sbands[NL80211_BAND_5GHZ];
887887
888888 #ifdef CONFIG_ATH9K_CHANNEL_CONTEXT
889889 ath9k_set_mcc_capab(sc, hw);
drivers/net/wireless/ath/ath9k/main.c+2−2
@@ -1933,14 +1933,14 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx, · 1932 unmodified lines
19331933 if (idx == 0)
19341934 ath_update_survey_stats(sc);
19351935
1936− sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ];
1936+ sband = hw->wiphy->bands[NL80211_BAND_2GHZ];
19371937 if (sband && idx >= sband->n_channels) {
19381938 idx -= sband->n_channels;
19391939 sband = NULL;
19401940 }
19411941
19421942 if (!sband)
1943− sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ];
1943+ sband = hw->wiphy->bands[NL80211_BAND_5GHZ];
19441944
19451945 if (!sband || idx >= sband->n_channels) {
19461946 spin_unlock_bh(&common->cc_lock);
drivers/net/wireless/ath/ath9k/xmit.c+2−2
@@ -1112,7 +1112,7 @@ static u8 ath_get_rate_txpower(struct ath_softc *sc, struct ath_buf *bf, · 1111 unmodified lines
11121112 bool is_2ghz;
11131113 struct modal_eep_header *pmodal;
11141114
1115− is_2ghz = info->band == IEEE80211_BAND_2GHZ;
1115+ is_2ghz = info->band == NL80211_BAND_2GHZ;
11161116 pmodal = &eep->modalHeader[is_2ghz];
11171117 power_ht40delta = pmodal->ht40PowerIncForPdadc;
11181118 } else {
@@ -1236,7 +1236,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, · 117 unmodified lines
12361236
12371237 /* legacy rates */
12381238 rate = &common->sbands[tx_info->band].bitrates[rates[i].idx];
1239− if ((tx_info->band == IEEE80211_BAND_2GHZ) &&
1239+ if ((tx_info->band == NL80211_BAND_2GHZ) &&
12401240 !(rate->flags & IEEE80211_RATE_ERP_G))
12411241 phy = WLAN_RC_PHY_CCK;
12421242 else
drivers/net/wireless/ath/carl9170/mac.c+6−6
@@ -48,7 +48,7 @@ int carl9170_set_dyn_sifs_ack(struct ar9170 *ar) · 47 unmodified lines
4848 if (conf_is_ht40(&ar->hw->conf))
4949 val = 0x010a;
5050 else {
51− if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
51+ if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
5252 val = 0x105;
5353 else
5454 val = 0x104;
@@ -66,7 +66,7 @@ int carl9170_set_rts_cts_rate(struct ar9170 *ar) · 11 unmodified lines
6666 rts_rate = 0x1da;
6767 cts_rate = 0x10a;
6868 } else {
69− if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) {
69+ if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) {
7070 /* 11 mbit CCK */
7171 rts_rate = 033;
7272 cts_rate = 003;
@@ -93,7 +93,7 @@ int carl9170_set_slot_time(struct ar9170 *ar) · 20 unmodified lines
9393 return 0;
9494 }
9595
96− if ((ar->hw->conf.chandef.chan->band == IEEE80211_BAND_5GHZ) ||
96+ if ((ar->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ) ||
9797 vif->bss_conf.use_short_slot)
9898 slottime = 9;
9999
@@ -120,7 +120,7 @@ int carl9170_set_mac_rates(struct ar9170 *ar) · 20 unmodified lines
120120 basic |= (vif->bss_conf.basic_rates & 0xff0) << 4;
121121 rcu_read_unlock();
122122
123− if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_5GHZ)
123+ if (ar->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ)
124124 mandatory = 0xff00; /* OFDM 6/9/12/18/24/36/48/54 */
125125 else
126126 mandatory = 0xff0f; /* OFDM (6/9../54) + CCK (1/2/5.5/11) */
@@ -512,10 +512,10 @@ int carl9170_set_mac_tpc(struct ar9170 *ar, struct ieee80211_channel *channel) · 385 unmodified lines
512512 chains = AR9170_TX_PHY_TXCHAIN_1;
513513
514514 switch (channel->band) {
515− case IEEE80211_BAND_2GHZ:
515+ case NL80211_BAND_2GHZ:
516516 power = ar->power_2G_ofdm[0] & 0x3f;
517517 break;
518− case IEEE80211_BAND_5GHZ:
518+ case NL80211_BAND_5GHZ:
519519 power = ar->power_5G_leg[0] & 0x3f;
520520 break;
521521 default:
drivers/net/wireless/ath/carl9170/main.c+3−3
@@ -1666,7 +1666,7 @@ static int carl9170_op_get_survey(struct ieee80211_hw *hw, int idx, · 1665 unmodified lines
16661666 return err;
16671667 }
16681668
1669− for (b = 0; b < IEEE80211_NUM_BANDS; b++) {
1669+ for (b = 0; b < NUM_NL80211_BANDS; b++) {
16701670 band = ar->hw->wiphy->bands[b];
16711671
16721672 if (!band)
@@ -1941,13 +1941,13 @@ static int carl9170_parse_eeprom(struct ar9170 *ar) · 268 unmodified lines
19411941 }
19421942
19431943 if (ar->eeprom.operating_flags & AR9170_OPFLAG_2GHZ) {
1944− ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
1944+ ar->hw->wiphy->bands[NL80211_BAND_2GHZ] =
19451945 &carl9170_band_2GHz;
19461946 chans += carl9170_band_2GHz.n_channels;
19471947 bands++;
19481948 }
19491949 if (ar->eeprom.operating_flags & AR9170_OPFLAG_5GHZ) {
1950− ar->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
1950+ ar->hw->wiphy->bands[NL80211_BAND_5GHZ] =
19511951 &carl9170_band_5GHz;
19521952 chans += carl9170_band_5GHz.n_channels;
19531953 bands++;
drivers/net/wireless/ath/carl9170/phy.c+9−9
@@ -540,11 +540,11 @@ static int carl9170_init_phy_from_eeprom(struct ar9170 *ar, · 539 unmodified lines
540540 return carl9170_regwrite_result();
541541 }
542542
543−static int carl9170_init_phy(struct ar9170 *ar, enum ieee80211_band band)
543+static int carl9170_init_phy(struct ar9170 *ar, enum nl80211_band band)
544544 {
545545 int i, err;
546546 u32 val;
547− bool is_2ghz = band == IEEE80211_BAND_2GHZ;
547+ bool is_2ghz = band == NL80211_BAND_2GHZ;
548548 bool is_40mhz = conf_is_ht40(&ar->hw->conf);
549549
550550 carl9170_regwrite_begin(ar);
@@ -1125,13 +1125,13 @@ static int carl9170_set_freq_cal_data(struct ar9170 *ar, · 574 unmodified lines
11251125 u8 f, tmp;
11261126
11271127 switch (channel->band) {
1128− case IEEE80211_BAND_2GHZ:
1128+ case NL80211_BAND_2GHZ:
11291129 f = channel->center_freq - 2300;
11301130 cal_freq_pier = ar->eeprom.cal_freq_pier_2G;
11311131 i = AR5416_NUM_2G_CAL_PIERS - 1;
11321132 break;
11331133
1134− case IEEE80211_BAND_5GHZ:
1134+ case NL80211_BAND_5GHZ:
11351135 f = (channel->center_freq - 4800) / 5;
11361136 cal_freq_pier = ar->eeprom.cal_freq_pier_5G;
11371137 i = AR5416_NUM_5G_CAL_PIERS - 1;
@@ -1158,12 +1158,12 @@ static int carl9170_set_freq_cal_data(struct ar9170 *ar, · 20 unmodified lines
11581158 int j;
11591159
11601160 switch (channel->band) {
1161− case IEEE80211_BAND_2GHZ:
1161+ case NL80211_BAND_2GHZ:
11621162 cal_pier_data = &ar->eeprom.
11631163 cal_pier_data_2G[chain][idx];
11641164 break;
11651165
1166− case IEEE80211_BAND_5GHZ:
1166+ case NL80211_BAND_5GHZ:
11671167 cal_pier_data = &ar->eeprom.
11681168 cal_pier_data_5G[chain][idx];
11691169 break;
@@ -1340,7 +1340,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw) · 170 unmodified lines
13401340 /* skip CTL and heavy clip for CTL_MKK and CTL_ETSI */
13411341 return;
13421342
1343− if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) {
1343+ if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) {
13441344 modes = mode_list_2ghz;
13451345 nr_modes = ARRAY_SIZE(mode_list_2ghz);
13461346 } else {
@@ -1607,7 +1607,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, · 260 unmodified lines
16071607 return err;
16081608
16091609 err = carl9170_init_rf_banks_0_7(ar,
1610− channel->band == IEEE80211_BAND_5GHZ);
1610+ channel->band == NL80211_BAND_5GHZ);
16111611 if (err)
16121612 return err;
16131613
@@ -1621,7 +1621,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, · 7 unmodified lines
16211621 return err;
16221622
16231623 err = carl9170_init_rf_bank4_pwr(ar,
1624− channel->band == IEEE80211_BAND_5GHZ,
1624+ channel->band == NL80211_BAND_5GHZ,
16251625 channel->center_freq, bw);
16261626 if (err)
16271627 return err;
drivers/net/wireless/ath/carl9170/rx.c+1−1
@@ -417,7 +417,7 @@ static int carl9170_rx_mac_status(struct ar9170 *ar, · 416 unmodified lines
417417
418418 return -EINVAL;
419419 }
420− if (status->band == IEEE80211_BAND_2GHZ)
420+ if (status->band == NL80211_BAND_2GHZ)
421421 status->rate_idx += 4;
422422 break;
423423
drivers/net/wireless/ath/carl9170/tx.c+4−4
@@ -720,12 +720,12 @@ static void carl9170_tx_rate_tpc_chains(struct ar9170 *ar, · 719 unmodified lines
720720 /* +1 dBm for HT40 */
721721 *tpc += 2;
722722
723− if (info->band == IEEE80211_BAND_2GHZ)
723+ if (info->band == NL80211_BAND_2GHZ)
724724 txpower = ar->power_2G_ht40;
725725 else
726726 txpower = ar->power_5G_ht40;
727727 } else {
728− if (info->band == IEEE80211_BAND_2GHZ)
728+ if (info->band == NL80211_BAND_2GHZ)
729729 txpower = ar->power_2G_ht20;
730730 else
731731 txpower = ar->power_5G_ht20;
@@ -734,7 +734,7 @@ static void carl9170_tx_rate_tpc_chains(struct ar9170 *ar, · 2 unmodified lines
734734 *phyrate = txrate->idx;
735735 *tpc += txpower[idx & 7];
736736 } else {
737− if (info->band == IEEE80211_BAND_2GHZ) {
737+ if (info->band == NL80211_BAND_2GHZ) {
738738 if (idx < 4)
739739 txpower = ar->power_2G_cck;
740740 else
@@ -797,7 +797,7 @@ static __le32 carl9170_tx_physet(struct ar9170 *ar, · 56 unmodified lines
797797 * tmp |= cpu_to_le32(AR9170_TX_PHY_GREENFIELD);
798798 */
799799 } else {
800− if (info->band == IEEE80211_BAND_2GHZ) {
800+ if (info->band == NL80211_BAND_2GHZ) {
801801 if (txrate->idx <= AR9170_TX_PHY_RATE_CCK_11M)
802802 tmp |= cpu_to_le32(AR9170_TX_PHY_MOD_CCK);
803803 else
drivers/net/wireless/ath/regd.c+8−8
@@ -336,12 +336,12 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy, · 335 unmodified lines
336336 struct ath_regulatory *reg,
337337 enum nl80211_reg_initiator initiator)
338338 {
339− enum ieee80211_band band;
339+ enum nl80211_band band;
340340 struct ieee80211_supported_band *sband;
341341 struct ieee80211_channel *ch;
342342 unsigned int i;
343343
344− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
344+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
345345 if (!wiphy->bands[band])
346346 continue;
347347 sband = wiphy->bands[band];
@@ -374,7 +374,7 @@ ath_reg_apply_ir_flags(struct wiphy *wiphy, · 26 unmodified lines
374374 {
375375 struct ieee80211_supported_band *sband;
376376
377− sband = wiphy->bands[IEEE80211_BAND_2GHZ];
377+ sband = wiphy->bands[NL80211_BAND_2GHZ];
378378 if (!sband)
379379 return;
380380
@@ -402,10 +402,10 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy) · 21 unmodified lines
402402 struct ieee80211_channel *ch;
403403 unsigned int i;
404404
405− if (!wiphy->bands[IEEE80211_BAND_5GHZ])
405+ if (!wiphy->bands[NL80211_BAND_5GHZ])
406406 return;
407407
408− sband = wiphy->bands[IEEE80211_BAND_5GHZ];
408+ sband = wiphy->bands[NL80211_BAND_5GHZ];
409409
410410 for (i = 0; i < sband->n_channels; i++) {
411411 ch = &sband->channels[i];
@@ -772,7 +772,7 @@ ath_regd_init(struct ath_regulatory *reg, · 360 unmodified lines
772772 EXPORT_SYMBOL(ath_regd_init);
773773
774774 u32 ath_regd_get_band_ctl(struct ath_regulatory *reg,
775− enum ieee80211_band band)
775+ enum nl80211_band band)
776776 {
777777 if (!reg->regpair ||
778778 (reg->country_code == CTRY_DEFAULT &&
@@ -794,9 +794,9 @@ u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, · 15 unmodified lines
794794 }
795795
796796 switch (band) {
797− case IEEE80211_BAND_2GHZ:
797+ case NL80211_BAND_2GHZ:
798798 return reg->regpair->reg_2ghz_ctl;
799− case IEEE80211_BAND_5GHZ:
799+ case NL80211_BAND_5GHZ:
800800 return reg->regpair->reg_5ghz_ctl;
801801 default:
802802 return NO_CTL;
drivers/net/wireless/ath/regd.h+1−1
@@ -255,7 +255,7 @@ int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, · 254 unmodified lines
255255 void (*reg_notifier)(struct wiphy *wiphy,
256256 struct regulatory_request *request));
257257 u32 ath_regd_get_band_ctl(struct ath_regulatory *reg,
258− enum ieee80211_band band);
258+ enum nl80211_band band);
259259 void ath_reg_notifier_apply(struct wiphy *wiphy,
260260 struct regulatory_request *request,
261261 struct ath_regulatory *reg);
drivers/net/wireless/ath/wcn36xx/main.c+6−6
@@ -26,14 +26,14 @@ module_param_named(debug_mask, wcn36xx_dbg_mask, uint, 0644); · 25 unmodified lines
2626 MODULE_PARM_DESC(debug_mask, "Debugging mask");
2727
2828 #define CHAN2G(_freq, _idx) { \
29− .band = IEEE80211_BAND_2GHZ, \
29+ .band = NL80211_BAND_2GHZ, \
3030 .center_freq = (_freq), \
3131 .hw_value = (_idx), \
3232 .max_power = 25, \
3333 }
3434
3535 #define CHAN5G(_freq, _idx) { \
36− .band = IEEE80211_BAND_5GHZ, \
36+ .band = NL80211_BAND_5GHZ, \
3737 .center_freq = (_freq), \
3838 .hw_value = (_idx), \
3939 .max_power = 25, \
@@ -516,7 +516,7 @@ static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw, · 476 unmodified lines
516516 }
517517
518518 static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta,
519− enum ieee80211_band band)
519+ enum nl80211_band band)
520520 {
521521 int i, size;
522522 u16 *rates_table;
@@ -529,7 +529,7 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, · 6 unmodified lines
529529
530530 size = ARRAY_SIZE(sta_priv->supported_rates.dsss_rates);
531531 rates_table = sta_priv->supported_rates.dsss_rates;
532− if (band == IEEE80211_BAND_2GHZ) {
532+ if (band == NL80211_BAND_2GHZ) {
533533 for (i = 0; i < size; i++) {
534534 if (rates & 0x01) {
535535 rates_table[i] = wcn_2ghz_rates[i].hw_value;
@@ -958,8 +958,8 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) · 422 unmodified lines
958958 BIT(NL80211_IFTYPE_ADHOC) |
959959 BIT(NL80211_IFTYPE_MESH_POINT);
960960
961− wcn->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wcn_band_2ghz;
962− wcn->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wcn_band_5ghz;
961+ wcn->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wcn_band_2ghz;
962+ wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz;
963963
964964 wcn->hw->wiphy->cipher_suites = cipher_suites;
965965 wcn->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
drivers/net/wireless/ath/wcn36xx/smd.c+2−2
@@ -104,11 +104,11 @@ static void wcn36xx_smd_set_bss_nw_type(struct wcn36xx *wcn, · 103 unmodified lines
104104 struct ieee80211_sta *sta,
105105 struct wcn36xx_hal_config_bss_params *bss_params)
106106 {
107− if (IEEE80211_BAND_5GHZ == WCN36XX_BAND(wcn))
107+ if (NL80211_BAND_5GHZ == WCN36XX_BAND(wcn))
108108 bss_params->nw_type = WCN36XX_HAL_11A_NW_TYPE;
109109 else if (sta && sta->ht_cap.ht_supported)
110110 bss_params->nw_type = WCN36XX_HAL_11N_NW_TYPE;
111− else if (sta && (sta->supp_rates[IEEE80211_BAND_2GHZ] & 0x7f))
111+ else if (sta && (sta->supp_rates[NL80211_BAND_2GHZ] & 0x7f))
112112 bss_params->nw_type = WCN36XX_HAL_11G_NW_TYPE;
113113 else
114114 bss_params->nw_type = WCN36XX_HAL_11B_NW_TYPE;
drivers/net/wireless/ath/wcn36xx/txrx.c+1−1
@@ -225,7 +225,7 @@ static void wcn36xx_set_tx_mgmt(struct wcn36xx_tx_bd *bd, · 224 unmodified lines
225225
226226 /* default rate for unicast */
227227 if (ieee80211_is_mgmt(hdr->frame_control))
228− bd->bd_rate = (WCN36XX_BAND(wcn) == IEEE80211_BAND_5GHZ) ?
228+ bd->bd_rate = (WCN36XX_BAND(wcn) == NL80211_BAND_5GHZ) ?
229229 WCN36XX_BD_RATE_CTRL :
230230 WCN36XX_BD_RATE_MGMT;
231231 else if (ieee80211_is_ctl(hdr->frame_control))
drivers/net/wireless/ath/wil6210/cfg80211.c+2−2
@@ -21,7 +21,7 @@ · 20 unmodified lines
2121 #define WIL_MAX_ROC_DURATION_MS 5000
2222
2323 #define CHAN60G(_channel, _flags) { \
24− .band = IEEE80211_BAND_60GHZ, \
24+ .band = NL80211_BAND_60GHZ, \
2525 .center_freq = 56160 + (2160 * (_channel)), \
2626 .hw_value = (_channel), \
2727 .flags = (_flags), \
@@ -1411,7 +1411,7 @@ static void wil_wiphy_init(struct wiphy *wiphy) · 1383 unmodified lines
14111411 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
14121412 NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P;
14131413
1414− wiphy->bands[IEEE80211_BAND_60GHZ] = &wil_band_60ghz;
1414+ wiphy->bands[NL80211_BAND_60GHZ] = &wil_band_60ghz;
14151415
14161416 /* TODO: figure this out */
14171417 wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC;
drivers/net/wireless/ath/wil6210/netdev.c+1−1
@@ -157,7 +157,7 @@ void *wil_if_alloc(struct device *dev) · 156 unmodified lines
157157
158158 wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */
159159 /* default monitor channel */
160− ch = wdev->wiphy->bands[IEEE80211_BAND_60GHZ]->channels;
160+ ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels;
161161 cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT);
162162
163163 ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup);
drivers/net/wireless/ath/wil6210/wmi.c+1−1
@@ -333,7 +333,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) · 332 unmodified lines
333333 }
334334
335335 ch_no = data->info.channel + 1;
336− freq = ieee80211_channel_to_frequency(ch_no, IEEE80211_BAND_60GHZ);
336+ freq = ieee80211_channel_to_frequency(ch_no, NL80211_BAND_60GHZ);
337337 channel = ieee80211_get_channel(wiphy, freq);
338338 signal = data->info.sqi;
339339 d_status = le16_to_cpu(data->info.status);
drivers/net/wireless/atmel/at76c50x-usb.c+3−3
@@ -1547,7 +1547,7 @@ static inline int at76_guess_freq(struct at76_priv *priv) · 1546 unmodified lines
15471547 channel = el[2];
15481548
15491549 exit:
1550− return ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
1550+ return ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
15511551 }
15521552
15531553 static void at76_rx_tasklet(unsigned long param)
@@ -1590,7 +1590,7 @@ static void at76_rx_tasklet(unsigned long param) · 36 unmodified lines
15901590 rx_status.signal = buf->rssi;
15911591 rx_status.flag |= RX_FLAG_DECRYPTED;
15921592 rx_status.flag |= RX_FLAG_IV_STRIPPED;
1593− rx_status.band = IEEE80211_BAND_2GHZ;
1593+ rx_status.band = NL80211_BAND_2GHZ;
15941594 rx_status.freq = at76_guess_freq(priv);
15951595
15961596 at76_dbg(DBG_MAC80211, "calling ieee80211_rx_irqsafe(): %d/%d",
@@ -2359,7 +2359,7 @@ static int at76_init_new_device(struct at76_priv *priv, · 762 unmodified lines
23592359 priv->hw->wiphy->max_scan_ssids = 1;
23602360 priv->hw->wiphy->max_scan_ie_len = 0;
23612361 priv->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
2362− priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &at76_supported_band;
2362+ priv->hw->wiphy->bands[NL80211_BAND_2GHZ] = &at76_supported_band;
23632363 ieee80211_hw_set(priv->hw, RX_INCLUDES_FCS);
23642364 ieee80211_hw_set(priv->hw, SIGNAL_UNSPEC);
23652365 priv->hw->max_signal = 100;
drivers/net/wireless/atmel/atmel.c+1−1
@@ -2434,7 +2434,7 @@ static int atmel_get_range(struct net_device *dev, · 2433 unmodified lines
24342434
24352435 /* Values in MHz -> * 10^5 * 10 */
24362436 range->freq[k].m = 100000 *
2437− ieee80211_channel_to_frequency(i, IEEE80211_BAND_2GHZ);
2437+ ieee80211_channel_to_frequency(i, NL80211_BAND_2GHZ);
24382438 range->freq[k++].e = 1;
24392439 }
24402440 range->num_frequency = k;
drivers/net/wireless/broadcom/b43/b43.h+2−2
@@ -992,9 +992,9 @@ static inline int b43_is_mode(struct b43_wl *wl, int type) · 991 unmodified lines
992992
993993 /**
994994 * b43_current_band - Returns the currently used band.
995− * Returns one of IEEE80211_BAND_2GHZ and IEEE80211_BAND_5GHZ.
995+ * Returns one of NL80211_BAND_2GHZ and NL80211_BAND_5GHZ.
996996 */
997−static inline enum ieee80211_band b43_current_band(struct b43_wl *wl)
997+static inline enum nl80211_band b43_current_band(struct b43_wl *wl)
998998 {
999999 return wl->hw->conf.chandef.chan->band;
10001000 }
drivers/net/wireless/broadcom/b43/main.c+17−17
@@ -187,7 +187,7 @@ static struct ieee80211_rate __b43_ratetable[] = { · 186 unmodified lines
187187 #define b43_g_ratetable_size 12
188188
189189 #define CHAN2G(_channel, _freq, _flags) { \
190− .band = IEEE80211_BAND_2GHZ, \
190+ .band = NL80211_BAND_2GHZ, \
191191 .center_freq = (_freq), \
192192 .hw_value = (_channel), \
193193 .flags = (_flags), \
@@ -216,7 +216,7 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { · 22 unmodified lines
216216 #undef CHAN2G
217217
218218 #define CHAN4G(_channel, _flags) { \
219− .band = IEEE80211_BAND_5GHZ, \
219+ .band = NL80211_BAND_5GHZ, \
220220 .center_freq = 4000 + (5 * (_channel)), \
221221 .hw_value = (_channel), \
222222 .flags = (_flags), \
@@ -224,7 +224,7 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { · 1 unmodified line
224224 .max_power = 30, \
225225 }
226226 #define CHAN5G(_channel, _flags) { \
227− .band = IEEE80211_BAND_5GHZ, \
227+ .band = NL80211_BAND_5GHZ, \
228228 .center_freq = 5000 + (5 * (_channel)), \
229229 .hw_value = (_channel), \
230230 .flags = (_flags), \
@@ -323,7 +323,7 @@ static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { · 92 unmodified lines
323323 #undef CHAN5G
324324
325325 static struct ieee80211_supported_band b43_band_5GHz_nphy = {
326− .band = IEEE80211_BAND_5GHZ,
326+ .band = NL80211_BAND_5GHZ,
327327 .channels = b43_5ghz_nphy_chantable,
328328 .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable),
329329 .bitrates = b43_a_ratetable,
@@ -331,7 +331,7 @@ static struct ieee80211_supported_band b43_band_5GHz_nphy = { · 1 unmodified line
331331 };
332332
333333 static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = {
334− .band = IEEE80211_BAND_5GHZ,
334+ .band = NL80211_BAND_5GHZ,
335335 .channels = b43_5ghz_nphy_chantable_limited,
336336 .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable_limited),
337337 .bitrates = b43_a_ratetable,
@@ -339,7 +339,7 @@ static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = { · 1 unmodified line
339339 };
340340
341341 static struct ieee80211_supported_band b43_band_5GHz_aphy = {
342− .band = IEEE80211_BAND_5GHZ,
342+ .band = NL80211_BAND_5GHZ,
343343 .channels = b43_5ghz_aphy_chantable,
344344 .n_channels = ARRAY_SIZE(b43_5ghz_aphy_chantable),
345345 .bitrates = b43_a_ratetable,
@@ -347,7 +347,7 @@ static struct ieee80211_supported_band b43_band_5GHz_aphy = { · 1 unmodified line
347347 };
348348
349349 static struct ieee80211_supported_band b43_band_2GHz = {
350− .band = IEEE80211_BAND_2GHZ,
350+ .band = NL80211_BAND_2GHZ,
351351 .channels = b43_2ghz_chantable,
352352 .n_channels = ARRAY_SIZE(b43_2ghz_chantable),
353353 .bitrates = b43_g_ratetable,
@@ -355,7 +355,7 @@ static struct ieee80211_supported_band b43_band_2GHz = { · 1 unmodified line
355355 };
356356
357357 static struct ieee80211_supported_band b43_band_2ghz_limited = {
358− .band = IEEE80211_BAND_2GHZ,
358+ .band = NL80211_BAND_2GHZ,
359359 .channels = b43_2ghz_chantable,
360360 .n_channels = b43_2ghz_chantable_limited_size,
361361 .bitrates = b43_g_ratetable,
@@ -717,7 +717,7 @@ static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) · 355 unmodified lines
717717 {
718718 /* slot_time is in usec. */
719719 /* This test used to exit for all but a G PHY. */
720− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
720+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
721721 return;
722722 b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time);
723723 /* Shared memory location 0x0010 is the slot time and should be
@@ -3880,12 +3880,12 @@ static void b43_op_set_tsf(struct ieee80211_hw *hw, · 3156 unmodified lines
38803880 mutex_unlock(&wl->mutex);
38813881 }
38823882
3883−static const char *band_to_string(enum ieee80211_band band)
3883+static const char *band_to_string(enum nl80211_band band)
38843884 {
38853885 switch (band) {
3886− case IEEE80211_BAND_5GHZ:
3886+ case NL80211_BAND_5GHZ:
38873887 return "5";
3888− case IEEE80211_BAND_2GHZ:
3888+ case NL80211_BAND_2GHZ:
38893889 return "2.4";
38903890 default:
38913891 break;
@@ -3903,10 +3903,10 @@ static int b43_switch_band(struct b43_wldev *dev, · 11 unmodified lines
39033903 u32 tmp;
39043904
39053905 switch (chan->band) {
3906− case IEEE80211_BAND_5GHZ:
3906+ case NL80211_BAND_5GHZ:
39073907 gmode = false;
39083908 break;
3909− case IEEE80211_BAND_2GHZ:
3909+ case NL80211_BAND_2GHZ:
39103910 gmode = true;
39113911 break;
39123912 default:
@@ -5294,16 +5294,16 @@ static int b43_setup_bands(struct b43_wldev *dev, · 1381 unmodified lines
52945294 phy->radio_rev == 9;
52955295
52965296 if (have_2ghz_phy)
5297− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = limited_2g ?
5297+ hw->wiphy->bands[NL80211_BAND_2GHZ] = limited_2g ?
52985298 &b43_band_2ghz_limited : &b43_band_2GHz;
52995299 if (dev->phy.type == B43_PHYTYPE_N) {
53005300 if (have_5ghz_phy)
5301− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = limited_5g ?
5301+ hw->wiphy->bands[NL80211_BAND_5GHZ] = limited_5g ?
53025302 &b43_band_5GHz_nphy_limited :
53035303 &b43_band_5GHz_nphy;
53045304 } else {
53055305 if (have_5ghz_phy)
5306− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &b43_band_5GHz_aphy;
5306+ hw->wiphy->bands[NL80211_BAND_5GHZ] = &b43_band_5GHz_aphy;
53075307 }
53085308
53095309 dev->phy.supports_2ghz = have_2ghz_phy;
drivers/net/wireless/broadcom/b43/phy_ac.c+1−1
@@ -61,7 +61,7 @@ static void b43_phy_ac_op_radio_write(struct b43_wldev *dev, u16 reg, · 60 unmodified lines
6161
6262 static unsigned int b43_phy_ac_op_get_default_chan(struct b43_wldev *dev)
6363 {
64− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
64+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
6565 return 11;
6666 return 36;
6767 }
drivers/net/wireless/broadcom/b43/phy_common.c+1−1
@@ -436,7 +436,7 @@ int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel) · 435 unmodified lines
436436 * firmware from sending ghost packets.
437437 */
438438 channelcookie = new_channel;
439− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
439+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
440440 channelcookie |= B43_SHM_SH_CHAN_5GHZ;
441441 /* FIXME: set 40Mhz flag if required */
442442 if (0)
drivers/net/wireless/broadcom/b43/phy_ht.c+8−8
@@ -568,7 +568,7 @@ static void b43_phy_ht_tx_power_ctl(struct b43_wldev *dev, bool enable) · 567 unmodified lines
568568 } else {
569569 b43_phy_set(dev, B43_PHY_HT_TXPCTL_CMD_C1, en_bits);
570570
571− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
571+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
572572 for (i = 0; i < 3; i++)
573573 b43_phy_write(dev, cmd_regs[i], 0x32);
574574 }
@@ -643,7 +643,7 @@ static void b43_phy_ht_tx_power_ctl_setup(struct b43_wldev *dev) · 68 unmodified lines
643643 u16 freq = dev->phy.chandef->chan->center_freq;
644644 int i, c;
645645
646− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
646+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
647647 for (c = 0; c < 3; c++) {
648648 target[c] = sprom->core_pwr_info[c].maxpwr_2g;
649649 a1[c] = sprom->core_pwr_info[c].pa_2g[0];
@@ -777,7 +777,7 @@ static void b43_phy_ht_channel_setup(struct b43_wldev *dev, · 127 unmodified lines
777777 const struct b43_phy_ht_channeltab_e_phy *e,
778778 struct ieee80211_channel *new_channel)
779779 {
780− if (new_channel->band == IEEE80211_BAND_5GHZ) {
780+ if (new_channel->band == NL80211_BAND_5GHZ) {
781781 /* Switch to 2 GHz for a moment to access B-PHY regs */
782782 b43_phy_mask(dev, B43_PHY_HT_BANDCTL, ~B43_PHY_HT_BANDCTL_5GHZ);
783783
@@ -805,7 +805,7 @@ static void b43_phy_ht_channel_setup(struct b43_wldev *dev, · 21 unmodified lines
805805 } else {
806806 b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_OFDM_EN,
807807 B43_PHY_HT_CLASS_CTL_OFDM_EN);
808− if (new_channel->band == IEEE80211_BAND_2GHZ)
808+ if (new_channel->band == NL80211_BAND_2GHZ)
809809 b43_phy_mask(dev, B43_PHY_HT_TEST, ~0x840);
810810 }
811811
@@ -916,7 +916,7 @@ static int b43_phy_ht_op_init(struct b43_wldev *dev) · 104 unmodified lines
916916 if (0) /* TODO: condition */
917917 ; /* TODO: PHY op on reg 0x217 */
918918
919− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
919+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
920920 b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_CCK_EN, 0);
921921 else
922922 b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_CCK_EN,
@@ -1005,7 +1005,7 @@ static int b43_phy_ht_op_init(struct b43_wldev *dev) · 82 unmodified lines
10051005 b43_phy_ht_classifier(dev, 0, 0);
10061006 b43_phy_ht_read_clip_detection(dev, clip_state);
10071007
1008− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
1008+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
10091009 b43_phy_ht_bphy_init(dev);
10101010
10111011 b43_httab_write_bulk(dev, B43_HTTAB32(0x1a, 0xc0),
@@ -1077,7 +1077,7 @@ static int b43_phy_ht_op_switch_channel(struct b43_wldev *dev, · 65 unmodified lines
10771077 enum nl80211_channel_type channel_type =
10781078 cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef);
10791079
1080− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
1080+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
10811081 if ((new_channel < 1) || (new_channel > 14))
10821082 return -EINVAL;
10831083 } else {
@@ -1089,7 +1089,7 @@ static int b43_phy_ht_op_switch_channel(struct b43_wldev *dev, · 5 unmodified lines
10891089
10901090 static unsigned int b43_phy_ht_op_get_default_chan(struct b43_wldev *dev)
10911091 {
1092− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
1092+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
10931093 return 11;
10941094 return 36;
10951095 }
drivers/net/wireless/broadcom/b43/phy_lcn.c+5−5
@@ -108,7 +108,7 @@ static void b43_radio_2064_channel_setup(struct b43_wldev *dev) · 107 unmodified lines
108108 /* wlc_radio_2064_init */
109109 static void b43_radio_2064_init(struct b43_wldev *dev)
110110 {
111− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
111+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
112112 b43_radio_write(dev, 0x09c, 0x0020);
113113 b43_radio_write(dev, 0x105, 0x0008);
114114 } else {
@@ -535,7 +535,7 @@ static void b43_phy_lcn_tx_pwr_ctl_init(struct b43_wldev *dev) · 420 unmodified lines
535535 b43_mac_suspend(dev);
536536
537537 if (!dev->phy.lcn->hw_pwr_ctl_capable) {
538− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
538+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
539539 tx_gains.gm_gain = 4;
540540 tx_gains.pga_gain = 12;
541541 tx_gains.pad_gain = 12;
@@ -720,7 +720,7 @@ static int b43_phy_lcn_op_init(struct b43_wldev *dev) · 178 unmodified lines
720720 else
721721 B43_WARN_ON(1);
722722
723− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
723+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
724724 b43_phy_lcn_tx_pwr_ctl_init(dev);
725725
726726 b43_switch_channel(dev, dev->phy.channel);
@@ -779,7 +779,7 @@ static int b43_phy_lcn_op_switch_channel(struct b43_wldev *dev, · 52 unmodified lines
779779 enum nl80211_channel_type channel_type =
780780 cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef);
781781
782− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
782+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
783783 if ((new_channel < 1) || (new_channel > 14))
784784 return -EINVAL;
785785 } else {
@@ -791,7 +791,7 @@ static int b43_phy_lcn_op_switch_channel(struct b43_wldev *dev, · 5 unmodified lines
791791
792792 static unsigned int b43_phy_lcn_op_get_default_chan(struct b43_wldev *dev)
793793 {
794− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
794+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
795795 return 1;
796796 return 36;
797797 }
drivers/net/wireless/broadcom/b43/phy_lp.c+15−15
@@ -46,7 +46,7 @@ static inline u16 channel2freq_lp(u8 channel) · 45 unmodified lines
4646
4747 static unsigned int b43_lpphy_op_get_default_chan(struct b43_wldev *dev)
4848 {
49− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
49+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
5050 return 1;
5151 return 36;
5252 }
@@ -91,7 +91,7 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev) · 38 unmodified lines
9191 u32 ofdmpo;
9292 int i;
9393
94− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
94+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
9595 lpphy->tx_isolation_med_band = sprom->tri2g;
9696 lpphy->bx_arch = sprom->bxa2g;
9797 lpphy->rx_pwr_offset = sprom->rxpo2g;
@@ -174,7 +174,7 @@ static void lpphy_adjust_gain_table(struct b43_wldev *dev, u32 freq) · 76 unmodified lines
174174
175175 B43_WARN_ON(dev->phy.rev >= 2);
176176
177− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
177+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
178178 isolation = lpphy->tx_isolation_med_band;
179179 else if (freq <= 5320)
180180 isolation = lpphy->tx_isolation_low_band;
@@ -238,7 +238,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) · 57 unmodified lines
238238 b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB,
239239 0xFF00, lpphy->rx_pwr_offset);
240240 if ((sprom->boardflags_lo & B43_BFL_FEM) &&
241− ((b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ||
241+ ((b43_current_band(dev->wl) == NL80211_BAND_5GHZ) ||
242242 (sprom->boardflags_hi & B43_BFH_PAREF))) {
243243 ssb_pmu_set_ldo_voltage(&bus->chipco, LDO_PAREF, 0x28);
244244 ssb_pmu_set_ldo_paref(&bus->chipco, true);
@@ -280,7 +280,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) · 35 unmodified lines
280280 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_7, 0xC0FF, 0x0900);
281281 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xFFC0, 0x000A);
282282 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xC0FF, 0x0B00);
283− } else if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ ||
283+ } else if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ ||
284284 (dev->dev->board_type == SSB_BOARD_BU4312) ||
285285 (dev->phy.rev == 0 && (sprom->boardflags_lo & B43_BFL_FEM))) {
286286 b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x0001);
@@ -326,7 +326,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) · 39 unmodified lines
326326 //FIXME the Broadcom driver caches & delays this HF write!
327327 b43_hf_write(dev, b43_hf_read(dev) | B43_HF_PR45960W);
328328 }
329− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
329+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
330330 b43_phy_set(dev, B43_LPPHY_LP_PHY_CTL, 0x8000);
331331 b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0040);
332332 b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0x00FF, 0xA400);
@@ -466,7 +466,7 @@ static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev) · 133 unmodified lines
466466 b43_lptab_write(dev, B43_LPTAB16(0x08, 0x12), 0x40);
467467 }
468468
469− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
469+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
470470 b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x40);
471471 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xF0FF, 0xB00);
472472 b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x6);
@@ -547,7 +547,7 @@ static void lpphy_2062_init(struct b43_wldev *dev) · 74 unmodified lines
547547 b43_radio_write(dev, B2062_S_BG_CTL1,
548548 (b43_radio_read(dev, B2062_N_COMM2) >> 1) | 0x80);
549549 }
550− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
550+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
551551 b43_radio_set(dev, B2062_N_TSSI_CTL0, 0x1);
552552 else
553553 b43_radio_mask(dev, B2062_N_TSSI_CTL0, ~0x1);
@@ -746,7 +746,7 @@ static void lpphy_clear_deaf(struct b43_wldev *dev, bool user) · 192 unmodified lines
746746 lpphy->crs_sys_disable = false;
747747
748748 if (!lpphy->crs_usr_disable && !lpphy->crs_sys_disable) {
749− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
749+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
750750 b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL,
751751 0xFF1F, 0x60);
752752 else
@@ -807,7 +807,7 @@ static void lpphy_disable_rx_gain_override(struct b43_wldev *dev) · 54 unmodified lines
807807 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF);
808808 if (dev->phy.rev >= 2) {
809809 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF);
810− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
810+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
811811 b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF);
812812 b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7);
813813 }
@@ -823,7 +823,7 @@ static void lpphy_enable_rx_gain_override(struct b43_wldev *dev) · 9 unmodified lines
823823 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40);
824824 if (dev->phy.rev >= 2) {
825825 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100);
826− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
826+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
827827 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400);
828828 b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8);
829829 }
@@ -951,7 +951,7 @@ static void lpphy_rev2plus_set_rx_gain(struct b43_wldev *dev, u32 gain) · 121 unmodified lines
951951 0xFBFF, ext_lna << 10);
952952 b43_phy_write(dev, B43_LPPHY_RX_GAIN_CTL_OVERRIDE_VAL, low_gain);
953953 b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS, 0xFFF0, high_gain);
954− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
954+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
955955 tmp = (gain >> 2) & 0x3;
956956 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2_VAL,
957957 0xE7FF, tmp<<11);
@@ -1344,7 +1344,7 @@ static void lpphy_calibrate_rc(struct b43_wldev *dev) · 386 unmodified lines
13441344 if (dev->phy.rev >= 2) {
13451345 lpphy_rev2plus_rc_calib(dev);
13461346 } else if (!lpphy->rc_cap) {
1347− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
1347+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
13481348 lpphy_rev0_1_rc_calib(dev);
13491349 } else {
13501350 lpphy_set_rc_cap(dev);
@@ -1548,7 +1548,7 @@ static void lpphy_tx_pctl_init_sw(struct b43_wldev *dev) · 197 unmodified lines
15481548 {
15491549 struct lpphy_tx_gains gains;
15501550
1551− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
1551+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
15521552 gains.gm = 4;
15531553 gains.pad = 12;
15541554 gains.pga = 12;
@@ -1902,7 +1902,7 @@ static int lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx, · 347 unmodified lines
19021902
19031903 lpphy_set_trsw_over(dev, tx, rx);
19041904
1905− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
1905+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
19061906 b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8);
19071907 b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0,
19081908 0xFFF7, pa << 3);
drivers/net/wireless/broadcom/b43/phy_n.c+88−88
@@ -105,9 +105,9 @@ enum n_rail_type { · 104 unmodified lines
105105
106106 static inline bool b43_nphy_ipa(struct b43_wldev *dev)
107107 {
108− enum ieee80211_band band = b43_current_band(dev->wl);
109− return ((dev->phy.n->ipa2g_on && band == IEEE80211_BAND_2GHZ) ||
110− (dev->phy.n->ipa5g_on && band == IEEE80211_BAND_5GHZ));
108+ enum nl80211_band band = b43_current_band(dev->wl);
109+ return ((dev->phy.n->ipa2g_on && band == NL80211_BAND_2GHZ) ||
110+ (dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ));
111111 }
112112
113113 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreGetState */
@@ -357,7 +357,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, · 243 unmodified lines
357357 break;
358358 case N_INTC_OVERRIDE_PA:
359359 tmp = 0x0030;
360− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
360+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
361361 val = value << 5;
362362 else
363363 val = value << 4;
@@ -365,7 +365,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, · 1 unmodified line
365365 b43_phy_set(dev, reg, 0x1000);
366366 break;
367367 case N_INTC_OVERRIDE_EXT_LNA_PU:
368− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
368+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
369369 tmp = 0x0001;
370370 tmp2 = 0x0004;
371371 val = value;
@@ -378,7 +378,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, · 6 unmodified lines
378378 b43_phy_mask(dev, reg, ~tmp2);
379379 break;
380380 case N_INTC_OVERRIDE_EXT_LNA_GAIN:
381− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
381+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
382382 tmp = 0x0002;
383383 tmp2 = 0x0008;
384384 val = value << 1;
@@ -465,7 +465,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, · 80 unmodified lines
465465 }
466466 break;
467467 case N_INTC_OVERRIDE_PA:
468− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
468+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
469469 tmp = 0x0020;
470470 val = value << 5;
471471 } else {
@@ -475,7 +475,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, · 3 unmodified lines
475475 b43_phy_maskset(dev, reg, ~tmp, val);
476476 break;
477477 case N_INTC_OVERRIDE_EXT_LNA_PU:
478− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
478+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
479479 tmp = 0x0001;
480480 val = value;
481481 } else {
@@ -485,7 +485,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, · 3 unmodified lines
485485 b43_phy_maskset(dev, reg, ~tmp, val);
486486 break;
487487 case N_INTC_OVERRIDE_EXT_LNA_GAIN:
488− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
488+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
489489 tmp = 0x0002;
490490 val = value << 1;
491491 } else {
@@ -600,7 +600,7 @@ static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev) · 108 unmodified lines
600600 b43_nphy_stay_in_carrier_search(dev, 1);
601601
602602 if (nphy->gain_boost) {
603− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
603+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
604604 gain[0] = 6;
605605 gain[1] = 6;
606606 } else {
@@ -736,7 +736,7 @@ static void b43_radio_2057_setup(struct b43_wldev *dev, · 129 unmodified lines
736736 switch (phy->radio_rev) {
737737 case 0 ... 4:
738738 case 6:
739− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
739+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
740740 b43_radio_write(dev, R2057_RFPLL_LOOPFILTER_R1, 0x3f);
741741 b43_radio_write(dev, R2057_CP_KPD_IDAC, 0x3f);
742742 b43_radio_write(dev, R2057_RFPLL_LOOPFILTER_C1, 0x8);
@@ -751,7 +751,7 @@ static void b43_radio_2057_setup(struct b43_wldev *dev, · 8 unmodified lines
751751 case 9: /* e.g. PHY rev 16 */
752752 b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x20);
753753 b43_radio_write(dev, R2057_VCOBUF_IDACS, 0x18);
754− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
754+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
755755 b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x38);
756756 b43_radio_write(dev, R2057_VCOBUF_IDACS, 0x0f);
757757
@@ -775,7 +775,7 @@ static void b43_radio_2057_setup(struct b43_wldev *dev, · 17 unmodified lines
775775 break;
776776 }
777777
778− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
778+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
779779 u16 txmix2g_tune_boost_pu = 0;
780780 u16 pad2g_tune_pus = 0;
781781
@@ -1135,7 +1135,7 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, · 353 unmodified lines
11351135 {
11361136 struct b43_phy *phy = &dev->phy;
11371137 struct ssb_sprom *sprom = dev->dev->bus_sprom;
1138− enum ieee80211_band band = b43_current_band(dev->wl);
1138+ enum nl80211_band band = b43_current_band(dev->wl);
11391139 u16 offset;
11401140 u8 i;
11411141 u16 bias, cbias;
@@ -1152,10 +1152,10 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, · 10 unmodified lines
11521152 dev->dev->chip_pkg == BCMA_PKG_ID_BCM43224_FAB_SMIC);
11531153
11541154 b43_chantab_radio_2056_upload(dev, e);
1155− b2056_upload_syn_pll_cp2(dev, band == IEEE80211_BAND_5GHZ);
1155+ b2056_upload_syn_pll_cp2(dev, band == NL80211_BAND_5GHZ);
11561156
11571157 if (sprom->boardflags2_lo & B43_BFL2_GPLL_WAR &&
1158− b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
1158+ b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
11591159 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F);
11601160 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F);
11611161 if (dev->dev->chip_id == BCMA_CHIP_ID_BCM4716 ||
@@ -1168,21 +1168,21 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, · 6 unmodified lines
11681168 }
11691169 }
11701170 if (sprom->boardflags2_hi & B43_BFH2_GPLL_WAR2 &&
1171− b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
1171+ b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
11721172 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1f);
11731173 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1f);
11741174 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x0b);
11751175 b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x20);
11761176 }
11771177 if (sprom->boardflags2_lo & B43_BFL2_APLL_WAR &&
1178− b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
1178+ b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
11791179 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F);
11801180 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F);
11811181 b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x05);
11821182 b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x0C);
11831183 }
11841184
1185− if (dev->phy.n->ipa2g_on && band == IEEE80211_BAND_2GHZ) {
1185+ if (dev->phy.n->ipa2g_on && band == NL80211_BAND_2GHZ) {
11861186 for (i = 0; i < 2; i++) {
11871187 offset = i ? B2056_TX1 : B2056_TX0;
11881188 if (dev->phy.rev >= 5) {
@@ -1244,7 +1244,7 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, · 55 unmodified lines
12441244 }
12451245 b43_radio_write(dev, offset | B2056_TX_PA_SPARE1, 0xee);
12461246 }
1247− } else if (dev->phy.n->ipa5g_on && band == IEEE80211_BAND_5GHZ) {
1247+ } else if (dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ) {
12481248 u16 freq = phy->chandef->chan->center_freq;
12491249 if (freq < 5100) {
12501250 paa_boost = 0xA;
@@ -1501,7 +1501,7 @@ static void b43_radio_init2055(struct b43_wldev *dev) · 250 unmodified lines
15011501 /* Follow wl, not specs. Do not force uploading all regs */
15021502 b2055_upload_inittab(dev, 0, 0);
15031503 } else {
1504− bool ghz5 = b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ;
1504+ bool ghz5 = b43_current_band(dev->wl) == NL80211_BAND_5GHZ;
15051505 b2055_upload_inittab(dev, ghz5, 0);
15061506 }
15071507 b43_radio_init2055_post(dev);
@@ -1785,7 +1785,7 @@ static void b43_nphy_rev3_rssi_select(struct b43_wldev *dev, u8 code, · 277 unmodified lines
17851785 b43_phy_maskset(dev, reg, 0xFFC3, 0);
17861786
17871787 if (rssi_type == N_RSSI_W1)
1788− val = (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ? 4 : 8;
1788+ val = (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) ? 4 : 8;
17891789 else if (rssi_type == N_RSSI_W2)
17901790 val = 16;
17911791 else
@@ -1813,12 +1813,12 @@ static void b43_nphy_rev3_rssi_select(struct b43_wldev *dev, u8 code, · 21 unmodified lines
18131813
18141814 if (rssi_type != N_RSSI_IQ &&
18151815 rssi_type != N_RSSI_TBD) {
1816− enum ieee80211_band band =
1816+ enum nl80211_band band =
18171817 b43_current_band(dev->wl);
18181818
18191819 if (dev->phy.rev < 7) {
18201820 if (b43_nphy_ipa(dev))
1821− val = (band == IEEE80211_BAND_5GHZ) ? 0xC : 0xE;
1821+ val = (band == NL80211_BAND_5GHZ) ? 0xC : 0xE;
18221822 else
18231823 val = 0x11;
18241824 reg = (i == 0) ? B2056_TX0 : B2056_TX1;
@@ -2120,7 +2120,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) · 295 unmodified lines
21202120 1, 0, false);
21212121 b43_nphy_rf_ctl_override_rev7(dev, 0x80, 1, 0, false, 0);
21222122 b43_nphy_rf_ctl_override_rev7(dev, 0x40, 1, 0, false, 0);
2123− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
2123+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
21242124 b43_nphy_rf_ctl_override_rev7(dev, 0x20, 0, 0, false,
21252125 0);
21262126 b43_nphy_rf_ctl_override_rev7(dev, 0x10, 1, 0, false,
@@ -2136,7 +2136,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) · 9 unmodified lines
21362136 b43_nphy_rf_ctl_override(dev, 0x2, 1, 0, false);
21372137 b43_nphy_rf_ctl_override(dev, 0x80, 1, 0, false);
21382138 b43_nphy_rf_ctl_override(dev, 0x40, 1, 0, false);
2139− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
2139+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
21402140 b43_nphy_rf_ctl_override(dev, 0x20, 0, 0, false);
21412141 b43_nphy_rf_ctl_override(dev, 0x10, 1, 0, false);
21422142 } else {
@@ -2257,7 +2257,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) · 114 unmodified lines
22572257 b43_phy_write(dev, regs_to_store[i], saved_regs_phy[i]);
22582258
22592259 /* Store for future configuration */
2260− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
2260+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
22612261 rssical_radio_regs = nphy->rssical_cache.rssical_radio_regs_2G;
22622262 rssical_phy_regs = nphy->rssical_cache.rssical_phy_regs_2G;
22632263 } else {
@@ -2289,7 +2289,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) · 25 unmodified lines
22892289 rssical_phy_regs[11] = b43_phy_read(dev, B43_NPHY_RSSIMC_1Q_RSSI_Y);
22902290
22912291 /* Remember for which channel we store configuration */
2292− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2292+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
22932293 nphy->rssical_chanspec_2G.center_freq = phy->chandef->chan->center_freq;
22942294 else
22952295 nphy->rssical_chanspec_5G.center_freq = phy->chandef->chan->center_freq;
@@ -2336,7 +2336,7 @@ static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, enum n_rssi_type type) · 40 unmodified lines
23362336 b43_nphy_read_clip_detection(dev, clip_state);
23372337 b43_nphy_write_clip_detection(dev, clip_off);
23382338
2339− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
2339+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
23402340 override = 0x140;
23412341 else
23422342 override = 0x110;
@@ -2629,7 +2629,7 @@ static void b43_nphy_gain_ctl_workarounds_rev1_2(struct b43_wldev *dev) · 286 unmodified lines
26292629 b43_phy_write(dev, B43_NPHY_CCK_SHIFTB_REF, 0x809C);
26302630
26312631 if (nphy->gain_boost) {
2632− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ &&
2632+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ &&
26332633 b43_is_40mhz(dev))
26342634 code = 4;
26352635 else
@@ -2688,7 +2688,7 @@ static void b43_nphy_gain_ctl_workarounds_rev1_2(struct b43_wldev *dev) · 52 unmodified lines
26882688 ~B43_NPHY_OVER_DGAIN_CCKDGECV & 0xFFFF,
26892689 0x5A << B43_NPHY_OVER_DGAIN_CCKDGECV_SHIFT);
26902690
2691− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2691+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
26922692 b43_phy_maskset(dev, B43_PHY_N(0xC5D), 0xFF80, 4);
26932693 }
26942694
@@ -2803,7 +2803,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 108 unmodified lines
28032803 scap_val = b43_radio_read(dev, R2057_RCCAL_SCAP_VAL);
28042804
28052805 if (b43_nphy_ipa(dev)) {
2806− bool ghz2 = b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ;
2806+ bool ghz2 = b43_current_band(dev->wl) == NL80211_BAND_2GHZ;
28072807
28082808 switch (phy->radio_rev) {
28092809 case 5:
@@ -2831,7 +2831,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 21 unmodified lines
28312831 bcap_val_11b[core] = bcap_val;
28322832 lpf_ofdm_20mhz[core] = 4;
28332833 lpf_11b[core] = 1;
2834− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
2834+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
28352835 scap_val_11n_20[core] = 0xc;
28362836 bcap_val_11n_20[core] = 0xc;
28372837 scap_val_11n_40[core] = 0xa;
@@ -2982,7 +2982,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 144 unmodified lines
29822982 conv = 0x7f;
29832983 filt = 0xee;
29842984 }
2985− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
2985+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
29862986 for (core = 0; core < 2; core++) {
29872987 if (core == 0) {
29882988 b43_radio_write(dev, 0x5F, bias);
@@ -2998,7 +2998,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 9 unmodified lines
29982998 }
29992999
30003000 if (b43_nphy_ipa(dev)) {
3001− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
3001+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
30023002 if (phy->radio_rev == 3 || phy->radio_rev == 4 ||
30033003 phy->radio_rev == 6) {
30043004 for (core = 0; core < 2; core++) {
@@ -3221,7 +3221,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 216 unmodified lines
32213221 ARRAY_SIZE(rx2tx_events));
32223222 }
32233223
3224− tmp16 = (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) ?
3224+ tmp16 = (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) ?
32253225 0x2 : 0x9C40;
32263226 b43_phy_write(dev, B43_NPHY_ENDROP_TLEN, tmp16);
32273227
@@ -3240,7 +3240,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 12 unmodified lines
32403240 b43_ntab_write(dev, B43_NTAB16(8, 0), 2);
32413241 b43_ntab_write(dev, B43_NTAB16(8, 16), 2);
32423242
3243− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
3243+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
32443244 pdet_range = sprom->fem.ghz2.pdet_range;
32453245 else
32463246 pdet_range = sprom->fem.ghz5.pdet_range;
@@ -3249,7 +3249,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 2 unmodified lines
32493249 switch (pdet_range) {
32503250 case 3:
32513251 if (!(dev->phy.rev >= 4 &&
3252− b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ))
3252+ b43_current_band(dev->wl) == NL80211_BAND_2GHZ))
32533253 break;
32543254 /* FALL THROUGH */
32553255 case 0:
@@ -3261,7 +3261,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 5 unmodified lines
32613261 break;
32623262 case 2:
32633263 if (dev->phy.rev >= 6) {
3264− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
3264+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
32653265 vmid[3] = 0x94;
32663266 else
32673267 vmid[3] = 0x8e;
@@ -3277,7 +3277,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 9 unmodified lines
32773277 break;
32783278 case 4:
32793279 case 5:
3280− if (b43_current_band(dev->wl) != IEEE80211_BAND_2GHZ) {
3280+ if (b43_current_band(dev->wl) != NL80211_BAND_2GHZ) {
32813281 if (pdet_range == 4) {
32823282 vmid[3] = 0x8e;
32833283 tmp16 = 0x96;
@@ -3322,9 +3322,9 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 38 unmodified lines
33223322 /* N PHY WAR TX Chain Update with hw_phytxchain as argument */
33233323
33243324 if ((sprom->boardflags2_lo & B43_BFL2_APLL_WAR &&
3325− b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ||
3325+ b43_current_band(dev->wl) == NL80211_BAND_5GHZ) ||
33263326 (sprom->boardflags2_lo & B43_BFL2_GPLL_WAR &&
3327− b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ))
3327+ b43_current_band(dev->wl) == NL80211_BAND_2GHZ))
33283328 tmp32 = 0x00088888;
33293329 else
33303330 tmp32 = 0x88888888;
@@ -3333,7 +3333,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 2 unmodified lines
33333333 b43_ntab_write(dev, B43_NTAB32(30, 3), tmp32);
33343334
33353335 if (dev->phy.rev == 4 &&
3336− b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
3336+ b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
33373337 b43_radio_write(dev, B2056_TX0 | B2056_TX_GMBB_IDAC,
33383338 0x70);
33393339 b43_radio_write(dev, B2056_TX1 | B2056_TX_GMBB_IDAC,
@@ -3376,7 +3376,7 @@ static void b43_nphy_workarounds_rev1_2(struct b43_wldev *dev) · 36 unmodified lines
33763376 delays1[5] = 0x14;
33773377 }
33783378
3379− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ &&
3379+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ &&
33803380 nphy->band5g_pwrgain) {
33813381 b43_radio_mask(dev, B2055_C1_TX_RF_SPARE, ~0x8);
33823382 b43_radio_mask(dev, B2055_C2_TX_RF_SPARE, ~0x8);
@@ -3451,7 +3451,7 @@ static void b43_nphy_workarounds(struct b43_wldev *dev) · 68 unmodified lines
34513451 struct b43_phy *phy = &dev->phy;
34523452 struct b43_phy_n *nphy = phy->n;
34533453
3454− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
3454+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
34553455 b43_nphy_classifier(dev, 1, 0);
34563456 else
34573457 b43_nphy_classifier(dev, 1, 1);
@@ -3586,7 +3586,7 @@ static void b43_nphy_iq_cal_gain_params(struct b43_wldev *dev, u16 core, · 128 unmodified lines
35863586 gain = (target.pad[core]) | (target.pga[core] << 4) |
35873587 (target.txgm[core] << 8);
35883588
3589− indx = (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ?
3589+ indx = (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) ?
35903590 1 : 0;
35913591 for (i = 0; i < 9; i++)
35923592 if (tbl_iqcal_gainparams[indx][i][0] == gain)
@@ -3614,7 +3614,7 @@ static void b43_nphy_tx_power_ctrl(struct b43_wldev *dev, bool enable) · 21 unmodified lines
36143614 struct b43_phy_n *nphy = dev->phy.n;
36153615 u8 i;
36163616 u16 bmask, val, tmp;
3617− enum ieee80211_band band = b43_current_band(dev->wl);
3617+ enum nl80211_band band = b43_current_band(dev->wl);
36183618
36193619 if (nphy->hang_avoid)
36203620 b43_nphy_stay_in_carrier_search(dev, 1);
@@ -3679,7 +3679,7 @@ static void b43_nphy_tx_power_ctrl(struct b43_wldev *dev, bool enable) · 58 unmodified lines
36793679 }
36803680 b43_phy_maskset(dev, B43_NPHY_TXPCTL_CMD, ~(bmask), val);
36813681
3682− if (band == IEEE80211_BAND_5GHZ) {
3682+ if (band == NL80211_BAND_5GHZ) {
36833683 if (phy->rev >= 19) {
36843684 /* TODO */
36853685 } else if (phy->rev >= 7) {
@@ -3770,7 +3770,7 @@ static void b43_nphy_tx_power_fix(struct b43_wldev *dev) · 84 unmodified lines
37703770 txpi[0] = 72;
37713771 txpi[1] = 72;
37723772 } else {
3773− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
3773+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
37743774 txpi[0] = sprom->txpid2g[0];
37753775 txpi[1] = sprom->txpid2g[1];
37763776 } else if (freq >= 4900 && freq < 5100) {
@@ -3868,7 +3868,7 @@ static void b43_nphy_ipa_internal_tssi_setup(struct b43_wldev *dev) · 91 unmodified lines
38683868 } else if (phy->rev >= 7) {
38693869 for (core = 0; core < 2; core++) {
38703870 r = core ? 0x190 : 0x170;
3871− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
3871+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
38723872 b43_radio_write(dev, r + 0x5, 0x5);
38733873 b43_radio_write(dev, r + 0x9, 0xE);
38743874 if (phy->rev != 5)
@@ -3892,7 +3892,7 @@ static void b43_nphy_ipa_internal_tssi_setup(struct b43_wldev *dev) · 17 unmodified lines
38923892 b43_radio_write(dev, r + 0xC, 0);
38933893 }
38943894 } else {
3895− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
3895+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
38963896 b43_radio_write(dev, B2056_SYN_RESERVED_ADDR31, 0x128);
38973897 else
38983898 b43_radio_write(dev, B2056_SYN_RESERVED_ADDR31, 0x80);
@@ -3909,7 +3909,7 @@ static void b43_nphy_ipa_internal_tssi_setup(struct b43_wldev *dev) · 10 unmodified lines
39093909 b43_radio_write(dev, r | B2056_TX_TSSI_MISC1, 8);
39103910 b43_radio_write(dev, r | B2056_TX_TSSI_MISC2, 0);
39113911 b43_radio_write(dev, r | B2056_TX_TSSI_MISC3, 0);
3912− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
3912+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
39133913 b43_radio_write(dev, r | B2056_TX_TX_SSI_MASTER,
39143914 0x5);
39153915 if (phy->rev != 5)
@@ -4098,7 +4098,7 @@ static void b43_nphy_tx_power_ctl_setup(struct b43_wldev *dev) · 182 unmodified lines
40984098 b0[0] = b0[1] = 5612;
40994099 b1[0] = b1[1] = -1393;
41004100 } else {
4101− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
4101+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
41024102 for (c = 0; c < 2; c++) {
41034103 idle[c] = nphy->pwr_ctl_info[c].idle_tssi_2g;
41044104 target[c] = sprom->core_pwr_info[c].maxpwr_2g;
@@ -4153,11 +4153,11 @@ static void b43_nphy_tx_power_ctl_setup(struct b43_wldev *dev) · 48 unmodified lines
41534153 for (c = 0; c < 2; c++) {
41544154 r = c ? 0x190 : 0x170;
41554155 if (b43_nphy_ipa(dev))
4156− b43_radio_write(dev, r + 0x9, (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) ? 0xE : 0xC);
4156+ b43_radio_write(dev, r + 0x9, (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) ? 0xE : 0xC);
41574157 }
41584158 } else {
41594159 if (b43_nphy_ipa(dev)) {
4160− tmp = (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ? 0xC : 0xE;
4160+ tmp = (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) ? 0xC : 0xE;
41614161 b43_radio_write(dev,
41624162 B2056_TX0 | B2056_TX_TX_SSI_MUX, tmp);
41634163 b43_radio_write(dev,
@@ -4267,13 +4267,13 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) · 103 unmodified lines
42674267 } else if (phy->rev >= 7) {
42684268 pga_gain = (table[i] >> 24) & 0xf;
42694269 pad_gain = (table[i] >> 19) & 0x1f;
4270− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
4270+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
42714271 rfpwr_offset = rf_pwr_offset_table[pad_gain];
42724272 else
42734273 rfpwr_offset = rf_pwr_offset_table[pga_gain];
42744274 } else {
42754275 pga_gain = (table[i] >> 24) & 0xF;
4276− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
4276+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
42774277 rfpwr_offset = b43_ntab_papd_pga_gain_delta_ipa_2g[pga_gain];
42784278 else
42794279 rfpwr_offset = 0; /* FIXME */
@@ -4288,7 +4288,7 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) · 8 unmodified lines
42884288 static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable)
42894289 {
42904290 struct b43_phy_n *nphy = dev->phy.n;
4291− enum ieee80211_band band;
4291+ enum nl80211_band band;
42924292 u16 tmp;
42934293
42944294 if (!enable) {
@@ -4300,12 +4300,12 @@ static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable) · 5 unmodified lines
43004300 if (dev->phy.rev >= 7) {
43014301 tmp = 0x1480;
43024302 } else if (dev->phy.rev >= 3) {
4303− if (band == IEEE80211_BAND_5GHZ)
4303+ if (band == NL80211_BAND_5GHZ)
43044304 tmp = 0x600;
43054305 else
43064306 tmp = 0x480;
43074307 } else {
4308− if (band == IEEE80211_BAND_5GHZ)
4308+ if (band == NL80211_BAND_5GHZ)
43094309 tmp = 0x180;
43104310 else
43114311 tmp = 0x120;
@@ -4734,7 +4734,7 @@ static void b43_nphy_restore_rssi_cal(struct b43_wldev *dev) · 422 unmodified lines
47344734 u16 *rssical_radio_regs = NULL;
47354735 u16 *rssical_phy_regs = NULL;
47364736
4737− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
4737+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
47384738 if (!nphy->rssical_chanspec_2G.center_freq)
47394739 return;
47404740 rssical_radio_regs = nphy->rssical_cache.rssical_radio_regs_2G;
@@ -4804,7 +4804,7 @@ static void b43_nphy_tx_cal_radio_setup_rev7(struct b43_wldev *dev) · 63 unmodified lines
48044804 save[off + 7] = b43_radio_read(dev, r + R2057_TX0_TSSIG);
48054805 save[off + 8] = b43_radio_read(dev, r + R2057_TX0_TSSI_MISC1);
48064806
4807− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
4807+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
48084808 b43_radio_write(dev, r + R2057_TX0_TX_SSI_MASTER, 0xA);
48094809 b43_radio_write(dev, r + R2057_TX0_IQCAL_VCM_HG, 0x43);
48104810 b43_radio_write(dev, r + R2057_TX0_IQCAL_IDAC, 0x55);
@@ -4864,7 +4864,7 @@ static void b43_nphy_tx_cal_radio_setup(struct b43_wldev *dev) · 53 unmodified lines
48644864 save[offset + 9] = b43_radio_read(dev, B2055_XOMISC);
48654865 save[offset + 10] = b43_radio_read(dev, B2055_PLL_LFC1);
48664866
4867− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
4867+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
48684868 b43_radio_write(dev, tmp | B2055_CAL_RVARCTL, 0x0A);
48694869 b43_radio_write(dev, tmp | B2055_CAL_LPOCTL, 0x40);
48704870 b43_radio_write(dev, tmp | B2055_CAL_TS, 0x55);
@@ -5005,7 +5005,7 @@ static void b43_nphy_int_pa_set_tx_dig_filters(struct b43_wldev *dev) · 134 unmodified lines
50055005 b43_nphy_pa_set_tx_dig_filter(dev, 0x186,
50065006 tbl_tx_filter_coef_rev4[3]);
50075007 } else {
5008− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
5008+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
50095009 b43_nphy_pa_set_tx_dig_filter(dev, 0x186,
50105010 tbl_tx_filter_coef_rev4[5]);
50115011 if (dev->phy.channel == 14)
@@ -5185,7 +5185,7 @@ static void b43_nphy_tx_cal_phy_setup(struct b43_wldev *dev) · 173 unmodified lines
51855185 false, 0);
51865186 } else if (phy->rev == 7) {
51875187 b43_radio_maskset(dev, R2057_OVR_REG0, 1 << 4, 1 << 4);
5188− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
5188+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
51895189 b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE0, ~1, 0);
51905190 b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE1, ~1, 0);
51915191 } else {
@@ -5210,7 +5210,7 @@ static void b43_nphy_tx_cal_phy_setup(struct b43_wldev *dev) · 18 unmodified lines
52105210 b43_ntab_write(dev, B43_NTAB16(8, 18), tmp);
52115211 regs[5] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC1);
52125212 regs[6] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC2);
5213− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
5213+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
52145214 tmp = 0x0180;
52155215 else
52165216 tmp = 0x0120;
@@ -5233,7 +5233,7 @@ static void b43_nphy_save_cal(struct b43_wldev *dev) · 16 unmodified lines
52335233 if (nphy->hang_avoid)
52345234 b43_nphy_stay_in_carrier_search(dev, 1);
52355235
5236− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
5236+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
52375237 rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G;
52385238 txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G;
52395239 iqcal_chanspec = &nphy->iqcal_chanspec_2G;
@@ -5304,7 +5304,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev) · 64 unmodified lines
53045304 u16 *txcal_radio_regs = NULL;
53055305 struct b43_phy_n_iq_comp *rxcal_coeffs = NULL;
53065306
5307− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
5307+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
53085308 if (!nphy->iqcal_chanspec_2G.center_freq)
53095309 return;
53105310 table = nphy->cal_cache.txcal_coeffs_2G;
@@ -5332,7 +5332,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev) · 21 unmodified lines
53325332 if (dev->phy.rev < 2)
53335333 b43_nphy_tx_iq_workaround(dev);
53345334
5335− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
5335+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
53365336 txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G;
53375337 rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G;
53385338 } else {
@@ -5422,7 +5422,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev, · 83 unmodified lines
54225422
54235423 phy6or5x = dev->phy.rev >= 6 ||
54245424 (dev->phy.rev == 5 && nphy->ipa2g_on &&
5425− b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ);
5425+ b43_current_band(dev->wl) == NL80211_BAND_2GHZ);
54265426 if (phy6or5x) {
54275427 if (b43_is_40mhz(dev)) {
54285428 b43_ntab_write_bulk(dev, B43_NTAB16(15, 0), 18,
@@ -5657,7 +5657,7 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev, · 228 unmodified lines
56575657 u16 tmp[6];
56585658 u16 uninitialized_var(cur_hpf1), uninitialized_var(cur_hpf2), cur_lna;
56595659 u32 real, imag;
5660− enum ieee80211_band band;
5660+ enum nl80211_band band;
56615661
56625662 u8 use;
56635663 u16 cur_hpf;
@@ -5712,18 +5712,18 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev, · 48 unmodified lines
57125712 band = b43_current_band(dev->wl);
57135713
57145714 if (nphy->rxcalparams & 0xFF000000) {
5715− if (band == IEEE80211_BAND_5GHZ)
5715+ if (band == NL80211_BAND_5GHZ)
57165716 b43_phy_write(dev, rfctl[0], 0x140);
57175717 else
57185718 b43_phy_write(dev, rfctl[0], 0x110);
57195719 } else {
5720− if (band == IEEE80211_BAND_5GHZ)
5720+ if (band == NL80211_BAND_5GHZ)
57215721 b43_phy_write(dev, rfctl[0], 0x180);
57225722 else
57235723 b43_phy_write(dev, rfctl[0], 0x120);
57245724 }
57255725
5726− if (band == IEEE80211_BAND_5GHZ)
5726+ if (band == NL80211_BAND_5GHZ)
57275727 b43_phy_write(dev, rfctl[1], 0x148);
57285728 else
57295729 b43_phy_write(dev, rfctl[1], 0x114);
@@ -5919,7 +5919,7 @@ static enum b43_txpwr_result b43_nphy_op_recalc_txpower(struct b43_wldev *dev, · 189 unmodified lines
59195919 #if 0
59205920 /* Some extra gains */
59215921 hw_gain = 6; /* N-PHY specific */
5922− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
5922+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
59235923 hw_gain += sprom->antenna_gain.a0;
59245924 else
59255925 hw_gain += sprom->antenna_gain.a1;
@@ -6043,7 +6043,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 117 unmodified lines
60436043 u8 tx_pwr_state;
60446044 struct nphy_txgains target;
60456045 u16 tmp;
6046− enum ieee80211_band tmp2;
6046+ enum nl80211_band tmp2;
60476047 bool do_rssi_cal;
60486048
60496049 u16 clip[2];
@@ -6051,7 +6051,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 1 unmodified line
60516051
60526052 if ((dev->phy.rev >= 3) &&
60536053 (sprom->boardflags_lo & B43_BFL_EXTLNA) &&
6054− (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)) {
6054+ (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)) {
60556055 switch (dev->dev->bus_type) {
60566056 #ifdef CONFIG_B43_BCMA
60576057 case B43_BUS_BCMA:
@@ -6170,7 +6170,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 112 unmodified lines
61706170
61716171 b43_nphy_classifier(dev, 0, 0);
61726172 b43_nphy_read_clip_detection(dev, clip);
6173− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
6173+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
61746174 b43_nphy_bphy_init(dev);
61756175
61766176 tx_pwr_state = nphy->txpwrctrl;
@@ -6187,7 +6187,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 10 unmodified lines
61876187
61886188 do_rssi_cal = false;
61896189 if (phy->rev >= 3) {
6190− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
6190+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
61916191 do_rssi_cal = !nphy->rssical_chanspec_2G.center_freq;
61926192 else
61936193 do_rssi_cal = !nphy->rssical_chanspec_5G.center_freq;
@@ -6201,7 +6201,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 7 unmodified lines
62016201 }
62026202
62036203 if (!((nphy->measure_hold & 0x6) != 0)) {
6204− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
6204+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
62056205 do_cal = !nphy->iqcal_chanspec_2G.center_freq;
62066206 else
62076207 do_cal = !nphy->iqcal_chanspec_5G.center_freq;
@@ -6291,7 +6291,7 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev, · 83 unmodified lines
62916291 int ch = new_channel->hw_value;
62926292 u16 tmp16;
62936293
6294− if (new_channel->band == IEEE80211_BAND_5GHZ) {
6294+ if (new_channel->band == NL80211_BAND_5GHZ) {
62956295 /* Switch to 2 GHz for a moment to access B43_PHY_B_BBCFG */
62966296 b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ);
62976297
@@ -6302,7 +6302,7 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev, · 4 unmodified lines
63026302 B43_PHY_B_BBCFG_RSTCCA | B43_PHY_B_BBCFG_RSTRX);
63036303 b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16);
63046304 b43_phy_set(dev, B43_NPHY_BANDCTL, B43_NPHY_BANDCTL_5GHZ);
6305− } else if (new_channel->band == IEEE80211_BAND_2GHZ) {
6305+ } else if (new_channel->band == NL80211_BAND_2GHZ) {
63066306 b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ);
63076307 tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR);
63086308 b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4);
@@ -6319,7 +6319,7 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev, · 10 unmodified lines
63196319 b43_phy_set(dev, B43_PHY_B_TEST, 0x0800);
63206320 } else {
63216321 b43_nphy_classifier(dev, 2, 2);
6322− if (new_channel->band == IEEE80211_BAND_2GHZ)
6322+ if (new_channel->band == NL80211_BAND_2GHZ)
63236323 b43_phy_mask(dev, B43_PHY_B_TEST, ~0x840);
63246324 }
63256325
@@ -6449,7 +6449,7 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, · 123 unmodified lines
64496449 &(tabent_r7->phy_regs) : &(tabent_r7_2g->phy_regs);
64506450
64516451 if (phy->radio_rev <= 4 || phy->radio_rev == 6) {
6452− tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 2 : 0;
6452+ tmp = (channel->band == NL80211_BAND_5GHZ) ? 2 : 0;
64536453 b43_radio_maskset(dev, R2057_TIA_CONFIG_CORE0, ~2, tmp);
64546454 b43_radio_maskset(dev, R2057_TIA_CONFIG_CORE1, ~2, tmp);
64556455 }
@@ -6457,12 +6457,12 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, · 1 unmodified line
64576457 b43_radio_2057_setup(dev, tabent_r7, tabent_r7_2g);
64586458 b43_nphy_channel_setup(dev, phy_regs, channel);
64596459 } else if (phy->rev >= 3) {
6460− tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 4 : 0;
6460+ tmp = (channel->band == NL80211_BAND_5GHZ) ? 4 : 0;
64616461 b43_radio_maskset(dev, 0x08, 0xFFFB, tmp);
64626462 b43_radio_2056_setup(dev, tabent_r3);
64636463 b43_nphy_channel_setup(dev, &(tabent_r3->phy_regs), channel);
64646464 } else {
6465− tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 0x0020 : 0x0050;
6465+ tmp = (channel->band == NL80211_BAND_5GHZ) ? 0x0020 : 0x0050;
64666466 b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp);
64676467 b43_radio_2055_setup(dev, tabent_r2);
64686468 b43_nphy_channel_setup(dev, &(tabent_r2->phy_regs), channel);
@@ -6692,7 +6692,7 @@ static int b43_nphy_op_switch_channel(struct b43_wldev *dev, · 223 unmodified lines
66926692 enum nl80211_channel_type channel_type =
66936693 cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef);
66946694
6695− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
6695+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
66966696 if ((new_channel < 1) || (new_channel > 14))
66976697 return -EINVAL;
66986698 } else {
@@ -6705,7 +6705,7 @@ static int b43_nphy_op_switch_channel(struct b43_wldev *dev, · 6 unmodified lines
67056705
67066706 static unsigned int b43_nphy_op_get_default_chan(struct b43_wldev *dev)
67076707 {
6708− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
6708+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
67096709 return 1;
67106710 return 36;
67116711 }
drivers/net/wireless/broadcom/b43/tables_lpphy.c+7−7
@@ -560,7 +560,7 @@ void b2062_upload_init_table(struct b43_wldev *dev) · 559 unmodified lines
560560
561561 for (i = 0; i < ARRAY_SIZE(b2062_init_tab); i++) {
562562 e = &b2062_init_tab[i];
563− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
563+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
564564 if (!(e->flags & B206X_FLAG_G))
565565 continue;
566566 b43_radio_write(dev, e->offset, e->value_g);
@@ -579,7 +579,7 @@ void b2063_upload_init_table(struct b43_wldev *dev) · 12 unmodified lines
579579
580580 for (i = 0; i < ARRAY_SIZE(b2063_init_tab); i++) {
581581 e = &b2063_init_tab[i];
582− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
582+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
583583 if (!(e->flags & B206X_FLAG_G))
584584 continue;
585585 b43_radio_write(dev, e->offset, e->value_g);
@@ -2379,12 +2379,12 @@ static void lpphy_rev2plus_write_gain_table(struct b43_wldev *dev, int offset, · 1793 unmodified lines
23792379 tmp |= data.pga << 8;
23802380 tmp |= data.gm;
23812381 if (dev->phy.rev >= 3) {
2382− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
2382+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
23832383 tmp |= 0x10 << 24;
23842384 else
23852385 tmp |= 0x70 << 24;
23862386 } else {
2387− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
2387+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
23882388 tmp |= 0x14 << 24;
23892389 else
23902390 tmp |= 0x7F << 24;
@@ -2423,7 +2423,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) · 32 unmodified lines
24232423 (sprom->boardflags_lo & B43_BFL_HGPA))
24242424 lpphy_write_gain_table_bulk(dev, 0, 128,
24252425 lpphy_rev0_nopa_tx_gain_table);
2426− else if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2426+ else if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
24272427 lpphy_write_gain_table_bulk(dev, 0, 128,
24282428 lpphy_rev0_2ghz_tx_gain_table);
24292429 else
@@ -2435,7 +2435,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) · 5 unmodified lines
24352435 (sprom->boardflags_lo & B43_BFL_HGPA))
24362436 lpphy_write_gain_table_bulk(dev, 0, 128,
24372437 lpphy_rev1_nopa_tx_gain_table);
2438− else if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2438+ else if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
24392439 lpphy_write_gain_table_bulk(dev, 0, 128,
24402440 lpphy_rev1_2ghz_tx_gain_table);
24412441 else
@@ -2446,7 +2446,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) · 4 unmodified lines
24462446 if (sprom->boardflags_hi & B43_BFH_NOPA)
24472447 lpphy_write_gain_table_bulk(dev, 0, 128,
24482448 lpphy_rev2_nopa_tx_gain_table);
2449− else if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)
2449+ else if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)
24502450 lpphy_write_gain_table_bulk(dev, 0, 128,
24512451 lpphy_rev2_2ghz_tx_gain_table);
24522452 else
drivers/net/wireless/broadcom/b43/tables_nphy.c+8−8
@@ -3502,7 +3502,7 @@ static void b43_nphy_tables_init_rev7_volatile(struct b43_wldev *dev) · 3501 unmodified lines
35023502 { 0x2, 0x18, 0x2 }, /* Core 1 */
35033503 };
35043504
3505− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
3505+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
35063506 antswlut = sprom->fem.ghz5.antswlut;
35073507 else
35083508 antswlut = sprom->fem.ghz2.antswlut;
@@ -3566,7 +3566,7 @@ static void b43_nphy_tables_init_rev3(struct b43_wldev *dev) · 57 unmodified lines
35663566 struct ssb_sprom *sprom = dev->dev->bus_sprom;
35673567 u8 antswlut;
35683568
3569− if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
3569+ if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ)
35703570 antswlut = sprom->fem.ghz5.antswlut;
35713571 else
35723572 antswlut = sprom->fem.ghz2.antswlut;
@@ -3651,7 +3651,7 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev) · 78 unmodified lines
36513651 {
36523652 struct b43_phy *phy = &dev->phy;
36533653
3654− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
3654+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
36553655 switch (phy->rev) {
36563656 case 17:
36573657 if (phy->radio_rev == 14)
@@ -3698,17 +3698,17 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev) · 40 unmodified lines
36983698 const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev)
36993699 {
37003700 struct b43_phy *phy = &dev->phy;
3701− enum ieee80211_band band = b43_current_band(dev->wl);
3701+ enum nl80211_band band = b43_current_band(dev->wl);
37023702 struct ssb_sprom *sprom = dev->dev->bus_sprom;
37033703
37043704 if (dev->phy.rev < 3)
37053705 return b43_ntab_tx_gain_rev0_1_2;
37063706
37073707 /* rev 3+ */
3708− if ((dev->phy.n->ipa2g_on && band == IEEE80211_BAND_2GHZ) ||
3709− (dev->phy.n->ipa5g_on && band == IEEE80211_BAND_5GHZ)) {
3708+ if ((dev->phy.n->ipa2g_on && band == NL80211_BAND_2GHZ) ||
3709+ (dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ)) {
37103710 return b43_nphy_get_ipa_gain_table(dev);
3711− } else if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
3711+ } else if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) {
37123712 switch (phy->rev) {
37133713 case 6:
37143714 case 5:
@@ -3746,7 +3746,7 @@ const s16 *b43_ntab_get_rf_pwr_offset_table(struct b43_wldev *dev) · 31 unmodified lines
37463746 {
37473747 struct b43_phy *phy = &dev->phy;
37483748
3749− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
3749+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
37503750 switch (phy->rev) {
37513751 case 17:
37523752 if (phy->radio_rev == 14)
drivers/net/wireless/broadcom/b43/tables_phy_lcn.c+1−1
@@ -701,7 +701,7 @@ void b43_phy_lcn_tables_init(struct b43_wldev *dev) · 700 unmodified lines
701701
702702 b43_phy_lcn_upload_static_tables(dev);
703703
704− if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
704+ if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) {
705705 if (sprom->boardflags_lo & B43_BFL_FEM)
706706 b43_phy_lcn_load_tx_gain_tab(dev,
707707 b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0);
drivers/net/wireless/broadcom/b43/xmit.c+4−4
@@ -803,7 +803,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) · 802 unmodified lines
803803 chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT;
804804 switch (chanstat & B43_RX_CHAN_PHYTYPE) {
805805 case B43_PHYTYPE_A:
806− status.band = IEEE80211_BAND_5GHZ;
806+ status.band = NL80211_BAND_5GHZ;
807807 B43_WARN_ON(1);
808808 /* FIXME: We don't really know which value the "chanid" contains.
809809 * So the following assignment might be wrong. */
@@ -811,7 +811,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) · 1 unmodified line
811811 ieee80211_channel_to_frequency(chanid, status.band);
812812 break;
813813 case B43_PHYTYPE_G:
814− status.band = IEEE80211_BAND_2GHZ;
814+ status.band = NL80211_BAND_2GHZ;
815815 /* Somewhere between 478.104 and 508.1084 firmware for G-PHY
816816 * has been modified to be compatible with N-PHY and others.
817817 */
@@ -826,9 +826,9 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) · 8 unmodified lines
826826 /* chanid is the SHM channel cookie. Which is the plain
827827 * channel number in b43. */
828828 if (chanstat & B43_RX_CHAN_5GHZ)
829− status.band = IEEE80211_BAND_5GHZ;
829+ status.band = NL80211_BAND_5GHZ;
830830 else
831− status.band = IEEE80211_BAND_2GHZ;
831+ status.band = NL80211_BAND_2GHZ;
832832 status.freq =
833833 ieee80211_channel_to_frequency(chanid, status.band);
834834 break;
drivers/net/wireless/broadcom/b43legacy/main.c+6−6
@@ -1056,7 +1056,7 @@ static void b43legacy_write_probe_resp_plcp(struct b43legacy_wldev *dev, · 1055 unmodified lines
10561056 b43legacy_generate_plcp_hdr(&plcp, size + FCS_LEN, rate->hw_value);
10571057 dur = ieee80211_generic_frame_duration(dev->wl->hw,
10581058 dev->wl->vif,
1059− IEEE80211_BAND_2GHZ,
1059+ NL80211_BAND_2GHZ,
10601060 size,
10611061 rate);
10621062 /* Write PLCP in two parts and timing for packet transfer */
@@ -1122,7 +1122,7 @@ static const u8 *b43legacy_generate_probe_resp(struct b43legacy_wldev *dev, · 59 unmodified lines
11221122 IEEE80211_STYPE_PROBE_RESP);
11231123 dur = ieee80211_generic_frame_duration(dev->wl->hw,
11241124 dev->wl->vif,
1125− IEEE80211_BAND_2GHZ,
1125+ NL80211_BAND_2GHZ,
11261126 *dest_size,
11271127 rate);
11281128 hdr->duration_id = dur;
@@ -2719,7 +2719,7 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw, · 1590 unmodified lines
27192719
27202720 /* Switch the PHY mode (if necessary). */
27212721 switch (conf->chandef.chan->band) {
2722− case IEEE80211_BAND_2GHZ:
2722+ case NL80211_BAND_2GHZ:
27232723 if (phy->type == B43legacy_PHYTYPE_B)
27242724 new_phymode = B43legacy_PHYMODE_B;
27252725 else
@@ -2792,7 +2792,7 @@ out_unlock_mutex: · 66 unmodified lines
27922792 static void b43legacy_update_basic_rates(struct b43legacy_wldev *dev, u32 brates)
27932793 {
27942794 struct ieee80211_supported_band *sband =
2795− dev->wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ];
2795+ dev->wl->hw->wiphy->bands[NL80211_BAND_2GHZ];
27962796 struct ieee80211_rate *rate;
27972797 int i;
27982798 u16 basic, direct, offset, basic_offset, rateptr;
@@ -3630,13 +3630,13 @@ static int b43legacy_setup_modes(struct b43legacy_wldev *dev, · 831 unmodified lines
36303630
36313631 phy->possible_phymodes = 0;
36323632 if (have_bphy) {
3633− hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
3633+ hw->wiphy->bands[NL80211_BAND_2GHZ] =
36343634 &b43legacy_band_2GHz_BPHY;
36353635 phy->possible_phymodes |= B43legacy_PHYMODE_B;
36363636 }
36373637
36383638 if (have_gphy) {
3639− hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
3639+ hw->wiphy->bands[NL80211_BAND_2GHZ] =
36403640 &b43legacy_band_2GHz_GPHY;
36413641 phy->possible_phymodes |= B43legacy_PHYMODE_G;
36423642 }
drivers/net/wireless/broadcom/b43legacy/xmit.c+1−1
@@ -565,7 +565,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev, · 564 unmodified lines
565565 switch (chanstat & B43legacy_RX_CHAN_PHYTYPE) {
566566 case B43legacy_PHYTYPE_B:
567567 case B43legacy_PHYTYPE_G:
568− status.band = IEEE80211_BAND_2GHZ;
568+ status.band = NL80211_BAND_2GHZ;
569569 status.freq = chanid + 2400;
570570 break;
571571 default:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c+37−37
@@ -144,7 +144,7 @@ static struct ieee80211_rate __wl_rates[] = { · 143 unmodified lines
144144 #define wl_a_rates_size (wl_g_rates_size - 4)
145145
146146 #define CHAN2G(_channel, _freq) { \
147− .band = IEEE80211_BAND_2GHZ, \
147+ .band = NL80211_BAND_2GHZ, \
148148 .center_freq = (_freq), \
149149 .hw_value = (_channel), \
150150 .flags = IEEE80211_CHAN_DISABLED, \
@@ -153,7 +153,7 @@ static struct ieee80211_rate __wl_rates[] = { · 2 unmodified lines
153153 }
154154
155155 #define CHAN5G(_channel) { \
156− .band = IEEE80211_BAND_5GHZ, \
156+ .band = NL80211_BAND_5GHZ, \
157157 .center_freq = 5000 + (5 * (_channel)), \
158158 .hw_value = (_channel), \
159159 .flags = IEEE80211_CHAN_DISABLED, \
@@ -181,13 +181,13 @@ static struct ieee80211_channel __wl_5ghz_channels[] = { · 21 unmodified lines
181181 * above is added to the band during setup.
182182 */
183183 static const struct ieee80211_supported_band __wl_band_2ghz = {
184− .band = IEEE80211_BAND_2GHZ,
184+ .band = NL80211_BAND_2GHZ,
185185 .bitrates = wl_g_rates,
186186 .n_bitrates = wl_g_rates_size,
187187 };
188188
189189 static const struct ieee80211_supported_band __wl_band_5ghz = {
190− .band = IEEE80211_BAND_5GHZ,
190+ .band = NL80211_BAND_5GHZ,
191191 .bitrates = wl_a_rates,
192192 .n_bitrates = wl_a_rates_size,
193193 };
@@ -292,13 +292,13 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf, · 98 unmodified lines
292292 WARN_ON_ONCE(1);
293293 }
294294 switch (ch->chan->band) {
295− case IEEE80211_BAND_2GHZ:
295+ case NL80211_BAND_2GHZ:
296296 ch_inf.band = BRCMU_CHAN_BAND_2G;
297297 break;
298− case IEEE80211_BAND_5GHZ:
298+ case NL80211_BAND_5GHZ:
299299 ch_inf.band = BRCMU_CHAN_BAND_5G;
300300 break;
301− case IEEE80211_BAND_60GHZ:
301+ case NL80211_BAND_60GHZ:
302302 default:
303303 WARN_ON_ONCE(1);
304304 }
@@ -2679,9 +2679,9 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, · 2374 unmodified lines
26792679 channel = bi->ctl_ch;
26802680
26812681 if (channel <= CH_MAX_2G_CHANNEL)
2682− band = wiphy->bands[IEEE80211_BAND_2GHZ];
2682+ band = wiphy->bands[NL80211_BAND_2GHZ];
26832683 else
2684− band = wiphy->bands[IEEE80211_BAND_5GHZ];
2684+ band = wiphy->bands[NL80211_BAND_5GHZ];
26852685
26862686 freq = ieee80211_channel_to_frequency(channel, band->band);
26872687 notify_channel = ieee80211_get_channel(wiphy, freq);
@@ -2788,9 +2788,9 @@ static s32 brcmf_inform_ibss(struct brcmf_cfg80211_info *cfg, · 100 unmodified lines
27882788 cfg->d11inf.decchspec(&ch);
27892789
27902790 if (ch.band == BRCMU_CHAN_BAND_2G)
2791− band = wiphy->bands[IEEE80211_BAND_2GHZ];
2791+ band = wiphy->bands[NL80211_BAND_2GHZ];
27922792 else
2793− band = wiphy->bands[IEEE80211_BAND_5GHZ];
2793+ band = wiphy->bands[NL80211_BAND_5GHZ];
27942794
27952795 freq = ieee80211_channel_to_frequency(ch.chnum, band->band);
27962796 cfg->channel = freq;
@@ -5215,9 +5215,9 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg, · 2418 unmodified lines
52155215 cfg->d11inf.decchspec(&ch);
52165216
52175217 if (ch.band == BRCMU_CHAN_BAND_2G)
5218− band = wiphy->bands[IEEE80211_BAND_2GHZ];
5218+ band = wiphy->bands[NL80211_BAND_2GHZ];
52195219 else
5220− band = wiphy->bands[IEEE80211_BAND_5GHZ];
5220+ band = wiphy->bands[NL80211_BAND_5GHZ];
52215221
52225222 freq = ieee80211_channel_to_frequency(ch.chnum, band->band);
52235223 notify_channel = ieee80211_get_channel(wiphy, freq);
@@ -5707,11 +5707,11 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, · 483 unmodified lines
57075707 }
57085708
57095709 wiphy = cfg_to_wiphy(cfg);
5710− band = wiphy->bands[IEEE80211_BAND_2GHZ];
5710+ band = wiphy->bands[NL80211_BAND_2GHZ];
57115711 if (band)
57125712 for (i = 0; i < band->n_channels; i++)
57135713 band->channels[i].flags = IEEE80211_CHAN_DISABLED;
5714− band = wiphy->bands[IEEE80211_BAND_5GHZ];
5714+ band = wiphy->bands[NL80211_BAND_5GHZ];
57155715 if (band)
57165716 for (i = 0; i < band->n_channels; i++)
57175717 band->channels[i].flags = IEEE80211_CHAN_DISABLED;
@@ -5722,9 +5722,9 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, · 4 unmodified lines
57225722 cfg->d11inf.decchspec(&ch);
57235723
57245724 if (ch.band == BRCMU_CHAN_BAND_2G) {
5725− band = wiphy->bands[IEEE80211_BAND_2GHZ];
5725+ band = wiphy->bands[NL80211_BAND_2GHZ];
57265726 } else if (ch.band == BRCMU_CHAN_BAND_5G) {
5727− band = wiphy->bands[IEEE80211_BAND_5GHZ];
5727+ band = wiphy->bands[NL80211_BAND_5GHZ];
57285728 } else {
57295729 brcmf_err("Invalid channel Spec. 0x%x.\n", ch.chspec);
57305730 continue;
@@ -5839,7 +5839,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg) · 108 unmodified lines
58395839 return err;
58405840 }
58415841
5842− band = cfg_to_wiphy(cfg)->bands[IEEE80211_BAND_2GHZ];
5842+ band = cfg_to_wiphy(cfg)->bands[NL80211_BAND_2GHZ];
58435843 list = (struct brcmf_chanspec_list *)pbuf;
58445844 num_chan = le32_to_cpu(list->count);
58455845 for (i = 0; i < num_chan; i++) {
@@ -5871,11 +5871,11 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) · 25 unmodified lines
58715871 band = WLC_BAND_2G;
58725872 err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band);
58735873 if (!err) {
5874− bw_cap[IEEE80211_BAND_2GHZ] = band;
5874+ bw_cap[NL80211_BAND_2GHZ] = band;
58755875 band = WLC_BAND_5G;
58765876 err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band);
58775877 if (!err) {
5878− bw_cap[IEEE80211_BAND_5GHZ] = band;
5878+ bw_cap[NL80211_BAND_5GHZ] = band;
58795879 return;
58805880 }
58815881 WARN_ON(1);
@@ -5890,14 +5890,14 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) · 8 unmodified lines
58905890
58915891 switch (mimo_bwcap) {
58925892 case WLC_N_BW_40ALL:
5893− bw_cap[IEEE80211_BAND_2GHZ] |= WLC_BW_40MHZ_BIT;
5893+ bw_cap[NL80211_BAND_2GHZ] |= WLC_BW_40MHZ_BIT;
58945894 /* fall-thru */
58955895 case WLC_N_BW_20IN2G_40IN5G:
5896− bw_cap[IEEE80211_BAND_5GHZ] |= WLC_BW_40MHZ_BIT;
5896+ bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_40MHZ_BIT;
58975897 /* fall-thru */
58985898 case WLC_N_BW_20ALL:
5899− bw_cap[IEEE80211_BAND_2GHZ] |= WLC_BW_20MHZ_BIT;
5900− bw_cap[IEEE80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT;
5899+ bw_cap[NL80211_BAND_2GHZ] |= WLC_BW_20MHZ_BIT;
5900+ bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT;
59015901 break;
59025902 default:
59035903 brcmf_err("invalid mimo_bw_cap value\n");
@@ -5938,7 +5938,7 @@ static void brcmf_update_vht_cap(struct ieee80211_supported_band *band, · 34 unmodified lines
59385938 __le16 mcs_map;
59395939
59405940 /* not allowed in 2.4G band */
5941− if (band->band == IEEE80211_BAND_2GHZ)
5941+ if (band->band == NL80211_BAND_2GHZ)
59425942 return;
59435943
59445944 band->vht_cap.vht_supported = true;
@@ -5997,8 +5997,8 @@ static int brcmf_setup_wiphybands(struct wiphy *wiphy) · 52 unmodified lines
59975997 brcmf_get_bwcap(ifp, bw_cap);
59985998 }
59995999 brcmf_dbg(INFO, "nmode=%d, vhtmode=%d, bw_cap=(%d, %d)\n",
6000− nmode, vhtmode, bw_cap[IEEE80211_BAND_2GHZ],
6001− bw_cap[IEEE80211_BAND_5GHZ]);
6000+ nmode, vhtmode, bw_cap[NL80211_BAND_2GHZ],
6001+ bw_cap[NL80211_BAND_5GHZ]);
60026002
60036003 err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain);
60046004 if (err) {
@@ -6321,7 +6321,7 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) · 316 unmodified lines
63216321 }
63226322
63236323 band->n_channels = ARRAY_SIZE(__wl_2ghz_channels);
6324− wiphy->bands[IEEE80211_BAND_2GHZ] = band;
6324+ wiphy->bands[NL80211_BAND_2GHZ] = band;
63256325 }
63266326 if (bandlist[i] == cpu_to_le32(WLC_BAND_5G)) {
63276327 band = kmemdup(&__wl_band_5ghz, sizeof(__wl_band_5ghz),
@@ -6338,7 +6338,7 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) · 10 unmodified lines
63386338 }
63396339
63406340 band->n_channels = ARRAY_SIZE(__wl_5ghz_channels);
6341− wiphy->bands[IEEE80211_BAND_5GHZ] = band;
6341+ wiphy->bands[NL80211_BAND_5GHZ] = band;
63426342 }
63436343 }
63446344 err = brcmf_setup_wiphybands(wiphy);
@@ -6604,13 +6604,13 @@ static void brcmf_free_wiphy(struct wiphy *wiphy) · 259 unmodified lines
66046604 kfree(wiphy->iface_combinations[i].limits);
66056605 }
66066606 kfree(wiphy->iface_combinations);
6607− if (wiphy->bands[IEEE80211_BAND_2GHZ]) {
6608− kfree(wiphy->bands[IEEE80211_BAND_2GHZ]->channels);
6609− kfree(wiphy->bands[IEEE80211_BAND_2GHZ]);
6607+ if (wiphy->bands[NL80211_BAND_2GHZ]) {
6608+ kfree(wiphy->bands[NL80211_BAND_2GHZ]->channels);
6609+ kfree(wiphy->bands[NL80211_BAND_2GHZ]);
66106610 }
6611− if (wiphy->bands[IEEE80211_BAND_5GHZ]) {
6612− kfree(wiphy->bands[IEEE80211_BAND_5GHZ]->channels);
6613− kfree(wiphy->bands[IEEE80211_BAND_5GHZ]);
6611+ if (wiphy->bands[NL80211_BAND_5GHZ]) {
6612+ kfree(wiphy->bands[NL80211_BAND_5GHZ]->channels);
6613+ kfree(wiphy->bands[NL80211_BAND_5GHZ]);
66146614 }
66156615 wiphy_free(wiphy);
66166616 }
@@ -6698,8 +6698,8 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, · 81 unmodified lines
66986698 * cfg80211 here that we do and have it decide we can enable
66996699 * it. But first check if device does support 2G operation.
67006700 */
6701− if (wiphy->bands[IEEE80211_BAND_2GHZ]) {
6702− cap = &wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap.cap;
6701+ if (wiphy->bands[NL80211_BAND_2GHZ]) {
6702+ cap = &wiphy->bands[NL80211_BAND_2GHZ]->ht_cap.cap;
67036703 *cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
67046704 }
67056705 err = wiphy_register(wiphy);
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c+4−4
@@ -1430,8 +1430,8 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, · 1429 unmodified lines
14301430
14311431 freq = ieee80211_channel_to_frequency(ch.chnum,
14321432 ch.band == BRCMU_CHAN_BAND_2G ?
1433− IEEE80211_BAND_2GHZ :
1434− IEEE80211_BAND_5GHZ);
1433+ NL80211_BAND_2GHZ :
1434+ NL80211_BAND_5GHZ);
14351435
14361436 wdev = &ifp->vif->wdev;
14371437 cfg80211_rx_mgmt(wdev, freq, 0, (u8 *)mgmt_frame, mgmt_frame_len, 0);
@@ -1900,8 +1900,8 @@ s32 brcmf_p2p_notify_rx_mgmt_p2p_probereq(struct brcmf_if *ifp, · 462 unmodified lines
19001900 mgmt_frame_len = e->datalen - sizeof(*rxframe);
19011901 freq = ieee80211_channel_to_frequency(ch.chnum,
19021902 ch.band == BRCMU_CHAN_BAND_2G ?
1903− IEEE80211_BAND_2GHZ :
1904− IEEE80211_BAND_5GHZ);
1903+ NL80211_BAND_2GHZ :
1904+ NL80211_BAND_5GHZ);
19051905
19061906 cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, 0);
19071907
drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c+5−5
@@ -636,7 +636,7 @@ static void brcms_reg_apply_radar_flags(struct wiphy *wiphy) · 635 unmodified lines
636636 struct ieee80211_channel *ch;
637637 int i;
638638
639− sband = wiphy->bands[IEEE80211_BAND_5GHZ];
639+ sband = wiphy->bands[NL80211_BAND_5GHZ];
640640 if (!sband)
641641 return;
642642
@@ -666,7 +666,7 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy, · 23 unmodified lines
666666 const struct ieee80211_reg_rule *rule;
667667 int band, i;
668668
669− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
669+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
670670 sband = wiphy->bands[band];
671671 if (!sband)
672672 continue;
@@ -710,7 +710,7 @@ static void brcms_reg_notifier(struct wiphy *wiphy, · 37 unmodified lines
710710 brcms_reg_apply_beaconing_flags(wiphy, request->initiator);
711711
712712 /* Disable radio if all channels disallowed by regulatory */
713− for (band = 0; !ch_found && band < IEEE80211_NUM_BANDS; band++) {
713+ for (band = 0; !ch_found && band < NUM_NL80211_BANDS; band++) {
714714 sband = wiphy->bands[band];
715715 if (!sband)
716716 continue;
@@ -755,9 +755,9 @@ void brcms_c_regd_init(struct brcms_c_info *wlc) · 38 unmodified lines
755755 &sup_chan);
756756
757757 if (band_idx == BAND_2G_INDEX)
758− sband = wiphy->bands[IEEE80211_BAND_2GHZ];
758+ sband = wiphy->bands[NL80211_BAND_2GHZ];
759759 else
760− sband = wiphy->bands[IEEE80211_BAND_5GHZ];
760+ sband = wiphy->bands[NL80211_BAND_5GHZ];
761761
762762 for (i = 0; i < sband->n_channels; i++) {
763763 ch = &sband->channels[i];
drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c+8−8
@@ -49,7 +49,7 @@ · 48 unmodified lines
4949 FIF_PSPOLL)
5050
5151 #define CHAN2GHZ(channel, freqency, chflags) { \
52− .band = IEEE80211_BAND_2GHZ, \
52+ .band = NL80211_BAND_2GHZ, \
5353 .center_freq = (freqency), \
5454 .hw_value = (channel), \
5555 .flags = chflags, \
@@ -58,7 +58,7 @@ · 2 unmodified lines
5858 }
5959
6060 #define CHAN5GHZ(channel, chflags) { \
61− .band = IEEE80211_BAND_5GHZ, \
61+ .band = NL80211_BAND_5GHZ, \
6262 .center_freq = 5000 + 5*(channel), \
6363 .hw_value = (channel), \
6464 .flags = chflags, \
@@ -217,7 +217,7 @@ static struct ieee80211_rate legacy_ratetable[] = { · 152 unmodified lines
217217 };
218218
219219 static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = {
220− .band = IEEE80211_BAND_2GHZ,
220+ .band = NL80211_BAND_2GHZ,
221221 .channels = brcms_2ghz_chantable,
222222 .n_channels = ARRAY_SIZE(brcms_2ghz_chantable),
223223 .bitrates = legacy_ratetable,
@@ -238,7 +238,7 @@ static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = { · 14 unmodified lines
238238 };
239239
240240 static const struct ieee80211_supported_band brcms_band_5GHz_nphy_template = {
241− .band = IEEE80211_BAND_5GHZ,
241+ .band = NL80211_BAND_5GHZ,
242242 .channels = brcms_5ghz_nphy_chantable,
243243 .n_channels = ARRAY_SIZE(brcms_5ghz_nphy_chantable),
244244 .bitrates = legacy_ratetable + BRCMS_LEGACY_5G_RATE_OFFSET,
@@ -1026,8 +1026,8 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw) · 781 unmodified lines
10261026 int has_5g = 0;
10271027 u16 phy_type;
10281028
1029− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL;
1030− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
1029+ hw->wiphy->bands[NL80211_BAND_2GHZ] = NULL;
1030+ hw->wiphy->bands[NL80211_BAND_5GHZ] = NULL;
10311031
10321032 phy_type = brcms_c_get_phy_type(wl->wlc, 0);
10331033 if (phy_type == PHY_TYPE_N || phy_type == PHY_TYPE_LCN) {
@@ -1038,7 +1038,7 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw) · 4 unmodified lines
10381038 band->ht_cap.mcs.rx_mask[1] = 0;
10391039 band->ht_cap.mcs.rx_highest = cpu_to_le16(72);
10401040 }
1041− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = band;
1041+ hw->wiphy->bands[NL80211_BAND_2GHZ] = band;
10421042 } else {
10431043 return -EPERM;
10441044 }
@@ -1049,7 +1049,7 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw) · 4 unmodified lines
10491049 if (phy_type == PHY_TYPE_N || phy_type == PHY_TYPE_LCN) {
10501050 band = &wlc->bandstate[BAND_5G_INDEX]->band;
10511051 *band = brcms_band_5GHz_nphy_template;
1052− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band;
1052+ hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
10531053 } else {
10541054 return -EPERM;
10551055 }
drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c+2−2
@@ -7076,7 +7076,7 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, · 7075 unmodified lines
70767076 channel = BRCMS_CHAN_CHANNEL(rxh->RxChan);
70777077
70787078 rx_status->band =
7079− channel > 14 ? IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ;
7079+ channel > 14 ? NL80211_BAND_5GHZ : NL80211_BAND_2GHZ;
70807080 rx_status->freq =
70817081 ieee80211_channel_to_frequency(channel, rx_status->band);
70827082
@@ -7143,7 +7143,7 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, · 60 unmodified lines
71437143 * a subset of the 2.4G rates. See bitrates field
71447144 * of brcms_band_5GHz_nphy (in mac80211_if.c).
71457145 */
7146− if (rx_status->band == IEEE80211_BAND_5GHZ)
7146+ if (rx_status->band == NL80211_BAND_5GHZ)
71477147 rx_status->rate_idx -= BRCMS_LEGACY_5G_RATE_OFFSET;
71487148
71497149 /* Determine short preamble and rate_idx */
drivers/net/wireless/cisco/airo.c+3−3
@@ -5836,7 +5836,7 @@ static int airo_get_freq(struct net_device *dev, · 5835 unmodified lines
58365836 ch = le16_to_cpu(status_rid.channel);
58375837 if((ch > 0) && (ch < 15)) {
58385838 fwrq->m = 100000 *
5839− ieee80211_channel_to_frequency(ch, IEEE80211_BAND_2GHZ);
5839+ ieee80211_channel_to_frequency(ch, NL80211_BAND_2GHZ);
58405840 fwrq->e = 1;
58415841 } else {
58425842 fwrq->m = ch;
@@ -6894,7 +6894,7 @@ static int airo_get_range(struct net_device *dev, · 1051 unmodified lines
68946894 for(i = 0; i < 14; i++) {
68956895 range->freq[k].i = i + 1; /* List index */
68966896 range->freq[k].m = 100000 *
6897− ieee80211_channel_to_frequency(i + 1, IEEE80211_BAND_2GHZ);
6897+ ieee80211_channel_to_frequency(i + 1, NL80211_BAND_2GHZ);
68986898 range->freq[k++].e = 1; /* Values in MHz -> * 10^5 * 10 */
68996899 }
69006900 range->num_frequency = k;
@@ -7302,7 +7302,7 @@ static inline char *airo_translate_scan(struct net_device *dev, · 401 unmodified lines
73027302 iwe.cmd = SIOCGIWFREQ;
73037303 iwe.u.freq.m = le16_to_cpu(bss->dsChannel);
73047304 iwe.u.freq.m = 100000 *
7305− ieee80211_channel_to_frequency(iwe.u.freq.m, IEEE80211_BAND_2GHZ);
7305+ ieee80211_channel_to_frequency(iwe.u.freq.m, NL80211_BAND_2GHZ);
73067306 iwe.u.freq.e = 1;
73077307 current_ev = iwe_stream_add_event(info, current_ev, end_buf,
73087308 &iwe, IW_EV_FREQ_LEN);
drivers/net/wireless/intel/ipw2x00/ipw2100.c+3−3
@@ -1913,7 +1913,7 @@ static int ipw2100_wdev_init(struct net_device *dev) · 1912 unmodified lines
19131913 if (geo->bg_channels) {
19141914 struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band;
19151915
1916− bg_band->band = IEEE80211_BAND_2GHZ;
1916+ bg_band->band = NL80211_BAND_2GHZ;
19171917 bg_band->n_channels = geo->bg_channels;
19181918 bg_band->channels = kcalloc(geo->bg_channels,
19191919 sizeof(struct ieee80211_channel),
@@ -1924,7 +1924,7 @@ static int ipw2100_wdev_init(struct net_device *dev) · 4 unmodified lines
19241924 }
19251925 /* translate geo->bg to bg_band.channels */
19261926 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;
19281928 bg_band->channels[i].center_freq = geo->bg[i].freq;
19291929 bg_band->channels[i].hw_value = geo->bg[i].channel;
19301930 bg_band->channels[i].max_power = geo->bg[i].max_power;
@@ -1945,7 +1945,7 @@ static int ipw2100_wdev_init(struct net_device *dev) · 14 unmodified lines
19451945 bg_band->bitrates = ipw2100_bg_rates;
19461946 bg_band->n_bitrates = RATE_COUNT;
19471947
1948− wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band;
1948+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band;
19491949 }
19501950
19511951 wdev->wiphy->cipher_suites = ipw_cipher_suites;
drivers/net/wireless/intel/ipw2x00/ipw2200.c+6−6
@@ -11359,7 +11359,7 @@ static int ipw_wdev_init(struct net_device *dev) · 11358 unmodified lines
1135911359 if (geo->bg_channels) {
1136011360 struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band;
1136111361
11362− bg_band->band = IEEE80211_BAND_2GHZ;
11362+ bg_band->band = NL80211_BAND_2GHZ;
1136311363 bg_band->n_channels = geo->bg_channels;
1136411364 bg_band->channels = kcalloc(geo->bg_channels,
1136511365 sizeof(struct ieee80211_channel),
@@ -11370,7 +11370,7 @@ static int ipw_wdev_init(struct net_device *dev) · 4 unmodified lines
1137011370 }
1137111371 /* translate geo->bg to bg_band.channels */
1137211372 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;
1137411374 bg_band->channels[i].center_freq = geo->bg[i].freq;
1137511375 bg_band->channels[i].hw_value = geo->bg[i].channel;
1137611376 bg_band->channels[i].max_power = geo->bg[i].max_power;
@@ -11391,14 +11391,14 @@ static int ipw_wdev_init(struct net_device *dev) · 14 unmodified lines
1139111391 bg_band->bitrates = ipw2200_bg_rates;
1139211392 bg_band->n_bitrates = ipw2200_num_bg_rates;
1139311393
11394− wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band;
11394+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band;
1139511395 }
1139611396
1139711397 /* fill-out priv->ieee->a_band */
1139811398 if (geo->a_channels) {
1139911399 struct ieee80211_supported_band *a_band = &priv->ieee->a_band;
1140011400
11401− a_band->band = IEEE80211_BAND_5GHZ;
11401+ a_band->band = NL80211_BAND_5GHZ;
1140211402 a_band->n_channels = geo->a_channels;
1140311403 a_band->channels = kcalloc(geo->a_channels,
1140411404 sizeof(struct ieee80211_channel),
@@ -11409,7 +11409,7 @@ static int ipw_wdev_init(struct net_device *dev) · 4 unmodified lines
1140911409 }
1141011410 /* translate geo->a to a_band.channels */
1141111411 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;
1141311413 a_band->channels[i].center_freq = geo->a[i].freq;
1141411414 a_band->channels[i].hw_value = geo->a[i].channel;
1141511415 a_band->channels[i].max_power = geo->a[i].max_power;
@@ -11430,7 +11430,7 @@ static int ipw_wdev_init(struct net_device *dev) · 14 unmodified lines
1143011430 a_band->bitrates = ipw2200_a_rates;
1143111431 a_band->n_bitrates = ipw2200_num_a_rates;
1143211432
11433− wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = a_band;
11433+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = a_band;
1143411434 }
1143511435
1143611436 wdev->wiphy->cipher_suites = ipw_cipher_suites;
drivers/net/wireless/intel/iwlegacy/3945-mac.c+15−15
@@ -1547,7 +1547,7 @@ il3945_irq_tasklet(struct il_priv *il) · 1546 unmodified lines
15471547 }
15481548
15491549 static int
1550−il3945_get_channels_for_scan(struct il_priv *il, enum ieee80211_band band,
1550+il3945_get_channels_for_scan(struct il_priv *il, enum nl80211_band band,
15511551 u8 is_active, u8 n_probes,
15521552 struct il3945_scan_channel *scan_ch,
15531553 struct ieee80211_vif *vif)
@@ -1618,7 +1618,7 @@ il3945_get_channels_for_scan(struct il_priv *il, enum ieee80211_band band, · 64 unmodified lines
16181618 /* scan_pwr_info->tpc.dsp_atten; */
16191619
16201620 /*scan_pwr_info->tpc.tx_gain; */
1621− if (band == IEEE80211_BAND_5GHZ)
1621+ if (band == NL80211_BAND_5GHZ)
16221622 scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3;
16231623 else {
16241624 scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3));
@@ -2534,7 +2534,7 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 909 unmodified lines
25342534 };
25352535 struct il3945_scan_cmd *scan;
25362536 u8 n_probes = 0;
2537− enum ieee80211_band band;
2537+ enum nl80211_band band;
25382538 bool is_active = false;
25392539 int ret;
25402540 u16 len;
@@ -2615,14 +2615,14 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 74 unmodified lines
26152615 /* flags + rate selection */
26162616
26172617 switch (il->scan_band) {
2618− case IEEE80211_BAND_2GHZ:
2618+ case NL80211_BAND_2GHZ:
26192619 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
26202620 scan->tx_cmd.rate = RATE_1M_PLCP;
2621− band = IEEE80211_BAND_2GHZ;
2621+ band = NL80211_BAND_2GHZ;
26222622 break;
2623− case IEEE80211_BAND_5GHZ:
2623+ case NL80211_BAND_5GHZ:
26242624 scan->tx_cmd.rate = RATE_6M_PLCP;
2625− band = IEEE80211_BAND_5GHZ;
2625+ band = NL80211_BAND_5GHZ;
26262626 break;
26272627 default:
26282628 IL_WARN("Invalid scan band\n");
@@ -3507,7 +3507,7 @@ il3945_init_drv(struct il_priv *il) · 878 unmodified lines
35073507
35083508 il->ieee_channels = NULL;
35093509 il->ieee_rates = NULL;
3510− il->band = IEEE80211_BAND_2GHZ;
3510+ il->band = NL80211_BAND_2GHZ;
35113511
35123512 il->iw_mode = NL80211_IFTYPE_STATION;
35133513 il->missed_beacon_threshold = IL_MISSED_BEACON_THRESHOLD_DEF;
@@ -3582,13 +3582,13 @@ il3945_setup_mac(struct il_priv *il) · 68 unmodified lines
35823582 /* Default value; 4 EDCA QOS priorities */
35833583 hw->queues = 4;
35843584
3585− if (il->bands[IEEE80211_BAND_2GHZ].n_channels)
3586− il->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
3587− &il->bands[IEEE80211_BAND_2GHZ];
3585+ if (il->bands[NL80211_BAND_2GHZ].n_channels)
3586+ il->hw->wiphy->bands[NL80211_BAND_2GHZ] =
3587+ &il->bands[NL80211_BAND_2GHZ];
35883588
3589− if (il->bands[IEEE80211_BAND_5GHZ].n_channels)
3590− il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
3591− &il->bands[IEEE80211_BAND_5GHZ];
3589+ if (il->bands[NL80211_BAND_5GHZ].n_channels)
3590+ il->hw->wiphy->bands[NL80211_BAND_5GHZ] =
3591+ &il->bands[NL80211_BAND_5GHZ];
35923592
35933593 il_leds_init(il);
35943594
@@ -3761,7 +3761,7 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · 166 unmodified lines
37613761 goto out_release_irq;
37623762 }
37633763
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]);
37653765 il3945_setup_deferred_work(il);
37663766 il3945_setup_handlers(il);
37673767 il_power_initialize(il);
drivers/net/wireless/intel/iwlegacy/3945-rs.c+11−11
@@ -97,7 +97,7 @@ static struct il3945_tpt_entry il3945_tpt_table_g[] = { · 96 unmodified lines
9797 #define RATE_RETRY_TH 15
9898
9999 static u8
100−il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band)
100+il3945_get_rate_idx_by_rssi(s32 rssi, enum nl80211_band band)
101101 {
102102 u32 idx = 0;
103103 u32 table_size = 0;
@@ -107,11 +107,11 @@ il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band) · 3 unmodified lines
107107 rssi = IL_MIN_RSSI_VAL;
108108
109109 switch (band) {
110− case IEEE80211_BAND_2GHZ:
110+ case NL80211_BAND_2GHZ:
111111 tpt_table = il3945_tpt_table_g;
112112 table_size = ARRAY_SIZE(il3945_tpt_table_g);
113113 break;
114− case IEEE80211_BAND_5GHZ:
114+ case NL80211_BAND_5GHZ:
115115 tpt_table = il3945_tpt_table_a;
116116 table_size = ARRAY_SIZE(il3945_tpt_table_a);
117117 break;
@@ -380,7 +380,7 @@ il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) · 262 unmodified lines
380380
381381 il->_3945.sta_supp_rates = sta->supp_rates[sband->band];
382382 /* 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) {
384384 rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE;
385385 il->_3945.sta_supp_rates <<= IL_FIRST_OFDM_RATE;
386386 }
@@ -541,7 +541,7 @@ il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband, · 154 unmodified lines
541541
542542 static u16
543543 il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask,
544− enum ieee80211_band band)
544+ enum nl80211_band band)
545545 {
546546 u8 high = RATE_INVALID;
547547 u8 low = RATE_INVALID;
@@ -549,7 +549,7 @@ il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask, · 1 unmodified line
549549
550550 /* 802.11A walks to the next literal adjacent rate in
551551 * the rate table */
552− if (unlikely(band == IEEE80211_BAND_5GHZ)) {
552+ if (unlikely(band == NL80211_BAND_5GHZ)) {
553553 int i;
554554 u32 mask;
555555
@@ -657,14 +657,14 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, · 101 unmodified lines
657657
658658 /* get user max rate if set */
659659 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)
661661 max_rate_idx += IL_FIRST_OFDM_RATE;
662662 if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT)
663663 max_rate_idx = -1;
664664
665665 idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1);
666666
667− if (sband->band == IEEE80211_BAND_5GHZ)
667+ if (sband->band == NL80211_BAND_5GHZ)
668668 rate_mask = rate_mask << IL_FIRST_OFDM_RATE;
669669
670670 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, · 135 unmodified lines
806806
807807 out:
808808
809− if (sband->band == IEEE80211_BAND_5GHZ) {
809+ if (sband->band == NL80211_BAND_5GHZ) {
810810 if (WARN_ON_ONCE(idx < IL_FIRST_OFDM_RATE))
811811 idx = IL_FIRST_OFDM_RATE;
812812 rs_sta->last_txrate_idx = idx;
@@ -935,7 +935,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) · 122 unmodified lines
935935
936936 rs_sta->tgg = 0;
937937 switch (il->band) {
938− case IEEE80211_BAND_2GHZ:
938+ case NL80211_BAND_2GHZ:
939939 /* TODO: this always does G, not a regression */
940940 if (il->active.flags & RXON_FLG_TGG_PROTECT_MSK) {
941941 rs_sta->tgg = 1;
@@ -943,7 +943,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) · 1 unmodified line
943943 } else
944944 rs_sta->expected_tpt = il3945_expected_tpt_g;
945945 break;
946− case IEEE80211_BAND_5GHZ:
946+ case NL80211_BAND_5GHZ:
947947 rs_sta->expected_tpt = il3945_expected_tpt_a;
948948 break;
949949 default:
drivers/net/wireless/intel/iwlegacy/3945.c+10−10
@@ -255,13 +255,13 @@ il3945_rs_next_rate(struct il_priv *il, int rate) · 254 unmodified lines
255255 int next_rate = il3945_get_prev_ieee_rate(rate);
256256
257257 switch (il->band) {
258− case IEEE80211_BAND_5GHZ:
258+ case NL80211_BAND_5GHZ:
259259 if (rate == RATE_12M_IDX)
260260 next_rate = RATE_9M_IDX;
261261 else if (rate == RATE_6M_IDX)
262262 next_rate = RATE_6M_IDX;
263263 break;
264− case IEEE80211_BAND_2GHZ:
264+ case NL80211_BAND_2GHZ:
265265 if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) &&
266266 il_is_associated(il)) {
267267 if (rate == RATE_11M_IDX)
@@ -349,7 +349,7 @@ il3945_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb) · 81 unmodified lines
349349
350350 /* Fill the MRR chain with some info about on-chip retransmissions */
351351 rate_idx = il3945_hwrate_to_plcp_idx(tx_resp->rate);
352− if (info->band == IEEE80211_BAND_5GHZ)
352+ if (info->band == NL80211_BAND_5GHZ)
353353 rate_idx -= IL_FIRST_OFDM_RATE;
354354
355355 fail = tx_resp->failure_frame;
@@ -554,14 +554,14 @@ il3945_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) · 198 unmodified lines
554554 rx_status.mactime = le64_to_cpu(rx_end->timestamp);
555555 rx_status.band =
556556 (rx_hdr->
557− phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? IEEE80211_BAND_2GHZ :
558− IEEE80211_BAND_5GHZ;
557+ phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? NL80211_BAND_2GHZ :
558+ NL80211_BAND_5GHZ;
559559 rx_status.freq =
560560 ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel),
561561 rx_status.band);
562562
563563 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)
565565 rx_status.rate_idx -= IL_FIRST_OFDM_RATE;
566566
567567 rx_status.antenna =
@@ -1409,7 +1409,7 @@ il3945_send_tx_power(struct il_priv *il) · 841 unmodified lines
14091409
14101410 chan = le16_to_cpu(il->active.channel);
14111411
1412− txpower.band = (il->band == IEEE80211_BAND_5GHZ) ? 0 : 1;
1412+ txpower.band = (il->band == NL80211_BAND_5GHZ) ? 0 : 1;
14131413 ch_info = il_get_channel_info(il, il->band, chan);
14141414 if (!ch_info) {
14151415 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, · 894 unmodified lines
23102310
23112311 il3945_sync_sta(il, vif_priv->ibss_bssid_sta_id,
23122312 (il->band ==
2313− IEEE80211_BAND_5GHZ) ? RATE_6M_PLCP :
2313+ NL80211_BAND_5GHZ) ? RATE_6M_PLCP :
23142314 RATE_1M_PLCP);
23152315 il3945_rate_scale_init(il->hw, vif_priv->ibss_bssid_sta_id);
23162316
@@ -2343,7 +2343,7 @@ il3945_init_hw_rate_table(struct il_priv *il) · 26 unmodified lines
23432343 }
23442344
23452345 switch (il->band) {
2346− case IEEE80211_BAND_5GHZ:
2346+ case NL80211_BAND_5GHZ:
23472347 D_RATE("Select A mode rate scale\n");
23482348 /* If one of the following CCK rates is used,
23492349 * have it fall back to the 6M OFDM rate */
@@ -2359,7 +2359,7 @@ il3945_init_hw_rate_table(struct il_priv *il) · 9 unmodified lines
23592359 il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx;
23602360 break;
23612361
2362− case IEEE80211_BAND_2GHZ:
2362+ case NL80211_BAND_2GHZ:
23632363 D_RATE("Select B/G mode rate scale\n");
23642364 /* If an OFDM rate is used, have it fall back to the
23652365 * 1M CCK rates */
drivers/net/wireless/intel/iwlegacy/4965-mac.c+19−19
@@ -457,7 +457,7 @@ il4965_rxq_stop(struct il_priv *il) · 456 unmodified lines
457457 }
458458
459459 int
460−il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band)
460+il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band)
461461 {
462462 int idx = 0;
463463 int band_offset = 0;
@@ -468,7 +468,7 @@ il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) · 4 unmodified lines
468468 return idx;
469469 /* Legacy rate format, search for match in table */
470470 } else {
471− if (band == IEEE80211_BAND_5GHZ)
471+ if (band == NL80211_BAND_5GHZ)
472472 band_offset = IL_FIRST_OFDM_RATE;
473473 for (idx = band_offset; idx < RATE_COUNT_LEGACY; idx++)
474474 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) · 213 unmodified lines
688688 rx_status.mactime = le64_to_cpu(phy_res->timestamp);
689689 rx_status.band =
690690 (phy_res->
691− phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? IEEE80211_BAND_2GHZ :
692− IEEE80211_BAND_5GHZ;
691+ phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? NL80211_BAND_2GHZ :
692+ NL80211_BAND_5GHZ;
693693 rx_status.freq =
694694 ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel),
695695 rx_status.band);
@@ -766,7 +766,7 @@ il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb) · 70 unmodified lines
766766
767767 static int
768768 il4965_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,
770770 u8 n_probes, struct il_scan_channel *scan_ch)
771771 {
772772 struct ieee80211_channel *chan;
@@ -822,7 +822,7 @@ il4965_get_channels_for_scan(struct il_priv *il, struct ieee80211_vif *vif, · 49 unmodified lines
822822 * power level:
823823 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3;
824824 */
825− if (band == IEEE80211_BAND_5GHZ)
825+ if (band == NL80211_BAND_5GHZ)
826826 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
827827 else
828828 scan_ch->tx_gain = ((1 << 5) | (5 << 3));
@@ -870,7 +870,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 41 unmodified lines
870870 u32 rate_flags = 0;
871871 u16 cmd_len;
872872 u16 rx_chain = 0;
873− enum ieee80211_band band;
873+ enum nl80211_band band;
874874 u8 n_probes = 0;
875875 u8 rx_ant = il->hw_params.valid_rx_ant;
876876 u8 rate;
@@ -944,7 +944,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 67 unmodified lines
944944 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
945945
946946 switch (il->scan_band) {
947− case IEEE80211_BAND_2GHZ:
947+ case NL80211_BAND_2GHZ:
948948 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
949949 chan_mod =
950950 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) · 5 unmodified lines
956956 rate_flags = RATE_MCS_CCK_MSK;
957957 }
958958 break;
959− case IEEE80211_BAND_5GHZ:
959+ case NL80211_BAND_5GHZ:
960960 rate = RATE_6M_PLCP;
961961 break;
962962 default:
@@ -1590,7 +1590,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, · 627 unmodified lines
15901590 || rate_idx > RATE_COUNT_LEGACY)
15911591 rate_idx = rate_lowest_index(&il->bands[info->band], sta);
15921592 /* 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)
15941594 rate_idx += IL_FIRST_OFDM_RATE;
15951595 /* Get PLCP rate for tx_cmd->rate_n_flags */
15961596 rate_plcp = il_rates[rate_idx].plcp;
@@ -3051,7 +3051,7 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id) · 1454 unmodified lines
30513051 }
30523052 /* Set up the rate scaling to start at selected rate, fall back
30533053 * 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)
30553055 r = RATE_6M_IDX;
30563056 else
30573057 r = RATE_1M_IDX;
@@ -5790,12 +5790,12 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length) · 2732 unmodified lines
57905790
57915791 hw->max_listen_interval = IL_CONN_MAX_LISTEN_INTERVAL;
57925792
5793− if (il->bands[IEEE80211_BAND_2GHZ].n_channels)
5794− il->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
5795− &il->bands[IEEE80211_BAND_2GHZ];
5796− if (il->bands[IEEE80211_BAND_5GHZ].n_channels)
5797− il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
5798− &il->bands[IEEE80211_BAND_5GHZ];
5793+ if (il->bands[NL80211_BAND_2GHZ].n_channels)
5794+ il->hw->wiphy->bands[NL80211_BAND_2GHZ] =
5795+ &il->bands[NL80211_BAND_2GHZ];
5796+ if (il->bands[NL80211_BAND_5GHZ].n_channels)
5797+ il->hw->wiphy->bands[NL80211_BAND_5GHZ] =
5798+ &il->bands[NL80211_BAND_5GHZ];
57995799
58005800 il_leds_init(il);
58015801
@@ -6368,7 +6368,7 @@ il4965_init_drv(struct il_priv *il) · 566 unmodified lines
63686368
63696369 il->ieee_channels = NULL;
63706370 il->ieee_rates = NULL;
6371− il->band = IEEE80211_BAND_2GHZ;
6371+ il->band = NL80211_BAND_2GHZ;
63726372
63736373 il->iw_mode = NL80211_IFTYPE_STATION;
63746374 il->current_ht_config.smps = IEEE80211_SMPS_STATIC;
@@ -6480,7 +6480,7 @@ il4965_set_hw_params(struct il_priv *il) · 105 unmodified lines
64806480 il->hw_params.max_data_size = IL49_RTC_DATA_SIZE;
64816481 il->hw_params.max_inst_size = IL49_RTC_INST_SIZE;
64826482 il->hw_params.max_bsm_size = BSM_SRAM_SIZE;
6483− il->hw_params.ht40_channel = BIT(IEEE80211_BAND_5GHZ);
6483+ il->hw_params.ht40_channel = BIT(NL80211_BAND_5GHZ);
64846484
64856485 il->hw_params.rx_wrt_ptr_reg = FH49_RSCSR_CHNL0_WPTR;
64866486
drivers/net/wireless/intel/iwlegacy/4965-rs.c+11−11
@@ -549,7 +549,7 @@ il4965_rate_n_flags_from_tbl(struct il_priv *il, struct il_scale_tbl_info *tbl, · 548 unmodified lines
549549 */
550550 static int
551551 il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
552− enum ieee80211_band band,
552+ enum nl80211_band band,
553553 struct il_scale_tbl_info *tbl, int *rate_idx)
554554 {
555555 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, · 18 unmodified lines
574574 /* legacy rate format */
575575 if (!(rate_n_flags & RATE_MCS_HT_MSK)) {
576576 if (il4965_num_of_ant == 1) {
577− if (band == IEEE80211_BAND_5GHZ)
577+ if (band == NL80211_BAND_5GHZ)
578578 tbl->lq_type = LQ_A;
579579 else
580580 tbl->lq_type = LQ_G;
@@ -743,7 +743,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, · 162 unmodified lines
743743 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) {
744744 switch_to_legacy = 1;
745745 scale_idx = rs_ht_to_legacy[scale_idx];
746− if (lq_sta->band == IEEE80211_BAND_5GHZ)
746+ if (lq_sta->band == NL80211_BAND_5GHZ)
747747 tbl->lq_type = LQ_A;
748748 else
749749 tbl->lq_type = LQ_G;
@@ -762,7 +762,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, · 12 unmodified lines
762762 /* Mask with station rate restriction */
763763 if (is_legacy(tbl->lq_type)) {
764764 /* 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)
766766 rate_mask =
767767 (u16) (rate_mask &
768768 (lq_sta->supp_rates << IL_FIRST_OFDM_RATE));
@@ -851,7 +851,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, · 82 unmodified lines
851851 table = &lq_sta->lq;
852852 tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags);
853853 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)
855855 rs_idx -= IL_FIRST_OFDM_RATE;
856856 mac_flags = info->status.rates[0].flags;
857857 mac_idx = info->status.rates[0].idx;
@@ -864,7 +864,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, · 6 unmodified lines
864864 * mac80211 HT idx is always zero-idxed; we need to move
865865 * HT OFDM rates after CCK rates in 2.4 GHz band
866866 */
867− if (il->band == IEEE80211_BAND_2GHZ)
867+ if (il->band == NL80211_BAND_2GHZ)
868868 mac_idx += IL_FIRST_OFDM_RATE;
869869 }
870870 /* 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, · 945 unmodified lines
18161816
18171817 /* mask with station rate restriction */
18181818 if (is_legacy(tbl->lq_type)) {
1819− if (lq_sta->band == IEEE80211_BAND_5GHZ)
1819+ if (lq_sta->band == NL80211_BAND_5GHZ)
18201820 /* supp_rates has no CCK bits in A mode */
18211821 rate_scale_idx_msk =
18221822 (u16) (rate_mask &
@@ -2212,7 +2212,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, · 389 unmodified lines
22122212 /* Get max rate if user set max rate */
22132213 if (lq_sta) {
22142214 lq_sta->max_rate_idx = txrc->max_rate_idx;
2215− if (sband->band == IEEE80211_BAND_5GHZ &&
2215+ if (sband->band == NL80211_BAND_5GHZ &&
22162216 lq_sta->max_rate_idx != -1)
22172217 lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE;
22182218 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, · 39 unmodified lines
22582258 } else {
22592259 /* Check for invalid rates */
22602260 if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY ||
2261− (sband->band == IEEE80211_BAND_5GHZ &&
2261+ (sband->band == NL80211_BAND_5GHZ &&
22622262 rate_idx < IL_FIRST_OFDM_RATE))
22632263 rate_idx = rate_lowest_index(sband, sta);
22642264 /* On valid 5 GHz rate, adjust idx */
2265− else if (sband->band == IEEE80211_BAND_5GHZ)
2265+ else if (sband->band == NL80211_BAND_5GHZ)
22662266 rate_idx -= IL_FIRST_OFDM_RATE;
22672267 info->control.rates[0].flags = 0;
22682268 }
@@ -2362,7 +2362,7 @@ il4965_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) · 93 unmodified lines
23622362
23632363 /* Set last_txrate_idx to lowest rate */
23642364 lq_sta->last_txrate_idx = rate_lowest_index(sband, sta);
2365− if (sband->band == IEEE80211_BAND_5GHZ)
2365+ if (sband->band == NL80211_BAND_5GHZ)
23662366 lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE;
23672367 lq_sta->is_agg = 0;
23682368
drivers/net/wireless/intel/iwlegacy/4965.c+3−3
@@ -1267,7 +1267,7 @@ il4965_send_tx_power(struct il_priv *il) · 1266 unmodified lines
12671267 "TX Power requested while scanning!\n"))
12681268 return -EAGAIN;
12691269
1270− band = il->band == IEEE80211_BAND_2GHZ;
1270+ band = il->band == NL80211_BAND_2GHZ;
12711271
12721272 is_ht40 = iw4965_is_ht40_channel(il->active.flags);
12731273
@@ -1480,7 +1480,7 @@ il4965_hw_channel_switch(struct il_priv *il, · 206 unmodified lines
14801480 u8 switch_count;
14811481 u16 beacon_interval = le16_to_cpu(il->timing.beacon_interval);
14821482 struct ieee80211_vif *vif = il->vif;
1483− band = (il->band == IEEE80211_BAND_2GHZ);
1483+ band = (il->band == NL80211_BAND_2GHZ);
14841484
14851485 if (WARN_ON_ONCE(vif == NULL))
14861486 return -EIO;
@@ -1918,7 +1918,7 @@ struct il_cfg il4965_cfg = { · 431 unmodified lines
19181918 * Force use of chains B and C for scan RX on 5 GHz band
19191919 * because the device has off-channel reception on chain A.
19201920 */
1921− .scan_rx_antennas[IEEE80211_BAND_5GHZ] = ANT_BC,
1921+ .scan_rx_antennas[NL80211_BAND_5GHZ] = ANT_BC,
19221922
19231923 .eeprom_size = IL4965_EEPROM_IMG_SIZE,
19241924 .num_of_queues = IL49_NUM_QUEUES,
drivers/net/wireless/intel/iwlegacy/4965.h+1−1
@@ -68,7 +68,7 @@ void il4965_rx_replenish(struct il_priv *il); · 67 unmodified lines
6868 void il4965_rx_replenish_now(struct il_priv *il);
6969 void il4965_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq);
7070 int il4965_rxq_stop(struct il_priv *il);
71−int il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band);
71+int il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band);
7272 void il4965_rx_handle(struct il_priv *il);
7373
7474 /* tx */
drivers/net/wireless/intel/iwlegacy/common.c+35−35
@@ -860,7 +860,7 @@ il_init_band_reference(const struct il_priv *il, int eep_band, · 859 unmodified lines
860860 * Does not set up a command, or touch hardware.
861861 */
862862 static int
863−il_mod_ht40_chan_info(struct il_priv *il, enum ieee80211_band band, u16 channel,
863+il_mod_ht40_chan_info(struct il_priv *il, enum nl80211_band band, u16 channel,
864864 const struct il_eeprom_channel *eeprom_ch,
865865 u8 clear_ht40_extension_channel)
866866 {
@@ -945,7 +945,7 @@ il_init_channel_map(struct il_priv *il) · 78 unmodified lines
945945 ch_info->channel = eeprom_ch_idx[ch];
946946 ch_info->band =
947947 (band ==
948− 1) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
948+ 1) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
949949
950950 /* permanently store EEPROM's channel regulatory flags
951951 * and max power in channel info database. */
@@ -1003,14 +1003,14 @@ il_init_channel_map(struct il_priv *il) · 51 unmodified lines
10031003
10041004 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */
10051005 for (band = 6; band <= 7; band++) {
1006− enum ieee80211_band ieeeband;
1006+ enum nl80211_band ieeeband;
10071007
10081008 il_init_band_reference(il, band, &eeprom_ch_count,
10091009 &eeprom_ch_info, &eeprom_ch_idx);
10101010
10111011 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */
10121012 ieeeband =
1013− (band == 6) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
1013+ (band == 6) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
10141014
10151015 /* Loop through each band adding each of the channels */
10161016 for (ch = 0; ch < eeprom_ch_count; ch++) {
@@ -1048,19 +1048,19 @@ EXPORT_SYMBOL(il_free_channel_map); · 31 unmodified lines
10481048 * Based on band and channel number.
10491049 */
10501050 const struct il_channel_info *
1051−il_get_channel_info(const struct il_priv *il, enum ieee80211_band band,
1051+il_get_channel_info(const struct il_priv *il, enum nl80211_band band,
10521052 u16 channel)
10531053 {
10541054 int i;
10551055
10561056 switch (band) {
1057− case IEEE80211_BAND_5GHZ:
1057+ case NL80211_BAND_5GHZ:
10581058 for (i = 14; i < il->channel_count; i++) {
10591059 if (il->channel_info[i].channel == channel)
10601060 return &il->channel_info[i];
10611061 }
10621062 break;
1063− case IEEE80211_BAND_2GHZ:
1063+ case NL80211_BAND_2GHZ:
10641064 if (channel >= 1 && channel <= 14)
10651065 return &il->channel_info[channel - 1];
10661066 break;
@@ -1457,7 +1457,7 @@ il_hdl_scan_complete(struct il_priv *il, struct il_rx_buf *rxb) · 390 unmodified lines
14571457 clear_bit(S_SCAN_HW, &il->status);
14581458
14591459 D_SCAN("Scan on %sGHz took %dms\n",
1460− (il->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2",
1460+ (il->scan_band == NL80211_BAND_2GHZ) ? "2.4" : "5.2",
14611461 jiffies_to_msecs(jiffies - il->scan_start));
14621462
14631463 queue_work(il->workqueue, &il->scan_completed);
@@ -1475,10 +1475,10 @@ il_setup_rx_scan_handlers(struct il_priv *il) · 11 unmodified lines
14751475 EXPORT_SYMBOL(il_setup_rx_scan_handlers);
14761476
14771477 u16
1478−il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band,
1478+il_get_active_dwell_time(struct il_priv *il, enum nl80211_band band,
14791479 u8 n_probes)
14801480 {
1481− if (band == IEEE80211_BAND_5GHZ)
1481+ if (band == NL80211_BAND_5GHZ)
14821482 return IL_ACTIVE_DWELL_TIME_52 +
14831483 IL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1);
14841484 else
@@ -1488,14 +1488,14 @@ il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, · 3 unmodified lines
14881488 EXPORT_SYMBOL(il_get_active_dwell_time);
14891489
14901490 u16
1491−il_get_passive_dwell_time(struct il_priv *il, enum ieee80211_band band,
1491+il_get_passive_dwell_time(struct il_priv *il, enum nl80211_band band,
14921492 struct ieee80211_vif *vif)
14931493 {
14941494 u16 value;
14951495
14961496 u16 passive =
14971497 (band ==
1498− IEEE80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE +
1498+ NL80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE +
14991499 IL_PASSIVE_DWELL_TIME_24 : IL_PASSIVE_DWELL_BASE +
15001500 IL_PASSIVE_DWELL_TIME_52;
15011501
@@ -1520,10 +1520,10 @@ void · 18 unmodified lines
15201520 il_init_scan_params(struct il_priv *il)
15211521 {
15221522 u8 ant_idx = fls(il->hw_params.valid_tx_ant) - 1;
1523− if (!il->scan_tx_ant[IEEE80211_BAND_5GHZ])
1524− il->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx;
1525− if (!il->scan_tx_ant[IEEE80211_BAND_2GHZ])
1526− il->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx;
1523+ if (!il->scan_tx_ant[NL80211_BAND_5GHZ])
1524+ il->scan_tx_ant[NL80211_BAND_5GHZ] = ant_idx;
1525+ if (!il->scan_tx_ant[NL80211_BAND_2GHZ])
1526+ il->scan_tx_ant[NL80211_BAND_2GHZ] = ant_idx;
15271527 }
15281528 EXPORT_SYMBOL(il_init_scan_params);
15291529
@@ -2003,7 +2003,7 @@ il_prep_station(struct il_priv *il, const u8 *addr, bool is_ap, · 473 unmodified lines
20032003 il_set_ht_add_station(il, sta_id, sta);
20042004
20052005 /* 3945 only */
2006− 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;
20072007 /* Turn on both antennas for the station... */
20082008 station->sta.rate_n_flags = cpu_to_le16(rate | RATE_MCS_ANT_AB_MSK);
20092009
@@ -3382,7 +3382,7 @@ EXPORT_SYMBOL(il_bcast_addr); · 1372 unmodified lines
33823382 static void
33833383 il_init_ht_hw_capab(const struct il_priv *il,
33843384 struct ieee80211_sta_ht_cap *ht_info,
3385− enum ieee80211_band band)
3385+ enum nl80211_band band)
33863386 {
33873387 u16 max_bit_rate = 0;
33883388 u8 rx_chains_num = il->hw_params.rx_chains_num;
@@ -3443,8 +3443,8 @@ il_init_geos(struct il_priv *il) · 54 unmodified lines
34433443 int i = 0;
34443444 s8 max_tx_power = 0;
34453445
3446− if (il->bands[IEEE80211_BAND_2GHZ].n_bitrates ||
3447− il->bands[IEEE80211_BAND_5GHZ].n_bitrates) {
3446+ if (il->bands[NL80211_BAND_2GHZ].n_bitrates ||
3447+ il->bands[NL80211_BAND_5GHZ].n_bitrates) {
34483448 D_INFO("Geography modes already initialized.\n");
34493449 set_bit(S_GEO_CONFIGURED, &il->status);
34503450 return 0;
@@ -3465,23 +3465,23 @@ il_init_geos(struct il_priv *il) · 14 unmodified lines
34653465 }
34663466
34673467 /* 5.2GHz channels start after the 2.4GHz channels */
3468− sband = &il->bands[IEEE80211_BAND_5GHZ];
3468+ sband = &il->bands[NL80211_BAND_5GHZ];
34693469 sband->channels = &channels[ARRAY_SIZE(il_eeprom_band_1)];
34703470 /* just OFDM */
34713471 sband->bitrates = &rates[IL_FIRST_OFDM_RATE];
34723472 sband->n_bitrates = RATE_COUNT_LEGACY - IL_FIRST_OFDM_RATE;
34733473
34743474 if (il->cfg->sku & IL_SKU_N)
3475− 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);
34763476
3477− sband = &il->bands[IEEE80211_BAND_2GHZ];
3477+ sband = &il->bands[NL80211_BAND_2GHZ];
34783478 sband->channels = channels;
34793479 /* OFDM & CCK */
34803480 sband->bitrates = rates;
34813481 sband->n_bitrates = RATE_COUNT_LEGACY;
34823482
34833483 if (il->cfg->sku & IL_SKU_N)
3484− 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);
34853485
34863486 il->ieee_channels = channels;
34873487 il->ieee_rates = rates;
@@ -3532,7 +3532,7 @@ il_init_geos(struct il_priv *il) · 44 unmodified lines
35323532 il->tx_power_user_lmt = max_tx_power;
35333533 il->tx_power_next = max_tx_power;
35343534
3535− if (il->bands[IEEE80211_BAND_5GHZ].n_channels == 0 &&
3535+ if (il->bands[NL80211_BAND_5GHZ].n_channels == 0 &&
35363536 (il->cfg->sku & IL_SKU_A)) {
35373537 IL_INFO("Incorrectly detected BG card as ABG. "
35383538 "Please send your PCI ID 0x%04X:0x%04X to maintainer.\n",
@@ -3541,8 +3541,8 @@ il_init_geos(struct il_priv *il) · 2 unmodified lines
35413541 }
35423542
35433543 IL_INFO("Tunable channels: %d 802.11bg, %d 802.11a channels\n",
3544− il->bands[IEEE80211_BAND_2GHZ].n_channels,
3545− il->bands[IEEE80211_BAND_5GHZ].n_channels);
3544+ il->bands[NL80211_BAND_2GHZ].n_channels,
3545+ il->bands[NL80211_BAND_5GHZ].n_channels);
35463546
35473547 set_bit(S_GEO_CONFIGURED, &il->status);
35483548
@@ -3563,7 +3563,7 @@ il_free_geos(struct il_priv *il) · 14 unmodified lines
35633563 EXPORT_SYMBOL(il_free_geos);
35643564
35653565 static bool
3566−il_is_channel_extension(struct il_priv *il, enum ieee80211_band band,
3566+il_is_channel_extension(struct il_priv *il, enum nl80211_band band,
35673567 u16 channel, u8 extension_chan_offset)
35683568 {
35693569 const struct il_channel_info *ch_info;
@@ -3926,14 +3926,14 @@ EXPORT_SYMBOL(il_set_rxon_ht); · 356 unmodified lines
39263926
39273927 /* Return valid, unused, channel for a passive scan to reset the RF */
39283928 u8
3929−il_get_single_channel_number(struct il_priv *il, enum ieee80211_band band)
3929+il_get_single_channel_number(struct il_priv *il, enum nl80211_band band)
39303930 {
39313931 const struct il_channel_info *ch_info;
39323932 int i;
39333933 u8 channel = 0;
39343934 u8 min, max;
39353935
3936− if (band == IEEE80211_BAND_5GHZ) {
3936+ if (band == NL80211_BAND_5GHZ) {
39373937 min = 14;
39383938 max = il->channel_count;
39393939 } else {
@@ -3965,14 +3965,14 @@ EXPORT_SYMBOL(il_get_single_channel_number); · 25 unmodified lines
39653965 int
39663966 il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch)
39673967 {
3968− enum ieee80211_band band = ch->band;
3968+ enum nl80211_band band = ch->band;
39693969 u16 channel = ch->hw_value;
39703970
39713971 if (le16_to_cpu(il->staging.channel) == channel && il->band == band)
39723972 return 0;
39733973
39743974 il->staging.channel = cpu_to_le16(channel);
3975− if (band == IEEE80211_BAND_5GHZ)
3975+ if (band == NL80211_BAND_5GHZ)
39763976 il->staging.flags &= ~RXON_FLG_BAND_24G_MSK;
39773977 else
39783978 il->staging.flags |= RXON_FLG_BAND_24G_MSK;
@@ -3986,10 +3986,10 @@ il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch) · 7 unmodified lines
39863986 EXPORT_SYMBOL(il_set_rxon_channel);
39873987
39883988 void
3989−il_set_flags_for_band(struct il_priv *il, enum ieee80211_band band,
3989+il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
39903990 struct ieee80211_vif *vif)
39913991 {
3992− if (band == IEEE80211_BAND_5GHZ) {
3992+ if (band == NL80211_BAND_5GHZ) {
39933993 il->staging.flags &=
39943994 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK |
39953995 RXON_FLG_CCK_MSK);
@@ -5415,7 +5415,7 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 1419 unmodified lines
54155415
54165416 if (changes & BSS_CHANGED_ERP_CTS_PROT) {
54175417 D_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot);
5418− if (bss_conf->use_cts_prot && il->band != IEEE80211_BAND_5GHZ)
5418+ if (bss_conf->use_cts_prot && il->band != NL80211_BAND_5GHZ)
54195419 il->staging.flags |= RXON_FLG_TGG_PROTECT_MSK;
54205420 else
54215421 il->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
drivers/net/wireless/intel/iwlegacy/common.h+15−15
@@ -432,7 +432,7 @@ u16 il_eeprom_query16(const struct il_priv *il, size_t offset); · 431 unmodified lines
432432 int il_init_channel_map(struct il_priv *il);
433433 void il_free_channel_map(struct il_priv *il);
434434 const struct il_channel_info *il_get_channel_info(const struct il_priv *il,
435− enum ieee80211_band band,
435+ enum nl80211_band band,
436436 u16 channel);
437437
438438 #define IL_NUM_SCAN_RATES (2)
@@ -497,7 +497,7 @@ struct il_channel_info { · 58 unmodified lines
497497
498498 u8 group_idx; /* 0-4, maps channel to group1/2/3/4/5 */
499499 u8 band_idx; /* 0-4, maps channel to band1/2/3/4/5 */
500− enum ieee80211_band band;
500+ enum nl80211_band band;
501501
502502 /* HT40 channel info */
503503 s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */
@@ -811,7 +811,7 @@ struct il_sensitivity_ranges { · 307 unmodified lines
811811 * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR
812812 * @max_stations:
813813 * @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)
815815 * @sw_crypto: 0 for hw, 1 for sw
816816 * @max_xxx_size: for ucode uses
817817 * @ct_kill_threshold: temperature threshold
@@ -1141,13 +1141,13 @@ struct il_priv { · 323 unmodified lines
11411141 struct list_head free_frames;
11421142 int frames_count;
11431143
1144− enum ieee80211_band band;
1144+ enum nl80211_band band;
11451145 int alloc_rxb_page;
11461146
11471147 void (*handlers[IL_CN_MAX]) (struct il_priv *il,
11481148 struct il_rx_buf *rxb);
11491149
1150− struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
1150+ struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
11511151
11521152 /* spectrum measurement report caching */
11531153 struct il_spectrum_notification measure_report;
@@ -1176,10 +1176,10 @@ struct il_priv { · 22 unmodified lines
11761176 unsigned long scan_start;
11771177 unsigned long scan_start_tsf;
11781178 void *scan_cmd;
1179− enum ieee80211_band scan_band;
1179+ enum nl80211_band scan_band;
11801180 struct cfg80211_scan_request *scan_request;
11811181 struct ieee80211_vif *scan_vif;
1182− u8 scan_tx_ant[IEEE80211_NUM_BANDS];
1182+ u8 scan_tx_ant[NUM_NL80211_BANDS];
11831183 u8 mgmt_tx_ant;
11841184
11851185 /* spinlock */
@@ -1479,7 +1479,7 @@ il_is_channel_radar(const struct il_channel_info *ch_info) · 293 unmodified lines
14791479 static inline u8
14801480 il_is_channel_a_band(const struct il_channel_info *ch_info)
14811481 {
1482− return ch_info->band == IEEE80211_BAND_5GHZ;
1482+ return ch_info->band == NL80211_BAND_5GHZ;
14831483 }
14841484
14851485 static inline int
@@ -1673,7 +1673,7 @@ struct il_cfg { · 187 unmodified lines
16731673 /* params not likely to change within a device family */
16741674 struct il_base_params *base_params;
16751675 /* params likely to change within a device family */
1676− u8 scan_rx_antennas[IEEE80211_NUM_BANDS];
1676+ u8 scan_rx_antennas[NUM_NL80211_BANDS];
16771677 enum il_led_mode led_mode;
16781678
16791679 int eeprom_size;
@@ -1707,9 +1707,9 @@ void il_set_rxon_hwcrypto(struct il_priv *il, int hw_decrypt); · 27 unmodified lines
17071707 int il_check_rxon_cmd(struct il_priv *il);
17081708 int il_full_rxon_required(struct il_priv *il);
17091709 int il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch);
1710−void il_set_flags_for_band(struct il_priv *il, enum ieee80211_band band,
1710+void il_set_flags_for_band(struct il_priv *il, enum nl80211_band band,
17111711 struct ieee80211_vif *vif);
1712−u8 il_get_single_channel_number(struct il_priv *il, enum ieee80211_band band);
1712+u8 il_get_single_channel_number(struct il_priv *il, enum nl80211_band band);
17131713 void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf);
17141714 bool il_is_ht40_tx_allowed(struct il_priv *il,
17151715 struct ieee80211_sta_ht_cap *ht_cap);
@@ -1793,9 +1793,9 @@ int il_force_reset(struct il_priv *il, bool external); · 77 unmodified lines
17931793 u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame,
17941794 const u8 *ta, const u8 *ie, int ie_len, int left);
17951795 void il_setup_rx_scan_handlers(struct il_priv *il);
1796−u16 il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band,
1796+u16 il_get_active_dwell_time(struct il_priv *il, enum nl80211_band band,
17971797 u8 n_probes);
1798−u16 il_get_passive_dwell_time(struct il_priv *il, enum ieee80211_band band,
1798+u16 il_get_passive_dwell_time(struct il_priv *il, enum nl80211_band band,
17991799 struct ieee80211_vif *vif);
18001800 void il_setup_scan_deferred_work(struct il_priv *il);
18011801 void il_cancel_scan_deferred_work(struct il_priv *il);
@@ -1955,7 +1955,7 @@ il_commit_rxon(struct il_priv *il) · 153 unmodified lines
19551955 }
19561956
19571957 static inline const struct ieee80211_supported_band *
1958−il_get_hw_mode(struct il_priv *il, enum ieee80211_band band)
1958+il_get_hw_mode(struct il_priv *il, enum nl80211_band band)
19591959 {
19601960 return il->hw->wiphy->bands[band];
19611961 }
@@ -2813,7 +2813,7 @@ struct il_lq_sta { · 851 unmodified lines
28132813 u8 action_counter; /* # mode-switch actions tried */
28142814 u8 is_green;
28152815 u8 is_dup;
2816− enum ieee80211_band band;
2816+ enum nl80211_band band;
28172817
28182818 /* The following are bitmaps of rates; RATE_6M_MASK, etc. */
28192819 u32 supp_rates;
drivers/net/wireless/intel/iwlegacy/debug.c+2−2
@@ -544,7 +544,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count, · 543 unmodified lines
544544 return -ENOMEM;
545545 }
546546
547− supp_band = il_get_hw_mode(il, IEEE80211_BAND_2GHZ);
547+ supp_band = il_get_hw_mode(il, NL80211_BAND_2GHZ);
548548 if (supp_band) {
549549 channels = supp_band->channels;
550550
@@ -571,7 +571,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count, · 20 unmodified lines
571571 flags & IEEE80211_CHAN_NO_IR ?
572572 "passive only" : "active/passive");
573573 }
574− supp_band = il_get_hw_mode(il, IEEE80211_BAND_5GHZ);
574+ supp_band = il_get_hw_mode(il, NL80211_BAND_5GHZ);
575575 if (supp_band) {
576576 channels = supp_band->channels;
577577
drivers/net/wireless/intel/iwlwifi/dvm/agn.h+4−4
@@ -158,7 +158,7 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, · 157 unmodified lines
158158 struct iwl_rxon_context *ctx);
159159 void iwl_set_flags_for_band(struct iwl_priv *priv,
160160 struct iwl_rxon_context *ctx,
161− enum ieee80211_band band,
161+ enum nl80211_band band,
162162 struct ieee80211_vif *vif);
163163
164164 /* uCode */
@@ -186,7 +186,7 @@ int iwl_send_statistics_request(struct iwl_priv *priv, · 21 unmodified lines
186186 u8 flags, bool clear);
187187
188188 static 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)
190190 {
191191 return priv->hw->wiphy->bands[band];
192192 }
@@ -198,7 +198,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan); · 5 unmodified lines
198198 #endif
199199
200200 /* rx */
201−int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band);
201+int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band);
202202 void iwl_setup_rx_handlers(struct iwl_priv *priv);
203203 void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
204204
@@ -258,7 +258,7 @@ void iwl_cancel_scan_deferred_work(struct iwl_priv *priv); · 53 unmodified lines
258258 int __must_check iwl_scan_initiate(struct iwl_priv *priv,
259259 struct ieee80211_vif *vif,
260260 enum iwl_scan_type scan_type,
261− enum ieee80211_band band);
261+ enum nl80211_band band);
262262
263263 /* For faster active scanning, scan will move to the next channel if fewer than
264264 * PLCP_QUIET_THRESH packets are heard on this channel within
drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c+2−2
@@ -335,7 +335,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf, · 334 unmodified lines
335335 if (!buf)
336336 return -ENOMEM;
337337
338− supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_2GHZ);
338+ supp_band = iwl_get_hw_mode(priv, NL80211_BAND_2GHZ);
339339 if (supp_band) {
340340 channels = supp_band->channels;
341341
@@ -358,7 +358,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf, · 16 unmodified lines
358358 IEEE80211_CHAN_NO_IR ?
359359 "passive only" : "active/passive");
360360 }
361− supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_5GHZ);
361+ supp_band = iwl_get_hw_mode(priv, NL80211_BAND_5GHZ);
362362 if (supp_band) {
363363 channels = supp_band->channels;
364364
drivers/net/wireless/intel/iwlwifi/dvm/dev.h+3−3
@@ -677,7 +677,7 @@ struct iwl_priv { · 676 unmodified lines
677677
678678 struct iwl_hw_params hw_params;
679679
680− enum ieee80211_band band;
680+ enum nl80211_band band;
681681 u8 valid_contexts;
682682
683683 void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv,
@@ -722,11 +722,11 @@ struct iwl_priv { · 38 unmodified lines
722722 unsigned long scan_start;
723723 unsigned long scan_start_tsf;
724724 void *scan_cmd;
725− enum ieee80211_band scan_band;
725+ enum nl80211_band scan_band;
726726 struct cfg80211_scan_request *scan_request;
727727 struct ieee80211_vif *scan_vif;
728728 enum iwl_scan_type scan_type;
729− u8 scan_tx_ant[IEEE80211_NUM_BANDS];
729+ u8 scan_tx_ant[NUM_NL80211_BANDS];
730730 u8 mgmt_tx_ant;
731731
732732 /* max number of station keys */
drivers/net/wireless/intel/iwlwifi/dvm/devices.c+2−2
@@ -420,7 +420,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, · 419 unmodified lines
420420 .data = { &cmd, },
421421 };
422422
423− cmd.band = priv->band == IEEE80211_BAND_2GHZ;
423+ cmd.band = priv->band == NL80211_BAND_2GHZ;
424424 ch = ch_switch->chandef.chan->hw_value;
425425 IWL_DEBUG_11H(priv, "channel switch from %d to %d\n",
426426 ctx->active.channel, ch);
@@ -588,7 +588,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, · 161 unmodified lines
588588
589589 hcmd.data[0] = cmd;
590590
591− cmd->band = priv->band == IEEE80211_BAND_2GHZ;
591+ cmd->band = priv->band == NL80211_BAND_2GHZ;
592592 ch = ch_switch->chandef.chan->hw_value;
593593 IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
594594 ctx->active.channel, ch);
drivers/net/wireless/intel/iwlwifi/dvm/lib.c+3−3
@@ -94,7 +94,7 @@ void iwlagn_temperature(struct iwl_priv *priv) · 93 unmodified lines
9494 iwl_tt_handler(priv);
9595 }
9696
97−int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band)
97+int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum nl80211_band band)
9898 {
9999 int idx = 0;
100100 int band_offset = 0;
@@ -105,7 +105,7 @@ int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) · 4 unmodified lines
105105 return idx;
106106 /* Legacy rate format, search for match in table */
107107 } else {
108− if (band == IEEE80211_BAND_5GHZ)
108+ if (band == NL80211_BAND_5GHZ)
109109 band_offset = IWL_FIRST_OFDM_RATE;
110110 for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++)
111111 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) · 766 unmodified lines
878878 int i;
879879 u8 ind = ant;
880880
881− if (priv->band == IEEE80211_BAND_2GHZ &&
881+ if (priv->band == NL80211_BAND_2GHZ &&
882882 priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)
883883 return 0;
884884
drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c+6−6
@@ -202,12 +202,12 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, · 201 unmodified lines
202202
203203 hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL;
204204
205− if (priv->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels)
206− priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
207− &priv->nvm_data->bands[IEEE80211_BAND_2GHZ];
208− if (priv->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels)
209− priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
210− &priv->nvm_data->bands[IEEE80211_BAND_5GHZ];
205+ if (priv->nvm_data->bands[NL80211_BAND_2GHZ].n_channels)
206+ priv->hw->wiphy->bands[NL80211_BAND_2GHZ] =
207+ &priv->nvm_data->bands[NL80211_BAND_2GHZ];
208+ if (priv->nvm_data->bands[NL80211_BAND_5GHZ].n_channels)
209+ priv->hw->wiphy->bands[NL80211_BAND_5GHZ] =
210+ &priv->nvm_data->bands[NL80211_BAND_5GHZ];
211211
212212 hw->wiphy->hw_version = priv->trans->hw_id;
213213
drivers/net/wireless/intel/iwlwifi/dvm/main.c+2−2
@@ -262,7 +262,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) · 261 unmodified lines
262262 rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant);
263263
264264 /* In mac80211, rates for 5 GHz start at 0 */
265− if (info->band == IEEE80211_BAND_5GHZ)
265+ if (info->band == NL80211_BAND_5GHZ)
266266 rate += IWL_FIRST_OFDM_RATE;
267267 else if (rate >= IWL_FIRST_CCK_RATE && rate <= IWL_LAST_CCK_RATE)
268268 rate_flags |= RATE_MCS_CCK_MSK;
@@ -1117,7 +1117,7 @@ static int iwl_init_drv(struct iwl_priv *priv) · 848 unmodified lines
11171117
11181118 INIT_LIST_HEAD(&priv->calib_results);
11191119
1120− priv->band = IEEE80211_BAND_2GHZ;
1120+ priv->band = NL80211_BAND_2GHZ;
11211121
11221122 priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold;
11231123
drivers/net/wireless/intel/iwlwifi/dvm/rs.c+11−11
@@ -599,7 +599,7 @@ static u32 rate_n_flags_from_tbl(struct iwl_priv *priv, · 598 unmodified lines
599599 * fill "search" or "active" tx mode table.
600600 */
601601 static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags,
602− enum ieee80211_band band,
602+ enum nl80211_band band,
603603 struct iwl_scale_tbl_info *tbl,
604604 int *rate_idx)
605605 {
@@ -624,7 +624,7 @@ static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags, · 18 unmodified lines
624624 /* legacy rate format */
625625 if (!(rate_n_flags & RATE_MCS_HT_MSK)) {
626626 if (num_of_ant == 1) {
627− if (band == IEEE80211_BAND_5GHZ)
627+ if (band == NL80211_BAND_5GHZ)
628628 tbl->lq_type = LQ_A;
629629 else
630630 tbl->lq_type = LQ_G;
@@ -802,7 +802,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, · 171 unmodified lines
802802 if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) {
803803 switch_to_legacy = 1;
804804 scale_index = rs_ht_to_legacy[scale_index];
805− if (lq_sta->band == IEEE80211_BAND_5GHZ)
805+ if (lq_sta->band == NL80211_BAND_5GHZ)
806806 tbl->lq_type = LQ_A;
807807 else
808808 tbl->lq_type = LQ_G;
@@ -821,7 +821,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, · 12 unmodified lines
821821 /* Mask with station rate restriction */
822822 if (is_legacy(tbl->lq_type)) {
823823 /* 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)
825825 rate_mask = (u16)(rate_mask &
826826 (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE));
827827 else
@@ -939,7 +939,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, · 111 unmodified lines
939939 table = &lq_sta->lq;
940940 tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags);
941941 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)
943943 rs_index -= IWL_FIRST_OFDM_RATE;
944944 mac_flags = info->status.rates[0].flags;
945945 mac_index = info->status.rates[0].idx;
@@ -952,7 +952,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, · 6 unmodified lines
952952 * mac80211 HT index is always zero-indexed; we need to move
953953 * HT OFDM rates after CCK rates in 2.4 GHz band
954954 */
955− if (priv->band == IEEE80211_BAND_2GHZ)
955+ if (priv->band == NL80211_BAND_2GHZ)
956956 mac_index += IWL_FIRST_OFDM_RATE;
957957 }
958958 /* 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, · 1325 unmodified lines
22842284
22852285 /* mask with station rate restriction */
22862286 if (is_legacy(tbl->lq_type)) {
2287− if (lq_sta->band == IEEE80211_BAND_5GHZ)
2287+ if (lq_sta->band == NL80211_BAND_5GHZ)
22882288 /* supp_rates has no CCK bits in A mode */
22892289 rate_scale_index_msk = (u16) (rate_mask &
22902290 (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, · 430 unmodified lines
27212721 /* Get max rate if user set max rate */
27222722 if (lq_sta) {
27232723 lq_sta->max_rate_idx = txrc->max_rate_idx;
2724− if ((sband->band == IEEE80211_BAND_5GHZ) &&
2724+ if ((sband->band == NL80211_BAND_5GHZ) &&
27252725 (lq_sta->max_rate_idx != -1))
27262726 lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE;
27272727 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, · 35 unmodified lines
27632763 } else {
27642764 /* Check for invalid rates */
27652765 if ((rate_idx < 0) || (rate_idx >= IWL_RATE_COUNT_LEGACY) ||
2766− ((sband->band == IEEE80211_BAND_5GHZ) &&
2766+ ((sband->band == NL80211_BAND_5GHZ) &&
27672767 (rate_idx < IWL_FIRST_OFDM_RATE)))
27682768 rate_idx = rate_lowest_index(sband, sta);
27692769 /* On valid 5 GHz rate, adjust index */
2770− else if (sband->band == IEEE80211_BAND_5GHZ)
2770+ else if (sband->band == NL80211_BAND_5GHZ)
27712771 rate_idx -= IWL_FIRST_OFDM_RATE;
27722772 info->control.rates[0].flags = 0;
27732773 }
@@ -2880,7 +2880,7 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i · 106 unmodified lines
28802880
28812881 /* Set last_txrate_idx to lowest rate */
28822882 lq_sta->last_txrate_idx = rate_lowest_index(sband, sta);
2883− if (sband->band == IEEE80211_BAND_5GHZ)
2883+ if (sband->band == NL80211_BAND_5GHZ)
28842884 lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE;
28852885 lq_sta->is_agg = 0;
28862886 #ifdef CONFIG_MAC80211_DEBUGFS
drivers/net/wireless/intel/iwlwifi/dvm/rs.h+1−1
@@ -355,7 +355,7 @@ struct iwl_lq_sta { · 354 unmodified lines
355355 u8 action_counter; /* # mode-switch actions tried */
356356 u8 is_green;
357357 u8 is_dup;
358− enum ieee80211_band band;
358+ enum nl80211_band band;
359359
360360 /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */
361361 u32 supp_rates;
drivers/net/wireless/intel/iwlwifi/dvm/rx.c+1−1
@@ -834,7 +834,7 @@ static void iwlagn_rx_reply_rx(struct iwl_priv *priv, · 833 unmodified lines
834834 /* rx_status carries information about the packet to mac80211 */
835835 rx_status.mactime = le64_to_cpu(phy_res->timestamp);
836836 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;
838838 rx_status.freq =
839839 ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel),
840840 rx_status.band);
drivers/net/wireless/intel/iwlwifi/dvm/rxon.c+5−5
@@ -719,7 +719,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf) · 718 unmodified lines
719719 void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch,
720720 struct iwl_rxon_context *ctx)
721721 {
722− enum ieee80211_band band = ch->band;
722+ enum nl80211_band band = ch->band;
723723 u16 channel = ch->hw_value;
724724
725725 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, · 1 unmodified line
727727 return;
728728
729729 ctx->staging.channel = cpu_to_le16(channel);
730− if (band == IEEE80211_BAND_5GHZ)
730+ if (band == NL80211_BAND_5GHZ)
731731 ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK;
732732 else
733733 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, · 6 unmodified lines
740740
741741 void iwl_set_flags_for_band(struct iwl_priv *priv,
742742 struct iwl_rxon_context *ctx,
743− enum ieee80211_band band,
743+ enum nl80211_band band,
744744 struct ieee80211_vif *vif)
745745 {
746− if (band == IEEE80211_BAND_5GHZ) {
746+ if (band == NL80211_BAND_5GHZ) {
747747 ctx->staging.flags &=
748748 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK
749749 | RXON_FLG_CCK_MSK);
@@ -1476,7 +1476,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, · 726 unmodified lines
14761476
14771477 iwlagn_set_rxon_chain(priv, ctx);
14781478
1479− if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ))
1479+ if (bss_conf->use_cts_prot && (priv->band != NL80211_BAND_5GHZ))
14801480 ctx->staging.flags |= RXON_FLG_TGG_PROTECT_MSK;
14811481 else
14821482 ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
drivers/net/wireless/intel/iwlwifi/dvm/scan.c+19−19
@@ -312,7 +312,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv, · 311 unmodified lines
312312 scan_notif->tsf_high, scan_notif->status);
313313
314314 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",
316316 jiffies_to_msecs(jiffies - priv->scan_start));
317317
318318 /*
@@ -362,9 +362,9 @@ void iwl_setup_rx_scan_handlers(struct iwl_priv *priv) · 43 unmodified lines
362362 }
363363
364364 static 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)
366366 {
367− if (band == IEEE80211_BAND_5GHZ)
367+ if (band == NL80211_BAND_5GHZ)
368368 return IWL_ACTIVE_DWELL_TIME_52 +
369369 IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1);
370370 else
@@ -431,9 +431,9 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time) · 60 unmodified lines
431431 }
432432
433433 static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv,
434− enum ieee80211_band band)
434+ enum nl80211_band band)
435435 {
436− u16 passive = (band == IEEE80211_BAND_2GHZ) ?
436+ u16 passive = (band == NL80211_BAND_2GHZ) ?
437437 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 :
438438 IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52;
439439
@@ -442,7 +442,7 @@ static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, · 2 unmodified lines
442442
443443 /* Return valid, unused, channel for a passive scan to reset the RF */
444444 static u8 iwl_get_single_channel_number(struct iwl_priv *priv,
445− enum ieee80211_band band)
445+ enum nl80211_band band)
446446 {
447447 struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band];
448448 struct iwl_rxon_context *ctx;
@@ -470,7 +470,7 @@ static u8 iwl_get_single_channel_number(struct iwl_priv *priv, · 21 unmodified lines
470470
471471 static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv,
472472 struct ieee80211_vif *vif,
473− enum ieee80211_band band,
473+ enum nl80211_band band,
474474 struct iwl_scan_channel *scan_ch)
475475 {
476476 const struct ieee80211_supported_band *sband;
@@ -492,7 +492,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, · 15 unmodified lines
492492 cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME);
493493 /* Set txpower levels to defaults */
494494 scan_ch->dsp_atten = 110;
495− if (band == IEEE80211_BAND_5GHZ)
495+ if (band == NL80211_BAND_5GHZ)
496496 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
497497 else
498498 scan_ch->tx_gain = ((1 << 5) | (5 << 3));
@@ -505,7 +505,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, · 6 unmodified lines
505505
506506 static int iwl_get_channels_for_scan(struct iwl_priv *priv,
507507 struct ieee80211_vif *vif,
508− enum ieee80211_band band,
508+ enum nl80211_band band,
509509 u8 is_active, u8 n_probes,
510510 struct iwl_scan_channel *scan_ch)
511511 {
@@ -553,7 +553,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv, · 41 unmodified lines
553553 * power level:
554554 * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3;
555555 */
556− if (band == IEEE80211_BAND_5GHZ)
556+ if (band == NL80211_BAND_5GHZ)
557557 scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3;
558558 else
559559 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) · 76 unmodified lines
636636 u32 rate_flags = 0;
637637 u16 cmd_len = 0;
638638 u16 rx_chain = 0;
639− enum ieee80211_band band;
639+ enum nl80211_band band;
640640 u8 n_probes = 0;
641641 u8 rx_ant = priv->nvm_data->valid_rx_ant;
642642 u8 rate;
@@ -750,7 +750,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · 107 unmodified lines
750750 scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE;
751751
752752 switch (priv->scan_band) {
753− case IEEE80211_BAND_2GHZ:
753+ case NL80211_BAND_2GHZ:
754754 scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK;
755755 chan_mod = le32_to_cpu(
756756 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) · 14 unmodified lines
771771 priv->lib->bt_params->advanced_bt_coexist)
772772 scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT;
773773 break;
774− case IEEE80211_BAND_5GHZ:
774+ case NL80211_BAND_5GHZ:
775775 rate = IWL_RATE_6M_PLCP;
776776 break;
777777 default:
@@ -809,7 +809,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · 31 unmodified lines
809809
810810 band = priv->scan_band;
811811
812− if (band == IEEE80211_BAND_2GHZ &&
812+ if (band == NL80211_BAND_2GHZ &&
813813 priv->lib->bt_params &&
814814 priv->lib->bt_params->advanced_bt_coexist) {
815815 /* 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) · 109 unmodified lines
925925 void iwl_init_scan_params(struct iwl_priv *priv)
926926 {
927927 u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1;
928− if (!priv->scan_tx_ant[IEEE80211_BAND_5GHZ])
929− priv->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx;
930− if (!priv->scan_tx_ant[IEEE80211_BAND_2GHZ])
931− priv->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx;
928+ if (!priv->scan_tx_ant[NL80211_BAND_5GHZ])
929+ priv->scan_tx_ant[NL80211_BAND_5GHZ] = ant_idx;
930+ if (!priv->scan_tx_ant[NL80211_BAND_2GHZ])
931+ priv->scan_tx_ant[NL80211_BAND_2GHZ] = ant_idx;
932932 }
933933
934934 int __must_check iwl_scan_initiate(struct iwl_priv *priv,
935935 struct ieee80211_vif *vif,
936936 enum iwl_scan_type scan_type,
937− enum ieee80211_band band)
937+ enum nl80211_band band)
938938 {
939939 int ret;
940940
drivers/net/wireless/intel/iwlwifi/dvm/sta.c+1−1
@@ -579,7 +579,7 @@ static void iwl_sta_fill_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, · 578 unmodified lines
579579
580580 /* Set up the rate scaling to start at selected rate, fall back
581581 * 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)
583583 r = IWL_RATE_6M_INDEX;
584584 else if (ctx && ctx->vif && ctx->vif->p2p)
585585 r = IWL_RATE_6M_INDEX;
drivers/net/wireless/intel/iwlwifi/dvm/tx.c+2−2
@@ -81,7 +81,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, · 80 unmodified lines
8181 tx_flags |= TX_CMD_FLG_TSF_MSK;
8282 else if (ieee80211_is_back_req(fc))
8383 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 &&
8585 priv->lib->bt_params &&
8686 priv->lib->bt_params->advanced_bt_coexist &&
8787 (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) ||
@@ -177,7 +177,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, · 89 unmodified lines
177177 rate_idx = rate_lowest_index(
178178 &priv->nvm_data->bands[info->band], sta);
179179 /* 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)
181181 rate_idx += IWL_FIRST_OFDM_RATE;
182182 /* Get PLCP rate for tx_cmd->rate_n_flags */
183183 rate_plcp = iwl_rates[rate_idx].plcp;
drivers/net/wireless/intel/iwlwifi/iwl-1000.c+1−1
@@ -64,7 +64,7 @@ static const struct iwl_base_params iwl1000_base_params = { · 63 unmodified lines
6464 static const struct iwl_ht_params iwl1000_ht_params = {
6565 .ht_greenfield_support = true,
6666 .use_rts_for_aggregation = true, /* use rts/cts protection */
67− .ht40_bands = BIT(IEEE80211_BAND_2GHZ),
67+ .ht40_bands = BIT(NL80211_BAND_2GHZ),
6868 };
6969
7070 static const struct iwl_eeprom_params iwl1000_eeprom_params = {
drivers/net/wireless/intel/iwlwifi/iwl-2000.c+1−1
@@ -89,7 +89,7 @@ static const struct iwl_base_params iwl2030_base_params = { · 88 unmodified lines
8989 static const struct iwl_ht_params iwl2000_ht_params = {
9090 .ht_greenfield_support = true,
9191 .use_rts_for_aggregation = true, /* use rts/cts protection */
92− .ht40_bands = BIT(IEEE80211_BAND_2GHZ),
92+ .ht40_bands = BIT(NL80211_BAND_2GHZ),
9393 };
9494
9595 static const struct iwl_eeprom_params iwl20x0_eeprom_params = {
drivers/net/wireless/intel/iwlwifi/iwl-5000.c+1−1
@@ -62,7 +62,7 @@ static const struct iwl_base_params iwl5000_base_params = { · 61 unmodified lines
6262
6363 static const struct iwl_ht_params iwl5000_ht_params = {
6464 .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),
6666 };
6767
6868 static const struct iwl_eeprom_params iwl5000_eeprom_params = {
drivers/net/wireless/intel/iwlwifi/iwl-6000.c+1−1
@@ -110,7 +110,7 @@ static const struct iwl_base_params iwl6000_g2_base_params = { · 109 unmodified lines
110110 static const struct iwl_ht_params iwl6000_ht_params = {
111111 .ht_greenfield_support = true,
112112 .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),
114114 };
115115
116116 static const struct iwl_eeprom_params iwl6000_eeprom_params = {
drivers/net/wireless/intel/iwlwifi/iwl-7000.c+2−2
@@ -156,7 +156,7 @@ static const struct iwl_tt_params iwl7000_high_temp_tt_params = { · 155 unmodified lines
156156
157157 static const struct iwl_ht_params iwl7000_ht_params = {
158158 .stbc = true,
159− .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
159+ .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
160160 };
161161
162162 #define IWL_DEVICE_7000_COMMON \
@@ -287,7 +287,7 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = { · 124 unmodified lines
287287 static const struct iwl_ht_params iwl7265_ht_params = {
288288 .stbc = true,
289289 .ldpc = true,
290− .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
290+ .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
291291 };
292292
293293 const struct iwl_cfg iwl3165_2ac_cfg = {
drivers/net/wireless/intel/iwlwifi/iwl-8000.c+1−1
@@ -124,7 +124,7 @@ static const struct iwl_base_params iwl8000_base_params = { · 123 unmodified lines
124124 static const struct iwl_ht_params iwl8000_ht_params = {
125125 .stbc = true,
126126 .ldpc = true,
127− .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
127+ .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
128128 };
129129
130130 static const struct iwl_tt_params iwl8000_tt_params = {
drivers/net/wireless/intel/iwlwifi/iwl-9000.c+1−1
@@ -93,7 +93,7 @@ static const struct iwl_base_params iwl9000_base_params = { · 92 unmodified lines
9393 static const struct iwl_ht_params iwl9000_ht_params = {
9494 .stbc = true,
9595 .ldpc = true,
96− .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ),
96+ .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ),
9797 };
9898
9999 static const struct iwl_tt_params iwl9000_tt_params = {
drivers/net/wireless/intel/iwlwifi/iwl-config.h+1−1
@@ -185,7 +185,7 @@ struct iwl_base_params { · 184 unmodified lines
185185 * @stbc: support Tx STBC and 1*SS Rx STBC
186186 * @ldpc: support Tx/Rx with LDPC
187187 * @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
189189 */
190190 struct iwl_ht_params {
191191 enum ieee80211_smps_mode smps_mode;
drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c+19−19
@@ -390,10 +390,10 @@ iwl_eeprom_enh_txp_read_element(struct iwl_nvm_data *data, · 389 unmodified lines
390390 int n_channels, s8 max_txpower_avg)
391391 {
392392 int ch_idx;
393− enum ieee80211_band band;
393+ enum nl80211_band band;
394394
395395 band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ?
396− IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ;
396+ NL80211_BAND_5GHZ : NL80211_BAND_2GHZ;
397397
398398 for (ch_idx = 0; ch_idx < n_channels; ch_idx++) {
399399 struct ieee80211_channel *chan = &data->channels[ch_idx];
@@ -526,7 +526,7 @@ static void iwl_init_band_reference(const struct iwl_cfg *cfg, · 126 unmodified lines
526526
527527 static void iwl_mod_ht40_chan_info(struct device *dev,
528528 struct iwl_nvm_data *data, int n_channels,
529− enum ieee80211_band band, u16 channel,
529+ enum nl80211_band band, u16 channel,
530530 const struct iwl_eeprom_channel *eeprom_ch,
531531 u8 clear_ht40_extension_channel)
532532 {
@@ -548,7 +548,7 @@ static void iwl_mod_ht40_chan_info(struct device *dev, · 15 unmodified lines
548548 IWL_DEBUG_EEPROM(dev,
549549 "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm): Ad-Hoc %ssupported\n",
550550 channel,
551− band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4",
551+ band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
552552 CHECK_AND_PRINT(IBSS),
553553 CHECK_AND_PRINT(ACTIVE),
554554 CHECK_AND_PRINT(RADAR),
@@ -606,8 +606,8 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, · 51 unmodified lines
606606 n_channels++;
607607
608608 channel->hw_value = eeprom_ch_array[ch_idx];
609− channel->band = (band == 1) ? IEEE80211_BAND_2GHZ
610− : IEEE80211_BAND_5GHZ;
609+ channel->band = (band == 1) ? NL80211_BAND_2GHZ
610+ : NL80211_BAND_5GHZ;
611611 channel->center_freq =
612612 ieee80211_channel_to_frequency(
613613 channel->hw_value, channel->band);
@@ -677,15 +677,15 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, · 63 unmodified lines
677677
678678 /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */
679679 for (band = 6; band <= 7; band++) {
680− enum ieee80211_band ieeeband;
680+ enum nl80211_band ieeeband;
681681
682682 iwl_init_band_reference(cfg, eeprom, eeprom_size, band,
683683 &eeprom_ch_count, &eeprom_ch_info,
684684 &eeprom_ch_array);
685685
686686 /* EEPROM band 6 is 2.4, band 7 is 5 GHz */
687− ieeeband = (band == 6) ? IEEE80211_BAND_2GHZ
688− : IEEE80211_BAND_5GHZ;
687+ ieeeband = (band == 6) ? NL80211_BAND_2GHZ
688+ : NL80211_BAND_5GHZ;
689689
690690 /* Loop through each band adding each of the channels */
691691 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, · 16 unmodified lines
708708
709709 int iwl_init_sband_channels(struct iwl_nvm_data *data,
710710 struct ieee80211_supported_band *sband,
711− int n_channels, enum ieee80211_band band)
711+ int n_channels, enum nl80211_band band)
712712 {
713713 struct ieee80211_channel *chan = &data->channels[0];
714714 int n = 0, idx = 0;
@@ -734,7 +734,7 @@ int iwl_init_sband_channels(struct iwl_nvm_data *data, · 19 unmodified lines
734734 void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
735735 struct iwl_nvm_data *data,
736736 struct ieee80211_sta_ht_cap *ht_info,
737− enum ieee80211_band band,
737+ enum nl80211_band band,
738738 u8 tx_chains, u8 rx_chains)
739739 {
740740 int max_bit_rate = 0;
@@ -813,22 +813,22 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, · 72 unmodified lines
813813 int n_used = 0;
814814 struct ieee80211_supported_band *sband;
815815
816− sband = &data->bands[IEEE80211_BAND_2GHZ];
817− sband->band = IEEE80211_BAND_2GHZ;
816+ sband = &data->bands[NL80211_BAND_2GHZ];
817+ sband->band = NL80211_BAND_2GHZ;
818818 sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS];
819819 sband->n_bitrates = N_RATES_24;
820820 n_used += iwl_init_sband_channels(data, sband, n_channels,
821− IEEE80211_BAND_2GHZ);
822− iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_2GHZ,
821+ NL80211_BAND_2GHZ);
822+ iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ,
823823 data->valid_tx_ant, data->valid_rx_ant);
824824
825− sband = &data->bands[IEEE80211_BAND_5GHZ];
826− sband->band = IEEE80211_BAND_5GHZ;
825+ sband = &data->bands[NL80211_BAND_5GHZ];
826+ sband->band = NL80211_BAND_5GHZ;
827827 sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS];
828828 sband->n_bitrates = N_RATES_52;
829829 n_used += iwl_init_sband_channels(data, sband, n_channels,
830− IEEE80211_BAND_5GHZ);
831− iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_5GHZ,
830+ NL80211_BAND_5GHZ);
831+ iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ,
832832 data->valid_tx_ant, data->valid_rx_ant);
833833
834834 if (n_channels != n_used)
drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h+3−3
@@ -98,7 +98,7 @@ struct iwl_nvm_data { · 97 unmodified lines
9898 s8 max_tx_pwr_half_dbm;
9999
100100 bool lar_enabled;
101− struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
101+ struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
102102 struct ieee80211_channel channels[];
103103 };
104104
@@ -133,12 +133,12 @@ int iwl_nvm_check_version(struct iwl_nvm_data *data, · 28 unmodified lines
133133
134134 int iwl_init_sband_channels(struct iwl_nvm_data *data,
135135 struct ieee80211_supported_band *sband,
136− int n_channels, enum ieee80211_band band);
136+ int n_channels, enum nl80211_band band);
137137
138138 void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg,
139139 struct iwl_nvm_data *data,
140140 struct ieee80211_sta_ht_cap *ht_info,
141− enum ieee80211_band band,
141+ enum nl80211_band band,
142142 u8 tx_chains, u8 rx_chains);
143143
144144 #endif /* __iwl_eeprom_parse_h__ */
drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c+13−13
@@ -308,7 +308,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, · 307 unmodified lines
308308
309309 channel->hw_value = nvm_chan[ch_idx];
310310 channel->band = (ch_idx < num_2ghz_channels) ?
311− IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
311+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
312312 channel->center_freq =
313313 ieee80211_channel_to_frequency(
314314 channel->hw_value, channel->band);
@@ -320,7 +320,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, · 5 unmodified lines
320320 * is not used in mvm, and is used for backwards compatibility
321321 */
322322 channel->max_power = IWL_DEFAULT_MAX_TX_POWER;
323− is_5ghz = channel->band == IEEE80211_BAND_5GHZ;
323+ is_5ghz = channel->band == NL80211_BAND_5GHZ;
324324
325325 /* don't put limitations in case we're using LAR */
326326 if (!lar_supported)
@@ -439,22 +439,22 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, · 112 unmodified lines
439439 &ch_section[NVM_CHANNELS_FAMILY_8000],
440440 lar_supported);
441441
442− sband = &data->bands[IEEE80211_BAND_2GHZ];
443− sband->band = IEEE80211_BAND_2GHZ;
442+ sband = &data->bands[NL80211_BAND_2GHZ];
443+ sband->band = NL80211_BAND_2GHZ;
444444 sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS];
445445 sband->n_bitrates = N_RATES_24;
446446 n_used += iwl_init_sband_channels(data, sband, n_channels,
447− IEEE80211_BAND_2GHZ);
448− iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_2GHZ,
447+ NL80211_BAND_2GHZ);
448+ iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ,
449449 tx_chains, rx_chains);
450450
451− sband = &data->bands[IEEE80211_BAND_5GHZ];
452− sband->band = IEEE80211_BAND_5GHZ;
451+ sband = &data->bands[NL80211_BAND_5GHZ];
452+ sband->band = NL80211_BAND_5GHZ;
453453 sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS];
454454 sband->n_bitrates = N_RATES_52;
455455 n_used += iwl_init_sband_channels(data, sband, n_channels,
456− IEEE80211_BAND_5GHZ);
457− iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_5GHZ,
456+ NL80211_BAND_5GHZ);
457+ iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ,
458458 tx_chains, rx_chains);
459459 if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac)
460460 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, · 320 unmodified lines
781781 struct ieee80211_regdomain *regd;
782782 int size_of_regd;
783783 struct ieee80211_reg_rule *rule;
784− enum ieee80211_band band;
784+ enum nl80211_band band;
785785 int center_freq, prev_center_freq = 0;
786786 int valid_rules = 0;
787787 bool new_rule;
@@ -809,7 +809,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, · 21 unmodified lines
809809 for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) {
810810 ch_flags = (u16)__le32_to_cpup(channels + ch_idx);
811811 band = (ch_idx < NUM_2GHZ_CHANNELS) ?
812− IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
812+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
813813 center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx],
814814 band);
815815 new_rule = false;
@@ -857,7 +857,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, · 41 unmodified lines
857857 IWL_DEBUG_DEV(dev, IWL_DL_LAR,
858858 "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n",
859859 center_freq,
860− band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4",
860+ band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
861861 CHECK_AND_PRINT_I(VALID),
862862 CHECK_AND_PRINT_I(ACTIVE),
863863 CHECK_AND_PRINT_I(RADAR),
drivers/net/wireless/intel/iwlwifi/mvm/coex.c+5−5
@@ -378,7 +378,7 @@ iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif) · 377 unmodified lines
378378 chanctx_conf = rcu_dereference(vif->chanctx_conf);
379379
380380 if (!chanctx_conf ||
381− chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ) {
381+ chanctx_conf->def.chan->band != NL80211_BAND_2GHZ) {
382382 rcu_read_unlock();
383383 return BT_COEX_INVALID_LUT;
384384 }
@@ -537,7 +537,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, · 152 unmodified lines
537537
538538 /* If channel context is invalid or not on 2.4GHz .. */
539539 if ((!chanctx_conf ||
540− chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ)) {
540+ chanctx_conf->def.chan->band != NL80211_BAND_2GHZ)) {
541541 if (vif->type == NL80211_IFTYPE_STATION) {
542542 /* ... relax constraints and disable rssi events */
543543 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) · 313 unmodified lines
857857 }
858858
859859 bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm,
860− enum ieee80211_band band)
860+ enum nl80211_band band)
861861 {
862862 u32 bt_activity = le32_to_cpu(mvm->last_bt_notif.bt_activity_grading);
863863
864− if (band != IEEE80211_BAND_2GHZ)
864+ if (band != NL80211_BAND_2GHZ)
865865 return false;
866866
867867 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, · 5 unmodified lines
873873 __le16 fc = hdr->frame_control;
874874 bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm);
875875
876− if (info->band != IEEE80211_BAND_2GHZ)
876+ if (info->band != NL80211_BAND_2GHZ)
877877 return 0;
878878
879879 if (unlikely(mvm->bt_tx_prio))
drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c+3−3
@@ -724,9 +724,9 @@ static ssize_t iwl_dbgfs_tof_responder_params_write(struct ieee80211_vif *vif, · 723 unmodified lines
724724
725725 ret = kstrtou32(data, 10, &value);
726726 if (ret == 0 && value) {
727− enum ieee80211_band band = (cmd->channel_num <= 14) ?
728− IEEE80211_BAND_2GHZ :
729− IEEE80211_BAND_5GHZ;
727+ enum nl80211_band band = (cmd->channel_num <= 14) ?
728+ NL80211_BAND_2GHZ :
729+ NL80211_BAND_5GHZ;
730730 struct ieee80211_channel chn = {
731731 .band = band,
732732 .center_freq = ieee80211_channel_to_frequency(
drivers/net/wireless/intel/iwlwifi/mvm/fw.c+1−1
@@ -980,7 +980,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm) · 979 unmodified lines
980980 goto error;
981981
982982 /* 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];
984984 cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT);
985985 for (i = 0; i < NUM_PHY_CTX; i++) {
986986 /*
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c+4−4
@@ -559,7 +559,7 @@ void iwl_mvm_mac_ctxt_release(struct iwl_mvm *mvm, struct ieee80211_vif *vif) · 558 unmodified lines
559559
560560 static void iwl_mvm_ack_rates(struct iwl_mvm *mvm,
561561 struct ieee80211_vif *vif,
562− enum ieee80211_band band,
562+ enum nl80211_band band,
563563 u8 *cck_rates, u8 *ofdm_rates)
564564 {
565565 struct ieee80211_supported_band *sband;
@@ -730,7 +730,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm, · 164 unmodified lines
730730 rcu_read_lock();
731731 chanctx = rcu_dereference(vif->chanctx_conf);
732732 iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band
733− : IEEE80211_BAND_2GHZ,
733+ : NL80211_BAND_2GHZ,
734734 &cck_ack_rates, &ofdm_ack_rates);
735735 rcu_read_unlock();
736736
@@ -1065,7 +1065,7 @@ static int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm, · 328 unmodified lines
10651065 cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) <<
10661066 RATE_MCS_ANT_POS);
10671067
1068− if (info->band == IEEE80211_BAND_5GHZ || vif->p2p) {
1068+ if (info->band == NL80211_BAND_5GHZ || vif->p2p) {
10691069 rate = IWL_FIRST_OFDM_RATE;
10701070 } else {
10711071 rate = IWL_FIRST_CCK_RATE;
@@ -1516,7 +1516,7 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm, · 444 unmodified lines
15161516 rx_status.device_timestamp = le32_to_cpu(sb->system_time);
15171517 rx_status.band =
15181518 (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;
15201520 rx_status.freq =
15211521 ieee80211_channel_to_frequency(le16_to_cpu(sb->channel),
15221522 rx_status.band);
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c+8−8
@@ -550,18 +550,18 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) · 549 unmodified lines
550550 else
551551 mvm->max_scans = IWL_MVM_MAX_LMAC_SCANS;
552552
553− if (mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels)
554− hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
555− &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ];
556− if (mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels) {
557− hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
558− &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ];
553+ if (mvm->nvm_data->bands[NL80211_BAND_2GHZ].n_channels)
554+ hw->wiphy->bands[NL80211_BAND_2GHZ] =
555+ &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
556+ if (mvm->nvm_data->bands[NL80211_BAND_5GHZ].n_channels) {
557+ hw->wiphy->bands[NL80211_BAND_5GHZ] =
558+ &mvm->nvm_data->bands[NL80211_BAND_5GHZ];
559559
560560 if (fw_has_capa(&mvm->fw->ucode_capa,
561561 IWL_UCODE_TLV_CAPA_BEAMFORMER) &&
562562 fw_has_api(&mvm->fw->ucode_capa,
563563 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 |=
565565 IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE;
566566 }
567567
@@ -2911,7 +2911,7 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm, · 2343 unmodified lines
29112911 cpu_to_le32(FW_CMD_ID_AND_COLOR(MAC_INDEX_AUX, 0)),
29122912 .sta_id_and_color = cpu_to_le32(mvm->aux_sta.sta_id),
29132913 /* Set the channel info data */
2914− .channel_info.band = (channel->band == IEEE80211_BAND_2GHZ) ?
2914+ .channel_info.band = (channel->band == NL80211_BAND_2GHZ) ?
29152915 PHY_BAND_24 : PHY_BAND_5,
29162916 .channel_info.channel = channel->hw_value,
29172917 .channel_info.width = PHY_VHT_CHANNEL_MODE20,
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h+3−3
@@ -1133,9 +1133,9 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm); · 1132 unmodified lines
11331133
11341134 /* Utils */
11351135 int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,
1136− enum ieee80211_band band);
1136+ enum nl80211_band band);
11371137 void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,
1138− enum ieee80211_band band,
1138+ enum nl80211_band band,
11391139 struct ieee80211_tx_rate *r);
11401140 u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx);
11411141 void 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, · 326 unmodified lines
14681468 bool iwl_mvm_bt_coex_is_ant_avail(struct iwl_mvm *mvm, u8 ant);
14691469 bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm);
14701470 bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm,
1471− enum ieee80211_band band);
1471+ enum nl80211_band band);
14721472 u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr,
14731473 struct ieee80211_tx_info *info, u8 ac);
14741474
drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c+1−1
@@ -147,7 +147,7 @@ static void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm, · 146 unmodified lines
147147 u8 active_cnt, idle_cnt;
148148
149149 /* 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 ?
151151 PHY_BAND_24 : PHY_BAND_5);
152152
153153 cmd->ci.channel = chandef->chan->hw_value;
drivers/net/wireless/intel/iwlwifi/mvm/rs.c+14−14
@@ -829,7 +829,7 @@ static u32 ucode_rate_from_rs_rate(struct iwl_mvm *mvm, · 828 unmodified lines
829829
830830 /* Convert a ucode rate into an rs_rate object */
831831 static int rs_rate_from_ucode_rate(const u32 ucode_rate,
832− enum ieee80211_band band,
832+ enum nl80211_band band,
833833 struct rs_rate *rate)
834834 {
835835 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, · 12 unmodified lines
848848 if (!(ucode_rate & RATE_MCS_HT_MSK) &&
849849 !(ucode_rate & RATE_MCS_VHT_MSK)) {
850850 if (num_of_ant == 1) {
851− if (band == IEEE80211_BAND_5GHZ)
851+ if (band == NL80211_BAND_5GHZ)
852852 rate->type = LQ_LEGACY_A;
853853 else
854854 rate->type = LQ_LEGACY_G;
@@ -1043,7 +1043,7 @@ static void rs_get_lower_rate_down_column(struct iwl_lq_sta *lq_sta, · 188 unmodified lines
10431043 return;
10441044 } else if (is_siso(rate)) {
10451045 /* Downgrade to Legacy if we were in SISO */
1046− if (lq_sta->band == IEEE80211_BAND_5GHZ)
1046+ if (lq_sta->band == NL80211_BAND_5GHZ)
10471047 rate->type = LQ_LEGACY_A;
10481048 else
10491049 rate->type = LQ_LEGACY_G;
@@ -1850,7 +1850,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm, · 800 unmodified lines
18501850 rate->ant = column->ant;
18511851
18521852 if (column->mode == RS_LEGACY) {
1853− if (lq_sta->band == IEEE80211_BAND_5GHZ)
1853+ if (lq_sta->band == NL80211_BAND_5GHZ)
18541854 rate->type = LQ_LEGACY_A;
18551855 else
18561856 rate->type = LQ_LEGACY_G;
@@ -2020,7 +2020,7 @@ static void rs_get_adjacent_txp(struct iwl_mvm *mvm, int index, · 163 unmodified lines
20202020 }
20212021
20222022 static 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)
20242024 {
20252025 int index = rate->index;
20262026 bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM);
@@ -2126,7 +2126,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, · 99 unmodified lines
21262126 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
21272127 struct ieee80211_vif *vif = mvm_sta->vif;
21282128 struct ieee80211_chanctx_conf *chanctx_conf;
2129− enum ieee80211_band band;
2129+ enum nl80211_band band;
21302130 struct iwl_rate_scale_data *window;
21312131 struct rs_rate *rate = &tbl->rate;
21322132 enum tpc_action action;
@@ -2148,7 +2148,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, · 15 unmodified lines
21482148 rcu_read_lock();
21492149 chanctx_conf = rcu_dereference(vif->chanctx_conf);
21502150 if (WARN_ON(!chanctx_conf))
2151− band = IEEE80211_NUM_BANDS;
2151+ band = NUM_NL80211_BANDS;
21522152 else
21532153 band = chanctx_conf->def.chan->band;
21542154 rcu_read_unlock();
@@ -2606,7 +2606,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, · 451 unmodified lines
26062606 rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2;
26072607 else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID)
26082608 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)
26102610 rate->type = LQ_LEGACY_A;
26112611 else
26122612 rate->type = LQ_LEGACY_G;
@@ -2623,7 +2623,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, · 10 unmodified lines
26232623 } else {
26242624 lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate;
26252625
2626− if (lq_sta->band == IEEE80211_BAND_5GHZ) {
2626+ if (lq_sta->band == NL80211_BAND_5GHZ) {
26272627 lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy;
26282628 lq_sta->optimal_nentries =
26292629 ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
@@ -2679,7 +2679,7 @@ static struct rs_rate *rs_get_optimal_rate(struct iwl_mvm *mvm, · 49 unmodified lines
26792679 static void rs_get_initial_rate(struct iwl_mvm *mvm,
26802680 struct ieee80211_sta *sta,
26812681 struct iwl_lq_sta *lq_sta,
2682− enum ieee80211_band band,
2682+ enum nl80211_band band,
26832683 struct rs_rate *rate)
26842684 {
26852685 int i, nentries;
@@ -2714,7 +2714,7 @@ static void rs_get_initial_rate(struct iwl_mvm *mvm, · 28 unmodified lines
27142714 rate->index = find_first_bit(&lq_sta->active_legacy_rate,
27152715 BITS_PER_LONG);
27162716
2717− if (band == IEEE80211_BAND_5GHZ) {
2717+ if (band == NL80211_BAND_5GHZ) {
27182718 rate->type = LQ_LEGACY_A;
27192719 initial_rates = rs_optimal_rates_5ghz_legacy;
27202720 nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy);
@@ -2814,7 +2814,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm, · 93 unmodified lines
28142814 static void rs_initialize_lq(struct iwl_mvm *mvm,
28152815 struct ieee80211_sta *sta,
28162816 struct iwl_lq_sta *lq_sta,
2817− enum ieee80211_band band,
2817+ enum nl80211_band band,
28182818 bool init)
28192819 {
28202820 struct iwl_scale_tbl_info *tbl;
@@ -3097,7 +3097,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg) · 276 unmodified lines
30973097 * Called after adding a new station to initialize rate scaling
30983098 */
30993099 void 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)
31013101 {
31023102 int i, j;
31033103 struct ieee80211_hw *hw = mvm->hw;
@@ -3203,7 +3203,7 @@ static void rs_rate_update(void *mvm_r, · 99 unmodified lines
32033203 #ifdef CONFIG_MAC80211_DEBUGFS
32043204 static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm,
32053205 struct iwl_lq_cmd *lq_cmd,
3206− enum ieee80211_band band,
3206+ enum nl80211_band band,
32073207 u32 ucode_rate)
32083208 {
32093209 struct rs_rate rate;
drivers/net/wireless/intel/iwlwifi/mvm/rs.h+2−2
@@ -305,7 +305,7 @@ struct iwl_lq_sta { · 304 unmodified lines
305305 bool stbc_capable; /* Tx STBC is supported by chip and Rx by STA */
306306 bool bfer_capable; /* Remote supports beamformee and we BFer */
307307
308− enum ieee80211_band band;
308+ enum nl80211_band band;
309309
310310 /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */
311311 unsigned long active_legacy_rate;
@@ -358,7 +358,7 @@ struct iwl_lq_sta { · 46 unmodified lines
358358
359359 /* Initialize station's rate scaling information after adding station */
360360 void 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);
362362
363363 /* Notify RS about Tx status */
364364 void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
drivers/net/wireless/intel/iwlwifi/mvm/rx.c+1−1
@@ -319,7 +319,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, · 318 unmodified lines
319319 rx_status->device_timestamp = le32_to_cpu(phy_info->system_timestamp);
320320 rx_status->band =
321321 (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;
323323 rx_status->freq =
324324 ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel),
325325 rx_status->band);
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c+2−2
@@ -456,8 +456,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, · 455 unmodified lines
456456
457457 rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise);
458458 rx_status->device_timestamp = le32_to_cpu(desc->gp2_on_air_rise);
459− rx_status->band = desc->channel > 14 ? IEEE80211_BAND_5GHZ :
460− IEEE80211_BAND_2GHZ;
459+ rx_status->band = desc->channel > 14 ? NL80211_BAND_5GHZ :
460+ NL80211_BAND_2GHZ;
461461 rx_status->freq = ieee80211_channel_to_frequency(desc->channel,
462462 rx_status->band);
463463 iwl_mvm_get_signal_strength(mvm, desc, rx_status);
drivers/net/wireless/intel/iwlwifi/mvm/scan.c+18−18
@@ -163,16 +163,16 @@ static inline __le16 iwl_mvm_scan_rx_chain(struct iwl_mvm *mvm) · 162 unmodified lines
163163 return cpu_to_le16(rx_chain);
164164 }
165165
166−static __le32 iwl_mvm_scan_rxon_flags(enum ieee80211_band band)
166+static __le32 iwl_mvm_scan_rxon_flags(enum nl80211_band band)
167167 {
168− if (band == IEEE80211_BAND_2GHZ)
168+ if (band == NL80211_BAND_2GHZ)
169169 return cpu_to_le32(PHY_BAND_24);
170170 else
171171 return cpu_to_le32(PHY_BAND_5);
172172 }
173173
174174 static inline __le32
175−iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band,
175+iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum nl80211_band band,
176176 bool no_cck)
177177 {
178178 u32 tx_ant;
@@ -182,7 +182,7 @@ iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band, · 3 unmodified lines
182182 mvm->scan_last_antenna_idx);
183183 tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS;
184184
185− if (band == IEEE80211_BAND_2GHZ && !no_cck)
185+ if (band == NL80211_BAND_2GHZ && !no_cck)
186186 return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK |
187187 tx_ant);
188188 else
@@ -591,14 +591,14 @@ static void iwl_mvm_scan_fill_tx_cmd(struct iwl_mvm *mvm, · 402 unmodified lines
591591 tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL |
592592 TX_CMD_FLG_BT_DIS);
593593 tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm,
594− IEEE80211_BAND_2GHZ,
594+ NL80211_BAND_2GHZ,
595595 no_cck);
596596 tx_cmd[0].sta_id = mvm->aux_sta.sta_id;
597597
598598 tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL |
599599 TX_CMD_FLG_BT_DIS);
600600 tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm,
601− IEEE80211_BAND_5GHZ,
601+ NL80211_BAND_5GHZ,
602602 no_cck);
603603 tx_cmd[1].sta_id = mvm->aux_sta.sta_id;
604604 }
@@ -695,19 +695,19 @@ iwl_mvm_build_scan_probe(struct iwl_mvm *mvm, struct ieee80211_vif *vif, · 90 unmodified lines
695695
696696 /* Insert ds parameter set element on 2.4 GHz band */
697697 newpos = iwl_mvm_copy_and_insert_ds_elem(mvm,
698− ies->ies[IEEE80211_BAND_2GHZ],
699− ies->len[IEEE80211_BAND_2GHZ],
698+ ies->ies[NL80211_BAND_2GHZ],
699+ ies->len[NL80211_BAND_2GHZ],
700700 pos);
701701 params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf);
702702 params->preq.band_data[0].len = cpu_to_le16(newpos - pos);
703703 pos = newpos;
704704
705− memcpy(pos, ies->ies[IEEE80211_BAND_5GHZ],
706− ies->len[IEEE80211_BAND_5GHZ]);
705+ memcpy(pos, ies->ies[NL80211_BAND_5GHZ],
706+ ies->len[NL80211_BAND_5GHZ]);
707707 params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf);
708708 params->preq.band_data[1].len =
709− cpu_to_le16(ies->len[IEEE80211_BAND_5GHZ]);
710− pos += ies->len[IEEE80211_BAND_5GHZ];
709+ cpu_to_le16(ies->len[NL80211_BAND_5GHZ]);
710+ pos += ies->len[NL80211_BAND_5GHZ];
711711
712712 memcpy(pos, ies->common_ies, ies->common_ie_len);
713713 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) · 207 unmodified lines
921921 unsigned int rates = 0;
922922 int i;
923923
924− band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ];
924+ band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
925925 for (i = 0; i < band->n_bitrates; i++)
926926 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];
928928 for (i = 0; i < band->n_bitrates; i++)
929929 rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value);
930930
@@ -939,8 +939,8 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm) · 8 unmodified lines
939939 struct iwl_scan_config *scan_config;
940940 struct ieee80211_supported_band *band;
941941 int num_channels =
942− mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels +
943− mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels;
942+ mvm->nvm_data->bands[NL80211_BAND_2GHZ].n_channels +
943+ mvm->nvm_data->bands[NL80211_BAND_5GHZ].n_channels;
944944 int ret, i, j = 0, cmd_size;
945945 struct iwl_host_cmd cmd = {
946946 .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) · 47 unmodified lines
994994 IWL_CHANNEL_FLAG_EBS_ADD |
995995 IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE;
996996
997− band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ];
997+ band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ];
998998 for (i = 0; i < band->n_channels; i++, j++)
999999 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];
10011001 for (i = 0; i < band->n_channels; i++, j++)
10021002 scan_config->channel_array[j] = band->channels[i].hw_value;
10031003
drivers/net/wireless/intel/iwlwifi/mvm/tdls.c+1−1
@@ -444,7 +444,7 @@ iwl_mvm_tdls_config_channel_switch(struct iwl_mvm *mvm, · 443 unmodified lines
444444 }
445445
446446 if (chandef) {
447− cmd.ci.band = (chandef->chan->band == IEEE80211_BAND_2GHZ ?
447+ cmd.ci.band = (chandef->chan->band == NL80211_BAND_2GHZ ?
448448 PHY_BAND_24 : PHY_BAND_5);
449449 cmd.ci.channel = chandef->chan->hw_value;
450450 cmd.ci.width = iwl_mvm_get_channel_width(chandef);
drivers/net/wireless/intel/iwlwifi/mvm/tx.c+3−3
@@ -359,7 +359,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, · 358 unmodified lines
359359 &mvm->nvm_data->bands[info->band], sta);
360360
361361 /* 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)
363363 rate_idx += IWL_FIRST_OFDM_RATE;
364364
365365 /* 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, · 6 unmodified lines
372372 iwl_mvm_next_antenna(mvm, iwl_mvm_get_valid_tx_ant(mvm),
373373 mvm->mgmt_last_antenna_idx);
374374
375− if (info->band == IEEE80211_BAND_2GHZ &&
375+ if (info->band == NL80211_BAND_2GHZ &&
376376 !iwl_mvm_bt_coex_is_shared_ant_avail(mvm))
377377 rate_flags = mvm->cfg->non_shared_ant << RATE_MCS_ANT_POS;
378378 else
@@ -1052,7 +1052,7 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status) · 673 unmodified lines
10521052 #endif /* CONFIG_IWLWIFI_DEBUG */
10531053
10541054 void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags,
1055− enum ieee80211_band band,
1055+ enum nl80211_band band,
10561056 struct ieee80211_tx_rate *r)
10571057 {
10581058 if (rate_n_flags & RATE_HT_MCS_GF_MSK)
drivers/net/wireless/intel/iwlwifi/mvm/utils.c+2−2
@@ -217,14 +217,14 @@ static const u8 fw_rate_idx_to_plcp[IWL_RATE_COUNT] = { · 216 unmodified lines
217217 };
218218
219219 int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags,
220− enum ieee80211_band band)
220+ enum nl80211_band band)
221221 {
222222 int rate = rate_n_flags & RATE_LEGACY_RATE_MSK;
223223 int idx;
224224 int band_offset = 0;
225225
226226 /* Legacy rate format, search for match in table */
227− if (band == IEEE80211_BAND_5GHZ)
227+ if (band == NL80211_BAND_5GHZ)
228228 band_offset = IWL_FIRST_OFDM_RATE;
229229 for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++)
230230 if (fw_rate_idx_to_plcp[idx] == rate)
drivers/net/wireless/intersil/orinoco/cfg.c+3−3
@@ -60,14 +60,14 @@ int orinoco_wiphy_register(struct wiphy *wiphy) · 59 unmodified lines
6060 if (priv->channel_mask & (1 << i)) {
6161 priv->channels[i].center_freq =
6262 ieee80211_channel_to_frequency(i + 1,
63− IEEE80211_BAND_2GHZ);
63+ NL80211_BAND_2GHZ);
6464 channels++;
6565 }
6666 }
6767 priv->band.channels = priv->channels;
6868 priv->band.n_channels = channels;
6969
70− wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
70+ wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
7171 wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
7272
7373 i = 0;
@@ -175,7 +175,7 @@ static int orinoco_set_monitor_channel(struct wiphy *wiphy, · 101 unmodified lines
175175 if (cfg80211_get_chandef_type(chandef) != NL80211_CHAN_NO_HT)
176176 return -EINVAL;
177177
178− if (chandef->chan->band != IEEE80211_BAND_2GHZ)
178+ if (chandef->chan->band != NL80211_BAND_2GHZ)
179179 return -EINVAL;
180180
181181 channel = ieee80211_frequency_to_channel(chandef->chan->center_freq);
drivers/net/wireless/intersil/orinoco/hw.c+1−1
@@ -1193,7 +1193,7 @@ int orinoco_hw_get_freq(struct orinoco_private *priv) · 1192 unmodified lines
11931193 goto out;
11941194
11951195 }
1196− freq = ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
1196+ freq = ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
11971197
11981198 out:
11991199 orinoco_unlock(priv, &flags);
drivers/net/wireless/intersil/orinoco/scan.c+2−2
@@ -111,7 +111,7 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, · 110 unmodified lines
111111 }
112112
113113 freq = ieee80211_channel_to_frequency(
114− le16_to_cpu(bss->a.channel), IEEE80211_BAND_2GHZ);
114+ le16_to_cpu(bss->a.channel), NL80211_BAND_2GHZ);
115115 channel = ieee80211_get_channel(wiphy, freq);
116116 if (!channel) {
117117 printk(KERN_DEBUG "Invalid channel designation %04X(%04X)",
@@ -148,7 +148,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, · 30 unmodified lines
148148 ie_len = len - sizeof(*bss);
149149 ie = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bss->data, ie_len);
150150 chan = ie ? ie[2] : 0;
151− freq = ieee80211_channel_to_frequency(chan, IEEE80211_BAND_2GHZ);
151+ freq = ieee80211_channel_to_frequency(chan, NL80211_BAND_2GHZ);
152152 channel = ieee80211_get_channel(wiphy, freq);
153153
154154 timestamp = le64_to_cpu(bss->timestamp);
drivers/net/wireless/intersil/p54/eeprom.c+16−16
@@ -76,14 +76,14 @@ struct p54_channel_entry { · 75 unmodified lines
7676 u16 data;
7777 int index;
7878 int max_power;
79− enum ieee80211_band band;
79+ enum nl80211_band band;
8080 };
8181
8282 struct p54_channel_list {
8383 struct p54_channel_entry *channels;
8484 size_t entries;
8585 size_t max_entries;
86− size_t band_channel_num[IEEE80211_NUM_BANDS];
86+ size_t band_channel_num[NUM_NL80211_BANDS];
8787 };
8888
8989 static int p54_get_band_from_freq(u16 freq)
@@ -91,10 +91,10 @@ static int p54_get_band_from_freq(u16 freq) · 1 unmodified line
9191 /* FIXME: sync these values with the 802.11 spec */
9292
9393 if ((freq >= 2412) && (freq <= 2484))
94− return IEEE80211_BAND_2GHZ;
94+ return NL80211_BAND_2GHZ;
9595
9696 if ((freq >= 4920) && (freq <= 5825))
97− return IEEE80211_BAND_5GHZ;
97+ return NL80211_BAND_5GHZ;
9898
9999 return -1;
100100 }
@@ -124,16 +124,16 @@ static int p54_compare_rssichan(const void *_a, · 23 unmodified lines
124124
125125 static int p54_fill_band_bitrates(struct ieee80211_hw *dev,
126126 struct ieee80211_supported_band *band_entry,
127− enum ieee80211_band band)
127+ enum nl80211_band band)
128128 {
129129 /* TODO: generate rate array dynamically */
130130
131131 switch (band) {
132− case IEEE80211_BAND_2GHZ:
132+ case NL80211_BAND_2GHZ:
133133 band_entry->bitrates = p54_bgrates;
134134 band_entry->n_bitrates = ARRAY_SIZE(p54_bgrates);
135135 break;
136− case IEEE80211_BAND_5GHZ:
136+ case NL80211_BAND_5GHZ:
137137 band_entry->bitrates = p54_arates;
138138 band_entry->n_bitrates = ARRAY_SIZE(p54_arates);
139139 break;
@@ -147,7 +147,7 @@ static int p54_fill_band_bitrates(struct ieee80211_hw *dev, · 7 unmodified lines
147147 static int p54_generate_band(struct ieee80211_hw *dev,
148148 struct p54_channel_list *list,
149149 unsigned int *chan_num,
150− enum ieee80211_band band)
150+ enum nl80211_band band)
151151 {
152152 struct p54_common *priv = dev->priv;
153153 struct ieee80211_supported_band *tmp, *old;
@@ -206,7 +206,7 @@ static int p54_generate_band(struct ieee80211_hw *dev, · 52 unmodified lines
206206
207207 if (j == 0) {
208208 wiphy_err(dev->wiphy, "Disabling totally damaged %d GHz band\n",
209− (band == IEEE80211_BAND_2GHZ) ? 2 : 5);
209+ (band == NL80211_BAND_2GHZ) ? 2 : 5);
210210
211211 ret = -ENODATA;
212212 goto err_out;
@@ -396,7 +396,7 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev) · 183 unmodified lines
396396 p54_compare_channels, NULL);
397397
398398 k = 0;
399− for (i = 0, j = 0; i < IEEE80211_NUM_BANDS; i++) {
399+ for (i = 0, j = 0; i < NUM_NL80211_BANDS; i++) {
400400 if (p54_generate_band(dev, list, &k, i) == 0)
401401 j++;
402402 }
@@ -573,10 +573,10 @@ static int p54_parse_rssical(struct ieee80211_hw *dev, · 170 unmodified lines
573573 for (i = 0; i < entries; i++) {
574574 u16 freq = 0;
575575 switch (i) {
576− case IEEE80211_BAND_2GHZ:
576+ case NL80211_BAND_2GHZ:
577577 freq = 2437;
578578 break;
579− case IEEE80211_BAND_5GHZ:
579+ case NL80211_BAND_5GHZ:
580580 freq = 5240;
581581 break;
582582 }
@@ -902,11 +902,11 @@ good_eeprom: · 319 unmodified lines
902902 if (priv->rxhw == PDR_SYNTH_FRONTEND_XBOW)
903903 p54_init_xbow_synth(priv);
904904 if (!(synth & PDR_SYNTH_24_GHZ_DISABLED))
905− dev->wiphy->bands[IEEE80211_BAND_2GHZ] =
906− priv->band_table[IEEE80211_BAND_2GHZ];
905+ dev->wiphy->bands[NL80211_BAND_2GHZ] =
906+ priv->band_table[NL80211_BAND_2GHZ];
907907 if (!(synth & PDR_SYNTH_5_GHZ_DISABLED))
908− dev->wiphy->bands[IEEE80211_BAND_5GHZ] =
909− priv->band_table[IEEE80211_BAND_5GHZ];
908+ dev->wiphy->bands[NL80211_BAND_5GHZ] =
909+ priv->band_table[NL80211_BAND_5GHZ];
910910 if ((synth & PDR_SYNTH_RX_DIV_MASK) == PDR_SYNTH_RX_DIV_SUPPORTED)
911911 priv->rx_diversity_mask = 3;
912912 if ((synth & PDR_SYNTH_TX_DIV_MASK) == PDR_SYNTH_TX_DIV_SUPPORTED)
drivers/net/wireless/intersil/p54/main.c+2−2
@@ -477,7 +477,7 @@ static void p54_bss_info_changed(struct ieee80211_hw *dev, · 476 unmodified lines
477477 p54_set_edcf(priv);
478478 }
479479 if (changed & BSS_CHANGED_BASIC_RATES) {
480− if (dev->conf.chandef.chan->band == IEEE80211_BAND_5GHZ)
480+ if (dev->conf.chandef.chan->band == NL80211_BAND_5GHZ)
481481 priv->basic_rate_mask = (info->basic_rates << 4);
482482 else
483483 priv->basic_rate_mask = info->basic_rates;
@@ -829,7 +829,7 @@ void p54_free_common(struct ieee80211_hw *dev) · 345 unmodified lines
829829 struct p54_common *priv = dev->priv;
830830 unsigned int i;
831831
832− for (i = 0; i < IEEE80211_NUM_BANDS; i++)
832+ for (i = 0; i < NUM_NL80211_BANDS; i++)
833833 kfree(priv->band_table[i]);
834834
835835 kfree(priv->iq_autocal);
drivers/net/wireless/intersil/p54/p54.h+1−1
@@ -223,7 +223,7 @@ struct p54_common { · 222 unmodified lines
223223 struct p54_cal_database *curve_data;
224224 struct p54_cal_database *output_limit;
225225 struct p54_cal_database *rssi_db;
226− struct ieee80211_supported_band *band_table[IEEE80211_NUM_BANDS];
226+ struct ieee80211_supported_band *band_table[NUM_NL80211_BANDS];
227227
228228 /* BBP/MAC state */
229229 u8 mac_addr[ETH_ALEN];
drivers/net/wireless/intersil/p54/txrx.c+2−2
@@ -353,7 +353,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb) · 352 unmodified lines
353353 rx_status->signal = p54_rssi_to_dbm(priv, hdr->rssi);
354354 if (hdr->rate & 0x10)
355355 rx_status->flag |= RX_FLAG_SHORTPRE;
356− if (priv->hw->conf.chandef.chan->band == IEEE80211_BAND_5GHZ)
356+ if (priv->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ)
357357 rx_status->rate_idx = (rate < 4) ? 0 : rate - 4;
358358 else
359359 rx_status->rate_idx = rate;
@@ -867,7 +867,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, · 507 unmodified lines
867867 for (i = 0; i < nrates && ridx < 8; i++) {
868868 /* we register the rates in perfect order */
869869 rate = info->control.rates[i].idx;
870− if (info->band == IEEE80211_BAND_5GHZ)
870+ if (info->band == NL80211_BAND_5GHZ)
871871 rate += 4;
872872
873873 /* store the count we actually calculated for TX status */
drivers/net/wireless/mac80211_hwsim.c+7−7
@@ -255,14 +255,14 @@ static struct class *hwsim_class; · 254 unmodified lines
255255 static struct net_device *hwsim_mon; /* global monitor netdev */
256256
257257 #define CHAN2G(_freq) { \
258− .band = IEEE80211_BAND_2GHZ, \
258+ .band = NL80211_BAND_2GHZ, \
259259 .center_freq = (_freq), \
260260 .hw_value = (_freq), \
261261 .max_power = 20, \
262262 }
263263
264264 #define CHAN5G(_freq) { \
265− .band = IEEE80211_BAND_5GHZ, \
265+ .band = NL80211_BAND_5GHZ, \
266266 .center_freq = (_freq), \
267267 .hw_value = (_freq), \
268268 .max_power = 20, \
@@ -479,7 +479,7 @@ struct mac80211_hwsim_data { · 210 unmodified lines
479479 struct list_head list;
480480 struct ieee80211_hw *hw;
481481 struct device *dev;
482− struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
482+ struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
483483 struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)];
484484 struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)];
485485 struct ieee80211_rate rates[ARRAY_SIZE(hwsim_rates)];
@@ -2347,7 +2347,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, · 1861 unmodified lines
23472347 u8 addr[ETH_ALEN];
23482348 struct mac80211_hwsim_data *data;
23492349 struct ieee80211_hw *hw;
2350− enum ieee80211_band band;
2350+ enum nl80211_band band;
23512351 const struct ieee80211_ops *ops = &mac80211_hwsim_ops;
23522352 int idx;
23532353
@@ -2476,16 +2476,16 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, · 122 unmodified lines
24762476 sizeof(hwsim_channels_5ghz));
24772477 memcpy(data->rates, hwsim_rates, sizeof(hwsim_rates));
24782478
2479− for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {
2479+ for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) {
24802480 struct ieee80211_supported_band *sband = &data->bands[band];
24812481 switch (band) {
2482− case IEEE80211_BAND_2GHZ:
2482+ case NL80211_BAND_2GHZ:
24832483 sband->channels = data->channels_2ghz;
24842484 sband->n_channels = ARRAY_SIZE(hwsim_channels_2ghz);
24852485 sband->bitrates = data->rates;
24862486 sband->n_bitrates = ARRAY_SIZE(hwsim_rates);
24872487 break;
2488− case IEEE80211_BAND_5GHZ:
2488+ case NL80211_BAND_5GHZ:
24892489 sband->channels = data->channels_5ghz;
24902490 sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz);
24912491 sband->bitrates = data->rates + 4;
drivers/net/wireless/marvell/libertas/cfg.c+5−5
@@ -23,7 +23,7 @@ · 22 unmodified lines
2323
2424
2525 #define CHAN2G(_channel, _freq, _flags) { \
26− .band = IEEE80211_BAND_2GHZ, \
26+ .band = NL80211_BAND_2GHZ, \
2727 .center_freq = (_freq), \
2828 .hw_value = (_channel), \
2929 .flags = (_flags), \
@@ -639,7 +639,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, · 609 unmodified lines
639639 if (chan_no != -1) {
640640 struct wiphy *wiphy = priv->wdev->wiphy;
641641 int freq = ieee80211_channel_to_frequency(chan_no,
642− IEEE80211_BAND_2GHZ);
642+ NL80211_BAND_2GHZ);
643643 struct ieee80211_channel *channel =
644644 ieee80211_get_channel(wiphy, freq);
645645
@@ -1266,7 +1266,7 @@ _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) · 620 unmodified lines
12661266 {
12671267 struct cfg80211_scan_request *creq = NULL;
12681268 int i, n_channels = ieee80211_get_num_supported_channels(wiphy);
1269− enum ieee80211_band band;
1269+ enum nl80211_band band;
12701270
12711271 creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) +
12721272 n_channels * sizeof(void *),
@@ -1281,7 +1281,7 @@ _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) · 8 unmodified lines
12811281
12821282 /* Scan all available channels */
12831283 i = 0;
1284− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
1284+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
12851285 int j;
12861286
12871287 if (!wiphy->bands[band])
@@ -2200,7 +2200,7 @@ int lbs_cfg_register(struct lbs_private *priv) · 912 unmodified lines
22002200 if (lbs_mesh_activated(priv))
22012201 wdev->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MESH_POINT);
22022202
2203− wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &lbs_band_2ghz;
2203+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &lbs_band_2ghz;
22042204
22052205 /*
22062206 * We could check priv->fwcapinfo && FW_CAPINFO_WPA, but I have
drivers/net/wireless/marvell/libertas/cmd.c+2−2
@@ -743,7 +743,7 @@ int lbs_set_11d_domain_info(struct lbs_private *priv) · 742 unmodified lines
743743 struct cmd_ds_802_11d_domain_info cmd;
744744 struct mrvl_ie_domain_param_set *domain = &cmd.domain;
745745 struct ieee80211_country_ie_triplet *t;
746− enum ieee80211_band band;
746+ enum nl80211_band band;
747747 struct ieee80211_channel *ch;
748748 u8 num_triplet = 0;
749749 u8 num_parsed_chan = 0;
@@ -777,7 +777,7 @@ int lbs_set_11d_domain_info(struct lbs_private *priv) · 27 unmodified lines
777777 * etc.
778778 */
779779 for (band = 0;
780− (band < IEEE80211_NUM_BANDS) && (num_triplet < MAX_11D_TRIPLETS);
780+ (band < NUM_NL80211_BANDS) && (num_triplet < MAX_11D_TRIPLETS);
781781 band++) {
782782
783783 if (!bands[band])
drivers/net/wireless/marvell/libertas_tf/main.c+2−2
@@ -570,7 +570,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) · 569 unmodified lines
570570 if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK)))
571571 stats.flag |= RX_FLAG_FAILED_FCS_CRC;
572572 stats.freq = priv->cur_freq;
573− stats.band = IEEE80211_BAND_2GHZ;
573+ stats.band = NL80211_BAND_2GHZ;
574574 stats.signal = prxpd->snr;
575575 priv->noise = prxpd->nf;
576576 /* Marvell rate index has a hole at value 4 */
@@ -642,7 +642,7 @@ struct lbtf_private *lbtf_add_card(void *card, struct device *dmdev) · 65 unmodified lines
642642 priv->band.bitrates = priv->rates;
643643 priv->band.n_channels = ARRAY_SIZE(lbtf_channels);
644644 priv->band.channels = priv->channels;
645− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
645+ hw->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
646646 hw->wiphy->interface_modes =
647647 BIT(NL80211_IFTYPE_STATION) |
648648 BIT(NL80211_IFTYPE_ADHOC);
drivers/net/wireless/marvell/mwifiex/cfg80211.c+17−17
@@ -474,7 +474,7 @@ int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy) · 473 unmodified lines
474474 u8 no_of_parsed_chan = 0;
475475 u8 first_chan = 0, next_chan = 0, max_pwr = 0;
476476 u8 i, flag = 0;
477− enum ieee80211_band band;
477+ enum nl80211_band band;
478478 struct ieee80211_supported_band *sband;
479479 struct ieee80211_channel *ch;
480480 struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy);
@@ -1410,7 +1410,7 @@ mwifiex_cfg80211_dump_survey(struct wiphy *wiphy, struct net_device *dev, · 929 unmodified lines
14101410 {
14111411 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
14121412 struct mwifiex_chan_stats *pchan_stats = priv->adapter->chan_stats;
1413− enum ieee80211_band band;
1413+ enum nl80211_band band;
14141414
14151415 mwifiex_dbg(priv->adapter, DUMP, "dump_survey idx=%d\n", idx);
14161416
@@ -1586,7 +1586,7 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy, · 169 unmodified lines
15861586 {
15871587 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
15881588 u16 bitmap_rates[MAX_BITMAP_RATES_SIZE];
1589− enum ieee80211_band band;
1589+ enum nl80211_band band;
15901590 struct mwifiex_adapter *adapter = priv->adapter;
15911591
15921592 if (!priv->media_connected) {
@@ -1600,11 +1600,11 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy, · 7 unmodified lines
16001600 memset(bitmap_rates, 0, sizeof(bitmap_rates));
16011601
16021602 /* Fill HR/DSSS rates. */
1603− if (band == IEEE80211_BAND_2GHZ)
1603+ if (band == NL80211_BAND_2GHZ)
16041604 bitmap_rates[0] = mask->control[band].legacy & 0x000f;
16051605
16061606 /* Fill OFDM rates */
1607− if (band == IEEE80211_BAND_2GHZ)
1607+ if (band == NL80211_BAND_2GHZ)
16081608 bitmap_rates[1] = (mask->control[band].legacy & 0x0ff0) >> 4;
16091609 else
16101610 bitmap_rates[1] = mask->control[band].legacy;
@@ -1771,7 +1771,7 @@ mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) · 160 unmodified lines
17711771 } else {
17721772 struct ieee80211_sta_ht_cap *ht_info;
17731773 int rx_mcs_supp;
1774− enum ieee80211_band band;
1774+ enum nl80211_band band;
17751775
17761776 if ((tx_ant == 0x1 && rx_ant == 0x1)) {
17771777 adapter->user_dev_mcs_support = HT_STREAM_1X1;
@@ -1785,7 +1785,7 @@ mwifiex_cfg80211_set_antenna(struct wiphy *wiphy, u32 tx_ant, u32 rx_ant) · 7 unmodified lines
17851785 MWIFIEX_11AC_MCS_MAP_2X2;
17861786 }
17871787
1788− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
1788+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
17891789 if (!adapter->wiphy->bands[band])
17901790 continue;
17911791
@@ -1997,7 +1997,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv) · 205 unmodified lines
19971997 struct cfg80211_bss *bss;
19981998 int ie_len;
19991999 u8 ie_buf[IEEE80211_MAX_SSID_LEN + sizeof(struct ieee_types_header)];
2000− enum ieee80211_band band;
2000+ enum nl80211_band band;
20012001
20022002 if (mwifiex_get_bss_info(priv, &bss_info))
20032003 return -1;
@@ -2271,7 +2271,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv, · 267 unmodified lines
22712271 int index = 0, i;
22722272 u8 config_bands = 0;
22732273
2274− if (params->chandef.chan->band == IEEE80211_BAND_2GHZ) {
2274+ if (params->chandef.chan->band == NL80211_BAND_2GHZ) {
22752275 if (!params->basic_rates) {
22762276 config_bands = BAND_B | BAND_G;
22772277 } else {
@@ -2859,18 +2859,18 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 581 unmodified lines
28592859 mwifiex_init_priv_params(priv, dev);
28602860 priv->netdev = dev;
28612861
2862− mwifiex_setup_ht_caps(&wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap, priv);
2862+ mwifiex_setup_ht_caps(&wiphy->bands[NL80211_BAND_2GHZ]->ht_cap, priv);
28632863 if (adapter->is_hw_11ac_capable)
28642864 mwifiex_setup_vht_caps(
2865− &wiphy->bands[IEEE80211_BAND_2GHZ]->vht_cap, priv);
2865+ &wiphy->bands[NL80211_BAND_2GHZ]->vht_cap, priv);
28662866
28672867 if (adapter->config_bands & BAND_A)
28682868 mwifiex_setup_ht_caps(
2869− &wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap, priv);
2869+ &wiphy->bands[NL80211_BAND_5GHZ]->ht_cap, priv);
28702870
28712871 if ((adapter->config_bands & BAND_A) && adapter->is_hw_11ac_capable)
28722872 mwifiex_setup_vht_caps(
2873− &wiphy->bands[IEEE80211_BAND_5GHZ]->vht_cap, priv);
2873+ &wiphy->bands[NL80211_BAND_5GHZ]->vht_cap, priv);
28742874
28752875 dev_net_set(dev, wiphy_net(wiphy));
28762876 dev->ieee80211_ptr = &priv->wdev;
@@ -3821,7 +3821,7 @@ static int mwifiex_cfg80211_get_channel(struct wiphy *wiphy, · 944 unmodified lines
38213821 struct ieee80211_channel *chan;
38223822 u8 second_chan_offset;
38233823 enum nl80211_channel_type chan_type;
3824− enum ieee80211_band band;
3824+ enum nl80211_band band;
38253825 int freq;
38263826 int ret = -ENODATA;
38273827
@@ -4053,11 +4053,11 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) · 225 unmodified lines
40534053 BIT(NL80211_IFTYPE_P2P_GO) |
40544054 BIT(NL80211_IFTYPE_AP);
40554055
4056− wiphy->bands[IEEE80211_BAND_2GHZ] = &mwifiex_band_2ghz;
4056+ wiphy->bands[NL80211_BAND_2GHZ] = &mwifiex_band_2ghz;
40574057 if (adapter->config_bands & BAND_A)
4058− wiphy->bands[IEEE80211_BAND_5GHZ] = &mwifiex_band_5ghz;
4058+ wiphy->bands[NL80211_BAND_5GHZ] = &mwifiex_band_5ghz;
40594059 else
4060− wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
4060+ wiphy->bands[NL80211_BAND_5GHZ] = NULL;
40614061
40624062 if (adapter->drcs_enabled && ISSUPP_DRCS_ENABLED(adapter->fw_cap_info))
40634063 wiphy->iface_combinations = &mwifiex_iface_comb_ap_sta_drcs;
drivers/net/wireless/marvell/mwifiex/cfp.c+6−6
@@ -322,9 +322,9 @@ mwifiex_get_cfp(struct mwifiex_private *priv, u8 band, u16 channel, u32 freq) · 321 unmodified lines
322322 return cfp;
323323
324324 if (mwifiex_band_to_radio_type(band) == HostCmd_SCAN_RADIO_TYPE_BG)
325− sband = priv->wdev.wiphy->bands[IEEE80211_BAND_2GHZ];
325+ sband = priv->wdev.wiphy->bands[NL80211_BAND_2GHZ];
326326 else
327− sband = priv->wdev.wiphy->bands[IEEE80211_BAND_5GHZ];
327+ sband = priv->wdev.wiphy->bands[NL80211_BAND_5GHZ];
328328
329329 if (!sband) {
330330 mwifiex_dbg(priv->adapter, ERROR,
@@ -399,15 +399,15 @@ u32 mwifiex_get_rates_from_cfg80211(struct mwifiex_private *priv, · 68 unmodified lines
399399 int i;
400400
401401 if (radio_type) {
402− sband = wiphy->bands[IEEE80211_BAND_5GHZ];
402+ sband = wiphy->bands[NL80211_BAND_5GHZ];
403403 if (WARN_ON_ONCE(!sband))
404404 return 0;
405− rate_mask = request->rates[IEEE80211_BAND_5GHZ];
405+ rate_mask = request->rates[NL80211_BAND_5GHZ];
406406 } else {
407− sband = wiphy->bands[IEEE80211_BAND_2GHZ];
407+ sband = wiphy->bands[NL80211_BAND_2GHZ];
408408 if (WARN_ON_ONCE(!sband))
409409 return 0;
410− rate_mask = request->rates[IEEE80211_BAND_2GHZ];
410+ rate_mask = request->rates[NL80211_BAND_2GHZ];
411411 }
412412
413413 num_rates = 0;
drivers/net/wireless/marvell/mwifiex/scan.c+4−4
@@ -494,13 +494,13 @@ mwifiex_scan_create_channel_list(struct mwifiex_private *priv, · 493 unmodified lines
494494 *scan_chan_list,
495495 u8 filtered_scan)
496496 {
497− enum ieee80211_band band;
497+ enum nl80211_band band;
498498 struct ieee80211_supported_band *sband;
499499 struct ieee80211_channel *ch;
500500 struct mwifiex_adapter *adapter = priv->adapter;
501501 int chan_idx = 0, i;
502502
503− for (band = 0; (band < IEEE80211_NUM_BANDS) ; band++) {
503+ for (band = 0; (band < NUM_NL80211_BANDS) ; band++) {
504504
505505 if (!priv->wdev.wiphy->bands[band])
506506 continue;
@@ -557,13 +557,13 @@ mwifiex_bgscan_create_channel_list(struct mwifiex_private *priv, · 50 unmodified lines
557557 struct mwifiex_chan_scan_param_set
558558 *scan_chan_list)
559559 {
560− enum ieee80211_band band;
560+ enum nl80211_band band;
561561 struct ieee80211_supported_band *sband;
562562 struct ieee80211_channel *ch;
563563 struct mwifiex_adapter *adapter = priv->adapter;
564564 int chan_idx = 0, i;
565565
566− for (band = 0; (band < IEEE80211_NUM_BANDS); band++) {
566+ for (band = 0; (band < NUM_NL80211_BANDS); band++) {
567567 if (!priv->wdev.wiphy->bands[band])
568568 continue;
569569
drivers/net/wireless/marvell/mwifiex/uap_cmd.c+1−1
@@ -816,7 +816,7 @@ void mwifiex_uap_set_channel(struct mwifiex_private *priv, · 815 unmodified lines
816816 chandef.chan->center_freq);
817817
818818 /* Set appropriate bands */
819− if (chandef.chan->band == IEEE80211_BAND_2GHZ) {
819+ if (chandef.chan->band == NL80211_BAND_2GHZ) {
820820 bss_cfg->band_cfg = BAND_CONFIG_BG;
821821 config_bands = BAND_B | BAND_G;
822822
drivers/net/wireless/marvell/mwl8k.c+44−44
@@ -346,20 +346,20 @@ struct mwl8k_sta { · 345 unmodified lines
346346 #define MWL8K_STA(_sta) ((struct mwl8k_sta *)&((_sta)->drv_priv))
347347
348348 static const struct ieee80211_channel mwl8k_channels_24[] = {
349− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, },
350− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, },
351− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, .hw_value = 3, },
352− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, .hw_value = 4, },
353− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, .hw_value = 5, },
354− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, .hw_value = 6, },
355− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, .hw_value = 7, },
356− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, .hw_value = 8, },
357− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, .hw_value = 9, },
358− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, .hw_value = 10, },
359− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, .hw_value = 11, },
360− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, .hw_value = 12, },
361− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, .hw_value = 13, },
362− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, .hw_value = 14, },
349+ { .band = NL80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, },
350+ { .band = NL80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, },
351+ { .band = NL80211_BAND_2GHZ, .center_freq = 2422, .hw_value = 3, },
352+ { .band = NL80211_BAND_2GHZ, .center_freq = 2427, .hw_value = 4, },
353+ { .band = NL80211_BAND_2GHZ, .center_freq = 2432, .hw_value = 5, },
354+ { .band = NL80211_BAND_2GHZ, .center_freq = 2437, .hw_value = 6, },
355+ { .band = NL80211_BAND_2GHZ, .center_freq = 2442, .hw_value = 7, },
356+ { .band = NL80211_BAND_2GHZ, .center_freq = 2447, .hw_value = 8, },
357+ { .band = NL80211_BAND_2GHZ, .center_freq = 2452, .hw_value = 9, },
358+ { .band = NL80211_BAND_2GHZ, .center_freq = 2457, .hw_value = 10, },
359+ { .band = NL80211_BAND_2GHZ, .center_freq = 2462, .hw_value = 11, },
360+ { .band = NL80211_BAND_2GHZ, .center_freq = 2467, .hw_value = 12, },
361+ { .band = NL80211_BAND_2GHZ, .center_freq = 2472, .hw_value = 13, },
362+ { .band = NL80211_BAND_2GHZ, .center_freq = 2484, .hw_value = 14, },
363363 };
364364
365365 static const struct ieee80211_rate mwl8k_rates_24[] = {
@@ -379,10 +379,10 @@ static const struct ieee80211_rate mwl8k_rates_24[] = { · 13 unmodified lines
379379 };
380380
381381 static const struct ieee80211_channel mwl8k_channels_50[] = {
382− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5180, .hw_value = 36, },
383− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5200, .hw_value = 40, },
384− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5220, .hw_value = 44, },
385− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5240, .hw_value = 48, },
382+ { .band = NL80211_BAND_5GHZ, .center_freq = 5180, .hw_value = 36, },
383+ { .band = NL80211_BAND_5GHZ, .center_freq = 5200, .hw_value = 40, },
384+ { .band = NL80211_BAND_5GHZ, .center_freq = 5220, .hw_value = 44, },
385+ { .band = NL80211_BAND_5GHZ, .center_freq = 5240, .hw_value = 48, },
386386 };
387387
388388 static const struct ieee80211_rate mwl8k_rates_50[] = {
@@ -1010,11 +1010,11 @@ mwl8k_rxd_ap_process(void *_rxd, struct ieee80211_rx_status *status, · 621 unmodified lines
10101010 }
10111011
10121012 if (rxd->channel > 14) {
1013− status->band = IEEE80211_BAND_5GHZ;
1013+ status->band = NL80211_BAND_5GHZ;
10141014 if (!(status->flag & RX_FLAG_HT))
10151015 status->rate_idx -= 5;
10161016 } else {
1017− status->band = IEEE80211_BAND_2GHZ;
1017+ status->band = NL80211_BAND_2GHZ;
10181018 }
10191019 status->freq = ieee80211_channel_to_frequency(rxd->channel,
10201020 status->band);
@@ -1118,11 +1118,11 @@ mwl8k_rxd_sta_process(void *_rxd, struct ieee80211_rx_status *status, · 97 unmodified lines
11181118 status->flag |= RX_FLAG_HT;
11191119
11201120 if (rxd->channel > 14) {
1121− status->band = IEEE80211_BAND_5GHZ;
1121+ status->band = NL80211_BAND_5GHZ;
11221122 if (!(status->flag & RX_FLAG_HT))
11231123 status->rate_idx -= 5;
11241124 } else {
1125− status->band = IEEE80211_BAND_2GHZ;
1125+ status->band = NL80211_BAND_2GHZ;
11261126 }
11271127 status->freq = ieee80211_channel_to_frequency(rxd->channel,
11281128 status->band);
@@ -2300,13 +2300,13 @@ static void mwl8k_setup_2ghz_band(struct ieee80211_hw *hw) · 1171 unmodified lines
23002300 BUILD_BUG_ON(sizeof(priv->rates_24) != sizeof(mwl8k_rates_24));
23012301 memcpy(priv->rates_24, mwl8k_rates_24, sizeof(mwl8k_rates_24));
23022302
2303− priv->band_24.band = IEEE80211_BAND_2GHZ;
2303+ priv->band_24.band = NL80211_BAND_2GHZ;
23042304 priv->band_24.channels = priv->channels_24;
23052305 priv->band_24.n_channels = ARRAY_SIZE(mwl8k_channels_24);
23062306 priv->band_24.bitrates = priv->rates_24;
23072307 priv->band_24.n_bitrates = ARRAY_SIZE(mwl8k_rates_24);
23082308
2309− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band_24;
2309+ hw->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band_24;
23102310 }
23112311
23122312 static void mwl8k_setup_5ghz_band(struct ieee80211_hw *hw)
@@ -2319,13 +2319,13 @@ static void mwl8k_setup_5ghz_band(struct ieee80211_hw *hw) · 6 unmodified lines
23192319 BUILD_BUG_ON(sizeof(priv->rates_50) != sizeof(mwl8k_rates_50));
23202320 memcpy(priv->rates_50, mwl8k_rates_50, sizeof(mwl8k_rates_50));
23212321
2322− priv->band_50.band = IEEE80211_BAND_5GHZ;
2322+ priv->band_50.band = NL80211_BAND_5GHZ;
23232323 priv->band_50.channels = priv->channels_50;
23242324 priv->band_50.n_channels = ARRAY_SIZE(mwl8k_channels_50);
23252325 priv->band_50.bitrates = priv->rates_50;
23262326 priv->band_50.n_bitrates = ARRAY_SIZE(mwl8k_rates_50);
23272327
2328− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->band_50;
2328+ hw->wiphy->bands[NL80211_BAND_5GHZ] = &priv->band_50;
23292329 }
23302330
23312331 /*
@@ -2876,9 +2876,9 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw, · 544 unmodified lines
28762876 cmd->header.length = cpu_to_le16(sizeof(*cmd));
28772877 cmd->action = cpu_to_le16(MWL8K_CMD_SET_LIST);
28782878
2879− if (channel->band == IEEE80211_BAND_2GHZ)
2879+ if (channel->band == NL80211_BAND_2GHZ)
28802880 cmd->band = cpu_to_le16(0x1);
2881− else if (channel->band == IEEE80211_BAND_5GHZ)
2881+ else if (channel->band == NL80211_BAND_5GHZ)
28822882 cmd->band = cpu_to_le16(0x4);
28832883
28842884 cmd->channel = cpu_to_le16(channel->hw_value);
@@ -3067,7 +3067,7 @@ static int freq_to_idx(struct mwl8k_priv *priv, int freq) · 182 unmodified lines
30673067 struct ieee80211_supported_band *sband;
30683068 int band, ch, idx = 0;
30693069
3070− for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {
3070+ for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) {
30713071 sband = priv->hw->wiphy->bands[band];
30723072 if (!sband)
30733073 continue;
@@ -3149,9 +3149,9 @@ static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, · 75 unmodified lines
31493149 cmd->action = cpu_to_le16(MWL8K_CMD_SET);
31503150 cmd->current_channel = channel->hw_value;
31513151
3152− if (channel->band == IEEE80211_BAND_2GHZ)
3152+ if (channel->band == NL80211_BAND_2GHZ)
31533153 cmd->channel_flags |= cpu_to_le32(0x00000001);
3154− else if (channel->band == IEEE80211_BAND_5GHZ)
3154+ else if (channel->band == NL80211_BAND_5GHZ)
31553155 cmd->channel_flags |= cpu_to_le32(0x00000004);
31563156
31573157 if (!priv->sw_scan_start) {
@@ -4094,10 +4094,10 @@ static int mwl8k_cmd_set_new_stn_add(struct ieee80211_hw *hw, · 936 unmodified lines
40944094 memcpy(cmd->mac_addr, sta->addr, ETH_ALEN);
40954095 cmd->stn_id = cpu_to_le16(sta->aid);
40964096 cmd->action = cpu_to_le16(MWL8K_STA_ACTION_ADD);
4097− if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
4098− rates = sta->supp_rates[IEEE80211_BAND_2GHZ];
4097+ if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
4098+ rates = sta->supp_rates[NL80211_BAND_2GHZ];
40994099 else
4100− rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5;
4100+ rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5;
41014101 cmd->legacy_rates = cpu_to_le32(rates);
41024102 if (sta->ht_cap.ht_supported) {
41034103 cmd->ht_rates[0] = sta->ht_cap.mcs.rx_mask[0];
@@ -4529,10 +4529,10 @@ static int mwl8k_cmd_update_stadb_add(struct ieee80211_hw *hw, · 425 unmodified lines
45294529 p->ht_caps = cpu_to_le16(sta->ht_cap.cap);
45304530 p->extended_ht_caps = (sta->ht_cap.ampdu_factor & 3) |
45314531 ((sta->ht_cap.ampdu_density & 7) << 2);
4532− if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
4533− rates = sta->supp_rates[IEEE80211_BAND_2GHZ];
4532+ if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
4533+ rates = sta->supp_rates[NL80211_BAND_2GHZ];
45344534 else
4535− rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5;
4535+ rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5;
45364536 legacy_rate_mask_to_array(p->legacy_rates, rates);
45374537 memcpy(p->ht_rates, sta->ht_cap.mcs.rx_mask, 16);
45384538 p->interop = 1;
@@ -5010,11 +5010,11 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 471 unmodified lines
50105010 goto out;
50115011 }
50125012
5013− if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) {
5014− ap_legacy_rates = ap->supp_rates[IEEE80211_BAND_2GHZ];
5013+ if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) {
5014+ ap_legacy_rates = ap->supp_rates[NL80211_BAND_2GHZ];
50155015 } else {
50165016 ap_legacy_rates =
5017− ap->supp_rates[IEEE80211_BAND_5GHZ] << 5;
5017+ ap->supp_rates[NL80211_BAND_5GHZ] << 5;
50185018 }
50195019 memcpy(ap_mcs_rates, ap->ht_cap.mcs.rx_mask, 16);
50205020
@@ -5042,7 +5042,7 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 21 unmodified lines
50425042 idx--;
50435043
50445044 if (hw->conf.chandef.chan->band ==
5045− IEEE80211_BAND_2GHZ)
5045+ NL80211_BAND_2GHZ)
50465046 rate = mwl8k_rates_24[idx].hw_value;
50475047 else
50485048 rate = mwl8k_rates_50[idx].hw_value;
@@ -5116,7 +5116,7 @@ mwl8k_bss_info_changed_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 67 unmodified lines
51165116 if (idx)
51175117 idx--;
51185118
5119− if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
5119+ if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
51205120 rate = mwl8k_rates_24[idx].hw_value;
51215121 else
51225122 rate = mwl8k_rates_50[idx].hw_value;
@@ -5388,7 +5388,7 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, · 265 unmodified lines
53885388 struct ieee80211_supported_band *sband;
53895389
53905390 if (priv->ap_fw) {
5391− sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ];
5391+ sband = hw->wiphy->bands[NL80211_BAND_2GHZ];
53925392
53935393 if (sband && idx >= sband->n_channels) {
53945394 idx -= sband->n_channels;
@@ -5396,7 +5396,7 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, · 1 unmodified line
53965396 }
53975397
53985398 if (!sband)
5399− sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ];
5399+ sband = hw->wiphy->bands[NL80211_BAND_5GHZ];
54005400
54015401 if (!sband || idx >= sband->n_channels)
54025402 return -ENOENT;
drivers/net/wireless/mediatek/mt7601u/init.c+2−2
@@ -469,7 +469,7 @@ struct mt7601u_dev *mt7601u_alloc_device(struct device *pdev) · 468 unmodified lines
469469 }
470470
471471 #define CHAN2G(_idx, _freq) { \
472− .band = IEEE80211_BAND_2GHZ, \
472+ .band = NL80211_BAND_2GHZ, \
473473 .center_freq = (_freq), \
474474 .hw_value = (_idx), \
475475 .max_power = 30, \
@@ -563,7 +563,7 @@ mt76_init_sband_2g(struct mt7601u_dev *dev) · 87 unmodified lines
563563 {
564564 dev->sband_2g = devm_kzalloc(dev->dev, sizeof(*dev->sband_2g),
565565 GFP_KERNEL);
566− dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = dev->sband_2g;
566+ dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = dev->sband_2g;
567567
568568 WARN_ON(dev->ee->reg.start - 1 + dev->ee->reg.num >
569569 ARRAY_SIZE(mt76_channels_2ghz));
drivers/net/wireless/ralink/rt2x00/rt2800lib.c+15−15
@@ -777,7 +777,7 @@ static int rt2800_agc_to_rssi(struct rt2x00_dev *rt2x00dev, u32 rxwi_w2) · 776 unmodified lines
777777 u8 offset1;
778778 u8 offset2;
779779
780− if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) {
780+ if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) {
781781 rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_BG, &eeprom);
782782 offset0 = rt2x00_get_field16(eeprom, EEPROM_RSSI_BG_OFFSET0);
783783 offset1 = rt2x00_get_field16(eeprom, EEPROM_RSSI_BG_OFFSET1);
@@ -1174,7 +1174,7 @@ static void rt2800_brightness_set(struct led_classdev *led_cdev, · 390 unmodified lines
11741174 container_of(led_cdev, struct rt2x00_led, led_dev);
11751175 unsigned int enabled = brightness != LED_OFF;
11761176 unsigned int bg_mode =
1177− (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_2GHZ);
1177+ (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ);
11781178 unsigned int polarity =
11791179 rt2x00_get_field16(led->rt2x00dev->led_mcu_reg,
11801180 EEPROM_FREQ_LED_POLARITY);
@@ -1741,7 +1741,7 @@ static void rt2800_config_3572bt_ant(struct rt2x00_dev *rt2x00dev) · 560 unmodified lines
17411741 u8 led_ctrl, led_g_mode, led_r_mode;
17421742
17431743 rt2800_register_read(rt2x00dev, GPIO_SWITCH, &reg);
1744− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
1744+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
17451745 rt2x00_set_field32(&reg, GPIO_SWITCH_0, 1);
17461746 rt2x00_set_field32(&reg, GPIO_SWITCH_1, 1);
17471747 } else {
@@ -1844,7 +1844,7 @@ void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant) · 96 unmodified lines
18441844 rt2x00_has_cap_bt_coexist(rt2x00dev)) {
18451845 rt2x00_set_field8(&r3, BBP3_RX_ADC, 1);
18461846 rt2x00_set_field8(&r3, BBP3_RX_ANTENNA,
1847− rt2x00dev->curr_band == IEEE80211_BAND_5GHZ);
1847+ rt2x00dev->curr_band == NL80211_BAND_5GHZ);
18481848 rt2800_set_ant_diversity(rt2x00dev, ANTENNA_B);
18491849 } else {
18501850 rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, 1);
@@ -3451,7 +3451,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev) · 1600 unmodified lines
34513451 * Matching Delta value -4 -3 -2 -1 0 +1 +2 +3 +4
34523452 * Example TSSI bounds 0xF0 0xD0 0xB5 0xA0 0x88 0x45 0x25 0x15 0x00
34533453 */
3454− if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) {
3454+ if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) {
34553455 rt2800_eeprom_read(rt2x00dev, EEPROM_TSSI_BOUND_BG1, &eeprom);
34563456 tssi_bounds[0] = rt2x00_get_field16(eeprom,
34573457 EEPROM_TSSI_BOUND_BG1_MINUS4);
@@ -3546,7 +3546,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev) · 88 unmodified lines
35463546 }
35473547
35483548 static int rt2800_get_txpower_bw_comp(struct rt2x00_dev *rt2x00dev,
3549− enum ieee80211_band band)
3549+ enum nl80211_band band)
35503550 {
35513551 u16 eeprom;
35523552 u8 comp_en;
@@ -3562,7 +3562,7 @@ static int rt2800_get_txpower_bw_comp(struct rt2x00_dev *rt2x00dev, · 9 unmodified lines
35623562 !test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags))
35633563 return 0;
35643564
3565− if (band == IEEE80211_BAND_2GHZ) {
3565+ if (band == NL80211_BAND_2GHZ) {
35663566 comp_en = rt2x00_get_field16(eeprom,
35673567 EEPROM_TXPOWER_DELTA_ENABLE_2G);
35683568 if (comp_en) {
@@ -3611,7 +3611,7 @@ static int rt2800_get_txpower_reg_delta(struct rt2x00_dev *rt2x00dev, · 42 unmodified lines
36113611 }
36123612
36133613 static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b,
3614− enum ieee80211_band band, int power_level,
3614+ enum nl80211_band band, int power_level,
36153615 u8 txpower, int delta)
36163616 {
36173617 u16 eeprom;
@@ -3639,7 +3639,7 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b, · 21 unmodified lines
36393639 rt2800_eeprom_read(rt2x00dev, EEPROM_EIRP_MAX_TX_POWER,
36403640 &eeprom);
36413641
3642− if (band == IEEE80211_BAND_2GHZ)
3642+ if (band == NL80211_BAND_2GHZ)
36433643 eirp_txpower_criterion = rt2x00_get_field16(eeprom,
36443644 EEPROM_EIRP_MAX_TX_POWER_2GHZ);
36453645 else
@@ -3686,7 +3686,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, · 40 unmodified lines
36863686 u16 eeprom;
36873687 u32 regs[TX_PWR_CFG_IDX_COUNT];
36883688 unsigned int offset;
3689− enum ieee80211_band band = chan->band;
3689+ enum nl80211_band band = chan->band;
36903690 int delta;
36913691 int i;
36923692
@@ -3697,7 +3697,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, · 4 unmodified lines
36973697 /* calculate temperature compensation delta */
36983698 delta = rt2800_get_gain_calibration_delta(rt2x00dev);
36993699
3700− if (band == IEEE80211_BAND_5GHZ)
3700+ if (band == NL80211_BAND_5GHZ)
37013701 offset = 16;
37023702 else
37033703 offset = 0;
@@ -4055,7 +4055,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, · 351 unmodified lines
40554055 for (i = 0; i < TX_PWR_CFG_IDX_COUNT; i++)
40564056 rt2x00_dbg(rt2x00dev,
40574057 "band:%cGHz, BW:%c0MHz, TX_PWR_CFG_%d%s = %08lx\n",
4058− (band == IEEE80211_BAND_5GHZ) ? '5' : '2',
4058+ (band == NL80211_BAND_5GHZ) ? '5' : '2',
40594059 (test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags)) ?
40604060 '4' : '2',
40614061 (i > TX_PWR_CFG_9_IDX) ?
@@ -4081,7 +4081,7 @@ static void rt2800_config_txpower_rt28xx(struct rt2x00_dev *rt2x00dev, · 19 unmodified lines
40814081 u16 eeprom;
40824082 u32 reg, offset;
40834083 int i, is_rate_b, delta, power_ctrl;
4084− enum ieee80211_band band = chan->band;
4084+ enum nl80211_band band = chan->band;
40854085
40864086 /*
40874087 * Calculate HT40 compensation. For 40MHz we need to add or subtract
@@ -4436,7 +4436,7 @@ static u8 rt2800_get_default_vgc(struct rt2x00_dev *rt2x00dev) · 348 unmodified lines
44364436 {
44374437 u8 vgc;
44384438
4439− if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) {
4439+ if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) {
44404440 if (rt2x00_rt(rt2x00dev, RT3070) ||
44414441 rt2x00_rt(rt2x00dev, RT3071) ||
44424442 rt2x00_rt(rt2x00dev, RT3090) ||
@@ -4511,7 +4511,7 @@ void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, · 68 unmodified lines
45114511 case RT3572:
45124512 case RT3593:
45134513 if (qual->rssi > -65) {
4514− if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ)
4514+ if (rt2x00dev->curr_band == NL80211_BAND_2GHZ)
45154515 vgc += 0x20;
45164516 else
45174517 vgc += 0x10;
drivers/net/wireless/ralink/rt2x00/rt2x00.h+2−2
@@ -753,8 +753,8 @@ struct rt2x00_dev { · 752 unmodified lines
753753 * IEEE80211 control structure.
754754 */
755755 struct ieee80211_hw *hw;
756− struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
757− enum ieee80211_band curr_band;
756+ struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
757+ enum nl80211_band curr_band;
758758 int curr_freq;
759759
760760 /*
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c+20−20
@@ -911,7 +911,7 @@ static void rt2x00lib_channel(struct ieee80211_channel *entry, · 910 unmodified lines
911911 const int value)
912912 {
913913 /* XXX: this assumption about the band is wrong for 802.11j */
914− entry->band = channel <= 14 ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
914+ entry->band = channel <= 14 ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
915915 entry->center_freq = ieee80211_channel_to_frequency(channel,
916916 entry->band);
917917 entry->hw_value = value;
@@ -975,13 +975,13 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, · 57 unmodified lines
975975 * Channels: 2.4 GHz
976976 */
977977 if (spec->supported_bands & SUPPORT_BAND_2GHZ) {
978− rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_channels = 14;
979− rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_bitrates = num_rates;
980− rt2x00dev->bands[IEEE80211_BAND_2GHZ].channels = channels;
981− rt2x00dev->bands[IEEE80211_BAND_2GHZ].bitrates = rates;
982− hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
983− &rt2x00dev->bands[IEEE80211_BAND_2GHZ];
984− memcpy(&rt2x00dev->bands[IEEE80211_BAND_2GHZ].ht_cap,
978+ rt2x00dev->bands[NL80211_BAND_2GHZ].n_channels = 14;
979+ rt2x00dev->bands[NL80211_BAND_2GHZ].n_bitrates = num_rates;
980+ rt2x00dev->bands[NL80211_BAND_2GHZ].channels = channels;
981+ rt2x00dev->bands[NL80211_BAND_2GHZ].bitrates = rates;
982+ hw->wiphy->bands[NL80211_BAND_2GHZ] =
983+ &rt2x00dev->bands[NL80211_BAND_2GHZ];
984+ memcpy(&rt2x00dev->bands[NL80211_BAND_2GHZ].ht_cap,
985985 &spec->ht, sizeof(spec->ht));
986986 }
987987
@@ -991,15 +991,15 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, · 3 unmodified lines
991991 * Channels: OFDM, UNII, HiperLAN2.
992992 */
993993 if (spec->supported_bands & SUPPORT_BAND_5GHZ) {
994− rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_channels =
994+ rt2x00dev->bands[NL80211_BAND_5GHZ].n_channels =
995995 spec->num_channels - 14;
996− rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_bitrates =
996+ rt2x00dev->bands[NL80211_BAND_5GHZ].n_bitrates =
997997 num_rates - 4;
998− rt2x00dev->bands[IEEE80211_BAND_5GHZ].channels = &channels[14];
999− rt2x00dev->bands[IEEE80211_BAND_5GHZ].bitrates = &rates[4];
1000− hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
1001− &rt2x00dev->bands[IEEE80211_BAND_5GHZ];
1002− memcpy(&rt2x00dev->bands[IEEE80211_BAND_5GHZ].ht_cap,
998+ rt2x00dev->bands[NL80211_BAND_5GHZ].channels = &channels[14];
999+ rt2x00dev->bands[NL80211_BAND_5GHZ].bitrates = &rates[4];
1000+ hw->wiphy->bands[NL80211_BAND_5GHZ] =
1001+ &rt2x00dev->bands[NL80211_BAND_5GHZ];
1002+ memcpy(&rt2x00dev->bands[NL80211_BAND_5GHZ].ht_cap,
10031003 &spec->ht, sizeof(spec->ht));
10041004 }
10051005
@@ -1016,11 +1016,11 @@ static void rt2x00lib_remove_hw(struct rt2x00_dev *rt2x00dev) · 10 unmodified lines
10161016 if (test_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags))
10171017 ieee80211_unregister_hw(rt2x00dev->hw);
10181018
1019− if (likely(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ])) {
1020− kfree(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->channels);
1021− kfree(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->bitrates);
1022− rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL;
1023− rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
1019+ if (likely(rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ])) {
1020+ kfree(rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels);
1021+ kfree(rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ]->bitrates);
1022+ rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = NULL;
1023+ rt2x00dev->hw->wiphy->bands[NL80211_BAND_5GHZ] = NULL;
10241024 }
10251025
10261026 kfree(rt2x00dev->spec.channels_info);
drivers/net/wireless/ralink/rt2x00/rt61pci.c+11−11
@@ -252,9 +252,9 @@ static void rt61pci_brightness_set(struct led_classdev *led_cdev, · 251 unmodified lines
252252 container_of(led_cdev, struct rt2x00_led, led_dev);
253253 unsigned int enabled = brightness != LED_OFF;
254254 unsigned int a_mode =
255− (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_5GHZ);
255+ (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ);
256256 unsigned int bg_mode =
257− (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_2GHZ);
257+ (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ);
258258
259259 if (led->type == LED_TYPE_RADIO) {
260260 rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg,
@@ -643,12 +643,12 @@ static void rt61pci_config_antenna_5x(struct rt2x00_dev *rt2x00dev, · 382 unmodified lines
643643 case ANTENNA_HW_DIVERSITY:
644644 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2);
645645 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END,
646− (rt2x00dev->curr_band != IEEE80211_BAND_5GHZ));
646+ (rt2x00dev->curr_band != NL80211_BAND_5GHZ));
647647 break;
648648 case ANTENNA_A:
649649 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1);
650650 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0);
651− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ)
651+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ)
652652 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0);
653653 else
654654 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3);
@@ -657,7 +657,7 @@ static void rt61pci_config_antenna_5x(struct rt2x00_dev *rt2x00dev, · 2 unmodified lines
657657 default:
658658 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1);
659659 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0);
660− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ)
660+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ)
661661 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3);
662662 else
663663 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0);
@@ -808,7 +808,7 @@ static void rt61pci_config_ant(struct rt2x00_dev *rt2x00dev, · 144 unmodified lines
808808 BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY ||
809809 ant->tx == ANTENNA_SW_DIVERSITY);
810810
811− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
811+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
812812 sel = antenna_sel_a;
813813 lna = rt2x00_has_cap_external_lna_a(rt2x00dev);
814814 } else {
@@ -822,9 +822,9 @@ static void rt61pci_config_ant(struct rt2x00_dev *rt2x00dev, · 7 unmodified lines
822822 rt2x00mmio_register_read(rt2x00dev, PHY_CSR0, &reg);
823823
824824 rt2x00_set_field32(&reg, PHY_CSR0_PA_PE_BG,
825− rt2x00dev->curr_band == IEEE80211_BAND_2GHZ);
825+ rt2x00dev->curr_band == NL80211_BAND_2GHZ);
826826 rt2x00_set_field32(&reg, PHY_CSR0_PA_PE_A,
827− rt2x00dev->curr_band == IEEE80211_BAND_5GHZ);
827+ rt2x00dev->curr_band == NL80211_BAND_5GHZ);
828828
829829 rt2x00mmio_register_write(rt2x00dev, PHY_CSR0, reg);
830830
@@ -846,7 +846,7 @@ static void rt61pci_config_lna_gain(struct rt2x00_dev *rt2x00dev, · 15 unmodified lines
846846 u16 eeprom;
847847 short lna_gain = 0;
848848
849− if (libconf->conf->chandef.chan->band == IEEE80211_BAND_2GHZ) {
849+ if (libconf->conf->chandef.chan->band == NL80211_BAND_2GHZ) {
850850 if (rt2x00_has_cap_external_lna_bg(rt2x00dev))
851851 lna_gain += 14;
852852
@@ -1048,7 +1048,7 @@ static void rt61pci_link_tuner(struct rt2x00_dev *rt2x00dev, · 195 unmodified lines
10481048 /*
10491049 * Determine r17 bounds.
10501050 */
1051− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
1051+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
10521052 low_bound = 0x28;
10531053 up_bound = 0x48;
10541054 if (rt2x00_has_cap_external_lna_a(rt2x00dev)) {
@@ -2077,7 +2077,7 @@ static int rt61pci_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1) · 1022 unmodified lines
20772077 return 0;
20782078 }
20792079
2080− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
2080+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
20812081 if (lna == 3 || lna == 2)
20822082 offset += 10;
20832083 }
drivers/net/wireless/ralink/rt2x00/rt73usb.c+11−11
@@ -197,9 +197,9 @@ static void rt73usb_brightness_set(struct led_classdev *led_cdev, · 196 unmodified lines
197197 container_of(led_cdev, struct rt2x00_led, led_dev);
198198 unsigned int enabled = brightness != LED_OFF;
199199 unsigned int a_mode =
200− (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_5GHZ);
200+ (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ);
201201 unsigned int bg_mode =
202− (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_2GHZ);
202+ (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ);
203203
204204 if (led->type == LED_TYPE_RADIO) {
205205 rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg,
@@ -593,13 +593,13 @@ static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev, · 387 unmodified lines
593593 case ANTENNA_HW_DIVERSITY:
594594 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2);
595595 temp = !rt2x00_has_cap_frame_type(rt2x00dev) &&
596− (rt2x00dev->curr_band != IEEE80211_BAND_5GHZ);
596+ (rt2x00dev->curr_band != NL80211_BAND_5GHZ);
597597 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, temp);
598598 break;
599599 case ANTENNA_A:
600600 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1);
601601 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0);
602− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ)
602+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ)
603603 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0);
604604 else
605605 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3);
@@ -608,7 +608,7 @@ static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev, · 2 unmodified lines
608608 default:
609609 rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1);
610610 rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0);
611− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ)
611+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ)
612612 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3);
613613 else
614614 rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0);
@@ -704,7 +704,7 @@ static void rt73usb_config_ant(struct rt2x00_dev *rt2x00dev, · 89 unmodified lines
704704 BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY ||
705705 ant->tx == ANTENNA_SW_DIVERSITY);
706706
707− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
707+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
708708 sel = antenna_sel_a;
709709 lna = rt2x00_has_cap_external_lna_a(rt2x00dev);
710710 } else {
@@ -718,9 +718,9 @@ static void rt73usb_config_ant(struct rt2x00_dev *rt2x00dev, · 7 unmodified lines
718718 rt2x00usb_register_read(rt2x00dev, PHY_CSR0, &reg);
719719
720720 rt2x00_set_field32(&reg, PHY_CSR0_PA_PE_BG,
721− (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ));
721+ (rt2x00dev->curr_band == NL80211_BAND_2GHZ));
722722 rt2x00_set_field32(&reg, PHY_CSR0_PA_PE_A,
723− (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ));
723+ (rt2x00dev->curr_band == NL80211_BAND_5GHZ));
724724
725725 rt2x00usb_register_write(rt2x00dev, PHY_CSR0, reg);
726726
@@ -736,7 +736,7 @@ static void rt73usb_config_lna_gain(struct rt2x00_dev *rt2x00dev, · 9 unmodified lines
736736 u16 eeprom;
737737 short lna_gain = 0;
738738
739− if (libconf->conf->chandef.chan->band == IEEE80211_BAND_2GHZ) {
739+ if (libconf->conf->chandef.chan->band == NL80211_BAND_2GHZ) {
740740 if (rt2x00_has_cap_external_lna_bg(rt2x00dev))
741741 lna_gain += 14;
742742
@@ -923,7 +923,7 @@ static void rt73usb_link_tuner(struct rt2x00_dev *rt2x00dev, · 180 unmodified lines
923923 /*
924924 * Determine r17 bounds.
925925 */
926− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
926+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
927927 low_bound = 0x28;
928928 up_bound = 0x48;
929929
@@ -1657,7 +1657,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1) · 727 unmodified lines
16571657 return 0;
16581658 }
16591659
1660− if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) {
1660+ if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) {
16611661 if (rt2x00_has_cap_external_lna_a(rt2x00dev)) {
16621662 if (lna == 3 || lna == 2)
16631663 offset += 10;
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c+4−4
@@ -526,7 +526,7 @@ static void rtl8180_tx(struct ieee80211_hw *dev, · 525 unmodified lines
526526 * ieee80211_generic_frame_duration
527527 */
528528 duration = ieee80211_generic_frame_duration(dev, priv->vif,
529− IEEE80211_BAND_2GHZ, skb->len,
529+ NL80211_BAND_2GHZ, skb->len,
530530 ieee80211_get_tx_rate(dev, info));
531531
532532 frame_duration = priv->ack_time + le16_to_cpu(duration);
@@ -1529,7 +1529,7 @@ static void rtl8180_bss_info_changed(struct ieee80211_hw *dev, · 996 unmodified lines
15291529 priv->ack_time =
15301530 le16_to_cpu(ieee80211_generic_frame_duration(dev,
15311531 priv->vif,
1532− IEEE80211_BAND_2GHZ, 10,
1532+ NL80211_BAND_2GHZ, 10,
15331533 &priv->rates[0])) - 10;
15341534
15351535 rtl8180_conf_erp(dev, info);
@@ -1795,12 +1795,12 @@ static int rtl8180_probe(struct pci_dev *pdev, · 259 unmodified lines
17951795 memcpy(priv->channels, rtl818x_channels, sizeof(rtl818x_channels));
17961796 memcpy(priv->rates, rtl818x_rates, sizeof(rtl818x_rates));
17971797
1798− priv->band.band = IEEE80211_BAND_2GHZ;
1798+ priv->band.band = NL80211_BAND_2GHZ;
17991799 priv->band.channels = priv->channels;
18001800 priv->band.n_channels = ARRAY_SIZE(rtl818x_channels);
18011801 priv->band.bitrates = priv->rates;
18021802 priv->band.n_bitrates = 4;
1803− dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
1803+ dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
18041804
18051805 ieee80211_hw_set(dev, HOST_BROADCAST_PS_BUFFERING);
18061806 ieee80211_hw_set(dev, RX_INCLUDES_FCS);
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c+2−2
@@ -1470,12 +1470,12 @@ static int rtl8187_probe(struct usb_interface *intf, · 1469 unmodified lines
14701470 memcpy(priv->rates, rtl818x_rates, sizeof(rtl818x_rates));
14711471 priv->map = (struct rtl818x_csr *)0xFF00;
14721472
1473− priv->band.band = IEEE80211_BAND_2GHZ;
1473+ priv->band.band = NL80211_BAND_2GHZ;
14741474 priv->band.channels = priv->channels;
14751475 priv->band.n_channels = ARRAY_SIZE(rtl818x_channels);
14761476 priv->band.bitrates = priv->rates;
14771477 priv->band.n_bitrates = ARRAY_SIZE(rtl818x_rates);
1478− dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
1478+ dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
14791479
14801480
14811481 ieee80211_hw_set(dev, RX_INCLUDES_FCS);
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c+15−15
@@ -91,33 +91,33 @@ static struct ieee80211_rate rtl8xxxu_rates[] = { · 90 unmodified lines
9191 };
9292
9393 static struct ieee80211_channel rtl8xxxu_channels_2g[] = {
94− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412,
94+ { .band = NL80211_BAND_2GHZ, .center_freq = 2412,
9595 .hw_value = 1, .max_power = 30 },
96− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417,
96+ { .band = NL80211_BAND_2GHZ, .center_freq = 2417,
9797 .hw_value = 2, .max_power = 30 },
98− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422,
98+ { .band = NL80211_BAND_2GHZ, .center_freq = 2422,
9999 .hw_value = 3, .max_power = 30 },
100− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427,
100+ { .band = NL80211_BAND_2GHZ, .center_freq = 2427,
101101 .hw_value = 4, .max_power = 30 },
102− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432,
102+ { .band = NL80211_BAND_2GHZ, .center_freq = 2432,
103103 .hw_value = 5, .max_power = 30 },
104− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437,
104+ { .band = NL80211_BAND_2GHZ, .center_freq = 2437,
105105 .hw_value = 6, .max_power = 30 },
106− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442,
106+ { .band = NL80211_BAND_2GHZ, .center_freq = 2442,
107107 .hw_value = 7, .max_power = 30 },
108− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447,
108+ { .band = NL80211_BAND_2GHZ, .center_freq = 2447,
109109 .hw_value = 8, .max_power = 30 },
110− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452,
110+ { .band = NL80211_BAND_2GHZ, .center_freq = 2452,
111111 .hw_value = 9, .max_power = 30 },
112− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457,
112+ { .band = NL80211_BAND_2GHZ, .center_freq = 2457,
113113 .hw_value = 10, .max_power = 30 },
114− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462,
114+ { .band = NL80211_BAND_2GHZ, .center_freq = 2462,
115115 .hw_value = 11, .max_power = 30 },
116− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467,
116+ { .band = NL80211_BAND_2GHZ, .center_freq = 2467,
117117 .hw_value = 12, .max_power = 30 },
118− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472,
118+ { .band = NL80211_BAND_2GHZ, .center_freq = 2472,
119119 .hw_value = 13, .max_power = 30 },
120− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484,
120+ { .band = NL80211_BAND_2GHZ, .center_freq = 2484,
121121 .hw_value = 14, .max_power = 30 }
122122 };
123123
@@ -8378,7 +8378,7 @@ static int rtl8xxxu_probe(struct usb_interface *interface, · 8254 unmodified lines
83788378 dev_info(&udev->dev, "Enabling HT_20_40 on the 2.4GHz band\n");
83798379 sband->ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40;
83808380 }
8381− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
8381+ hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
83828382
83838383 hw->wiphy->rts_threshold = 2347;
83848384
drivers/net/wireless/realtek/rtlwifi/base.c+22−22
@@ -131,7 +131,7 @@ static struct ieee80211_rate rtl_ratetable_5g[] = { · 130 unmodified lines
131131 };
132132
133133 static const struct ieee80211_supported_band rtl_band_2ghz = {
134− .band = IEEE80211_BAND_2GHZ,
134+ .band = NL80211_BAND_2GHZ,
135135
136136 .channels = rtl_channeltable_2g,
137137 .n_channels = ARRAY_SIZE(rtl_channeltable_2g),
@@ -143,7 +143,7 @@ static const struct ieee80211_supported_band rtl_band_2ghz = { · 5 unmodified lines
143143 };
144144
145145 static struct ieee80211_supported_band rtl_band_5ghz = {
146− .band = IEEE80211_BAND_5GHZ,
146+ .band = NL80211_BAND_5GHZ,
147147
148148 .channels = rtl_channeltable_5g,
149149 .n_channels = ARRAY_SIZE(rtl_channeltable_5g),
@@ -197,7 +197,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, · 47 unmodified lines
197197
198198 ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
199199
200− /*hw->wiphy->bands[IEEE80211_BAND_2GHZ]
200+ /*hw->wiphy->bands[NL80211_BAND_2GHZ]
201201 *base on ant_num
202202 *rx_mask: RX mask
203203 *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7
@@ -328,26 +328,26 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) · 124 unmodified lines
328328 rtlhal->bandset == BAND_ON_BOTH) {
329329 /* 1: 2.4 G bands */
330330 /* <1> use mac->bands as mem for hw->wiphy->bands */
331− sband = &(rtlmac->bands[IEEE80211_BAND_2GHZ]);
331+ sband = &(rtlmac->bands[NL80211_BAND_2GHZ]);
332332
333− /* <2> set hw->wiphy->bands[IEEE80211_BAND_2GHZ]
333+ /* <2> set hw->wiphy->bands[NL80211_BAND_2GHZ]
334334 * to default value(1T1R) */
335− memcpy(&(rtlmac->bands[IEEE80211_BAND_2GHZ]), &rtl_band_2ghz,
335+ memcpy(&(rtlmac->bands[NL80211_BAND_2GHZ]), &rtl_band_2ghz,
336336 sizeof(struct ieee80211_supported_band));
337337
338338 /* <3> init ht cap base on ant_num */
339339 _rtl_init_hw_ht_capab(hw, &sband->ht_cap);
340340
341341 /* <4> set mac->sband to wiphy->sband */
342− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
342+ hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
343343
344344 /* 2: 5 G bands */
345345 /* <1> use mac->bands as mem for hw->wiphy->bands */
346− sband = &(rtlmac->bands[IEEE80211_BAND_5GHZ]);
346+ sband = &(rtlmac->bands[NL80211_BAND_5GHZ]);
347347
348− /* <2> set hw->wiphy->bands[IEEE80211_BAND_5GHZ]
348+ /* <2> set hw->wiphy->bands[NL80211_BAND_5GHZ]
349349 * to default value(1T1R) */
350− memcpy(&(rtlmac->bands[IEEE80211_BAND_5GHZ]), &rtl_band_5ghz,
350+ memcpy(&(rtlmac->bands[NL80211_BAND_5GHZ]), &rtl_band_5ghz,
351351 sizeof(struct ieee80211_supported_band));
352352
353353 /* <3> init ht cap base on ant_num */
@@ -355,15 +355,15 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) · 1 unmodified line
355355
356356 _rtl_init_hw_vht_capab(hw, &sband->vht_cap);
357357 /* <4> set mac->sband to wiphy->sband */
358− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
358+ hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
359359 } else {
360360 if (rtlhal->current_bandtype == BAND_ON_2_4G) {
361361 /* <1> use mac->bands as mem for hw->wiphy->bands */
362− sband = &(rtlmac->bands[IEEE80211_BAND_2GHZ]);
362+ sband = &(rtlmac->bands[NL80211_BAND_2GHZ]);
363363
364− /* <2> set hw->wiphy->bands[IEEE80211_BAND_2GHZ]
364+ /* <2> set hw->wiphy->bands[NL80211_BAND_2GHZ]
365365 * to default value(1T1R) */
366− memcpy(&(rtlmac->bands[IEEE80211_BAND_2GHZ]),
366+ memcpy(&(rtlmac->bands[NL80211_BAND_2GHZ]),
367367 &rtl_band_2ghz,
368368 sizeof(struct ieee80211_supported_band));
369369
@@ -371,14 +371,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) · 1 unmodified line
371371 _rtl_init_hw_ht_capab(hw, &sband->ht_cap);
372372
373373 /* <4> set mac->sband to wiphy->sband */
374− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
374+ hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
375375 } else if (rtlhal->current_bandtype == BAND_ON_5G) {
376376 /* <1> use mac->bands as mem for hw->wiphy->bands */
377− sband = &(rtlmac->bands[IEEE80211_BAND_5GHZ]);
377+ sband = &(rtlmac->bands[NL80211_BAND_5GHZ]);
378378
379− /* <2> set hw->wiphy->bands[IEEE80211_BAND_5GHZ]
379+ /* <2> set hw->wiphy->bands[NL80211_BAND_5GHZ]
380380 * to default value(1T1R) */
381− memcpy(&(rtlmac->bands[IEEE80211_BAND_5GHZ]),
381+ memcpy(&(rtlmac->bands[NL80211_BAND_5GHZ]),
382382 &rtl_band_5ghz,
383383 sizeof(struct ieee80211_supported_band));
384384
@@ -387,7 +387,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) · 2 unmodified lines
387387
388388 _rtl_init_hw_vht_capab(hw, &sband->vht_cap);
389389 /* <4> set mac->sband to wiphy->sband */
390− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
390+ hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
391391 } else {
392392 RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n",
393393 rtlhal->current_bandtype);
@@ -861,7 +861,7 @@ static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw, · 467 unmodified lines
861861
862862 /* mac80211's rate_idx is like this:
863863 *
864− * 2.4G band:rx_status->band == IEEE80211_BAND_2GHZ
864+ * 2.4G band:rx_status->band == NL80211_BAND_2GHZ
865865 *
866866 * B/G rate:
867867 * (rx_status->flag & RX_FLAG_HT) = 0,
@@ -871,7 +871,7 @@ static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw, · 3 unmodified lines
871871 * (rx_status->flag & RX_FLAG_HT) = 1,
872872 * DESC_RATEMCS0-->DESC_RATEMCS15 ==> idx is 0-->15
873873 *
874− * 5G band:rx_status->band == IEEE80211_BAND_5GHZ
874+ * 5G band:rx_status->band == NL80211_BAND_5GHZ
875875 * A rate:
876876 * (rx_status->flag & RX_FLAG_HT) = 0,
877877 * DESC_RATE6M-->DESC_RATE54M ==> idx is 0-->7,
@@ -958,7 +958,7 @@ int rtlwifi_rate_mapping(struct ieee80211_hw *hw, bool isht, bool isvht, · 80 unmodified lines
958958 return rate_idx;
959959 }
960960 if (false == isht) {
961− if (IEEE80211_BAND_2GHZ == hw->conf.chandef.chan->band) {
961+ if (NL80211_BAND_2GHZ == hw->conf.chandef.chan->band) {
962962 switch (desc_rate) {
963963 case DESC_RATE1M:
964964 rate_idx = 0;
drivers/net/wireless/realtek/rtlwifi/regd.c+8−8
@@ -154,13 +154,13 @@ static bool _rtl_is_radar_freq(u16 center_freq) · 153 unmodified lines
154154 static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy,
155155 enum nl80211_reg_initiator initiator)
156156 {
157− enum ieee80211_band band;
157+ enum nl80211_band band;
158158 struct ieee80211_supported_band *sband;
159159 const struct ieee80211_reg_rule *reg_rule;
160160 struct ieee80211_channel *ch;
161161 unsigned int i;
162162
163− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
163+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
164164
165165 if (!wiphy->bands[band])
166166 continue;
@@ -210,9 +210,9 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, · 43 unmodified lines
210210 struct ieee80211_channel *ch;
211211 const struct ieee80211_reg_rule *reg_rule;
212212
213− if (!wiphy->bands[IEEE80211_BAND_2GHZ])
213+ if (!wiphy->bands[NL80211_BAND_2GHZ])
214214 return;
215− sband = wiphy->bands[IEEE80211_BAND_2GHZ];
215+ sband = wiphy->bands[NL80211_BAND_2GHZ];
216216
217217 /*
218218 *If no country IE has been received always enable active scan
@@ -262,10 +262,10 @@ static void _rtl_reg_apply_radar_flags(struct wiphy *wiphy) · 43 unmodified lines
262262 struct ieee80211_channel *ch;
263263 unsigned int i;
264264
265− if (!wiphy->bands[IEEE80211_BAND_5GHZ])
265+ if (!wiphy->bands[NL80211_BAND_5GHZ])
266266 return;
267267
268− sband = wiphy->bands[IEEE80211_BAND_5GHZ];
268+ sband = wiphy->bands[NL80211_BAND_5GHZ];
269269
270270 for (i = 0; i < sband->n_channels; i++) {
271271 ch = &sband->channels[i];
@@ -301,12 +301,12 @@ static void _rtl_reg_apply_world_flags(struct wiphy *wiphy, · 29 unmodified lines
301301
302302 static void _rtl_dump_channel_map(struct wiphy *wiphy)
303303 {
304− enum ieee80211_band band;
304+ enum nl80211_band band;
305305 struct ieee80211_supported_band *sband;
306306 struct ieee80211_channel *ch;
307307 unsigned int i;
308308
309− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
309+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
310310 if (!wiphy->bands[band])
311311 continue;
312312 sband = wiphy->bands[band];
drivers/net/wireless/realtek/rtlwifi/wifi.h+1−1
@@ -1359,7 +1359,7 @@ struct rtl_mac { · 1358 unmodified lines
13591359 u32 tx_ss_num;
13601360 u32 rx_ss_num;
13611361
1362− struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
1362+ struct ieee80211_supported_band bands[NUM_NL80211_BANDS];
13631363 struct ieee80211_hw *hw;
13641364 struct ieee80211_vif *vif;
13651365 enum nl80211_iftype opmode;
drivers/net/wireless/rndis_wlan.c+2−2
@@ -1291,7 +1291,7 @@ static int set_channel(struct usbnet *usbdev, int channel) · 1290 unmodified lines
12911291 return 0;
12921292
12931293 dsconfig = 1000 *
1294− ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
1294+ ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
12951295
12961296 len = sizeof(config);
12971297 ret = rndis_query_oid(usbdev,
@@ -3476,7 +3476,7 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) · 2178 unmodified lines
34763476 priv->band.n_channels = ARRAY_SIZE(rndis_channels);
34773477 priv->band.bitrates = priv->rates;
34783478 priv->band.n_bitrates = ARRAY_SIZE(rndis_rates);
3479− wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
3479+ wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
34803480 wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC;
34813481
34823482 memcpy(priv->cipher_suites, rndis_cipher_suites,
drivers/net/wireless/rsi/rsi_91x_mac80211.c+50−50
@@ -20,84 +20,84 @@ · 19 unmodified lines
2020 #include "rsi_common.h"
2121
2222 static const struct ieee80211_channel rsi_2ghz_channels[] = {
23− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412,
23+ { .band = NL80211_BAND_2GHZ, .center_freq = 2412,
2424 .hw_value = 1 }, /* Channel 1 */
25− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417,
25+ { .band = NL80211_BAND_2GHZ, .center_freq = 2417,
2626 .hw_value = 2 }, /* Channel 2 */
27− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422,
27+ { .band = NL80211_BAND_2GHZ, .center_freq = 2422,
2828 .hw_value = 3 }, /* Channel 3 */
29− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427,
29+ { .band = NL80211_BAND_2GHZ, .center_freq = 2427,
3030 .hw_value = 4 }, /* Channel 4 */
31− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432,
31+ { .band = NL80211_BAND_2GHZ, .center_freq = 2432,
3232 .hw_value = 5 }, /* Channel 5 */
33− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437,
33+ { .band = NL80211_BAND_2GHZ, .center_freq = 2437,
3434 .hw_value = 6 }, /* Channel 6 */
35− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442,
35+ { .band = NL80211_BAND_2GHZ, .center_freq = 2442,
3636 .hw_value = 7 }, /* Channel 7 */
37− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447,
37+ { .band = NL80211_BAND_2GHZ, .center_freq = 2447,
3838 .hw_value = 8 }, /* Channel 8 */
39− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452,
39+ { .band = NL80211_BAND_2GHZ, .center_freq = 2452,
4040 .hw_value = 9 }, /* Channel 9 */
41− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457,
41+ { .band = NL80211_BAND_2GHZ, .center_freq = 2457,
4242 .hw_value = 10 }, /* Channel 10 */
43− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462,
43+ { .band = NL80211_BAND_2GHZ, .center_freq = 2462,
4444 .hw_value = 11 }, /* Channel 11 */
45− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467,
45+ { .band = NL80211_BAND_2GHZ, .center_freq = 2467,
4646 .hw_value = 12 }, /* Channel 12 */
47− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472,
47+ { .band = NL80211_BAND_2GHZ, .center_freq = 2472,
4848 .hw_value = 13 }, /* Channel 13 */
49− { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484,
49+ { .band = NL80211_BAND_2GHZ, .center_freq = 2484,
5050 .hw_value = 14 }, /* Channel 14 */
5151 };
5252
5353 static const struct ieee80211_channel rsi_5ghz_channels[] = {
54− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5180,
54+ { .band = NL80211_BAND_5GHZ, .center_freq = 5180,
5555 .hw_value = 36, }, /* Channel 36 */
56− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5200,
56+ { .band = NL80211_BAND_5GHZ, .center_freq = 5200,
5757 .hw_value = 40, }, /* Channel 40 */
58− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5220,
58+ { .band = NL80211_BAND_5GHZ, .center_freq = 5220,
5959 .hw_value = 44, }, /* Channel 44 */
60− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5240,
60+ { .band = NL80211_BAND_5GHZ, .center_freq = 5240,
6161 .hw_value = 48, }, /* Channel 48 */
62− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5260,
62+ { .band = NL80211_BAND_5GHZ, .center_freq = 5260,
6363 .hw_value = 52, }, /* Channel 52 */
64− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5280,
64+ { .band = NL80211_BAND_5GHZ, .center_freq = 5280,
6565 .hw_value = 56, }, /* Channel 56 */
66− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5300,
66+ { .band = NL80211_BAND_5GHZ, .center_freq = 5300,
6767 .hw_value = 60, }, /* Channel 60 */
68− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5320,
68+ { .band = NL80211_BAND_5GHZ, .center_freq = 5320,
6969 .hw_value = 64, }, /* Channel 64 */
70− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5500,
70+ { .band = NL80211_BAND_5GHZ, .center_freq = 5500,
7171 .hw_value = 100, }, /* Channel 100 */
72− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5520,
72+ { .band = NL80211_BAND_5GHZ, .center_freq = 5520,
7373 .hw_value = 104, }, /* Channel 104 */
74− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5540,
74+ { .band = NL80211_BAND_5GHZ, .center_freq = 5540,
7575 .hw_value = 108, }, /* Channel 108 */
76− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5560,
76+ { .band = NL80211_BAND_5GHZ, .center_freq = 5560,
7777 .hw_value = 112, }, /* Channel 112 */
78− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5580,
78+ { .band = NL80211_BAND_5GHZ, .center_freq = 5580,
7979 .hw_value = 116, }, /* Channel 116 */
80− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5600,
80+ { .band = NL80211_BAND_5GHZ, .center_freq = 5600,
8181 .hw_value = 120, }, /* Channel 120 */
82− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5620,
82+ { .band = NL80211_BAND_5GHZ, .center_freq = 5620,
8383 .hw_value = 124, }, /* Channel 124 */
84− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5640,
84+ { .band = NL80211_BAND_5GHZ, .center_freq = 5640,
8585 .hw_value = 128, }, /* Channel 128 */
86− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5660,
86+ { .band = NL80211_BAND_5GHZ, .center_freq = 5660,
8787 .hw_value = 132, }, /* Channel 132 */
88− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5680,
88+ { .band = NL80211_BAND_5GHZ, .center_freq = 5680,
8989 .hw_value = 136, }, /* Channel 136 */
90− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5700,
90+ { .band = NL80211_BAND_5GHZ, .center_freq = 5700,
9191 .hw_value = 140, }, /* Channel 140 */
92− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5745,
92+ { .band = NL80211_BAND_5GHZ, .center_freq = 5745,
9393 .hw_value = 149, }, /* Channel 149 */
94− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5765,
94+ { .band = NL80211_BAND_5GHZ, .center_freq = 5765,
9595 .hw_value = 153, }, /* Channel 153 */
96− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5785,
96+ { .band = NL80211_BAND_5GHZ, .center_freq = 5785,
9797 .hw_value = 157, }, /* Channel 157 */
98− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5805,
98+ { .band = NL80211_BAND_5GHZ, .center_freq = 5805,
9999 .hw_value = 161, }, /* Channel 161 */
100− { .band = IEEE80211_BAND_5GHZ, .center_freq = 5825,
100+ { .band = NL80211_BAND_5GHZ, .center_freq = 5825,
101101 .hw_value = 165, }, /* Channel 165 */
102102 };
103103
@@ -150,12 +150,12 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band) · 46 unmodified lines
150150 struct ieee80211_supported_band *sbands = &adapter->sbands[band];
151151 void *channels = NULL;
152152
153− if (band == IEEE80211_BAND_2GHZ) {
153+ if (band == NL80211_BAND_2GHZ) {
154154 channels = kmalloc(sizeof(rsi_2ghz_channels), GFP_KERNEL);
155155 memcpy(channels,
156156 rsi_2ghz_channels,
157157 sizeof(rsi_2ghz_channels));
158− sbands->band = IEEE80211_BAND_2GHZ;
158+ sbands->band = NL80211_BAND_2GHZ;
159159 sbands->n_channels = ARRAY_SIZE(rsi_2ghz_channels);
160160 sbands->bitrates = rsi_rates;
161161 sbands->n_bitrates = ARRAY_SIZE(rsi_rates);
@@ -164,7 +164,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band) · 2 unmodified lines
164164 memcpy(channels,
165165 rsi_5ghz_channels,
166166 sizeof(rsi_5ghz_channels));
167− sbands->band = IEEE80211_BAND_5GHZ;
167+ sbands->band = NL80211_BAND_5GHZ;
168168 sbands->n_channels = ARRAY_SIZE(rsi_5ghz_channels);
169169 sbands->bitrates = &rsi_rates[4];
170170 sbands->n_bitrates = ARRAY_SIZE(rsi_rates) - 4;
@@ -775,7 +775,7 @@ static int rsi_mac80211_set_rate_mask(struct ieee80211_hw *hw, · 604 unmodified lines
775775 {
776776 struct rsi_hw *adapter = hw->priv;
777777 struct rsi_common *common = adapter->priv;
778− enum ieee80211_band band = hw->conf.chandef.chan->band;
778+ enum nl80211_band band = hw->conf.chandef.chan->band;
779779
780780 mutex_lock(&common->mutex);
781781 common->fixedrate_mask[band] = 0;
@@ -999,8 +999,8 @@ static int rsi_mac80211_sta_remove(struct ieee80211_hw *hw, · 217 unmodified lines
999999
10001000 mutex_lock(&common->mutex);
10011001 /* Resetting all the fields to default values */
1002− common->bitrate_mask[IEEE80211_BAND_2GHZ] = 0;
1003− common->bitrate_mask[IEEE80211_BAND_5GHZ] = 0;
1002+ common->bitrate_mask[NL80211_BAND_2GHZ] = 0;
1003+ common->bitrate_mask[NL80211_BAND_5GHZ] = 0;
10041004 common->min_rate = 0xffff;
10051005 common->vif_info[0].is_ht = false;
10061006 common->vif_info[0].sgi = false;
@@ -1070,8 +1070,8 @@ int rsi_mac80211_attach(struct rsi_common *common) · 63 unmodified lines
10701070 hw->max_rate_tries = MAX_RETRIES;
10711071
10721072 hw->max_tx_aggregation_subframes = 6;
1073− rsi_register_rates_channels(adapter, IEEE80211_BAND_2GHZ);
1074− rsi_register_rates_channels(adapter, IEEE80211_BAND_5GHZ);
1073+ rsi_register_rates_channels(adapter, NL80211_BAND_2GHZ);
1074+ rsi_register_rates_channels(adapter, NL80211_BAND_5GHZ);
10751075 hw->rate_control_algorithm = "AARF";
10761076
10771077 SET_IEEE80211_PERM_ADDR(hw, common->mac_addr);
@@ -1087,10 +1087,10 @@ int rsi_mac80211_attach(struct rsi_common *common) · 9 unmodified lines
10871087
10881088 wiphy->available_antennas_rx = 1;
10891089 wiphy->available_antennas_tx = 1;
1090− wiphy->bands[IEEE80211_BAND_2GHZ] =
1091− &adapter->sbands[IEEE80211_BAND_2GHZ];
1092− wiphy->bands[IEEE80211_BAND_5GHZ] =
1093− &adapter->sbands[IEEE80211_BAND_5GHZ];
1090+ wiphy->bands[NL80211_BAND_2GHZ] =
1091+ &adapter->sbands[NL80211_BAND_2GHZ];
1092+ wiphy->bands[NL80211_BAND_5GHZ] =
1093+ &adapter->sbands[NL80211_BAND_5GHZ];
10941094
10951095 status = ieee80211_register_hw(hw);
10961096 if (status)
drivers/net/wireless/rsi/rsi_91x_mgmt.c+4−4
@@ -210,7 +210,7 @@ static u16 mcs[] = {13, 26, 39, 52, 78, 104, 117, 130}; · 209 unmodified lines
210210 */
211211 static void rsi_set_default_parameters(struct rsi_common *common)
212212 {
213− common->band = IEEE80211_BAND_2GHZ;
213+ common->band = NL80211_BAND_2GHZ;
214214 common->channel_width = BW_20MHZ;
215215 common->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
216216 common->channel = 1;
@@ -655,7 +655,7 @@ int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode) · 438 unmodified lines
655655 vap_caps->rts_threshold = cpu_to_le16(common->rts_threshold);
656656 vap_caps->default_mgmt_rate = cpu_to_le32(RSI_RATE_6);
657657
658− if (common->band == IEEE80211_BAND_5GHZ) {
658+ if (common->band == NL80211_BAND_5GHZ) {
659659 vap_caps->default_ctrl_rate = cpu_to_le32(RSI_RATE_6);
660660 if (conf_is_ht40(&common->priv->hw->conf)) {
661661 vap_caps->default_ctrl_rate |=
@@ -872,7 +872,7 @@ int rsi_band_check(struct rsi_common *common) · 210 unmodified lines
872872 else
873873 common->channel_width = BW_40MHZ;
874874
875− if (common->band == IEEE80211_BAND_2GHZ) {
875+ if (common->band == NL80211_BAND_2GHZ) {
876876 if (common->channel_width)
877877 common->endpoint = EP_2GHZ_40MHZ;
878878 else
@@ -1046,7 +1046,7 @@ static int rsi_send_auto_rate_request(struct rsi_common *common) · 167 unmodified lines
10461046 if (common->channel_width == BW_40MHZ)
10471047 auto_rate->desc_word[7] |= cpu_to_le16(1);
10481048
1049− if (band == IEEE80211_BAND_2GHZ) {
1049+ if (band == NL80211_BAND_2GHZ) {
10501050 min_rate = RSI_RATE_1;
10511051 rate_table_offset = 0;
10521052 } else {
drivers/net/wireless/rsi/rsi_91x_pkt.c+1−1
@@ -184,7 +184,7 @@ int rsi_send_mgmt_pkt(struct rsi_common *common, · 183 unmodified lines
184184 if (wh->addr1[0] & BIT(0))
185185 msg[3] |= cpu_to_le16(RSI_BROADCAST_PKT);
186186
187− if (common->band == IEEE80211_BAND_2GHZ)
187+ if (common->band == NL80211_BAND_2GHZ)
188188 msg[4] = cpu_to_le16(RSI_11B_MODE);
189189 else
190190 msg[4] = cpu_to_le16((RSI_RATE_6 & 0x0f) | RSI_11G_MODE);
drivers/net/wireless/rsi/rsi_main.h+1−1
@@ -211,7 +211,7 @@ struct rsi_hw { · 210 unmodified lines
211211 struct ieee80211_hw *hw;
212212 struct ieee80211_vif *vifs[RSI_MAX_VIFS];
213213 struct ieee80211_tx_queue_params edca_params[NUM_EDCA_QUEUES];
214− struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
214+ struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
215215
216216 struct device *device;
217217 u8 sc_nvifs;
drivers/net/wireless/st/cw1200/main.c+5−5
@@ -102,7 +102,7 @@ static struct ieee80211_rate cw1200_mcs_rates[] = { · 101 unmodified lines
102102
103103
104104 #define CHAN2G(_channel, _freq, _flags) { \
105− .band = IEEE80211_BAND_2GHZ, \
105+ .band = NL80211_BAND_2GHZ, \
106106 .center_freq = (_freq), \
107107 .hw_value = (_channel), \
108108 .flags = (_flags), \
@@ -111,7 +111,7 @@ static struct ieee80211_rate cw1200_mcs_rates[] = { · 2 unmodified lines
111111 }
112112
113113 #define CHAN5G(_channel, _flags) { \
114− .band = IEEE80211_BAND_5GHZ, \
114+ .band = NL80211_BAND_5GHZ, \
115115 .center_freq = 5000 + (5 * (_channel)), \
116116 .hw_value = (_channel), \
117117 .flags = (_flags), \
@@ -311,12 +311,12 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, · 193 unmodified lines
311311
312312 hw->sta_data_size = sizeof(struct cw1200_sta_priv);
313313
314− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &cw1200_band_2ghz;
314+ hw->wiphy->bands[NL80211_BAND_2GHZ] = &cw1200_band_2ghz;
315315 if (have_5ghz)
316− hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &cw1200_band_5ghz;
316+ hw->wiphy->bands[NL80211_BAND_5GHZ] = &cw1200_band_5ghz;
317317
318318 /* Channel params have to be cleared before registering wiphy again */
319− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
319+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
320320 struct ieee80211_supported_band *sband = hw->wiphy->bands[band];
321321 if (!sband)
322322 continue;
drivers/net/wireless/st/cw1200/scan.c+1−1
@@ -402,7 +402,7 @@ void cw1200_probe_work(struct work_struct *work) · 401 unmodified lines
402402 }
403403 wsm = (struct wsm_tx *)frame.skb->data;
404404 scan.max_tx_rate = wsm->max_tx_rate;
405− scan.band = (priv->channel->band == IEEE80211_BAND_5GHZ) ?
405+ scan.band = (priv->channel->band == NL80211_BAND_5GHZ) ?
406406 WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G;
407407 if (priv->join_status == CW1200_JOIN_STATUS_STA ||
408408 priv->join_status == CW1200_JOIN_STATUS_IBSS) {
drivers/net/wireless/st/cw1200/sta.c+3−3
@@ -1278,7 +1278,7 @@ static void cw1200_do_join(struct cw1200_common *priv) · 1277 unmodified lines
12781278 join.dtim_period = priv->join_dtim_period;
12791279
12801280 join.channel_number = priv->channel->hw_value;
1281− join.band = (priv->channel->band == IEEE80211_BAND_5GHZ) ?
1281+ join.band = (priv->channel->band == NL80211_BAND_5GHZ) ?
12821282 WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G;
12831283
12841284 memcpy(join.bssid, bssid, sizeof(join.bssid));
@@ -1462,7 +1462,7 @@ int cw1200_enable_listening(struct cw1200_common *priv) · 177 unmodified lines
14621462 };
14631463
14641464 if (priv->channel) {
1465− start.band = priv->channel->band == IEEE80211_BAND_5GHZ ?
1465+ start.band = priv->channel->band == NL80211_BAND_5GHZ ?
14661466 WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G;
14671467 start.channel_number = priv->channel->hw_value;
14681468 } else {
@@ -2315,7 +2315,7 @@ static int cw1200_start_ap(struct cw1200_common *priv) · 846 unmodified lines
23152315 struct wsm_start start = {
23162316 .mode = priv->vif->p2p ?
23172317 WSM_START_MODE_P2P_GO : WSM_START_MODE_AP,
2318− .band = (priv->channel->band == IEEE80211_BAND_5GHZ) ?
2318+ .band = (priv->channel->band == NL80211_BAND_5GHZ) ?
23192319 WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G,
23202320 .channel_number = priv->channel->hw_value,
23212321 .beacon_interval = conf->beacon_int,
drivers/net/wireless/st/cw1200/txrx.c+1−1
@@ -1079,7 +1079,7 @@ void cw1200_rx_cb(struct cw1200_common *priv, · 1078 unmodified lines
10791079
10801080 hdr->band = ((arg->channel_number & 0xff00) ||
10811081 (arg->channel_number > 14)) ?
1082− IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ;
1082+ NL80211_BAND_5GHZ : NL80211_BAND_2GHZ;
10831083 hdr->freq = ieee80211_channel_to_frequency(
10841084 arg->channel_number,
10851085 hdr->band);
drivers/net/wireless/st/cw1200/wsm.c+2−2
@@ -849,9 +849,9 @@ static int wsm_startup_indication(struct cw1200_common *priv, · 848 unmodified lines
849849
850850 /* Disable unsupported frequency bands */
851851 if (!(priv->wsm_caps.fw_cap & 0x1))
852− priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL;
852+ priv->hw->wiphy->bands[NL80211_BAND_2GHZ] = NULL;
853853 if (!(priv->wsm_caps.fw_cap & 0x2))
854− priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
854+ priv->hw->wiphy->bands[NL80211_BAND_5GHZ] = NULL;
855855
856856 priv->firmware_ready = 1;
857857 wake_up(&priv->wsm_startup_done);
drivers/net/wireless/ti/wl1251/main.c+1−1
@@ -1482,7 +1482,7 @@ int wl1251_init_ieee80211(struct wl1251 *wl) · 1481 unmodified lines
14821482 wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
14831483 BIT(NL80211_IFTYPE_ADHOC);
14841484 wl->hw->wiphy->max_scan_ssids = 1;
1485− wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wl1251_band_2ghz;
1485+ wl->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wl1251_band_2ghz;
14861486
14871487 wl->hw->queues = 4;
14881488
drivers/net/wireless/ti/wl1251/rx.c+1−1
@@ -53,7 +53,7 @@ static void wl1251_rx_status(struct wl1251 *wl, · 52 unmodified lines
5353
5454 memset(status, 0, sizeof(struct ieee80211_rx_status));
5555
56− status->band = IEEE80211_BAND_2GHZ;
56+ status->band = NL80211_BAND_2GHZ;
5757 status->mactime = desc->timestamp;
5858
5959 /*
drivers/net/wireless/ti/wl12xx/main.c+4−4
@@ -469,8 +469,8 @@ static const u8 wl12xx_rate_to_idx_5ghz[] = { · 468 unmodified lines
469469 };
470470
471471 static const u8 *wl12xx_band_rate_to_idx[] = {
472− [IEEE80211_BAND_2GHZ] = wl12xx_rate_to_idx_2ghz,
473− [IEEE80211_BAND_5GHZ] = wl12xx_rate_to_idx_5ghz
472+ [NL80211_BAND_2GHZ] = wl12xx_rate_to_idx_2ghz,
473+ [NL80211_BAND_5GHZ] = wl12xx_rate_to_idx_5ghz
474474 };
475475
476476 enum wl12xx_hw_rates {
@@ -1827,8 +1827,8 @@ static int wl12xx_setup(struct wl1271 *wl) · 1350 unmodified lines
18271827 wl->fw_status_priv_len = 0;
18281828 wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics);
18291829 wl->ofdm_only_ap = true;
1830− wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, &wl12xx_ht_cap);
1831− wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, &wl12xx_ht_cap);
1830+ wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ, &wl12xx_ht_cap);
1831+ wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ, &wl12xx_ht_cap);
18321832 wl12xx_conf_init(wl);
18331833
18341834 if (!fref_param) {
drivers/net/wireless/ti/wl12xx/scan.c+10−10
@@ -27,7 +27,7 @@ · 26 unmodified lines
2727 static int wl1271_get_scan_channels(struct wl1271 *wl,
2828 struct cfg80211_scan_request *req,
2929 struct basic_scan_channel_params *channels,
30− enum ieee80211_band band, bool passive)
30+ enum nl80211_band band, bool passive)
3131 {
3232 struct conf_scan_settings *c = &wl->conf.scan;
3333 int i, j;
@@ -92,7 +92,7 @@ static int wl1271_get_scan_channels(struct wl1271 *wl, · 58 unmodified lines
9292 #define WL1271_NOTHING_TO_SCAN 1
9393
9494 static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif,
95− enum ieee80211_band band,
95+ enum nl80211_band band,
9696 bool passive, u32 basic_rate)
9797 {
9898 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
@@ -144,7 +144,7 @@ static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 45 unmodified lines
144144 cmd->params.tid_trigger = CONF_TX_AC_ANY_TID;
145145 cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG;
146146
147− if (band == IEEE80211_BAND_2GHZ)
147+ if (band == NL80211_BAND_2GHZ)
148148 cmd->params.band = WL1271_SCAN_BAND_2_4_GHZ;
149149 else
150150 cmd->params.band = WL1271_SCAN_BAND_5_GHZ;
@@ -218,7 +218,7 @@ out: · 67 unmodified lines
218218 void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif)
219219 {
220220 int ret = 0;
221− enum ieee80211_band band;
221+ enum nl80211_band band;
222222 u32 rate, mask;
223223
224224 switch (wl->scan.state) {
@@ -226,7 +226,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 1 unmodified line
226226 break;
227227
228228 case WL1271_SCAN_STATE_2GHZ_ACTIVE:
229− band = IEEE80211_BAND_2GHZ;
229+ band = NL80211_BAND_2GHZ;
230230 mask = wlvif->bitrate_masks[band];
231231 if (wl->scan.req->no_cck) {
232232 mask &= ~CONF_TX_CCK_RATES;
@@ -243,7 +243,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 10 unmodified lines
243243 break;
244244
245245 case WL1271_SCAN_STATE_2GHZ_PASSIVE:
246− band = IEEE80211_BAND_2GHZ;
246+ band = NL80211_BAND_2GHZ;
247247 mask = wlvif->bitrate_masks[band];
248248 if (wl->scan.req->no_cck) {
249249 mask &= ~CONF_TX_CCK_RATES;
@@ -263,7 +263,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 13 unmodified lines
263263 break;
264264
265265 case WL1271_SCAN_STATE_5GHZ_ACTIVE:
266− band = IEEE80211_BAND_5GHZ;
266+ band = NL80211_BAND_5GHZ;
267267 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]);
268268 ret = wl1271_scan_send(wl, wlvif, band, false, rate);
269269 if (ret == WL1271_NOTHING_TO_SCAN) {
@@ -274,7 +274,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 4 unmodified lines
274274 break;
275275
276276 case WL1271_SCAN_STATE_5GHZ_PASSIVE:
277− band = IEEE80211_BAND_5GHZ;
277+ band = NL80211_BAND_5GHZ;
278278 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]);
279279 ret = wl1271_scan_send(wl, wlvif, band, true, rate);
280280 if (ret == WL1271_NOTHING_TO_SCAN) {
@@ -378,7 +378,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, · 97 unmodified lines
378378 wl12xx_adjust_channels(cfg, cfg_channels);
379379
380380 if (!force_passive && cfg->active[0]) {
381− u8 band = IEEE80211_BAND_2GHZ;
381+ u8 band = NL80211_BAND_2GHZ;
382382 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
383383 wlvif->role_id, band,
384384 req->ssids[0].ssid,
@@ -395,7 +395,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, · 10 unmodified lines
395395 }
396396
397397 if (!force_passive && cfg->active[1]) {
398− u8 band = IEEE80211_BAND_5GHZ;
398+ u8 band = NL80211_BAND_5GHZ;
399399 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
400400 wlvif->role_id, band,
401401 req->ssids[0].ssid,
drivers/net/wireless/ti/wl18xx/cmd.c+3−3
@@ -48,10 +48,10 @@ int wl18xx_cmd_channel_switch(struct wl1271 *wl, · 47 unmodified lines
4848 cmd->stop_tx = ch_switch->block_tx;
4949
5050 switch (ch_switch->chandef.chan->band) {
51− case IEEE80211_BAND_2GHZ:
51+ case NL80211_BAND_2GHZ:
5252 cmd->band = WLCORE_BAND_2_4GHZ;
5353 break;
54− case IEEE80211_BAND_5GHZ:
54+ case NL80211_BAND_5GHZ:
5555 cmd->band = WLCORE_BAND_5GHZ;
5656 break;
5757 default:
@@ -187,7 +187,7 @@ int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start) · 129 unmodified lines
187187
188188 cmd->role_id = wlvif->role_id;
189189 cmd->channel = wlvif->channel;
190− if (wlvif->band == IEEE80211_BAND_5GHZ)
190+ if (wlvif->band == NL80211_BAND_5GHZ)
191191 cmd->band = WLCORE_BAND_5GHZ;
192192 cmd->bandwidth = wlcore_get_native_channel_type(wlvif->channel_type);
193193
drivers/net/wireless/ti/wl18xx/event.c+3−3
@@ -64,13 +64,13 @@ static int wlcore_smart_config_sync_event(struct wl1271 *wl, u8 sync_channel, · 63 unmodified lines
6464 u8 sync_band)
6565 {
6666 struct sk_buff *skb;
67− enum ieee80211_band band;
67+ enum nl80211_band band;
6868 int freq;
6969
7070 if (sync_band == WLCORE_BAND_5GHZ)
71− band = IEEE80211_BAND_5GHZ;
71+ band = NL80211_BAND_5GHZ;
7272 else
73− band = IEEE80211_BAND_2GHZ;
73+ band = NL80211_BAND_2GHZ;
7474
7575 freq = ieee80211_channel_to_frequency(sync_channel, band);
7676
drivers/net/wireless/ti/wl18xx/main.c+11−11
@@ -137,8 +137,8 @@ static const u8 wl18xx_rate_to_idx_5ghz[] = { · 136 unmodified lines
137137 };
138138
139139 static const u8 *wl18xx_band_rate_to_idx[] = {
140− [IEEE80211_BAND_2GHZ] = wl18xx_rate_to_idx_2ghz,
141− [IEEE80211_BAND_5GHZ] = wl18xx_rate_to_idx_5ghz
140+ [NL80211_BAND_2GHZ] = wl18xx_rate_to_idx_2ghz,
141+ [NL80211_BAND_5GHZ] = wl18xx_rate_to_idx_5ghz
142142 };
143143
144144 enum wl18xx_hw_rates {
@@ -1302,12 +1302,12 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, · 1157 unmodified lines
13021302 wl1271_debug(DEBUG_ACX, "using wide channel rate mask");
13031303
13041304 /* sanity check - we don't support this */
1305− if (WARN_ON(wlvif->band != IEEE80211_BAND_5GHZ))
1305+ if (WARN_ON(wlvif->band != NL80211_BAND_5GHZ))
13061306 return 0;
13071307
13081308 return CONF_TX_RATE_USE_WIDE_CHAN;
13091309 } else if (wl18xx_is_mimo_supported(wl) &&
1310− wlvif->band == IEEE80211_BAND_2GHZ) {
1310+ wlvif->band == NL80211_BAND_2GHZ) {
13111311 wl1271_debug(DEBUG_ACX, "using MIMO rate mask");
13121312 /*
13131313 * we don't care about HT channel here - if a peer doesn't
@@ -1996,24 +1996,24 @@ static int wl18xx_setup(struct wl1271 *wl) · 682 unmodified lines
19961996 * siso40.
19971997 */
19981998 if (wl18xx_is_mimo_supported(wl))
1999− wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ,
1999+ wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ,
20002000 &wl18xx_mimo_ht_cap_2ghz);
20012001 else
2002− wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ,
2002+ wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ,
20032003 &wl18xx_siso40_ht_cap_2ghz);
20042004
20052005 /* 5Ghz is always wide */
2006− wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ,
2006+ wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ,
20072007 &wl18xx_siso40_ht_cap_5ghz);
20082008 } else if (priv->conf.ht.mode == HT_MODE_WIDE) {
2009− wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ,
2009+ wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ,
20102010 &wl18xx_siso40_ht_cap_2ghz);
2011− wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ,
2011+ wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ,
20122012 &wl18xx_siso40_ht_cap_5ghz);
20132013 } else if (priv->conf.ht.mode == HT_MODE_SISO20) {
2014− wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ,
2014+ wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ,
20152015 &wl18xx_siso20_ht_cap);
2016− wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ,
2016+ wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ,
20172017 &wl18xx_siso20_ht_cap);
20182018 }
20192019
drivers/net/wireless/ti/wl18xx/scan.c+4−4
@@ -110,7 +110,7 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 109 unmodified lines
110110
111111 /* TODO: per-band ies? */
112112 if (cmd->active[0]) {
113− u8 band = IEEE80211_BAND_2GHZ;
113+ u8 band = NL80211_BAND_2GHZ;
114114 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
115115 cmd->role_id, band,
116116 req->ssids ? req->ssids[0].ssid : NULL,
@@ -127,7 +127,7 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 10 unmodified lines
127127 }
128128
129129 if (cmd->active[1] || cmd->dfs) {
130− u8 band = IEEE80211_BAND_5GHZ;
130+ u8 band = NL80211_BAND_5GHZ;
131131 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
132132 cmd->role_id, band,
133133 req->ssids ? req->ssids[0].ssid : NULL,
@@ -253,7 +253,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, · 119 unmodified lines
253253 cmd->terminate_on_report = 0;
254254
255255 if (cmd->active[0]) {
256− u8 band = IEEE80211_BAND_2GHZ;
256+ u8 band = NL80211_BAND_2GHZ;
257257 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
258258 cmd->role_id, band,
259259 req->ssids ? req->ssids[0].ssid : NULL,
@@ -270,7 +270,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, · 10 unmodified lines
270270 }
271271
272272 if (cmd->active[1] || cmd->dfs) {
273− u8 band = IEEE80211_BAND_5GHZ;
273+ u8 band = NL80211_BAND_5GHZ;
274274 ret = wl12xx_cmd_build_probe_req(wl, wlvif,
275275 cmd->role_id, band,
276276 req->ssids ? req->ssids[0].ssid : NULL,
drivers/net/wireless/ti/wl18xx/tx.c+1−1
@@ -43,7 +43,7 @@ void wl18xx_get_last_tx_rate(struct wl1271 *wl, struct ieee80211_vif *vif, · 42 unmodified lines
4343
4444 if (fw_rate <= CONF_HW_RATE_INDEX_54MBPS) {
4545 rate->idx = fw_rate;
46− if (band == IEEE80211_BAND_5GHZ)
46+ if (band == NL80211_BAND_5GHZ)
4747 rate->idx -= CONF_HW_RATE_INDEX_6MBPS;
4848 rate->flags = 0;
4949 } else {
drivers/net/wireless/ti/wlcore/cmd.c+18−18
@@ -423,7 +423,7 @@ EXPORT_SYMBOL_GPL(wlcore_get_native_channel_type); · 422 unmodified lines
423423
424424 static int wl12xx_cmd_role_start_dev(struct wl1271 *wl,
425425 struct wl12xx_vif *wlvif,
426− enum ieee80211_band band,
426+ enum nl80211_band band,
427427 int channel)
428428 {
429429 struct wl12xx_cmd_role_start *cmd;
@@ -438,7 +438,7 @@ static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, · 8 unmodified lines
438438 wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id);
439439
440440 cmd->role_id = wlvif->dev_role_id;
441− if (band == IEEE80211_BAND_5GHZ)
441+ if (band == NL80211_BAND_5GHZ)
442442 cmd->band = WLCORE_BAND_5GHZ;
443443 cmd->channel = channel;
444444
@@ -524,7 +524,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 79 unmodified lines
524524 wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id);
525525
526526 cmd->role_id = wlvif->role_id;
527− if (wlvif->band == IEEE80211_BAND_5GHZ)
527+ if (wlvif->band == NL80211_BAND_5GHZ)
528528 cmd->band = WLCORE_BAND_5GHZ;
529529 cmd->channel = wlvif->channel;
530530 cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set);
@@ -693,10 +693,10 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 162 unmodified lines
693693 cmd->ap.local_rates = cpu_to_le32(supported_rates);
694694
695695 switch (wlvif->band) {
696− case IEEE80211_BAND_2GHZ:
696+ case NL80211_BAND_2GHZ:
697697 cmd->band = WLCORE_BAND_2_4GHZ;
698698 break;
699− case IEEE80211_BAND_5GHZ:
699+ case NL80211_BAND_5GHZ:
700700 cmd->band = WLCORE_BAND_5GHZ;
701701 break;
702702 default:
@@ -773,7 +773,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 70 unmodified lines
773773 wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id);
774774
775775 cmd->role_id = wlvif->role_id;
776− if (wlvif->band == IEEE80211_BAND_5GHZ)
776+ if (wlvif->band == NL80211_BAND_5GHZ)
777777 cmd->band = WLCORE_BAND_5GHZ;
778778 cmd->channel = wlvif->channel;
779779 cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set);
@@ -1164,7 +1164,7 @@ int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 384 unmodified lines
11641164 }
11651165
11661166 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]);
1167− if (band == IEEE80211_BAND_2GHZ)
1167+ if (band == NL80211_BAND_2GHZ)
11681168 ret = wl1271_cmd_template_set(wl, role_id,
11691169 template_id_2_4,
11701170 skb->data, skb->len, 0, rate);
@@ -1195,7 +1195,7 @@ struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl, · 24 unmodified lines
11951195 wl1271_debug(DEBUG_SCAN, "set ap probe request template");
11961196
11971197 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[wlvif->band]);
1198− if (wlvif->band == IEEE80211_BAND_2GHZ)
1198+ if (wlvif->band == NL80211_BAND_2GHZ)
11991199 ret = wl1271_cmd_template_set(wl, wlvif->role_id,
12001200 CMD_TEMPL_CFG_PROBE_REQ_2_4,
12011201 skb->data, skb->len, 0, rate);
@@ -1628,19 +1628,19 @@ out: · 426 unmodified lines
16281628 return ret;
16291629 }
16301630
1631−static int wlcore_get_reg_conf_ch_idx(enum ieee80211_band band, u16 ch)
1631+static int wlcore_get_reg_conf_ch_idx(enum nl80211_band band, u16 ch)
16321632 {
16331633 /*
16341634 * map the given band/channel to the respective predefined
16351635 * bit expected by the fw
16361636 */
16371637 switch (band) {
1638− case IEEE80211_BAND_2GHZ:
1638+ case NL80211_BAND_2GHZ:
16391639 /* channels 1..14 are mapped to 0..13 */
16401640 if (ch >= 1 && ch <= 14)
16411641 return ch - 1;
16421642 break;
1643− case IEEE80211_BAND_5GHZ:
1643+ case NL80211_BAND_5GHZ:
16441644 switch (ch) {
16451645 case 8 ... 16:
16461646 /* channels 8,12,16 are mapped to 18,19,20 */
@@ -1670,7 +1670,7 @@ static int wlcore_get_reg_conf_ch_idx(enum ieee80211_band band, u16 ch) · 23 unmodified lines
16701670 }
16711671
16721672 void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel,
1673− enum ieee80211_band band)
1673+ enum nl80211_band band)
16741674 {
16751675 int ch_bit_idx = 0;
16761676
@@ -1699,7 +1699,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) · 22 unmodified lines
16991699
17001700 memset(tmp_ch_bitmap, 0, sizeof(tmp_ch_bitmap));
17011701
1702− for (b = IEEE80211_BAND_2GHZ; b <= IEEE80211_BAND_5GHZ; b++) {
1702+ for (b = NL80211_BAND_2GHZ; b <= NL80211_BAND_5GHZ; b++) {
17031703 band = wiphy->bands[b];
17041704 for (i = 0; i < band->n_channels; i++) {
17051705 struct ieee80211_channel *channel = &band->channels[i];
@@ -1851,7 +1851,7 @@ out: · 145 unmodified lines
18511851 }
18521852
18531853 static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif,
1854− u8 role_id, enum ieee80211_band band, u8 channel)
1854+ u8 role_id, enum nl80211_band band, u8 channel)
18551855 {
18561856 struct wl12xx_cmd_roc *cmd;
18571857 int ret = 0;
@@ -1870,10 +1870,10 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 12 unmodified lines
18701870 cmd->role_id = role_id;
18711871 cmd->channel = channel;
18721872 switch (band) {
1873− case IEEE80211_BAND_2GHZ:
1873+ case NL80211_BAND_2GHZ:
18741874 cmd->band = WLCORE_BAND_2_4GHZ;
18751875 break;
1876− case IEEE80211_BAND_5GHZ:
1876+ case NL80211_BAND_5GHZ:
18771877 cmd->band = WLCORE_BAND_5GHZ;
18781878 break;
18791879 default:
@@ -1925,7 +1925,7 @@ out: · 45 unmodified lines
19251925 }
19261926
19271927 int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id,
1928− enum ieee80211_band band, u8 channel)
1928+ enum nl80211_band band, u8 channel)
19291929 {
19301930 int ret = 0;
19311931
@@ -1995,7 +1995,7 @@ out: · 63 unmodified lines
19951995
19961996 /* start dev role and roc on its channel */
19971997 int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif,
1998− enum ieee80211_band band, int channel)
1998+ enum nl80211_band band, int channel)
19991999 {
20002000 int ret;
20012001
drivers/net/wireless/ti/wlcore/cmd.h+3−3
@@ -40,7 +40,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); · 39 unmodified lines
4040 int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif);
4141 int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif);
4242 int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif,
43− enum ieee80211_band band, int channel);
43+ enum nl80211_band band, int channel);
4444 int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif);
4545 int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer);
4646 int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf,
@@ -83,14 +83,14 @@ int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 36 unmodified lines
8383 int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif,
8484 u8 hlid);
8585 int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id,
86− enum ieee80211_band band, u8 channel);
86+ enum nl80211_band band, u8 channel);
8787 int wl12xx_croc(struct wl1271 *wl, u8 role_id);
8888 int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
8989 struct ieee80211_sta *sta, u8 hlid);
9090 int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif,
9191 u8 hlid);
9292 void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel,
93− enum ieee80211_band band);
93+ enum nl80211_band band);
9494 int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl);
9595 int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif,
9696 u8 feature, u8 enable, u8 value);
drivers/net/wireless/ti/wlcore/main.c+16−16
@@ -1930,7 +1930,7 @@ static void wlcore_op_stop_locked(struct wl1271 *wl) · 1929 unmodified lines
19301930 if (test_and_clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags))
19311931 wlcore_enable_interrupts(wl);
19321932
1933− wl->band = IEEE80211_BAND_2GHZ;
1933+ wl->band = NL80211_BAND_2GHZ;
19341934
19351935 wl->rx_counter = 0;
19361936 wl->power_level = WL1271_DEFAULT_POWER_LEVEL;
@@ -2240,8 +2240,8 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif) · 303 unmodified lines
22402240 wlvif->rate_set = CONF_TX_ENABLED_RATES;
22412241 }
22422242
2243− wlvif->bitrate_masks[IEEE80211_BAND_2GHZ] = wl->conf.tx.basic_rate;
2244− wlvif->bitrate_masks[IEEE80211_BAND_5GHZ] = wl->conf.tx.basic_rate_5;
2243+ wlvif->bitrate_masks[NL80211_BAND_2GHZ] = wl->conf.tx.basic_rate;
2244+ wlvif->bitrate_masks[NL80211_BAND_5GHZ] = wl->conf.tx.basic_rate_5;
22452245 wlvif->beacon_int = WL1271_DEFAULT_BEACON_INT;
22462246
22472247 /*
@@ -2330,7 +2330,7 @@ power_off: · 82 unmodified lines
23302330 * 11a channels if not supported
23312331 */
23322332 if (!wl->enable_11a)
2333− wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels = 0;
2333+ wiphy->bands[NL80211_BAND_5GHZ]->n_channels = 0;
23342334
23352335 wl1271_debug(DEBUG_MAC80211, "11a is %ssupported",
23362336 wl->enable_11a ? "" : "not ");
@@ -5871,7 +5871,7 @@ static const struct ieee80211_ops wl1271_ops = { · 3534 unmodified lines
58715871 };
58725872
58735873
5874−u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum ieee80211_band band)
5874+u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum nl80211_band band)
58755875 {
58765876 u8 idx;
58775877
@@ -6096,21 +6096,21 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) · 218 unmodified lines
60966096 * We keep local copies of the band structs because we need to
60976097 * modify them on a per-device basis.
60986098 */
6099− memcpy(&wl->bands[IEEE80211_BAND_2GHZ], &wl1271_band_2ghz,
6099+ memcpy(&wl->bands[NL80211_BAND_2GHZ], &wl1271_band_2ghz,
61006100 sizeof(wl1271_band_2ghz));
6101− memcpy(&wl->bands[IEEE80211_BAND_2GHZ].ht_cap,
6102− &wl->ht_cap[IEEE80211_BAND_2GHZ],
6101+ memcpy(&wl->bands[NL80211_BAND_2GHZ].ht_cap,
6102+ &wl->ht_cap[NL80211_BAND_2GHZ],
61036103 sizeof(*wl->ht_cap));
6104− memcpy(&wl->bands[IEEE80211_BAND_5GHZ], &wl1271_band_5ghz,
6104+ memcpy(&wl->bands[NL80211_BAND_5GHZ], &wl1271_band_5ghz,
61056105 sizeof(wl1271_band_5ghz));
6106− memcpy(&wl->bands[IEEE80211_BAND_5GHZ].ht_cap,
6107− &wl->ht_cap[IEEE80211_BAND_5GHZ],
6106+ memcpy(&wl->bands[NL80211_BAND_5GHZ].ht_cap,
6107+ &wl->ht_cap[NL80211_BAND_5GHZ],
61086108 sizeof(*wl->ht_cap));
61096109
6110− wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
6111− &wl->bands[IEEE80211_BAND_2GHZ];
6112− wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
6113− &wl->bands[IEEE80211_BAND_5GHZ];
6110+ wl->hw->wiphy->bands[NL80211_BAND_2GHZ] =
6111+ &wl->bands[NL80211_BAND_2GHZ];
6112+ wl->hw->wiphy->bands[NL80211_BAND_5GHZ] =
6113+ &wl->bands[NL80211_BAND_5GHZ];
61146114
61156115 /*
61166116 * allow 4 queues per mac address we support +
@@ -6205,7 +6205,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size, · 88 unmodified lines
62056205 wl->channel = 0;
62066206 wl->rx_counter = 0;
62076207 wl->power_level = WL1271_DEFAULT_POWER_LEVEL;
6208− wl->band = IEEE80211_BAND_2GHZ;
6208+ wl->band = NL80211_BAND_2GHZ;
62096209 wl->channel_type = NL80211_CHAN_NO_HT;
62106210 wl->flags = 0;
62116211 wl->sg_enabled = true;
drivers/net/wireless/ti/wlcore/ps.c+2−2
@@ -202,7 +202,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 201 unmodified lines
202202 * enable beacon early termination.
203203 * Not relevant for 5GHz and for high rates.
204204 */
205− if ((wlvif->band == IEEE80211_BAND_2GHZ) &&
205+ if ((wlvif->band == NL80211_BAND_2GHZ) &&
206206 (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) {
207207 ret = wl1271_acx_bet_enable(wl, wlvif, true);
208208 if (ret < 0)
@@ -213,7 +213,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 4 unmodified lines
213213 wl1271_debug(DEBUG_PSM, "leaving psm");
214214
215215 /* disable beacon early termination */
216− if ((wlvif->band == IEEE80211_BAND_2GHZ) &&
216+ if ((wlvif->band == NL80211_BAND_2GHZ) &&
217217 (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) {
218218 ret = wl1271_acx_bet_enable(wl, wlvif, false);
219219 if (ret < 0)
drivers/net/wireless/ti/wlcore/rx.c+2−2
@@ -64,9 +64,9 @@ static void wl1271_rx_status(struct wl1271 *wl, · 63 unmodified lines
6464 memset(status, 0, sizeof(struct ieee80211_rx_status));
6565
6666 if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG)
67− status->band = IEEE80211_BAND_2GHZ;
67+ status->band = NL80211_BAND_2GHZ;
6868 else
69− status->band = IEEE80211_BAND_5GHZ;
69+ status->band = NL80211_BAND_5GHZ;
7070
7171 status->rate_idx = wlcore_rate_to_idx(wl, desc->rate, status->band);
7272
drivers/net/wireless/ti/wlcore/rx.h+1−1
@@ -146,7 +146,7 @@ struct wl1271_rx_descriptor { · 145 unmodified lines
146146 } __packed;
147147
148148 int wlcore_rx(struct wl1271 *wl, struct wl_fw_status *status);
149−u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band);
149+u8 wl1271_rate_to_idx(int rate, enum nl80211_band band);
150150 int wl1271_rx_filter_enable(struct wl1271 *wl,
151151 int index, bool enable,
152152 struct wl12xx_rx_filter *filter);
drivers/net/wireless/ti/wlcore/scan.c+7−7
@@ -164,7 +164,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, · 163 unmodified lines
164164 struct conf_sched_scan_settings *c = &wl->conf.sched_scan;
165165 u32 delta_per_probe;
166166
167− if (band == IEEE80211_BAND_5GHZ)
167+ if (band == NL80211_BAND_5GHZ)
168168 delta_per_probe = c->dwell_time_delta_per_probe_5;
169169 else
170170 delta_per_probe = c->dwell_time_delta_per_probe;
@@ -215,7 +215,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, · 44 unmodified lines
215215 channels[j].channel = req_channels[i]->hw_value;
216216
217217 if (n_pactive_ch &&
218− (band == IEEE80211_BAND_2GHZ) &&
218+ (band == NL80211_BAND_2GHZ) &&
219219 (channels[j].channel >= 12) &&
220220 (channels[j].channel <= 14) &&
221221 (flags & IEEE80211_CHAN_NO_IR) &&
@@ -266,7 +266,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 44 unmodified lines
266266 n_channels,
267267 n_ssids,
268268 cfg->channels_2,
269− IEEE80211_BAND_2GHZ,
269+ NL80211_BAND_2GHZ,
270270 false, true, 0,
271271 MAX_CHANNELS_2GHZ,
272272 &n_pactive_ch,
@@ -277,7 +277,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 4 unmodified lines
277277 n_channels,
278278 n_ssids,
279279 cfg->channels_2,
280− IEEE80211_BAND_2GHZ,
280+ NL80211_BAND_2GHZ,
281281 false, false,
282282 cfg->passive[0],
283283 MAX_CHANNELS_2GHZ,
@@ -289,7 +289,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 5 unmodified lines
289289 n_channels,
290290 n_ssids,
291291 cfg->channels_5,
292− IEEE80211_BAND_5GHZ,
292+ NL80211_BAND_5GHZ,
293293 false, true, 0,
294294 wl->max_channels_5,
295295 &n_pactive_ch,
@@ -300,7 +300,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 4 unmodified lines
300300 n_channels,
301301 n_ssids,
302302 cfg->channels_5,
303− IEEE80211_BAND_5GHZ,
303+ NL80211_BAND_5GHZ,
304304 true, true,
305305 cfg->passive[1],
306306 wl->max_channels_5,
@@ -312,7 +312,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 5 unmodified lines
312312 n_channels,
313313 n_ssids,
314314 cfg->channels_5,
315− IEEE80211_BAND_5GHZ,
315+ NL80211_BAND_5GHZ,
316316 false, false,
317317 cfg->passive[1] + cfg->dfs,
318318 wl->max_channels_5,
drivers/net/wireless/ti/wlcore/tx.c+1−1
@@ -453,7 +453,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 452 unmodified lines
453453 }
454454
455455 u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set,
456− enum ieee80211_band rate_band)
456+ enum nl80211_band rate_band)
457457 {
458458 struct ieee80211_supported_band *band;
459459 u32 enabled_rates = 0;
drivers/net/wireless/ti/wlcore/tx.h+2−2
@@ -246,9 +246,9 @@ int wlcore_tx_complete(struct wl1271 *wl); · 245 unmodified lines
246246 void wl12xx_tx_reset_wlvif(struct wl1271 *wl, struct wl12xx_vif *wlvif);
247247 void wl12xx_tx_reset(struct wl1271 *wl);
248248 void wl1271_tx_flush(struct wl1271 *wl);
249−u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum ieee80211_band band);
249+u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum nl80211_band band);
250250 u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set,
251− enum ieee80211_band rate_band);
251+ enum nl80211_band rate_band);
252252 u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set);
253253 u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
254254 struct sk_buff *skb, struct ieee80211_sta *sta);
drivers/net/wireless/ti/wlcore/wlcore.h+2−2
@@ -342,7 +342,7 @@ struct wl1271 { · 341 unmodified lines
342342 struct wl12xx_vif *sched_vif;
343343
344344 /* The current band */
345− enum ieee80211_band band;
345+ enum nl80211_band band;
346346
347347 struct completion *elp_compl;
348348 struct delayed_work elp_work;
@@ -517,7 +517,7 @@ void wlcore_update_inconn_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 168 unmodified lines
517517 struct wl1271_station *wl_sta, bool in_conn);
518518
519519 static inline void
520−wlcore_set_ht_cap(struct wl1271 *wl, enum ieee80211_band band,
520+wlcore_set_ht_cap(struct wl1271 *wl, enum nl80211_band band,
521521 struct ieee80211_sta_ht_cap *ht_cap)
522522 {
523523 memcpy(&wl->ht_cap[band], ht_cap, sizeof(*ht_cap));
drivers/net/wireless/ti/wlcore/wlcore_i.h+1−1
@@ -392,7 +392,7 @@ struct wl12xx_vif { · 391 unmodified lines
392392 u8 ssid_len;
393393
394394 /* The current band */
395− enum ieee80211_band band;
395+ enum nl80211_band band;
396396 int channel;
397397 enum nl80211_channel_type channel_type;
398398
drivers/net/wireless/wl3501_cs.c+1−1
@@ -1454,7 +1454,7 @@ static int wl3501_get_freq(struct net_device *dev, struct iw_request_info *info, · 1453 unmodified lines
14541454 struct wl3501_card *this = netdev_priv(dev);
14551455
14561456 wrqu->freq.m = 100000 *
1457− ieee80211_channel_to_frequency(this->chan, IEEE80211_BAND_2GHZ);
1457+ ieee80211_channel_to_frequency(this->chan, NL80211_BAND_2GHZ);
14581458 wrqu->freq.e = 1;
14591459 return 0;
14601460 }
drivers/net/wireless/zydas/zd1211rw/zd_mac.c+2−2
@@ -1068,7 +1068,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length) · 1067 unmodified lines
10681068 }
10691069
10701070 stats.freq = zd_channels[_zd_chip_get_channel(&mac->chip) - 1].center_freq;
1071− stats.band = IEEE80211_BAND_2GHZ;
1071+ stats.band = NL80211_BAND_2GHZ;
10721072 stats.signal = zd_check_signal(hw, status->signal_strength);
10731073
10741074 rate = zd_rx_rate(buffer, status);
@@ -1395,7 +1395,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) · 320 unmodified lines
13951395 mac->band.n_channels = ARRAY_SIZE(zd_channels);
13961396 mac->band.channels = mac->channels;
13971397
1398− hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band;
1398+ hw->wiphy->bands[NL80211_BAND_2GHZ] = &mac->band;
13991399
14001400 ieee80211_hw_set(hw, MFP_CAPABLE);
14011401 ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
drivers/staging/rtl8723au/core/rtw_mlme_ext.c+2−2
@@ -2113,10 +2113,10 @@ static int on_action_public23a(struct rtw_adapter *padapter, · 2112 unmodified lines
21132113
21142114 if (channel <= RTW_CH_MAX_2G_CHANNEL)
21152115 freq = ieee80211_channel_to_frequency(channel,
2116− IEEE80211_BAND_2GHZ);
2116+ NL80211_BAND_2GHZ);
21172117 else
21182118 freq = ieee80211_channel_to_frequency(channel,
2119− IEEE80211_BAND_5GHZ);
2119+ NL80211_BAND_5GHZ);
21202120
21212121 if (cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pframe,
21222122 skb->len, 0))
drivers/staging/rtl8723au/include/ieee80211.h+1−1
@@ -266,7 +266,7 @@ join_res: · 265 unmodified lines
266266
267267 /* Represent channel details, subset of ieee80211_channel */
268268 struct rtw_ieee80211_channel {
269− /* enum ieee80211_band band; */
269+ /* enum nl80211_band band; */
270270 /* u16 center_freq; */
271271 u16 hw_value;
272272 u32 flags;
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c+27−27
@@ -39,7 +39,7 @@ static const u32 rtw_cipher_suites[] = { · 38 unmodified lines
3939 }
4040
4141 #define CHAN2G(_channel, _freq, _flags) { \
42− .band = IEEE80211_BAND_2GHZ, \
42+ .band = NL80211_BAND_2GHZ, \
4343 .center_freq = (_freq), \
4444 .hw_value = (_channel), \
4545 .flags = (_flags), \
@@ -48,7 +48,7 @@ static const u32 rtw_cipher_suites[] = { · 2 unmodified lines
4848 }
4949
5050 #define CHAN5G(_channel, _flags) { \
51− .band = IEEE80211_BAND_5GHZ, \
51+ .band = NL80211_BAND_5GHZ, \
5252 .center_freq = 5000 + (5 * (_channel)), \
5353 .hw_value = (_channel), \
5454 .flags = (_flags), \
@@ -143,15 +143,15 @@ static void rtw_5g_rates_init(struct ieee80211_rate *rates) · 88 unmodified lines
143143 }
144144
145145 static struct ieee80211_supported_band *
146−rtw_spt_band_alloc(enum ieee80211_band band)
146+rtw_spt_band_alloc(enum nl80211_band band)
147147 {
148148 struct ieee80211_supported_band *spt_band = NULL;
149149 int n_channels, n_bitrates;
150150
151− if (band == IEEE80211_BAND_2GHZ) {
151+ if (band == NL80211_BAND_2GHZ) {
152152 n_channels = RTW_2G_CHANNELS_NUM;
153153 n_bitrates = RTW_G_RATES_NUM;
154− } else if (band == IEEE80211_BAND_5GHZ) {
154+ } else if (band == NL80211_BAND_5GHZ) {
155155 n_channels = RTW_5G_CHANNELS_NUM;
156156 n_bitrates = RTW_A_RATES_NUM;
157157 } else {
@@ -176,10 +176,10 @@ rtw_spt_band_alloc(enum ieee80211_band band) · 18 unmodified lines
176176 spt_band->n_channels = n_channels;
177177 spt_band->n_bitrates = n_bitrates;
178178
179− if (band == IEEE80211_BAND_2GHZ) {
179+ if (band == NL80211_BAND_2GHZ) {
180180 rtw_2g_channels_init(spt_band->channels);
181181 rtw_2g_rates_init(spt_band->bitrates);
182− } else if (band == IEEE80211_BAND_5GHZ) {
182+ } else if (band == NL80211_BAND_5GHZ) {
183183 rtw_5g_channels_init(spt_band->channels);
184184 rtw_5g_rates_init(spt_band->bitrates);
185185 }
@@ -257,10 +257,10 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, · 71 unmodified lines
257257 channel = pnetwork->network.DSConfig;
258258 if (channel <= RTW_CH_MAX_2G_CHANNEL)
259259 freq = ieee80211_channel_to_frequency(channel,
260− IEEE80211_BAND_2GHZ);
260+ NL80211_BAND_2GHZ);
261261 else
262262 freq = ieee80211_channel_to_frequency(channel,
263− IEEE80211_BAND_5GHZ);
263+ NL80211_BAND_5GHZ);
264264
265265 notify_channel = ieee80211_get_channel(wiphy, freq);
266266
@@ -322,11 +322,11 @@ void rtw_cfg80211_indicate_connect(struct rtw_adapter *padapter) · 55 unmodified lines
322322 if (channel <= RTW_CH_MAX_2G_CHANNEL)
323323 freq =
324324 ieee80211_channel_to_frequency(channel,
325− IEEE80211_BAND_2GHZ);
325+ NL80211_BAND_2GHZ);
326326 else
327327 freq =
328328 ieee80211_channel_to_frequency(channel,
329− IEEE80211_BAND_5GHZ);
329+ NL80211_BAND_5GHZ);
330330
331331 notify_channel = ieee80211_get_channel(wiphy, freq);
332332
@@ -2360,10 +2360,10 @@ void rtw_cfg80211_indicate_sta_assoc(struct rtw_adapter *padapter, · 2027 unmodified lines
23602360 channel = pmlmeext->cur_channel;
23612361 if (channel <= RTW_CH_MAX_2G_CHANNEL)
23622362 freq = ieee80211_channel_to_frequency(channel,
2363− IEEE80211_BAND_2GHZ);
2363+ NL80211_BAND_2GHZ);
23642364 else
23652365 freq = ieee80211_channel_to_frequency(channel,
2366− IEEE80211_BAND_5GHZ);
2366+ NL80211_BAND_5GHZ);
23672367
23682368 cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pmgmt_frame, frame_len,
23692369 0);
@@ -2392,10 +2392,10 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, · 22 unmodified lines
23922392 channel = pmlmeext->cur_channel;
23932393 if (channel <= RTW_CH_MAX_2G_CHANNEL)
23942394 freq = ieee80211_channel_to_frequency(channel,
2395− IEEE80211_BAND_2GHZ);
2395+ NL80211_BAND_2GHZ);
23962396 else
23972397 freq = ieee80211_channel_to_frequency(channel,
2398− IEEE80211_BAND_5GHZ);
2398+ NL80211_BAND_5GHZ);
23992399
24002400 mgmt.frame_control =
24012401 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH);
@@ -3109,7 +3109,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = { · 707 unmodified lines
31093109 };
31103110
31113111 static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap,
3112− enum ieee80211_band band, u8 rf_type)
3112+ enum nl80211_band band, u8 rf_type)
31133113 {
31143114
31153115 #define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
@@ -3133,7 +3133,7 @@ static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, · 17 unmodified lines
31333133 ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
31343134
31353135 /*
3136− *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
3136+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
31373137 *base on ant_num
31383138 *rx_mask: RX mask
31393139 *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7
@@ -3173,19 +3173,19 @@ void rtw_cfg80211_init_wiphy(struct rtw_adapter *padapter) · 33 unmodified lines
31733173
31743174 /* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
31753175 {
3176− bands = wiphy->bands[IEEE80211_BAND_2GHZ];
3176+ bands = wiphy->bands[NL80211_BAND_2GHZ];
31773177 if (bands)
31783178 rtw_cfg80211_init_ht_capab(&bands->ht_cap,
3179− IEEE80211_BAND_2GHZ,
3179+ NL80211_BAND_2GHZ,
31803180 rf_type);
31813181 }
31823182
31833183 /* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
31843184 {
3185− bands = wiphy->bands[IEEE80211_BAND_5GHZ];
3185+ bands = wiphy->bands[NL80211_BAND_5GHZ];
31863186 if (bands)
31873187 rtw_cfg80211_init_ht_capab(&bands->ht_cap,
3188− IEEE80211_BAND_5GHZ,
3188+ NL80211_BAND_5GHZ,
31893189 rf_type);
31903190 }
31913191 }
@@ -3224,11 +3224,11 @@ static void rtw_cfg80211_preinit_wiphy(struct rtw_adapter *padapter, · 32 unmodified lines
32243224 wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
32253225
32263226 /* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
3227− wiphy->bands[IEEE80211_BAND_2GHZ] =
3228− rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
3227+ wiphy->bands[NL80211_BAND_2GHZ] =
3228+ rtw_spt_band_alloc(NL80211_BAND_2GHZ);
32293229 /* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
3230− wiphy->bands[IEEE80211_BAND_5GHZ] =
3231− rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
3230+ wiphy->bands[NL80211_BAND_5GHZ] =
3231+ rtw_spt_band_alloc(NL80211_BAND_5GHZ);
32323232
32333233 wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
32343234 wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME;
@@ -3313,8 +3313,8 @@ void rtw_wdev_free(struct wireless_dev *wdev) · 78 unmodified lines
33133313 if (!wdev)
33143314 return;
33153315
3316− kfree(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
3317− kfree(wdev->wiphy->bands[IEEE80211_BAND_5GHZ]);
3316+ kfree(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
3317+ kfree(wdev->wiphy->bands[NL80211_BAND_5GHZ]);
33183318
33193319 wiphy_free(wdev->wiphy);
33203320
drivers/staging/vt6655/channel.c+2−2
@@ -144,7 +144,7 @@ void vnt_init_bands(struct vnt_private *priv) · 143 unmodified lines
144144 ch[i].flags = IEEE80211_CHAN_NO_HT40;
145145 }
146146
147− priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
147+ priv->hw->wiphy->bands[NL80211_BAND_5GHZ] =
148148 &vnt_supported_5ghz_band;
149149 /* fallthrough */
150150 case RF_RFMD2959:
@@ -159,7 +159,7 @@ void vnt_init_bands(struct vnt_private *priv) · 8 unmodified lines
159159 ch[i].flags = IEEE80211_CHAN_NO_HT40;
160160 }
161161
162− priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
162+ priv->hw->wiphy->bands[NL80211_BAND_2GHZ] =
163163 &vnt_supported_2ghz_band;
164164 break;
165165 }
drivers/staging/vt6655/device_main.c+2−2
@@ -812,7 +812,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, · 811 unmodified lines
812812 else if (fb_option & FIFOCTL_AUTO_FB_1)
813813 tx_rate = fallback_rate1[tx_rate][retry];
814814
815− if (info->band == IEEE80211_BAND_5GHZ)
815+ if (info->band == NL80211_BAND_5GHZ)
816816 idx = tx_rate - RATE_6M;
817817 else
818818 idx = tx_rate;
@@ -1290,7 +1290,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) · 471 unmodified lines
12901290 (conf->flags & IEEE80211_CONF_OFFCHANNEL)) {
12911291 set_channel(priv, conf->chandef.chan);
12921292
1293− if (conf->chandef.chan->band == IEEE80211_BAND_5GHZ)
1293+ if (conf->chandef.chan->band == NL80211_BAND_5GHZ)
12941294 bb_type = BB_TYPE_11A;
12951295 else
12961296 bb_type = BB_TYPE_11G;
drivers/staging/vt6655/rxtx.c+1−1
@@ -1307,7 +1307,7 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx, · 1306 unmodified lines
13071307 }
13081308
13091309 if (current_rate > RATE_11M) {
1310− if (info->band == IEEE80211_BAND_5GHZ) {
1310+ if (info->band == NL80211_BAND_5GHZ) {
13111311 pkt_type = PK_TYPE_11A;
13121312 } else {
13131313 if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
drivers/staging/vt6656/channel.c+2−2
@@ -153,7 +153,7 @@ void vnt_init_bands(struct vnt_private *priv) · 152 unmodified lines
153153 ch[i].flags = IEEE80211_CHAN_NO_HT40;
154154 }
155155
156− priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
156+ priv->hw->wiphy->bands[NL80211_BAND_5GHZ] =
157157 &vnt_supported_5ghz_band;
158158 /* fallthrough */
159159 case RF_AL2230:
@@ -167,7 +167,7 @@ void vnt_init_bands(struct vnt_private *priv) · 7 unmodified lines
167167 ch[i].flags = IEEE80211_CHAN_NO_HT40;
168168 }
169169
170− priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
170+ priv->hw->wiphy->bands[NL80211_BAND_2GHZ] =
171171 &vnt_supported_2ghz_band;
172172 break;
173173 }
drivers/staging/vt6656/int.c+1−1
@@ -97,7 +97,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, u8 pkt_no, u8 tsr) · 96 unmodified lines
9797 else if (context->fb_option == AUTO_FB_1)
9898 tx_rate = fallback_rate1[tx_rate][retry];
9999
100− if (info->band == IEEE80211_BAND_5GHZ)
100+ if (info->band == NL80211_BAND_5GHZ)
101101 idx = tx_rate - RATE_6M;
102102 else
103103 idx = tx_rate;
drivers/staging/vt6656/main_usb.c+1−1
@@ -662,7 +662,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) · 661 unmodified lines
662662 (conf->flags & IEEE80211_CONF_OFFCHANNEL)) {
663663 vnt_set_channel(priv, conf->chandef.chan->hw_value);
664664
665− if (conf->chandef.chan->band == IEEE80211_BAND_5GHZ)
665+ if (conf->chandef.chan->band == NL80211_BAND_5GHZ)
666666 bb_type = BB_TYPE_11A;
667667 else
668668 bb_type = BB_TYPE_11G;
drivers/staging/vt6656/rxtx.c+1−1
@@ -813,7 +813,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) · 812 unmodified lines
813813 }
814814
815815 if (current_rate > RATE_11M) {
816− if (info->band == IEEE80211_BAND_5GHZ) {
816+ if (info->band == NL80211_BAND_5GHZ) {
817817 pkt_type = PK_TYPE_11A;
818818 } else {
819819 if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c+5−5
@@ -102,7 +102,7 @@ static u8 op_ifcs; · 101 unmodified lines
102102 u8 wilc_initialized = 1;
103103
104104 #define CHAN2G(_channel, _freq, _flags) { \
105− .band = IEEE80211_BAND_2GHZ, \
105+ .band = NL80211_BAND_2GHZ, \
106106 .center_freq = (_freq), \
107107 .hw_value = (_channel), \
108108 .flags = (_flags), \
@@ -241,7 +241,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan) · 132 unmodified lines
241241 struct ieee80211_channel *channel;
242242
243243 if (network_info) {
244− freq = ieee80211_channel_to_frequency((s32)network_info->ch, IEEE80211_BAND_2GHZ);
244+ freq = ieee80211_channel_to_frequency((s32)network_info->ch, NL80211_BAND_2GHZ);
245245 channel = ieee80211_get_channel(wiphy, freq);
246246
247247 rssi = get_rssi_avg(network_info);
@@ -409,7 +409,7 @@ static void CfgScanResult(enum scan_event scan_event, · 161 unmodified lines
409409 return;
410410
411411 if (network_info) {
412− s32Freq = ieee80211_channel_to_frequency((s32)network_info->ch, IEEE80211_BAND_2GHZ);
412+ s32Freq = ieee80211_channel_to_frequency((s32)network_info->ch, NL80211_BAND_2GHZ);
413413 channel = ieee80211_get_channel(wiphy, s32Freq);
414414
415415 if (!channel)
@@ -1451,7 +1451,7 @@ void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size) · 1035 unmodified lines
14511451 return;
14521452 }
14531453 } else {
1454− s32Freq = ieee80211_channel_to_frequency(curr_channel, IEEE80211_BAND_2GHZ);
1454+ s32Freq = ieee80211_channel_to_frequency(curr_channel, NL80211_BAND_2GHZ);
14551455
14561456 if (ieee80211_is_action(buff[FRAME_TYPE_ID])) {
14571457 if (priv->bCfgScanning && time_after_eq(jiffies, (unsigned long)pstrWFIDrv->p2p_timeout)) {
@@ -2246,7 +2246,7 @@ static struct wireless_dev *WILC_WFI_CfgAlloc(void) · 788 unmodified lines
22462246 WILC_WFI_band_2ghz.ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_8K;
22472247 WILC_WFI_band_2ghz.ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE;
22482248
2249− wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &WILC_WFI_band_2ghz;
2249+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &WILC_WFI_band_2ghz;
22502250
22512251 return wdev;
22522252
drivers/staging/wlan-ng/cfg80211.c+3−3
@@ -415,7 +415,7 @@ static int prism2_scan(struct wiphy *wiphy, · 414 unmodified lines
415415 ie_len = ie_buf[1] + 2;
416416 memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len);
417417 freq = ieee80211_channel_to_frequency(msg2.dschannel.data,
418− IEEE80211_BAND_2GHZ);
418+ NL80211_BAND_2GHZ);
419419 bss = cfg80211_inform_bss(wiphy,
420420 ieee80211_get_channel(wiphy, freq),
421421 CFG80211_BSS_FTYPE_UNKNOWN,
@@ -758,9 +758,9 @@ static struct wiphy *wlan_create_wiphy(struct device *dev, wlandevice_t *wlandev · 336 unmodified lines
758758 priv->band.n_channels = ARRAY_SIZE(prism2_channels);
759759 priv->band.bitrates = priv->rates;
760760 priv->band.n_bitrates = ARRAY_SIZE(prism2_rates);
761− priv->band.band = IEEE80211_BAND_2GHZ;
761+ priv->band.band = NL80211_BAND_2GHZ;
762762 priv->band.ht_cap.ht_supported = false;
763− wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
763+ wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
764764
765765 set_wiphy_dev(wiphy, dev);
766766 wiphy->privid = prism2_wiphy_privid;
include/net/cfg80211.h+35−35
@@ -67,26 +67,6 @@ struct wiphy; · 66 unmodified lines
6767 * wireless hardware capability structures
6868 */
6969
70−/**
71− * enum ieee80211_band - supported frequency bands
72− *
73− * The bands are assigned this way because the supported
74− * bitrates differ in these bands.
75− *
76− * @IEEE80211_BAND_2GHZ: 2.4GHz ISM band
77− * @IEEE80211_BAND_5GHZ: around 5GHz band (4.9-5.7)
78− * @IEEE80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
79− * @IEEE80211_NUM_BANDS: number of defined bands
80− */
81−enum ieee80211_band {
82− IEEE80211_BAND_2GHZ = NL80211_BAND_2GHZ,
83− IEEE80211_BAND_5GHZ = NL80211_BAND_5GHZ,
84− IEEE80211_BAND_60GHZ = NL80211_BAND_60GHZ,
85−
86− /* keep last */
87− IEEE80211_NUM_BANDS
88−};
89−
9070 /**
9171 * enum ieee80211_channel_flags - channel flags
9272 *
@@ -167,7 +147,7 @@ enum ieee80211_channel_flags { · 74 unmodified lines
167147 * @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels.
168148 */
169149 struct ieee80211_channel {
170− enum ieee80211_band band;
150+ enum nl80211_band band;
171151 u16 center_freq;
172152 u16 hw_value;
173153 u32 flags;
@@ -324,7 +304,7 @@ struct ieee80211_sta_vht_cap { · 150 unmodified lines
324304 struct ieee80211_supported_band {
325305 struct ieee80211_channel *channels;
326306 struct ieee80211_rate *bitrates;
327− enum ieee80211_band band;
307+ enum nl80211_band band;
328308 int n_channels;
329309 int n_bitrates;
330310 struct ieee80211_sta_ht_cap ht_cap;
@@ -1370,7 +1350,7 @@ struct mesh_setup { · 1039 unmodified lines
13701350 bool user_mpm;
13711351 u8 dtim_period;
13721352 u16 beacon_interval;
1373− int mcast_rate[IEEE80211_NUM_BANDS];
1353+ int mcast_rate[NUM_NL80211_BANDS];
13741354 u32 basic_rates;
13751355 };
13761356
@@ -1468,7 +1448,7 @@ struct cfg80211_scan_request { · 91 unmodified lines
14681448 size_t ie_len;
14691449 u32 flags;
14701450
1471− u32 rates[IEEE80211_NUM_BANDS];
1451+ u32 rates[NUM_NL80211_BANDS];
14721452
14731453 struct wireless_dev *wdev;
14741454
@@ -1750,7 +1730,12 @@ enum cfg80211_assoc_req_flags { · 275 unmodified lines
17501730 * @ie_len: Length of ie buffer in octets
17511731 * @use_mfp: Use management frame protection (IEEE 802.11w) in this association
17521732 * @crypto: crypto settings
1753− * @prev_bssid: previous BSSID, if not %NULL use reassociate frame
1733+ * @prev_bssid: previous BSSID, if not %NULL use reassociate frame. This is used
1734+ * to indicate a request to reassociate within the ESS instead of a request
1735+ * do the initial association with the ESS. When included, this is set to
1736+ * the BSSID of the current association, i.e., to the value that is
1737+ * included in the Current AP address field of the Reassociation Request
1738+ * frame.
17541739 * @flags: See &enum cfg80211_assoc_req_flags
17551740 * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask
17561741 * will be used in ht_capa. Un-supported values will be ignored.
@@ -1855,7 +1840,7 @@ struct cfg80211_ibss_params { · 98 unmodified lines
18551840 bool privacy;
18561841 bool control_port;
18571842 bool userspace_handles_dfs;
1858− int mcast_rate[IEEE80211_NUM_BANDS];
1843+ int mcast_rate[NUM_NL80211_BANDS];
18591844 struct ieee80211_ht_cap ht_capa;
18601845 struct ieee80211_ht_cap ht_capa_mask;
18611846 };
@@ -1867,7 +1852,7 @@ struct cfg80211_ibss_params { · 5 unmodified lines
18671852 * @delta: value of RSSI level adjustment.
18681853 */
18691854 struct cfg80211_bss_select_adjust {
1870− enum ieee80211_band band;
1855+ enum nl80211_band band;
18711856 s8 delta;
18721857 };
18731858
@@ -1882,7 +1867,7 @@ struct cfg80211_bss_select_adjust { · 8 unmodified lines
18821867 struct cfg80211_bss_selection {
18831868 enum nl80211_bss_select_attr behaviour;
18841869 union {
1885− enum ieee80211_band band_pref;
1870+ enum nl80211_band band_pref;
18861871 struct cfg80211_bss_select_adjust adjust;
18871872 } param;
18881873 };
@@ -1925,7 +1910,12 @@ struct cfg80211_bss_selection { · 36 unmodified lines
19251910 * @pbss: if set, connect to a PCP instead of AP. Valid for DMG
19261911 * networks.
19271912 * @bss_select: criteria to be used for BSS selection.
1928− * @prev_bssid: previous BSSID, if not %NULL use reassociate frame
1913+ * @prev_bssid: previous BSSID, if not %NULL use reassociate frame. This is used
1914+ * to indicate a request to reassociate within the ESS instead of a request
1915+ * do the initial association with the ESS. When included, this is set to
1916+ * the BSSID of the current association, i.e., to the value that is
1917+ * included in the Current AP address field of the Reassociation Request
1918+ * frame.
19291919 */
19301920 struct cfg80211_connect_params {
19311921 struct ieee80211_channel *channel;
@@ -1980,7 +1970,7 @@ struct cfg80211_bitrate_mask { · 48 unmodified lines
19801970 u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
19811971 u16 vht_mcs[NL80211_VHT_NSS_MAX];
19821972 enum nl80211_txrate_gi gi;
1983− } control[IEEE80211_NUM_BANDS];
1973+ } control[NUM_NL80211_BANDS];
19841974 };
19851975 /**
19861976 * struct cfg80211_pmksa - PMK Security Association
@@ -2377,7 +2367,17 @@ struct cfg80211_qos_map { · 390 unmodified lines
23772367 * @connect: Connect to the ESS with the specified parameters. When connected,
23782368 * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS.
23792369 * If the connection fails for some reason, call cfg80211_connect_result()
2380− * with the status from the AP.
2370+ * with the status from the AP. The driver is allowed to roam to other
2371+ * BSSes within the ESS when the other BSS matches the connect parameters.
2372+ * When such roaming is initiated by the driver, the driver is expected to
2373+ * verify that the target matches the configured security parameters and
2374+ * to use Reassociation Request frame instead of Association Request frame.
2375+ * The connect function can also be used to request the driver to perform
2376+ * a specific roam when connected to an ESS. In that case, the prev_bssid
2377+ * parameter is set to the BSSID of the currently associated BSS as an
2378+ * indication of requesting reassociation. In both the driver-initiated and
2379+ * new connect() call initiated roaming cases, the result of roaming is
2380+ * indicated with a call to cfg80211_roamed() or cfg80211_roamed_bss().
23812381 * (invoked with the wireless_dev mutex held)
23822382 * @disconnect: Disconnect from the BSS/ESS.
23832383 * (invoked with the wireless_dev mutex held)
@@ -2657,7 +2657,7 @@ struct cfg80211_ops { · 273 unmodified lines
26572657 int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev);
26582658
26592659 int (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev,
2660− int rate[IEEE80211_NUM_BANDS]);
2660+ int rate[NUM_NL80211_BANDS]);
26612661
26622662 int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed);
26632663
@@ -3303,7 +3303,7 @@ struct wiphy { · 639 unmodified lines
33033303 * help determine whether you own this wiphy or not. */
33043304 const void *privid;
33053305
3306− struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS];
3306+ struct ieee80211_supported_band *bands[NUM_NL80211_BANDS];
33073307
33083308 /* Lets us get back the wiphy on the callback */
33093309 void (*reg_notifier)(struct wiphy *wiphy,
@@ -3638,7 +3638,7 @@ static inline void *wdev_priv(struct wireless_dev *wdev) · 328 unmodified lines
36383638 * @band: band, necessary due to channel number overlap
36393639 * Return: The corresponding frequency (in MHz), or 0 if the conversion failed.
36403640 */
3641−int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band);
3641+int ieee80211_channel_to_frequency(int chan, enum nl80211_band band);
36423642
36433643 /**
36443644 * ieee80211_frequency_to_channel - convert frequency to channel number
@@ -5069,7 +5069,7 @@ void cfg80211_ch_switch_started_notify(struct net_device *dev, · 1424 unmodified lines
50695069 * Returns %true if the conversion was successful, %false otherwise.
50705070 */
50715071 bool ieee80211_operating_class_to_band(u8 operating_class,
5072− enum ieee80211_band *band);
5072+ enum nl80211_band *band);
50735073
50745074 /**
50755075 * ieee80211_chandef_to_operating_class - convert chandef to operation class
include/net/mac80211.h+6−6
@@ -549,7 +549,7 @@ struct ieee80211_bss_conf { · 548 unmodified lines
549549 u8 sync_dtim_count;
550550 u32 basic_rates;
551551 struct ieee80211_rate *beacon_rate;
552− int mcast_rate[IEEE80211_NUM_BANDS];
552+ int mcast_rate[NUM_NL80211_BANDS];
553553 u16 ht_operation_mode;
554554 s32 cqm_rssi_thold;
555555 u32 cqm_rssi_hyst;
@@ -938,8 +938,8 @@ struct ieee80211_tx_info { · 382 unmodified lines
938938 * @common_ie_len: length of the common_ies
939939 */
940940 struct ieee80211_scan_ies {
941− const u8 *ies[IEEE80211_NUM_BANDS];
942− size_t len[IEEE80211_NUM_BANDS];
941+ const u8 *ies[NUM_NL80211_BANDS];
942+ size_t len[NUM_NL80211_BANDS];
943943 const u8 *common_ies;
944944 size_t common_ie_len;
945945 };
@@ -1754,7 +1754,7 @@ struct ieee80211_sta_rates { · 808 unmodified lines
17541754 * @txq: per-TID data TX queues (if driver uses the TXQ abstraction)
17551755 */
17561756 struct ieee80211_sta {
1757− u32 supp_rates[IEEE80211_NUM_BANDS];
1757+ u32 supp_rates[NUM_NL80211_BANDS];
17581758 u8 addr[ETH_ALEN];
17591759 u16 aid;
17601760 struct ieee80211_sta_ht_cap ht_cap;
@@ -4404,7 +4404,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, · 2643 unmodified lines
44044404 */
44054405 __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
44064406 struct ieee80211_vif *vif,
4407− enum ieee80211_band band,
4407+ enum nl80211_band band,
44084408 size_t frame_len,
44094409 struct ieee80211_rate *rate);
44104410
@@ -5357,7 +5357,7 @@ struct rate_control_ops { · 946 unmodified lines
53575357 };
53585358
53595359 static inline int rate_supported(struct ieee80211_sta *sta,
5360− enum ieee80211_band band,
5360+ enum nl80211_band band,
53615361 int index)
53625362 {
53635363 return (sta == NULL || sta->supp_rates[band] & BIT(index));
include/uapi/linux/nl80211.h+17−3
@@ -429,7 +429,11 @@ · 428 unmodified lines
429429 * @NL80211_CMD_ASSOCIATE: association request and notification; like
430430 * NL80211_CMD_AUTHENTICATE but for Association and Reassociation
431431 * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request,
432− * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives).
432+ * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives). The
433+ * %NL80211_ATTR_PREV_BSSID attribute is used to specify whether the
434+ * request is for the initial association to an ESS (that attribute not
435+ * included) or for reassociation within the ESS (that attribute is
436+ * included).
433437 * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like
434438 * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to
435439 * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication
@@ -479,6 +483,9 @@ · 43 unmodified lines
479483 * set of BSSID,frequency parameters is used (i.e., either the enforcing
480484 * %NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict
481485 * %NL80211_ATTR_MAC_HINT and %NL80211_ATTR_WIPHY_FREQ_HINT).
486+ * %NL80211_ATTR_PREV_BSSID can be used to request a reassociation within
487+ * the ESS in case the device is already associated and an association with
488+ * a different BSS is desired.
482489 * Background scan period can optionally be
483490 * specified in %NL80211_ATTR_BG_SCAN_PERIOD,
484491 * if not specified default background scan configuration
@@ -1287,8 +1294,11 @@ enum nl80211_commands { · 802 unmodified lines
12871294 * @NL80211_ATTR_RESP_IE: (Re)association response information elements as
12881295 * sent by peer, for ROAM and successful CONNECT events.
12891296 *
1290− * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE
1291− * commands to specify using a reassociate frame
1297+ * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used in ASSOCIATE and CONNECT
1298+ * commands to specify a request to reassociate within an ESS, i.e., to use
1299+ * Reassociate Request frame (with the value of this attribute in the
1300+ * Current AP address field) instead of Association Request frame which is
1301+ * used for the initial association to an ESS.
12921302 *
12931303 * @NL80211_ATTR_KEY: key information in a nested attribute with
12941304 * %NL80211_KEY_* sub-attributes
@@ -3643,11 +3653,15 @@ enum nl80211_txrate_gi { · 2348 unmodified lines
36433653 * @NL80211_BAND_2GHZ: 2.4 GHz ISM band
36443654 * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
36453655 * @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
3656+ * @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
3657+ * since newer kernel versions may support more bands
36463658 */
36473659 enum nl80211_band {
36483660 NL80211_BAND_2GHZ,
36493661 NL80211_BAND_5GHZ,
36503662 NL80211_BAND_60GHZ,
3663+
3664+ NUM_NL80211_BANDS,
36513665 };
36523666
36533667 /**
net/mac80211/cfg.c+7−7
@@ -1049,7 +1049,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, · 1048 unmodified lines
10491049 int ret = 0;
10501050 struct ieee80211_supported_band *sband;
10511051 struct ieee80211_sub_if_data *sdata = sta->sdata;
1052− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
1052+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
10531053 u32 mask, set;
10541054
10551055 sband = local->hw.wiphy->bands[band];
@@ -1848,7 +1848,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy, · 792 unmodified lines
18481848 struct bss_parameters *params)
18491849 {
18501850 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
1851− enum ieee80211_band band;
1851+ enum nl80211_band band;
18521852 u32 changed = 0;
18531853
18541854 if (!sdata_dereference(sdata->u.ap.beacon, sdata))
@@ -1867,7 +1867,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy, · 12 unmodified lines
18671867 }
18681868
18691869 if (!sdata->vif.bss_conf.use_short_slot &&
1870− band == IEEE80211_BAND_5GHZ) {
1870+ band == NL80211_BAND_5GHZ) {
18711871 sdata->vif.bss_conf.use_short_slot = true;
18721872 changed |= BSS_CHANGED_ERP_SLOT;
18731873 }
@@ -2097,12 +2097,12 @@ static int ieee80211_leave_ocb(struct wiphy *wiphy, struct net_device *dev) · 223 unmodified lines
20972097 }
20982098
20992099 static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
2100− int rate[IEEE80211_NUM_BANDS])
2100+ int rate[NUM_NL80211_BANDS])
21012101 {
21022102 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
21032103
21042104 memcpy(sdata->vif.bss_conf.mcast_rate, rate,
2105− sizeof(int) * IEEE80211_NUM_BANDS);
2105+ sizeof(int) * NUM_NL80211_BANDS);
21062106
21072107 return 0;
21082108 }
@@ -2507,7 +2507,7 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, · 398 unmodified lines
25072507 return ret;
25082508 }
25092509
2510− for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
2510+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
25112511 struct ieee80211_supported_band *sband = wiphy->bands[i];
25122512 int j;
25132513
@@ -3135,7 +3135,7 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev, · 621 unmodified lines
31353135 struct ieee80211_tx_info *info;
31363136 struct sta_info *sta;
31373137 struct ieee80211_chanctx_conf *chanctx_conf;
3138− enum ieee80211_band band;
3138+ enum nl80211_band band;
31393139 int ret;
31403140
31413141 /* the lock is needed to assign the cookie later */
net/mac80211/debugfs_netdev.c+6−6
@@ -169,21 +169,21 @@ static ssize_t ieee80211_if_write_##name(struct file *file, \ · 168 unmodified lines
169169 IEEE80211_IF_FILE_R(name)
170170
171171 /* common attributes */
172−IEEE80211_IF_FILE(rc_rateidx_mask_2ghz, rc_rateidx_mask[IEEE80211_BAND_2GHZ],
172+IEEE80211_IF_FILE(rc_rateidx_mask_2ghz, rc_rateidx_mask[NL80211_BAND_2GHZ],
173173 HEX);
174−IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[IEEE80211_BAND_5GHZ],
174+IEEE80211_IF_FILE(rc_rateidx_mask_5ghz, rc_rateidx_mask[NL80211_BAND_5GHZ],
175175 HEX);
176176 IEEE80211_IF_FILE(rc_rateidx_mcs_mask_2ghz,
177− rc_rateidx_mcs_mask[IEEE80211_BAND_2GHZ], HEXARRAY);
177+ rc_rateidx_mcs_mask[NL80211_BAND_2GHZ], HEXARRAY);
178178 IEEE80211_IF_FILE(rc_rateidx_mcs_mask_5ghz,
179− rc_rateidx_mcs_mask[IEEE80211_BAND_5GHZ], HEXARRAY);
179+ rc_rateidx_mcs_mask[NL80211_BAND_5GHZ], HEXARRAY);
180180
181181 static ssize_t ieee80211_if_fmt_rc_rateidx_vht_mcs_mask_2ghz(
182182 const struct ieee80211_sub_if_data *sdata,
183183 char *buf, int buflen)
184184 {
185185 int i, len = 0;
186− const u16 *mask = sdata->rc_rateidx_vht_mcs_mask[IEEE80211_BAND_2GHZ];
186+ const u16 *mask = sdata->rc_rateidx_vht_mcs_mask[NL80211_BAND_2GHZ];
187187
188188 for (i = 0; i < NL80211_VHT_NSS_MAX; i++)
189189 len += scnprintf(buf + len, buflen - len, "%04x ", mask[i]);
@@ -199,7 +199,7 @@ static ssize_t ieee80211_if_fmt_rc_rateidx_vht_mcs_mask_5ghz( · 9 unmodified lines
199199 char *buf, int buflen)
200200 {
201201 int i, len = 0;
202− const u16 *mask = sdata->rc_rateidx_vht_mcs_mask[IEEE80211_BAND_5GHZ];
202+ const u16 *mask = sdata->rc_rateidx_vht_mcs_mask[NL80211_BAND_5GHZ];
203203
204204 for (i = 0; i < NL80211_VHT_NSS_MAX; i++)
205205 len += scnprintf(buf + len, buflen - len, "%04x ", mask[i]);
net/mac80211/ibss.c+5−5
@@ -126,7 +126,7 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata, · 125 unmodified lines
126126 }
127127 }
128128
129− if (sband->band == IEEE80211_BAND_2GHZ) {
129+ if (sband->band == NL80211_BAND_2GHZ) {
130130 *pos++ = WLAN_EID_DS_PARAMS;
131131 *pos++ = 1;
132132 *pos++ = ieee80211_frequency_to_channel(
@@ -348,11 +348,11 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, · 215 unmodified lines
348348 *
349349 * HT follows these specifications (IEEE 802.11-2012 20.3.18)
350350 */
351− sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;
351+ sdata->vif.bss_conf.use_short_slot = chan->band == NL80211_BAND_5GHZ;
352352 bss_change |= BSS_CHANGED_ERP_SLOT;
353353
354354 /* cf. IEEE 802.11 9.2.12 */
355− if (chan->band == IEEE80211_BAND_2GHZ && have_higher_than_11mbit)
355+ if (chan->band == NL80211_BAND_2GHZ && have_higher_than_11mbit)
356356 sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE;
357357 else
358358 sdata->flags &= ~IEEE80211_SDATA_OPERATING_GMODE;
@@ -989,7 +989,7 @@ static void ieee80211_update_sta_info(struct ieee80211_sub_if_data *sdata, · 630 unmodified lines
989989 struct ieee80211_channel *channel)
990990 {
991991 struct sta_info *sta;
992− enum ieee80211_band band = rx_status->band;
992+ enum nl80211_band band = rx_status->band;
993993 enum nl80211_bss_scan_width scan_width;
994994 struct ieee80211_local *local = sdata->local;
995995 struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
@@ -1109,7 +1109,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, · 113 unmodified lines
11091109 struct ieee80211_channel *channel;
11101110 u64 beacon_timestamp, rx_timestamp;
11111111 u32 supp_rates = 0;
1112− enum ieee80211_band band = rx_status->band;
1112+ enum nl80211_band band = rx_status->band;
11131113
11141114 channel = ieee80211_get_channel(local->hw.wiphy, rx_status->freq);
11151115 if (!channel)
net/mac80211/ieee80211_i.h+17−17
@@ -896,13 +896,13 @@ struct ieee80211_sub_if_data { · 895 unmodified lines
896896 struct ieee80211_if_ap *bss;
897897
898898 /* bitmap of allowed (non-MCS) rate indexes for rate control */
899− u32 rc_rateidx_mask[IEEE80211_NUM_BANDS];
899+ u32 rc_rateidx_mask[NUM_NL80211_BANDS];
900900
901− bool rc_has_mcs_mask[IEEE80211_NUM_BANDS];
902− u8 rc_rateidx_mcs_mask[IEEE80211_NUM_BANDS][IEEE80211_HT_MCS_MASK_LEN];
901+ bool rc_has_mcs_mask[NUM_NL80211_BANDS];
902+ u8 rc_rateidx_mcs_mask[NUM_NL80211_BANDS][IEEE80211_HT_MCS_MASK_LEN];
903903
904− bool rc_has_vht_mcs_mask[IEEE80211_NUM_BANDS];
905− u16 rc_rateidx_vht_mcs_mask[IEEE80211_NUM_BANDS][NL80211_VHT_NSS_MAX];
904+ bool rc_has_vht_mcs_mask[NUM_NL80211_BANDS];
905+ u16 rc_rateidx_vht_mcs_mask[NUM_NL80211_BANDS][NL80211_VHT_NSS_MAX];
906906
907907 union {
908908 struct ieee80211_if_ap ap;
@@ -957,10 +957,10 @@ sdata_assert_lock(struct ieee80211_sub_if_data *sdata) · 48 unmodified lines
957957 lockdep_assert_held(&sdata->wdev.mtx);
958958 }
959959
960−static inline enum ieee80211_band
960+static inline enum nl80211_band
961961 ieee80211_get_sdata_band(struct ieee80211_sub_if_data *sdata)
962962 {
963− enum ieee80211_band band = IEEE80211_BAND_2GHZ;
963+ enum nl80211_band band = NL80211_BAND_2GHZ;
964964 struct ieee80211_chanctx_conf *chanctx_conf;
965965
966966 rcu_read_lock();
@@ -1231,7 +1231,7 @@ struct ieee80211_local { · 264 unmodified lines
12311231 struct cfg80211_scan_request __rcu *scan_req;
12321232 struct ieee80211_scan_request *hw_scan_req;
12331233 struct cfg80211_chan_def scan_chandef;
1234− enum ieee80211_band hw_scan_band;
1234+ enum nl80211_band hw_scan_band;
12351235 int scan_channel_idx;
12361236 int scan_ies_len;
12371237 int hw_scan_ies_bufsize;
@@ -1738,10 +1738,10 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata, · 500 unmodified lines
17381738 struct ieee80211_mgmt *mgmt);
17391739 u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
17401740 struct sta_info *sta, u8 opmode,
1741− enum ieee80211_band band);
1741+ enum nl80211_band band);
17421742 void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
17431743 struct sta_info *sta, u8 opmode,
1744− enum ieee80211_band band);
1744+ enum nl80211_band band);
17451745 void ieee80211_apply_vhtcap_overrides(struct ieee80211_sub_if_data *sdata,
17461746 struct ieee80211_sta_vht_cap *vht_cap);
17471747 void ieee80211_get_vht_mask_from_cap(__le16 vht_cap,
@@ -1769,7 +1769,7 @@ void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, · 21 unmodified lines
17691769 */
17701770 int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
17711771 struct ieee802_11_elems *elems,
1772− enum ieee80211_band current_band,
1772+ enum nl80211_band current_band,
17731773 u32 sta_flags, u8 *bssid,
17741774 struct ieee80211_csa_ie *csa_ie);
17751775
@@ -1794,7 +1794,7 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw) · 18 unmodified lines
17941794
17951795 /* utility functions/constants */
17961796 extern const void *const mac80211_wiphy_privid; /* for wiphy privid */
1797−int ieee80211_frame_duration(enum ieee80211_band band, size_t len,
1797+int ieee80211_frame_duration(enum nl80211_band band, size_t len,
17981798 int rate, int erp, int short_preamble,
17991799 int shift);
18001800 void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata,
@@ -1804,12 +1804,12 @@ void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, · 3 unmodified lines
18041804
18051805 void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
18061806 struct sk_buff *skb, int tid,
1807− enum ieee80211_band band);
1807+ enum nl80211_band band);
18081808
18091809 static inline void
18101810 ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
18111811 struct sk_buff *skb, int tid,
1812− enum ieee80211_band band)
1812+ enum nl80211_band band)
18131813 {
18141814 rcu_read_lock();
18151815 __ieee80211_tx_skb_tid_band(sdata, skb, tid, band);
@@ -1964,7 +1964,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, · 148 unmodified lines
19641964
19651965 u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
19661966 struct ieee802_11_elems *elems,
1967− enum ieee80211_band band, u32 *basic_rates);
1967+ enum nl80211_band band, u32 *basic_rates);
19681968 int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata,
19691969 enum ieee80211_smps_mode smps_mode);
19701970 int __ieee80211_request_smps_ap(struct ieee80211_sub_if_data *sdata,
@@ -1987,10 +1987,10 @@ int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef, · 16 unmodified lines
19871987 const u8 *srates, int srates_len, u32 *rates);
19881988 int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
19891989 struct sk_buff *skb, bool need_basic,
1990− enum ieee80211_band band);
1990+ enum nl80211_band band);
19911991 int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
19921992 struct sk_buff *skb, bool need_basic,
1993− enum ieee80211_band band);
1993+ enum nl80211_band band);
19941994 u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo);
19951995
19961996 /* channel management */
net/mac80211/iface.c+1−1
@@ -1800,7 +1800,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, · 1799 unmodified lines
18001800 INIT_DELAYED_WORK(&sdata->dec_tailroom_needed_wk,
18011801 ieee80211_delayed_tailroom_dec);
18021802
1803− for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
1803+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
18041804 struct ieee80211_supported_band *sband;
18051805 sband = local->hw.wiphy->bands[i];
18061806 sdata->rc_rateidx_mask[i] =
net/mac80211/main.c+3−3
@@ -801,7 +801,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) · 800 unmodified lines
801801 {
802802 struct ieee80211_local *local = hw_to_local(hw);
803803 int result, i;
804− enum ieee80211_band band;
804+ enum nl80211_band band;
805805 int channels, max_bitrates;
806806 bool supp_ht, supp_vht;
807807 netdev_features_t feature_whitelist;
@@ -874,7 +874,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) · 66 unmodified lines
874874 max_bitrates = 0;
875875 supp_ht = false;
876876 supp_vht = false;
877− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
877+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
878878 struct ieee80211_supported_band *sband;
879879
880880 sband = local->hw.wiphy->bands[band];
@@ -936,7 +936,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) · 55 unmodified lines
936936 if (!local->int_scan_req)
937937 return -ENOMEM;
938938
939− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
939+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
940940 if (!local->hw.wiphy->bands[band])
941941 continue;
942942 local->int_scan_req->rates[band] = (u32) -1;
net/mac80211/mesh.c+5−5
@@ -415,7 +415,7 @@ int mesh_add_ht_cap_ie(struct ieee80211_sub_if_data *sdata, · 414 unmodified lines
415415 struct sk_buff *skb)
416416 {
417417 struct ieee80211_local *local = sdata->local;
418− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
418+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
419419 struct ieee80211_supported_band *sband;
420420 u8 *pos;
421421
@@ -478,7 +478,7 @@ int mesh_add_vht_cap_ie(struct ieee80211_sub_if_data *sdata, · 56 unmodified lines
478478 struct sk_buff *skb)
479479 {
480480 struct ieee80211_local *local = sdata->local;
481− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
481+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
482482 struct ieee80211_supported_band *sband;
483483 u8 *pos;
484484
@@ -680,7 +680,7 @@ ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh) · 195 unmodified lines
680680 struct ieee80211_mgmt *mgmt;
681681 struct ieee80211_chanctx_conf *chanctx_conf;
682682 struct mesh_csa_settings *csa;
683− enum ieee80211_band band;
683+ enum nl80211_band band;
684684 u8 *pos;
685685 struct ieee80211_sub_if_data *sdata;
686686 int hdr_len = offsetof(struct ieee80211_mgmt, u.beacon) +
@@ -930,7 +930,7 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata, · 243 unmodified lines
930930 struct cfg80211_csa_settings params;
931931 struct ieee80211_csa_ie csa_ie;
932932 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
933− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
933+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
934934 int err;
935935 u32 sta_flags;
936936
@@ -1084,7 +1084,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, · 147 unmodified lines
10841084 struct ieee80211_channel *channel;
10851085 size_t baselen;
10861086 int freq;
1087− enum ieee80211_band band = rx_status->band;
1087+ enum nl80211_band band = rx_status->band;
10881088
10891089 /* ignore ProbeResp to foreign address */
10901090 if (stype == IEEE80211_STYPE_PROBE_RESP &&
net/mac80211/mesh_plink.c+5−5
@@ -93,18 +93,18 @@ static inline void mesh_plink_fsm_restart(struct sta_info *sta) · 92 unmodified lines
9393 static u32 mesh_set_short_slot_time(struct ieee80211_sub_if_data *sdata)
9494 {
9595 struct ieee80211_local *local = sdata->local;
96− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
96+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
9797 struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
9898 struct sta_info *sta;
9999 u32 erp_rates = 0, changed = 0;
100100 int i;
101101 bool short_slot = false;
102102
103− if (band == IEEE80211_BAND_5GHZ) {
103+ if (band == NL80211_BAND_5GHZ) {
104104 /* (IEEE 802.11-2012 19.4.5) */
105105 short_slot = true;
106106 goto out;
107− } else if (band != IEEE80211_BAND_2GHZ)
107+ } else if (band != NL80211_BAND_2GHZ)
108108 goto out;
109109
110110 for (i = 0; i < sband->n_bitrates; i++)
@@ -247,7 +247,7 @@ static int mesh_plink_frame_tx(struct ieee80211_sub_if_data *sdata, · 136 unmodified lines
247247 mgmt->u.action.u.self_prot.action_code = action;
248248
249249 if (action != WLAN_SP_MESH_PEERING_CLOSE) {
250− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
250+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
251251
252252 /* capability info */
253253 pos = skb_put(skb, 2);
@@ -385,7 +385,7 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata, · 131 unmodified lines
385385 struct ieee802_11_elems *elems, bool insert)
386386 {
387387 struct ieee80211_local *local = sdata->local;
388− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
388+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
389389 struct ieee80211_supported_band *sband;
390390 u32 rates, basic_rates = 0, changed = 0;
391391 enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth;
net/mac80211/mlme.c+7−7
@@ -661,7 +661,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) · 660 unmodified lines
661661
662662 capab = WLAN_CAPABILITY_ESS;
663663
664− if (sband->band == IEEE80211_BAND_2GHZ) {
664+ if (sband->band == NL80211_BAND_2GHZ) {
665665 capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME;
666666 capab |= WLAN_CAPABILITY_SHORT_PREAMBLE;
667667 }
@@ -1100,7 +1100,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, · 432 unmodified lines
11001100 struct cfg80211_bss *cbss = ifmgd->associated;
11011101 struct ieee80211_chanctx_conf *conf;
11021102 struct ieee80211_chanctx *chanctx;
1103− enum ieee80211_band current_band;
1103+ enum nl80211_band current_band;
11041104 struct ieee80211_csa_ie csa_ie;
11051105 struct ieee80211_channel_switch ch_switch;
11061106 int res;
@@ -1257,11 +1257,11 @@ ieee80211_find_80211h_pwr_constr(struct ieee80211_sub_if_data *sdata, · 150 unmodified lines
12571257 default:
12581258 WARN_ON_ONCE(1);
12591259 /* fall through */
1260− case IEEE80211_BAND_2GHZ:
1261− case IEEE80211_BAND_60GHZ:
1260+ case NL80211_BAND_2GHZ:
1261+ case NL80211_BAND_60GHZ:
12621262 chan_increment = 1;
12631263 break;
1264− case IEEE80211_BAND_5GHZ:
1264+ case NL80211_BAND_5GHZ:
12651265 chan_increment = 4;
12661266 break;
12671267 }
@@ -1861,7 +1861,7 @@ static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, · 593 unmodified lines
18611861 }
18621862
18631863 use_short_slot = !!(capab & WLAN_CAPABILITY_SHORT_SLOT_TIME);
1864− if (ieee80211_get_sdata_band(sdata) == IEEE80211_BAND_5GHZ)
1864+ if (ieee80211_get_sdata_band(sdata) == NL80211_BAND_5GHZ)
18651865 use_short_slot = true;
18661866
18671867 if (use_protection != bss_conf->use_cts_prot) {
@@ -4375,7 +4375,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, · 2507 unmodified lines
43754375 sdata->vif.bss_conf.basic_rates = basic_rates;
43764376
43774377 /* cf. IEEE 802.11 9.2.12 */
4378− if (cbss->channel->band == IEEE80211_BAND_2GHZ &&
4378+ if (cbss->channel->band == NL80211_BAND_2GHZ &&
43794379 have_higher_than_11mbit)
43804380 sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE;
43814381 else
net/mac80211/rate.c+1−1
@@ -287,7 +287,7 @@ static void __rate_control_send_low(struct ieee80211_hw *hw, · 286 unmodified lines
287287 u32 rate_flags =
288288 ieee80211_chandef_rate_flags(&hw->conf.chandef);
289289
290− if ((sband->band == IEEE80211_BAND_2GHZ) &&
290+ if ((sband->band == NL80211_BAND_2GHZ) &&
291291 (info->flags & IEEE80211_TX_CTL_NO_CCK_RATE))
292292 rate_flags |= IEEE80211_RATE_ERP_G;
293293
net/mac80211/rc80211_minstrel.c+3−3
@@ -436,7 +436,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta, · 435 unmodified lines
436436
437437
438438 static void
439−calc_rate_durations(enum ieee80211_band band,
439+calc_rate_durations(enum nl80211_band band,
440440 struct minstrel_rate *d,
441441 struct ieee80211_rate *rate,
442442 struct cfg80211_chan_def *chandef)
@@ -579,7 +579,7 @@ minstrel_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp) · 136 unmodified lines
579579 if (!mi)
580580 return NULL;
581581
582− for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
582+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
583583 sband = hw->wiphy->bands[i];
584584 if (sband && sband->n_bitrates > max_rates)
585585 max_rates = sband->n_bitrates;
@@ -621,7 +621,7 @@ minstrel_init_cck_rates(struct minstrel_priv *mp) · 35 unmodified lines
621621 u32 rate_flags = ieee80211_chandef_rate_flags(&mp->hw->conf.chandef);
622622 int i, j;
623623
624− sband = mp->hw->wiphy->bands[IEEE80211_BAND_2GHZ];
624+ sband = mp->hw->wiphy->bands[NL80211_BAND_2GHZ];
625625 if (!sband)
626626 return;
627627
net/mac80211/rc80211_minstrel_ht.c+2−2
@@ -1137,7 +1137,7 @@ minstrel_ht_update_cck(struct minstrel_priv *mp, struct minstrel_ht_sta *mi, · 1136 unmodified lines
11371137 {
11381138 int i;
11391139
1140− if (sband->band != IEEE80211_BAND_2GHZ)
1140+ if (sband->band != NL80211_BAND_2GHZ)
11411141 return;
11421142
11431143 if (!ieee80211_hw_check(mp->hw, SUPPORTS_HT_CCK_RATES))
@@ -1335,7 +1335,7 @@ minstrel_ht_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp) · 191 unmodified lines
13351335 int max_rates = 0;
13361336 int i;
13371337
1338− for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
1338+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
13391339 sband = hw->wiphy->bands[i];
13401340 if (sband && sband->n_bitrates > max_rates)
13411341 max_rates = sband->n_bitrates;
net/mac80211/rx.c+3−3
@@ -322,7 +322,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, · 321 unmodified lines
322322 else if (status->flag & RX_FLAG_5MHZ)
323323 channel_flags |= IEEE80211_CHAN_QUARTER;
324324
325− if (status->band == IEEE80211_BAND_5GHZ)
325+ if (status->band == NL80211_BAND_5GHZ)
326326 channel_flags |= IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ;
327327 else if (status->flag & (RX_FLAG_HT | RX_FLAG_VHT))
328328 channel_flags |= IEEE80211_CHAN_DYN | IEEE80211_CHAN_2GHZ;
@@ -2823,7 +2823,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 2494 unmodified lines
28232823
28242824 switch (mgmt->u.action.u.measurement.action_code) {
28252825 case WLAN_ACTION_SPCT_MSR_REQ:
2826− if (status->band != IEEE80211_BAND_5GHZ)
2826+ if (status->band != NL80211_BAND_5GHZ)
28272827 break;
28282828
28292829 if (len < (IEEE80211_MIN_ACTION_SIZE +
@@ -4043,7 +4043,7 @@ void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta, · 1213 unmodified lines
40434043
40444044 WARN_ON_ONCE(softirq_count() == 0);
40454045
4046− if (WARN_ON(status->band >= IEEE80211_NUM_BANDS))
4046+ if (WARN_ON(status->band >= NUM_NL80211_BANDS))
40474047 goto drop;
40484048
40494049 sband = local->hw.wiphy->bands[status->band];
net/mac80211/scan.c+6−6
@@ -272,7 +272,7 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) · 271 unmodified lines
272272 n_chans = req->n_channels;
273273 } else {
274274 do {
275− if (local->hw_scan_band == IEEE80211_NUM_BANDS)
275+ if (local->hw_scan_band == NUM_NL80211_BANDS)
276276 return false;
277277
278278 n_chans = 0;
@@ -485,7 +485,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local, · 206 unmodified lines
485485 int i;
486486 struct ieee80211_sub_if_data *sdata;
487487 struct cfg80211_scan_request *scan_req;
488− enum ieee80211_band band = local->hw.conf.chandef.chan->band;
488+ enum nl80211_band band = local->hw.conf.chandef.chan->band;
489489 u32 tx_flags;
490490
491491 scan_req = rcu_dereference_protected(local->scan_req,
@@ -953,7 +953,7 @@ int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, · 461 unmodified lines
953953 {
954954 struct ieee80211_local *local = sdata->local;
955955 int ret = -EBUSY, i, n_ch = 0;
956− enum ieee80211_band band;
956+ enum nl80211_band band;
957957
958958 mutex_lock(&local->mtx);
959959
@@ -965,7 +965,7 @@ int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, · 5 unmodified lines
965965 if (!channels) {
966966 int max_n;
967967
968− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
968+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
969969 if (!local->hw.wiphy->bands[band])
970970 continue;
971971
@@ -1085,7 +1085,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, · 113 unmodified lines
10851085 struct ieee80211_scan_ies sched_scan_ies = {};
10861086 struct cfg80211_chan_def chandef;
10871087 int ret, i, iebufsz, num_bands = 0;
1088− u32 rate_masks[IEEE80211_NUM_BANDS] = {};
1088+ u32 rate_masks[NUM_NL80211_BANDS] = {};
10891089 u8 bands_used = 0;
10901090 u8 *ie;
10911091 size_t len;
@@ -1097,7 +1097,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, · 5 unmodified lines
10971097 if (!local->ops->sched_scan_start)
10981098 return -ENOTSUPP;
10991099
1100− for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
1100+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
11011101 if (local->hw.wiphy->bands[i]) {
11021102 bands_used |= BIT(i);
11031103 rate_masks[i] = (u32) -1;
net/mac80211/spectmgmt.c+2−2
@@ -23,11 +23,11 @@ · 22 unmodified lines
2323
2424 int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
2525 struct ieee802_11_elems *elems,
26− enum ieee80211_band current_band,
26+ enum nl80211_band current_band,
2727 u32 sta_flags, u8 *bssid,
2828 struct ieee80211_csa_ie *csa_ie)
2929 {
30− enum ieee80211_band new_band;
30+ enum nl80211_band new_band;
3131 int new_freq;
3232 u8 new_chan_no;
3333 struct ieee80211_channel *new_chan;
net/mac80211/tdls.c+9−9
@@ -47,7 +47,7 @@ static void ieee80211_tdls_add_ext_capab(struct ieee80211_sub_if_data *sdata, · 46 unmodified lines
4747 NL80211_FEATURE_TDLS_CHANNEL_SWITCH;
4848 bool wider_band = ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) &&
4949 !ifmgd->tdls_wider_bw_prohibited;
50− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
50+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
5151 struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
5252 bool vht = sband && sband->vht_cap.vht_supported;
5353 u8 *pos = (void *)skb_put(skb, 10);
@@ -184,7 +184,7 @@ static u16 ieee80211_get_tdls_sta_capab(struct ieee80211_sub_if_data *sdata, · 130 unmodified lines
184184 if (status_code != 0)
185185 return 0;
186186
187− if (ieee80211_get_sdata_band(sdata) == IEEE80211_BAND_2GHZ) {
187+ if (ieee80211_get_sdata_band(sdata) == NL80211_BAND_2GHZ) {
188188 return WLAN_CAPABILITY_SHORT_SLOT_TIME |
189189 WLAN_CAPABILITY_SHORT_PREAMBLE;
190190 }
@@ -357,7 +357,7 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata, · 166 unmodified lines
357357 u8 action_code, bool initiator,
358358 const u8 *extra_ies, size_t extra_ies_len)
359359 {
360− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
360+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
361361 struct ieee80211_local *local = sdata->local;
362362 struct ieee80211_supported_band *sband;
363363 struct ieee80211_sta_ht_cap ht_cap;
@@ -544,7 +544,7 @@ ieee80211_tdls_add_setup_cfm_ies(struct ieee80211_sub_if_data *sdata, · 180 unmodified lines
544544 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
545545 size_t offset = 0, noffset;
546546 struct sta_info *sta, *ap_sta;
547− enum ieee80211_band band = ieee80211_get_sdata_band(sdata);
547+ enum nl80211_band band = ieee80211_get_sdata_band(sdata);
548548 u8 *pos;
549549
550550 mutex_lock(&local->sta_mtx);
@@ -611,7 +611,7 @@ ieee80211_tdls_add_setup_cfm_ies(struct ieee80211_sub_if_data *sdata, · 60 unmodified lines
611611 ieee80211_tdls_add_link_ie(sdata, skb, peer, initiator);
612612
613613 /* only include VHT-operation if not on the 2.4GHz band */
614− if (band != IEEE80211_BAND_2GHZ && sta->sta.vht_cap.vht_supported) {
614+ if (band != NL80211_BAND_2GHZ && sta->sta.vht_cap.vht_supported) {
615615 /*
616616 * if both peers support WIDER_BW, we can expand the chandef to
617617 * a wider compatible one, up to 80MHz
@@ -1773,7 +1773,7 @@ ieee80211_process_tdls_channel_switch_req(struct ieee80211_sub_if_data *sdata, · 1155 unmodified lines
17731773 u8 target_channel, oper_class;
17741774 bool local_initiator;
17751775 struct sta_info *sta;
1776− enum ieee80211_band band;
1776+ enum nl80211_band band;
17771777 struct ieee80211_tdls_data *tf = (void *)skb->data;
17781778 struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb);
17791779 int baselen = offsetof(typeof(*tf), u.chan_switch_req.variable);
@@ -1805,10 +1805,10 @@ ieee80211_process_tdls_channel_switch_req(struct ieee80211_sub_if_data *sdata, · 25 unmodified lines
18051805 if ((oper_class == 112 || oper_class == 2 || oper_class == 3 ||
18061806 oper_class == 4 || oper_class == 5 || oper_class == 6) &&
18071807 target_channel < 14)
1808− band = IEEE80211_BAND_5GHZ;
1808+ band = NL80211_BAND_5GHZ;
18091809 else
1810− band = target_channel < 14 ? IEEE80211_BAND_2GHZ :
1811− IEEE80211_BAND_5GHZ;
1810+ band = target_channel < 14 ? NL80211_BAND_2GHZ :
1811+ NL80211_BAND_5GHZ;
18121812
18131813 freq = ieee80211_channel_to_frequency(target_channel, band);
18141814 if (freq == 0) {
net/mac80211/trace.h+3−3
@@ -401,7 +401,7 @@ TRACE_EVENT(drv_bss_info_changed, · 400 unmodified lines
401401 __field(u32, sync_device_ts)
402402 __field(u8, sync_dtim_count)
403403 __field(u32, basic_rates)
404− __array(int, mcast_rate, IEEE80211_NUM_BANDS)
404+ __array(int, mcast_rate, NUM_NL80211_BANDS)
405405 __field(u16, ht_operation_mode)
406406 __field(s32, cqm_rssi_thold);
407407 __field(s32, cqm_rssi_hyst);
@@ -1265,8 +1265,8 @@ TRACE_EVENT(drv_set_bitrate_mask, · 857 unmodified lines
12651265 TP_fast_assign(
12661266 LOCAL_ASSIGN;
12671267 VIF_ASSIGN;
1268− __entry->legacy_2g = mask->control[IEEE80211_BAND_2GHZ].legacy;
1269− __entry->legacy_5g = mask->control[IEEE80211_BAND_5GHZ].legacy;
1268+ __entry->legacy_2g = mask->control[NL80211_BAND_2GHZ].legacy;
1269+ __entry->legacy_5g = mask->control[NL80211_BAND_5GHZ].legacy;
12701270 ),
12711271
12721272 TP_printk(
net/mac80211/tx.c+7−7
@@ -150,7 +150,7 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, · 149 unmodified lines
150150 rate = DIV_ROUND_UP(r->bitrate, 1 << shift);
151151
152152 switch (sband->band) {
153− case IEEE80211_BAND_2GHZ: {
153+ case NL80211_BAND_2GHZ: {
154154 u32 flag;
155155 if (tx->sdata->flags & IEEE80211_SDATA_OPERATING_GMODE)
156156 flag = IEEE80211_RATE_MANDATORY_G;
@@ -160,13 +160,13 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, · 3 unmodified lines
160160 mrate = r->bitrate;
161161 break;
162162 }
163− case IEEE80211_BAND_5GHZ:
163+ case NL80211_BAND_5GHZ:
164164 if (r->flags & IEEE80211_RATE_MANDATORY_A)
165165 mrate = r->bitrate;
166166 break;
167− case IEEE80211_BAND_60GHZ:
167+ case NL80211_BAND_60GHZ:
168168 /* TODO, for now fall through */
169− case IEEE80211_NUM_BANDS:
169+ case NUM_NL80211_BANDS:
170170 WARN_ON(1);
171171 break;
172172 }
@@ -2138,7 +2138,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, · 1965 unmodified lines
21382138 u16 info_id = 0;
21392139 struct ieee80211_chanctx_conf *chanctx_conf;
21402140 struct ieee80211_sub_if_data *ap_sdata;
2141− enum ieee80211_band band;
2141+ enum nl80211_band band;
21422142 int ret;
21432143
21442144 if (IS_ERR(sta))
@@ -3597,7 +3597,7 @@ __ieee80211_beacon_get(struct ieee80211_hw *hw, · 1452 unmodified lines
35973597 struct sk_buff *skb = NULL;
35983598 struct ieee80211_tx_info *info;
35993599 struct ieee80211_sub_if_data *sdata = NULL;
3600− enum ieee80211_band band;
3600+ enum nl80211_band band;
36013601 struct ieee80211_tx_rate_control txrc;
36023602 struct ieee80211_chanctx_conf *chanctx_conf;
36033603 int csa_off_base = 0;
@@ -4165,7 +4165,7 @@ EXPORT_SYMBOL(ieee80211_unreserve_tid); · 561 unmodified lines
41654165
41664166 void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata,
41674167 struct sk_buff *skb, int tid,
4168− enum ieee80211_band band)
4168+ enum nl80211_band band)
41694169 {
41704170 int ac = ieee802_1d_to_ac[tid & 7];
41714171
net/mac80211/util.c+12−12
@@ -59,7 +59,7 @@ void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx) · 58 unmodified lines
5959 }
6060 }
6161
62−int ieee80211_frame_duration(enum ieee80211_band band, size_t len,
62+int ieee80211_frame_duration(enum nl80211_band band, size_t len,
6363 int rate, int erp, int short_preamble,
6464 int shift)
6565 {
@@ -77,7 +77,7 @@ int ieee80211_frame_duration(enum ieee80211_band band, size_t len, · 11 unmodified lines
7777 * is assumed to be 0 otherwise.
7878 */
7979
80− if (band == IEEE80211_BAND_5GHZ || erp) {
80+ if (band == NL80211_BAND_5GHZ || erp) {
8181 /*
8282 * OFDM:
8383 *
@@ -129,7 +129,7 @@ int ieee80211_frame_duration(enum ieee80211_band band, size_t len, · 45 unmodified lines
129129 /* Exported duration function for driver use */
130130 __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
131131 struct ieee80211_vif *vif,
132− enum ieee80211_band band,
132+ enum nl80211_band band,
133133 size_t frame_len,
134134 struct ieee80211_rate *rate)
135135 {
@@ -1129,7 +1129,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, · 993 unmodified lines
11291129 rcu_read_lock();
11301130 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
11311131 use_11b = (chanctx_conf &&
1132− chanctx_conf->def.chan->band == IEEE80211_BAND_2GHZ) &&
1132+ chanctx_conf->def.chan->band == NL80211_BAND_2GHZ) &&
11331133 !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE);
11341134 rcu_read_unlock();
11351135
@@ -1301,7 +1301,7 @@ void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, · 165 unmodified lines
13011301 static int ieee80211_build_preq_ies_band(struct ieee80211_local *local,
13021302 u8 *buffer, size_t buffer_len,
13031303 const u8 *ie, size_t ie_len,
1304− enum ieee80211_band band,
1304+ enum nl80211_band band,
13051305 u32 rate_mask,
13061306 struct cfg80211_chan_def *chandef,
13071307 size_t *offset)
@@ -1375,7 +1375,7 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local, · 67 unmodified lines
13751375 pos += ext_rates_len;
13761376 }
13771377
1378− if (chandef->chan && sband->band == IEEE80211_BAND_2GHZ) {
1378+ if (chandef->chan && sband->band == NL80211_BAND_2GHZ) {
13791379 if (end - pos < 3)
13801380 goto out_err;
13811381 *pos++ = WLAN_EID_DS_PARAMS;
@@ -1479,7 +1479,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, · 97 unmodified lines
14791479
14801480 memset(ie_desc, 0, sizeof(*ie_desc));
14811481
1482− for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
1482+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
14831483 if (bands_used & BIT(i)) {
14841484 pos += ieee80211_build_preq_ies_band(local,
14851485 buffer + pos,
@@ -1522,7 +1522,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, · 36 unmodified lines
15221522 struct sk_buff *skb;
15231523 struct ieee80211_mgmt *mgmt;
15241524 int ies_len;
1525− u32 rate_masks[IEEE80211_NUM_BANDS] = {};
1525+ u32 rate_masks[NUM_NL80211_BANDS] = {};
15261526 struct ieee80211_scan_ies dummy_ie_desc;
15271527
15281528 /*
@@ -1582,7 +1582,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, · 53 unmodified lines
15821582
15831583 u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata,
15841584 struct ieee802_11_elems *elems,
1585− enum ieee80211_band band, u32 *basic_rates)
1585+ enum nl80211_band band, u32 *basic_rates)
15861586 {
15871587 struct ieee80211_supported_band *sband;
15881588 size_t num_rates;
@@ -2520,7 +2520,7 @@ int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef, · 931 unmodified lines
25202520
25212521 int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata,
25222522 struct sk_buff *skb, bool need_basic,
2523− enum ieee80211_band band)
2523+ enum nl80211_band band)
25242524 {
25252525 struct ieee80211_local *local = sdata->local;
25262526 struct ieee80211_supported_band *sband;
@@ -2565,7 +2565,7 @@ int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, · 38 unmodified lines
25652565
25662566 int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata,
25672567 struct sk_buff *skb, bool need_basic,
2568− enum ieee80211_band band)
2568+ enum nl80211_band band)
25692569 {
25702570 struct ieee80211_local *local = sdata->local;
25712571 struct ieee80211_supported_band *sband;
@@ -2711,7 +2711,7 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, · 139 unmodified lines
27112711
27122712 if (status->flag & RX_FLAG_MACTIME_PLCP_START) {
27132713 /* TODO: handle HT/VHT preambles */
2714− if (status->band == IEEE80211_BAND_5GHZ) {
2714+ if (status->band == NL80211_BAND_5GHZ) {
27152715 ts += 20 << shift;
27162716 mpdu_offset += 2;
27172717 } else if (status->flag & RX_FLAG_SHORTPRE) {
net/mac80211/vht.c+2−2
@@ -418,7 +418,7 @@ void ieee80211_sta_set_rx_nss(struct sta_info *sta) · 417 unmodified lines
418418
419419 u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
420420 struct sta_info *sta, u8 opmode,
421− enum ieee80211_band band)
421+ enum nl80211_band band)
422422 {
423423 struct ieee80211_local *local = sdata->local;
424424 struct ieee80211_supported_band *sband;
@@ -504,7 +504,7 @@ EXPORT_SYMBOL_GPL(ieee80211_update_mu_groups); · 79 unmodified lines
504504
505505 void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
506506 struct sta_info *sta, u8 opmode,
507− enum ieee80211_band band)
507+ enum nl80211_band band)
508508 {
509509 struct ieee80211_local *local = sdata->local;
510510 struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band];
net/wireless/chan.c+1−1
@@ -768,7 +768,7 @@ static bool cfg80211_ir_permissive_chan(struct wiphy *wiphy, · 767 unmodified lines
768768 if (chan == other_chan)
769769 return true;
770770
771− if (chan->band != IEEE80211_BAND_5GHZ)
771+ if (chan->band != NL80211_BAND_5GHZ)
772772 continue;
773773
774774 r1 = cfg80211_get_unii(chan->center_freq);
net/wireless/core.c+4−4
@@ -557,7 +557,7 @@ int wiphy_register(struct wiphy *wiphy) · 556 unmodified lines
557557 {
558558 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
559559 int res;
560− enum ieee80211_band band;
560+ enum nl80211_band band;
561561 struct ieee80211_supported_band *sband;
562562 bool have_band = false;
563563 int i;
@@ -647,7 +647,7 @@ int wiphy_register(struct wiphy *wiphy) · 83 unmodified lines
647647 return res;
648648
649649 /* sanity check supported bands/channels */
650− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
650+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
651651 sband = wiphy->bands[band];
652652 if (!sband)
653653 continue;
@@ -659,7 +659,7 @@ int wiphy_register(struct wiphy *wiphy) · 5 unmodified lines
659659 * on 60GHz band, there are no legacy rates, so
660660 * n_bitrates is 0
661661 */
662− if (WARN_ON(band != IEEE80211_BAND_60GHZ &&
662+ if (WARN_ON(band != NL80211_BAND_60GHZ &&
663663 !sband->n_bitrates))
664664 return -EINVAL;
665665
@@ -669,7 +669,7 @@ int wiphy_register(struct wiphy *wiphy) · 3 unmodified lines
669669 * global structure for that.
670670 */
671671 if (cfg80211_disable_40mhz_24ghz &&
672− band == IEEE80211_BAND_2GHZ &&
672+ band == NL80211_BAND_2GHZ &&
673673 sband->ht_cap.ht_supported) {
674674 sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
675675 sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
net/wireless/debugfs.c+2−2
@@ -69,7 +69,7 @@ static ssize_t ht40allow_map_read(struct file *file, · 68 unmodified lines
6969 struct wiphy *wiphy = file->private_data;
7070 char *buf;
7171 unsigned int offset = 0, buf_size = PAGE_SIZE, i, r;
72− enum ieee80211_band band;
72+ enum nl80211_band band;
7373 struct ieee80211_supported_band *sband;
7474
7575 buf = kzalloc(buf_size, GFP_KERNEL);
@@ -78,7 +78,7 @@ static ssize_t ht40allow_map_read(struct file *file, · 2 unmodified lines
7878
7979 rtnl_lock();
8080
81− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
81+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
8282 sband = wiphy->bands[band];
8383 if (!sband)
8484 continue;
net/wireless/ibss.c+3−3
@@ -104,7 +104,7 @@ static int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, · 103 unmodified lines
104104 struct ieee80211_supported_band *sband =
105105 rdev->wiphy.bands[params->chandef.chan->band];
106106 int j;
107− u32 flag = params->chandef.chan->band == IEEE80211_BAND_5GHZ ?
107+ u32 flag = params->chandef.chan->band == NL80211_BAND_5GHZ ?
108108 IEEE80211_RATE_MANDATORY_A :
109109 IEEE80211_RATE_MANDATORY_B;
110110
@@ -236,7 +236,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, · 125 unmodified lines
236236 struct wireless_dev *wdev)
237237 {
238238 struct cfg80211_cached_keys *ck = NULL;
239− enum ieee80211_band band;
239+ enum nl80211_band band;
240240 int i, err;
241241
242242 ASSERT_WDEV_LOCK(wdev);
@@ -248,7 +248,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, · 5 unmodified lines
248248 if (!wdev->wext.ibss.chandef.chan) {
249249 struct ieee80211_channel *new_chan = NULL;
250250
251− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
251+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
252252 struct ieee80211_supported_band *sband;
253253 struct ieee80211_channel *chan;
254254
net/wireless/mesh.c+2−2
@@ -128,9 +128,9 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev, · 127 unmodified lines
128128
129129 if (!setup->chandef.chan) {
130130 /* if we don't have that either, use the first usable channel */
131− enum ieee80211_band band;
131+ enum nl80211_band band;
132132
133− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
133+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
134134 struct ieee80211_supported_band *sband;
135135 struct ieee80211_channel *chan;
136136 int i;
net/wireless/mlme.c+1−1
@@ -726,7 +726,7 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work) · 725 unmodified lines
726726 wiphy = &rdev->wiphy;
727727
728728 rtnl_lock();
729− for (bandid = 0; bandid < IEEE80211_NUM_BANDS; bandid++) {
729+ for (bandid = 0; bandid < NUM_NL80211_BANDS; bandid++) {
730730 sband = wiphy->bands[bandid];
731731 if (!sband)
732732 continue;
net/wireless/nl80211.c+22−22
@@ -1277,7 +1277,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · 1276 unmodified lines
12771277 struct nlattr *nl_bands, *nl_band;
12781278 struct nlattr *nl_freqs, *nl_freq;
12791279 struct nlattr *nl_cmds;
1280− enum ieee80211_band band;
1280+ enum nl80211_band band;
12811281 struct ieee80211_channel *chan;
12821282 int i;
12831283 const struct ieee80211_txrx_stypes *mgmt_stypes =
@@ -1410,7 +1410,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · 126 unmodified lines
14101410 goto nla_put_failure;
14111411
14121412 for (band = state->band_start;
1413− band < IEEE80211_NUM_BANDS; band++) {
1413+ band < NUM_NL80211_BANDS; band++) {
14141414 struct ieee80211_supported_band *sband;
14151415
14161416 sband = rdev->wiphy.bands[band];
@@ -1472,7 +1472,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · 55 unmodified lines
14721472 }
14731473 nla_nest_end(msg, nl_bands);
14741474
1475− if (band < IEEE80211_NUM_BANDS)
1475+ if (band < NUM_NL80211_BANDS)
14761476 state->band_start = band + 1;
14771477 else
14781478 state->band_start = 0;
@@ -3493,7 +3493,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) · 2014 unmodified lines
34933493 }
34943494
34953495 params.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]);
3496− if (params.pbss && !rdev->wiphy.bands[IEEE80211_BAND_60GHZ])
3496+ if (params.pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ])
34973497 return -EOPNOTSUPP;
34983498
34993499 wdev_lock(wdev);
@@ -5821,9 +5821,9 @@ static int validate_scan_freqs(struct nlattr *freqs) · 2321 unmodified lines
58215821 return n_channels;
58225822 }
58235823
5824−static bool is_band_valid(struct wiphy *wiphy, enum ieee80211_band b)
5824+static bool is_band_valid(struct wiphy *wiphy, enum nl80211_band b)
58255825 {
5826− return b < IEEE80211_NUM_BANDS && wiphy->bands[b];
5826+ return b < NUM_NL80211_BANDS && wiphy->bands[b];
58275827 }
58285828
58295829 static int parse_bss_select(struct nlattr *nla, struct wiphy *wiphy,
@@ -6018,10 +6018,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) · 188 unmodified lines
60186018 i++;
60196019 }
60206020 } else {
6021− enum ieee80211_band band;
6021+ enum nl80211_band band;
60226022
60236023 /* all channels */
6024− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
6024+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
60256025 int j;
60266026 if (!wiphy->bands[band])
60276027 continue;
@@ -6066,7 +6066,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) · 38 unmodified lines
60666066 request->ie_len);
60676067 }
60686068
6069− for (i = 0; i < IEEE80211_NUM_BANDS; i++)
6069+ for (i = 0; i < NUM_NL80211_BANDS; i++)
60706070 if (wiphy->bands[i])
60716071 request->rates[i] =
60726072 (1 << wiphy->bands[i]->n_bitrates) - 1;
@@ -6075,9 +6075,9 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) · 2 unmodified lines
60756075 nla_for_each_nested(attr,
60766076 info->attrs[NL80211_ATTR_SCAN_SUPP_RATES],
60776077 tmp) {
6078− enum ieee80211_band band = nla_type(attr);
6078+ enum nl80211_band band = nla_type(attr);
60796079
6080− if (band < 0 || band >= IEEE80211_NUM_BANDS) {
6080+ if (band < 0 || band >= NUM_NL80211_BANDS) {
60816081 err = -EINVAL;
60826082 goto out_free;
60836083 }
@@ -6265,7 +6265,7 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, · 181 unmodified lines
62656265 struct cfg80211_sched_scan_request *request;
62666266 struct nlattr *attr;
62676267 int err, tmp, n_ssids = 0, n_match_sets = 0, n_channels, i, n_plans = 0;
6268− enum ieee80211_band band;
6268+ enum nl80211_band band;
62696269 size_t ie_len;
62706270 struct nlattr *tb[NL80211_SCHED_SCAN_MATCH_ATTR_MAX + 1];
62716271 s32 default_match_rssi = NL80211_SCAN_RSSI_THOLD_OFF;
@@ -6430,7 +6430,7 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, · 158 unmodified lines
64306430 }
64316431 } else {
64326432 /* all channels */
6433− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
6433+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
64346434 int j;
64356435 if (!wiphy->bands[band])
64366436 continue;
@@ -7538,14 +7538,14 @@ static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info) · 1101 unmodified lines
75387538
75397539 static bool
75407540 nl80211_parse_mcast_rate(struct cfg80211_registered_device *rdev,
7541− int mcast_rate[IEEE80211_NUM_BANDS],
7541+ int mcast_rate[NUM_NL80211_BANDS],
75427542 int rateval)
75437543 {
75447544 struct wiphy *wiphy = &rdev->wiphy;
75457545 bool found = false;
75467546 int band, i;
75477547
7548− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
7548+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
75497549 struct ieee80211_supported_band *sband;
75507550
75517551 sband = wiphy->bands[band];
@@ -7725,7 +7725,7 @@ static int nl80211_set_mcast_rate(struct sk_buff *skb, struct genl_info *info) · 173 unmodified lines
77257725 {
77267726 struct cfg80211_registered_device *rdev = info->user_ptr[0];
77277727 struct net_device *dev = info->user_ptr[1];
7728− int mcast_rate[IEEE80211_NUM_BANDS];
7728+ int mcast_rate[NUM_NL80211_BANDS];
77297729 u32 nla_rate;
77307730 int err;
77317731
@@ -8130,7 +8130,7 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) · 398 unmodified lines
81308130 }
81318131
81328132 connect.pbss = nla_get_flag(info->attrs[NL80211_ATTR_PBSS]);
8133− if (connect.pbss && !rdev->wiphy.bands[IEEE80211_BAND_60GHZ]) {
8133+ if (connect.pbss && !rdev->wiphy.bands[NL80211_BAND_60GHZ]) {
81348134 kzfree(connkeys);
81358135 return -EOPNOTSUPP;
81368136 }
@@ -8550,7 +8550,7 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, · 413 unmodified lines
85508550
85518551 memset(&mask, 0, sizeof(mask));
85528552 /* Default to all rates enabled */
8553− for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
8553+ for (i = 0; i < NUM_NL80211_BANDS; i++) {
85548554 sband = rdev->wiphy.bands[i];
85558555
85568556 if (!sband)
@@ -8574,14 +8574,14 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, · 17 unmodified lines
85748574
85758575 /*
85768576 * The nested attribute uses enum nl80211_band as the index. This maps
8577− * directly to the enum ieee80211_band values used in cfg80211.
8577+ * directly to the enum nl80211_band values used in cfg80211.
85788578 */
85798579 BUILD_BUG_ON(NL80211_MAX_SUPP_HT_RATES > IEEE80211_HT_MCS_MASK_LEN * 8);
85808580 nla_for_each_nested(tx_rates, info->attrs[NL80211_ATTR_TX_RATES], rem) {
8581− enum ieee80211_band band = nla_type(tx_rates);
8581+ enum nl80211_band band = nla_type(tx_rates);
85828582 int err;
85838583
8584− if (band < 0 || band >= IEEE80211_NUM_BANDS)
8584+ if (band < 0 || band >= NUM_NL80211_BANDS)
85858585 return -EINVAL;
85868586 sband = rdev->wiphy.bands[band];
85878587 if (sband == NULL)
@@ -10746,7 +10746,7 @@ static int nl80211_tdls_channel_switch(struct sk_buff *skb, · 2158 unmodified lines
1074610746 * section 10.22.6.2.1. Disallow 5/10Mhz channels as well for now, the
1074710747 * specification is not defined for them.
1074810748 */
10749− if (chandef.chan->band == IEEE80211_BAND_2GHZ &&
10749+ if (chandef.chan->band == NL80211_BAND_2GHZ &&
1075010750 chandef.width != NL80211_CHAN_WIDTH_20_NOHT &&
1075110751 chandef.width != NL80211_CHAN_WIDTH_20)
1075210752 return -EINVAL;
net/wireless/rdev-ops.h+1−1
@@ -1048,7 +1048,7 @@ rdev_start_radar_detection(struct cfg80211_registered_device *rdev, · 1047 unmodified lines
10481048 static inline int
10491049 rdev_set_mcast_rate(struct cfg80211_registered_device *rdev,
10501050 struct net_device *dev,
1051− int mcast_rate[IEEE80211_NUM_BANDS])
1051+ int mcast_rate[NUM_NL80211_BANDS])
10521052 {
10531053 int ret = -ENOTSUPP;
10541054
net/wireless/reg.c+15−15
@@ -1546,12 +1546,12 @@ static void reg_process_ht_flags_band(struct wiphy *wiphy, · 1545 unmodified lines
15461546
15471547 static void reg_process_ht_flags(struct wiphy *wiphy)
15481548 {
1549− enum ieee80211_band band;
1549+ enum nl80211_band band;
15501550
15511551 if (!wiphy)
15521552 return;
15531553
1554− for (band = 0; band < IEEE80211_NUM_BANDS; band++)
1554+ for (band = 0; band < NUM_NL80211_BANDS; band++)
15551555 reg_process_ht_flags_band(wiphy, wiphy->bands[band]);
15561556 }
15571557
@@ -1673,7 +1673,7 @@ static void reg_check_channels(void) · 115 unmodified lines
16731673 static void wiphy_update_regulatory(struct wiphy *wiphy,
16741674 enum nl80211_reg_initiator initiator)
16751675 {
1676− enum ieee80211_band band;
1676+ enum nl80211_band band;
16771677 struct regulatory_request *lr = get_last_request();
16781678
16791679 if (ignore_reg_update(wiphy, initiator)) {
@@ -1690,7 +1690,7 @@ static void wiphy_update_regulatory(struct wiphy *wiphy, · 10 unmodified lines
16901690
16911691 lr->dfs_region = get_cfg80211_regdom()->dfs_region;
16921692
1693− for (band = 0; band < IEEE80211_NUM_BANDS; band++)
1693+ for (band = 0; band < NUM_NL80211_BANDS; band++)
16941694 handle_band(wiphy, initiator, wiphy->bands[band]);
16951695
16961696 reg_process_beacons(wiphy);
@@ -1786,14 +1786,14 @@ static void handle_band_custom(struct wiphy *wiphy, · 89 unmodified lines
17861786 void wiphy_apply_custom_regulatory(struct wiphy *wiphy,
17871787 const struct ieee80211_regdomain *regd)
17881788 {
1789− enum ieee80211_band band;
1789+ enum nl80211_band band;
17901790 unsigned int bands_set = 0;
17911791
17921792 WARN(!(wiphy->regulatory_flags & REGULATORY_CUSTOM_REG),
17931793 "wiphy should have REGULATORY_CUSTOM_REG\n");
17941794 wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG;
17951795
1796− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
1796+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
17971797 if (!wiphy->bands[band])
17981798 continue;
17991799 handle_band_custom(wiphy, wiphy->bands[band], regd);
@@ -2228,7 +2228,7 @@ static void reg_process_self_managed_hints(void) · 428 unmodified lines
22282228 struct wiphy *wiphy;
22292229 const struct ieee80211_regdomain *tmp;
22302230 const struct ieee80211_regdomain *regd;
2231− enum ieee80211_band band;
2231+ enum nl80211_band band;
22322232 struct regulatory_request request = {};
22332233
22342234 list_for_each_entry(rdev, &cfg80211_rdev_list, list) {
@@ -2246,7 +2246,7 @@ static void reg_process_self_managed_hints(void) · 11 unmodified lines
22462246 rcu_assign_pointer(wiphy->regd, regd);
22472247 rcu_free_regdom(tmp);
22482248
2249− for (band = 0; band < IEEE80211_NUM_BANDS; band++)
2249+ for (band = 0; band < NUM_NL80211_BANDS; band++)
22502250 handle_band_custom(wiphy, wiphy->bands[band], regd);
22512251
22522252 reg_process_ht_flags(wiphy);
@@ -2404,7 +2404,7 @@ int regulatory_hint(struct wiphy *wiphy, const char *alpha2) · 151 unmodified lines
24042404 }
24052405 EXPORT_SYMBOL(regulatory_hint);
24062406
2407−void regulatory_hint_country_ie(struct wiphy *wiphy, enum ieee80211_band band,
2407+void regulatory_hint_country_ie(struct wiphy *wiphy, enum nl80211_band band,
24082408 const u8 *country_ie, u8 country_ie_len)
24092409 {
24102410 char alpha2[2];
@@ -2504,11 +2504,11 @@ static void restore_alpha2(char *alpha2, bool reset_user) · 93 unmodified lines
25042504 static void restore_custom_reg_settings(struct wiphy *wiphy)
25052505 {
25062506 struct ieee80211_supported_band *sband;
2507− enum ieee80211_band band;
2507+ enum nl80211_band band;
25082508 struct ieee80211_channel *chan;
25092509 int i;
25102510
2511− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
2511+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
25122512 sband = wiphy->bands[band];
25132513 if (!sband)
25142514 continue;
@@ -2623,9 +2623,9 @@ void regulatory_hint_disconnect(void) · 108 unmodified lines
26232623
26242624 static bool freq_is_chan_12_13_14(u16 freq)
26252625 {
2626− if (freq == ieee80211_channel_to_frequency(12, IEEE80211_BAND_2GHZ) ||
2627− freq == ieee80211_channel_to_frequency(13, IEEE80211_BAND_2GHZ) ||
2628− freq == ieee80211_channel_to_frequency(14, IEEE80211_BAND_2GHZ))
2626+ if (freq == ieee80211_channel_to_frequency(12, NL80211_BAND_2GHZ) ||
2627+ freq == ieee80211_channel_to_frequency(13, NL80211_BAND_2GHZ) ||
2628+ freq == ieee80211_channel_to_frequency(14, NL80211_BAND_2GHZ))
26292629 return true;
26302630 return false;
26312631 }
@@ -2650,7 +2650,7 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy, · 18 unmodified lines
26502650
26512651 if (beacon_chan->beacon_found ||
26522652 beacon_chan->flags & IEEE80211_CHAN_RADAR ||
2653− (beacon_chan->band == IEEE80211_BAND_2GHZ &&
2653+ (beacon_chan->band == NL80211_BAND_2GHZ &&
26542654 !freq_is_chan_12_13_14(beacon_chan->center_freq)))
26552655 return 0;
26562656
net/wireless/reg.h+1−1
@@ -104,7 +104,7 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy, · 103 unmodified lines
104104 * information for a band the BSS is not present in it will be ignored.
105105 */
106106 void regulatory_hint_country_ie(struct wiphy *wiphy,
107− enum ieee80211_band band,
107+ enum nl80211_band band,
108108 const u8 *country_ie,
109109 u8 country_ie_len);
110110
net/wireless/scan.c+7−7
@@ -531,7 +531,7 @@ static int cmp_bss(struct cfg80211_bss *a, · 530 unmodified lines
531531 }
532532
533533 static bool cfg80211_bss_type_match(u16 capability,
534− enum ieee80211_band band,
534+ enum nl80211_band band,
535535 enum ieee80211_bss_type bss_type)
536536 {
537537 bool ret = true;
@@ -540,7 +540,7 @@ static bool cfg80211_bss_type_match(u16 capability, · 2 unmodified lines
540540 if (bss_type == IEEE80211_BSS_TYPE_ANY)
541541 return ret;
542542
543− if (band == IEEE80211_BAND_60GHZ) {
543+ if (band == NL80211_BAND_60GHZ) {
544544 mask = WLAN_CAPABILITY_DMG_TYPE_MASK;
545545 switch (bss_type) {
546546 case IEEE80211_BSS_TYPE_ESS:
@@ -1006,7 +1006,7 @@ cfg80211_inform_bss_data(struct wiphy *wiphy, · 459 unmodified lines
10061006 if (!res)
10071007 return NULL;
10081008
1009− if (channel->band == IEEE80211_BAND_60GHZ) {
1009+ if (channel->band == NL80211_BAND_60GHZ) {
10101010 bss_type = res->pub.capability & WLAN_CAPABILITY_DMG_TYPE_MASK;
10111011 if (bss_type == WLAN_CAPABILITY_DMG_TYPE_AP ||
10121012 bss_type == WLAN_CAPABILITY_DMG_TYPE_PBSS)
@@ -1089,7 +1089,7 @@ cfg80211_inform_bss_frame_data(struct wiphy *wiphy, · 76 unmodified lines
10891089 if (!res)
10901090 return NULL;
10911091
1092− if (channel->band == IEEE80211_BAND_60GHZ) {
1092+ if (channel->band == NL80211_BAND_60GHZ) {
10931093 bss_type = res->pub.capability & WLAN_CAPABILITY_DMG_TYPE_MASK;
10941094 if (bss_type == WLAN_CAPABILITY_DMG_TYPE_AP ||
10951095 bss_type == WLAN_CAPABILITY_DMG_TYPE_PBSS)
@@ -1185,7 +1185,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, · 89 unmodified lines
11851185 struct iw_scan_req *wreq = NULL;
11861186 struct cfg80211_scan_request *creq = NULL;
11871187 int i, err, n_channels = 0;
1188− enum ieee80211_band band;
1188+ enum nl80211_band band;
11891189
11901190 if (!netif_running(dev))
11911191 return -ENETDOWN;
@@ -1229,7 +1229,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, · 37 unmodified lines
12291229
12301230 /* translate "Scan on frequencies" request */
12311231 i = 0;
1232− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
1232+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
12331233 int j;
12341234
12351235 if (!wiphy->bands[band])
@@ -1289,7 +1289,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, · 53 unmodified lines
12891289 creq->n_ssids = 0;
12901290 }
12911291
1292− for (i = 0; i < IEEE80211_NUM_BANDS; i++)
1292+ for (i = 0; i < NUM_NL80211_BANDS; i++)
12931293 if (wiphy->bands[i])
12941294 creq->rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1;
12951295
net/wireless/sme.c+3−3
@@ -81,7 +81,7 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) · 80 unmodified lines
8181 return -ENOMEM;
8282
8383 if (wdev->conn->params.channel) {
84− enum ieee80211_band band = wdev->conn->params.channel->band;
84+ enum nl80211_band band = wdev->conn->params.channel->band;
8585 struct ieee80211_supported_band *sband =
8686 wdev->wiphy->bands[band];
8787
@@ -93,11 +93,11 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) · 5 unmodified lines
9393 request->rates[band] = (1 << sband->n_bitrates) - 1;
9494 } else {
9595 int i = 0, j;
96− enum ieee80211_band band;
96+ enum nl80211_band band;
9797 struct ieee80211_supported_band *bands;
9898 struct ieee80211_channel *channel;
9999
100− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
100+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
101101 bands = wdev->wiphy->bands[band];
102102 if (!bands)
103103 continue;
net/wireless/trace.h+10−10
@@ -110,7 +110,7 @@ · 109 unmodified lines
110110 conf->dot11MeshHWMPconfirmationInterval; \
111111 } while (0)
112112
113−#define CHAN_ENTRY __field(enum ieee80211_band, band) \
113+#define CHAN_ENTRY __field(enum nl80211_band, band) \
114114 __field(u16, center_freq)
115115 #define CHAN_ASSIGN(chan) \
116116 do { \
@@ -125,7 +125,7 @@ · 8 unmodified lines
125125 #define CHAN_PR_FMT "band: %d, freq: %u"
126126 #define CHAN_PR_ARG __entry->band, __entry->center_freq
127127
128−#define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \
128+#define CHAN_DEF_ENTRY __field(enum nl80211_band, band) \
129129 __field(u32, control_freq) \
130130 __field(u32, width) \
131131 __field(u32, center_freq1) \
@@ -2647,7 +2647,7 @@ TRACE_EVENT(cfg80211_scan_done, · 2515 unmodified lines
26472647 TP_STRUCT__entry(
26482648 __field(u32, n_channels)
26492649 __dynamic_array(u8, ie, request ? request->ie_len : 0)
2650− __array(u32, rates, IEEE80211_NUM_BANDS)
2650+ __array(u32, rates, NUM_NL80211_BANDS)
26512651 __field(u32, wdev_id)
26522652 MAC_ENTRY(wiphy_mac)
26532653 __field(bool, no_cck)
@@ -2658,7 +2658,7 @@ TRACE_EVENT(cfg80211_scan_done, · 4 unmodified lines
26582658 memcpy(__get_dynamic_array(ie), request->ie,
26592659 request->ie_len);
26602660 memcpy(__entry->rates, request->rates,
2661− IEEE80211_NUM_BANDS);
2661+ NUM_NL80211_BANDS);
26622662 __entry->wdev_id = request->wdev ?
26632663 request->wdev->identifier : 0;
26642664 if (request->wiphy)
@@ -2883,25 +2883,25 @@ TRACE_EVENT(rdev_start_radar_detection, · 218 unmodified lines
28832883
28842884 TRACE_EVENT(rdev_set_mcast_rate,
28852885 TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
2886− int mcast_rate[IEEE80211_NUM_BANDS]),
2886+ int mcast_rate[NUM_NL80211_BANDS]),
28872887 TP_ARGS(wiphy, netdev, mcast_rate),
28882888 TP_STRUCT__entry(
28892889 WIPHY_ENTRY
28902890 NETDEV_ENTRY
2891− __array(int, mcast_rate, IEEE80211_NUM_BANDS)
2891+ __array(int, mcast_rate, NUM_NL80211_BANDS)
28922892 ),
28932893 TP_fast_assign(
28942894 WIPHY_ASSIGN;
28952895 NETDEV_ASSIGN;
28962896 memcpy(__entry->mcast_rate, mcast_rate,
2897− sizeof(int) * IEEE80211_NUM_BANDS);
2897+ sizeof(int) * NUM_NL80211_BANDS);
28982898 ),
28992899 TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", "
29002900 "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]",
29012901 WIPHY_PR_ARG, NETDEV_PR_ARG,
2902− __entry->mcast_rate[IEEE80211_BAND_2GHZ],
2903− __entry->mcast_rate[IEEE80211_BAND_5GHZ],
2904− __entry->mcast_rate[IEEE80211_BAND_60GHZ])
2902+ __entry->mcast_rate[NL80211_BAND_2GHZ],
2903+ __entry->mcast_rate[NL80211_BAND_5GHZ],
2904+ __entry->mcast_rate[NL80211_BAND_60GHZ])
29052905 );
29062906
29072907 TRACE_EVENT(rdev_set_coalesce,
net/wireless/util.c+20−20
@@ -47,7 +47,7 @@ u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband, · 46 unmodified lines
4747 if (WARN_ON(!sband))
4848 return 1;
4949
50− if (sband->band == IEEE80211_BAND_2GHZ) {
50+ if (sband->band == NL80211_BAND_2GHZ) {
5151 if (scan_width == NL80211_BSS_CHAN_WIDTH_5 ||
5252 scan_width == NL80211_BSS_CHAN_WIDTH_10)
5353 mandatory_flag = IEEE80211_RATE_MANDATORY_G;
@@ -65,26 +65,26 @@ u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband, · 11 unmodified lines
6565 }
6666 EXPORT_SYMBOL(ieee80211_mandatory_rates);
6767
68−int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band)
68+int ieee80211_channel_to_frequency(int chan, enum nl80211_band band)
6969 {
7070 /* see 802.11 17.3.8.3.2 and Annex J
7171 * there are overlapping channel numbers in 5GHz and 2GHz bands */
7272 if (chan <= 0)
7373 return 0; /* not supported */
7474 switch (band) {
75− case IEEE80211_BAND_2GHZ:
75+ case NL80211_BAND_2GHZ:
7676 if (chan == 14)
7777 return 2484;
7878 else if (chan < 14)
7979 return 2407 + chan * 5;
8080 break;
81− case IEEE80211_BAND_5GHZ:
81+ case NL80211_BAND_5GHZ:
8282 if (chan >= 182 && chan <= 196)
8383 return 4000 + chan * 5;
8484 else
8585 return 5000 + chan * 5;
8686 break;
87− case IEEE80211_BAND_60GHZ:
87+ case NL80211_BAND_60GHZ:
8888 if (chan < 5)
8989 return 56160 + chan * 2160;
9090 break;
@@ -116,11 +116,11 @@ EXPORT_SYMBOL(ieee80211_frequency_to_channel); · 25 unmodified lines
116116 struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy,
117117 int freq)
118118 {
119− enum ieee80211_band band;
119+ enum nl80211_band band;
120120 struct ieee80211_supported_band *sband;
121121 int i;
122122
123− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
123+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
124124 sband = wiphy->bands[band];
125125
126126 if (!sband)
@@ -137,12 +137,12 @@ struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, · 10 unmodified lines
137137 EXPORT_SYMBOL(__ieee80211_get_channel);
138138
139139 static void set_mandatory_flags_band(struct ieee80211_supported_band *sband,
140− enum ieee80211_band band)
140+ enum nl80211_band band)
141141 {
142142 int i, want;
143143
144144 switch (band) {
145− case IEEE80211_BAND_5GHZ:
145+ case NL80211_BAND_5GHZ:
146146 want = 3;
147147 for (i = 0; i < sband->n_bitrates; i++) {
148148 if (sband->bitrates[i].bitrate == 60 ||
@@ -155,7 +155,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, · 6 unmodified lines
155155 }
156156 WARN_ON(want);
157157 break;
158− case IEEE80211_BAND_2GHZ:
158+ case NL80211_BAND_2GHZ:
159159 want = 7;
160160 for (i = 0; i < sband->n_bitrates; i++) {
161161 if (sband->bitrates[i].bitrate == 10) {
@@ -185,12 +185,12 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, · 23 unmodified lines
185185 }
186186 WARN_ON(want != 0 && want != 3 && want != 6);
187187 break;
188− case IEEE80211_BAND_60GHZ:
188+ case NL80211_BAND_60GHZ:
189189 /* check for mandatory HT MCS 1..4 */
190190 WARN_ON(!sband->ht_cap.ht_supported);
191191 WARN_ON((sband->ht_cap.mcs.rx_mask[0] & 0x1e) != 0x1e);
192192 break;
193− case IEEE80211_NUM_BANDS:
193+ case NUM_NL80211_BANDS:
194194 WARN_ON(1);
195195 break;
196196 }
@@ -198,9 +198,9 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, · 1 unmodified line
198198
199199 void ieee80211_set_bitrate_flags(struct wiphy *wiphy)
200200 {
201− enum ieee80211_band band;
201+ enum nl80211_band band;
202202
203− for (band = 0; band < IEEE80211_NUM_BANDS; band++)
203+ for (band = 0; band < NUM_NL80211_BANDS; band++)
204204 if (wiphy->bands[band])
205205 set_mandatory_flags_band(wiphy->bands[band], band);
206206 }
@@ -1399,22 +1399,22 @@ size_t ieee80211_ie_split_ric(const u8 *ies, size_t ielen, · 1192 unmodified lines
13991399 EXPORT_SYMBOL(ieee80211_ie_split_ric);
14001400
14011401 bool ieee80211_operating_class_to_band(u8 operating_class,
1402− enum ieee80211_band *band)
1402+ enum nl80211_band *band)
14031403 {
14041404 switch (operating_class) {
14051405 case 112:
14061406 case 115 ... 127:
14071407 case 128 ... 130:
1408− *band = IEEE80211_BAND_5GHZ;
1408+ *band = NL80211_BAND_5GHZ;
14091409 return true;
14101410 case 81:
14111411 case 82:
14121412 case 83:
14131413 case 84:
1414− *band = IEEE80211_BAND_2GHZ;
1414+ *band = NL80211_BAND_2GHZ;
14151415 return true;
14161416 case 180:
1417− *band = IEEE80211_BAND_60GHZ;
1417+ *band = NL80211_BAND_60GHZ;
14181418 return true;
14191419 }
14201420
@@ -1726,10 +1726,10 @@ int ieee80211_get_ratemask(struct ieee80211_supported_band *sband, · 305 unmodified lines
17261726
17271727 unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy)
17281728 {
1729− enum ieee80211_band band;
1729+ enum nl80211_band band;
17301730 unsigned int n_channels = 0;
17311731
1732− for (band = 0; band < IEEE80211_NUM_BANDS; band++)
1732+ for (band = 0; band < NUM_NL80211_BANDS; band++)
17331733 if (wiphy->bands[band])
17341734 n_channels += wiphy->bands[band]->n_channels;
17351735
net/wireless/wext-compat.c+7−7
@@ -32,13 +32,13 @@ int cfg80211_wext_giwname(struct net_device *dev, · 31 unmodified lines
3232 if (!wdev)
3333 return -EOPNOTSUPP;
3434
35− sband = wdev->wiphy->bands[IEEE80211_BAND_5GHZ];
35+ sband = wdev->wiphy->bands[NL80211_BAND_5GHZ];
3636 if (sband) {
3737 is_a = true;
3838 is_ht |= sband->ht_cap.ht_supported;
3939 }
4040
41− sband = wdev->wiphy->bands[IEEE80211_BAND_2GHZ];
41+ sband = wdev->wiphy->bands[NL80211_BAND_2GHZ];
4242 if (sband) {
4343 int i;
4444 /* Check for mandatory rates */
@@ -143,7 +143,7 @@ int cfg80211_wext_giwrange(struct net_device *dev, · 98 unmodified lines
143143 {
144144 struct wireless_dev *wdev = dev->ieee80211_ptr;
145145 struct iw_range *range = (struct iw_range *) extra;
146− enum ieee80211_band band;
146+ enum nl80211_band band;
147147 int i, c = 0;
148148
149149 if (!wdev)
@@ -215,7 +215,7 @@ int cfg80211_wext_giwrange(struct net_device *dev, · 65 unmodified lines
215215 }
216216 }
217217
218− for (band = 0; band < IEEE80211_NUM_BANDS; band ++) {
218+ for (band = 0; band < NUM_NL80211_BANDS; band ++) {
219219 struct ieee80211_supported_band *sband;
220220
221221 sband = wdev->wiphy->bands[band];
@@ -265,11 +265,11 @@ int cfg80211_wext_freq(struct iw_freq *freq) · 43 unmodified lines
265265 * -EINVAL for impossible things.
266266 */
267267 if (freq->e == 0) {
268− enum ieee80211_band band = IEEE80211_BAND_2GHZ;
268+ enum nl80211_band band = NL80211_BAND_2GHZ;
269269 if (freq->m < 0)
270270 return 0;
271271 if (freq->m > 14)
272− band = IEEE80211_BAND_5GHZ;
272+ band = NL80211_BAND_5GHZ;
273273 return ieee80211_channel_to_frequency(freq->m, band);
274274 } else {
275275 int i, div = 1000000;
@@ -1245,7 +1245,7 @@ static int cfg80211_wext_siwrate(struct net_device *dev, · 969 unmodified lines
12451245 maxrate = rate->value / 100000;
12461246 }
12471247
1248− for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
1248+ for (band = 0; band < NUM_NL80211_BANDS; band++) {
12491249 sband = wdev->wiphy->bands[band];
12501250 if (sband == NULL)
12511251 continue;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t