@@ -482,7 +482,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
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)
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,
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,
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,
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,
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,
24262426
24272427static 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,
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,
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,
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)
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)
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)
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)
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)
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)
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,
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 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
64246424
64256425static bool
64266426ath10k_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,
64436443
64446444static bool
64456445ath10k_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,
64926492
64936493static int
64946494ath10k_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,
65936593
65946594static bool
65956595ath10k_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,
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 = {
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 = {
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)
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)
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 @@ int ath10k_mac_register(struct ath10k *ar)
78157815 ar -> dfs_detector -> exit (ar -> dfs_detector );
78167816
78177817err_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)
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}
0 commit comments