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. ====================
Unified · Split
| @@ -75,7 +75,6 @@ · 74 unmodified lines | ||
| 75 | 75 | <chapter> |
| 76 | 76 | <title>Device registration</title> |
| 77 | 77 | !Pinclude/net/cfg80211.h Device registration |
| 78 | −!Finclude/net/cfg80211.h ieee80211_band | |
| 79 | 78 | !Finclude/net/cfg80211.h ieee80211_channel_flags |
| 80 | 79 | !Finclude/net/cfg80211.h ieee80211_channel |
| 81 | 80 | !Finclude/net/cfg80211.h ieee80211_rate_flags |
| @@ -440,7 +440,7 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev) · 439 unmodified lines | ||
| 440 | 440 | rx_status.rate_idx = rate; |
| 441 | 441 | |
| 442 | 442 | rx_status.freq = adm8211_channels[priv->channel - 1].center_freq; |
| 443 | − rx_status.band = IEEE80211_BAND_2GHZ; | |
| 443 | + rx_status.band = NL80211_BAND_2GHZ; | |
| 444 | 444 | |
| 445 | 445 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); |
| 446 | 446 | ieee80211_rx_irqsafe(dev, skb); |
| @@ -1894,7 +1894,7 @@ static int adm8211_probe(struct pci_dev *pdev, · 1447 unmodified lines | ||
| 1894 | 1894 | |
| 1895 | 1895 | priv->channel = 1; |
| 1896 | 1896 | |
| 1897 | − dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | |
| 1897 | + dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; | |
| 1898 | 1898 | |
| 1899 | 1899 | err = ieee80211_register_hw(dev); |
| 1900 | 1900 | if (err) { |
| @@ -1471,12 +1471,12 @@ static int ar5523_init_modes(struct ar5523 *ar) · 1470 unmodified lines | ||
| 1471 | 1471 | memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels)); |
| 1472 | 1472 | memcpy(ar->rates, ar5523_rates, sizeof(ar5523_rates)); |
| 1473 | 1473 | |
| 1474 | − ar->band.band = IEEE80211_BAND_2GHZ; | |
| 1474 | + ar->band.band = NL80211_BAND_2GHZ; | |
| 1475 | 1475 | ar->band.channels = ar->channels; |
| 1476 | 1476 | ar->band.n_channels = ARRAY_SIZE(ar5523_channels); |
| 1477 | 1477 | ar->band.bitrates = ar->rates; |
| 1478 | 1478 | 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; | |
| 1480 | 1480 | return 0; |
| 1481 | 1481 | } |
| 1482 | 1482 | |
| @@ -185,7 +185,7 @@ struct ath_common { · 184 unmodified lines | ||
| 185 | 185 | bool bt_ant_diversity; |
| 186 | 186 | |
| 187 | 187 | int last_rssi; |
| 188 | − struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; | |
| 188 | + struct ieee80211_supported_band sbands[NUM_NL80211_BANDS]; | |
| 189 | 189 | }; |
| 190 | 190 | |
| 191 | 191 | static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common) |
| @@ -765,7 +765,7 @@ struct ath10k { · 764 unmodified lines | ||
| 765 | 765 | } scan; |
| 766 | 766 | |
| 767 | 767 | struct { |
| 768 | − struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; | |
| 768 | + struct ieee80211_supported_band sbands[NUM_NL80211_BANDS]; | |
| 769 | 769 | } mac; |
| 770 | 770 | |
| 771 | 771 | /* should never be NULL; needed for regular htt rx */ |
| @@ -2182,9 +2182,9 @@ static void ath10k_htt_rx_tx_mode_switch_ind(struct ath10k *ar, · 2181 unmodified lines | ||
| 2182 | 2182 | ath10k_mac_tx_push_pending(ar); |
| 2183 | 2183 | } |
| 2184 | 2184 | |
| 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) | |
| 2186 | 2186 | { |
| 2187 | − enum ieee80211_band band; | |
| 2187 | + enum nl80211_band band; | |
| 2188 | 2188 | |
| 2189 | 2189 | switch (phy_mode) { |
| 2190 | 2190 | case MODE_11A: |
| @@ -2193,7 +2193,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) · 2 unmodified lines | ||
| 2193 | 2193 | case MODE_11AC_VHT20: |
| 2194 | 2194 | case MODE_11AC_VHT40: |
| 2195 | 2195 | case MODE_11AC_VHT80: |
| 2196 | − band = IEEE80211_BAND_5GHZ; | |
| 2196 | + band = NL80211_BAND_5GHZ; | |
| 2197 | 2197 | break; |
| 2198 | 2198 | case MODE_11G: |
| 2199 | 2199 | case MODE_11B: |
| @@ -2204,7 +2204,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) · 4 unmodified lines | ||
| 2204 | 2204 | case MODE_11AC_VHT40_2G: |
| 2205 | 2205 | case MODE_11AC_VHT80_2G: |
| 2206 | 2206 | default: |
| 2207 | − band = IEEE80211_BAND_2GHZ; | |
| 2207 | + band = NL80211_BAND_2GHZ; | |
| 2208 | 2208 | } |
| 2209 | 2209 | |
| 2210 | 2210 | return band; |
| @@ -482,7 +482,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) · 481 unmodified lines | ||
| 482 | 482 | enum wmi_phy_mode phymode = MODE_UNKNOWN; |
| 483 | 483 | |
| 484 | 484 | switch (chandef->chan->band) { |
| 485 | − case IEEE80211_BAND_2GHZ: | |
| 485 | + case NL80211_BAND_2GHZ: | |
| 486 | 486 | switch (chandef->width) { |
| 487 | 487 | case NL80211_CHAN_WIDTH_20_NOHT: |
| 488 | 488 | if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM) |
| @@ -505,7 +505,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) · 16 unmodified lines | ||
| 505 | 505 | break; |
| 506 | 506 | } |
| 507 | 507 | break; |
| 508 | − case IEEE80211_BAND_5GHZ: | |
| 508 | + case NL80211_BAND_5GHZ: | |
| 509 | 509 | switch (chandef->width) { |
| 510 | 510 | case NL80211_CHAN_WIDTH_20_NOHT: |
| 511 | 511 | phymode = MODE_11A; |
| @@ -2055,7 +2055,7 @@ static void ath10k_peer_assoc_h_rates(struct ath10k *ar, · 1543 unmodified lines | ||
| 2055 | 2055 | struct cfg80211_chan_def def; |
| 2056 | 2056 | const struct ieee80211_supported_band *sband; |
| 2057 | 2057 | const struct ieee80211_rate *rates; |
| 2058 | − enum ieee80211_band band; | |
| 2058 | + enum nl80211_band band; | |
| 2059 | 2059 | u32 ratemask; |
| 2060 | 2060 | u8 rate; |
| 2061 | 2061 | int i; |
| @@ -2115,7 +2115,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, · 53 unmodified lines | ||
| 2115 | 2115 | const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; |
| 2116 | 2116 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 2117 | 2117 | struct cfg80211_chan_def def; |
| 2118 | − enum ieee80211_band band; | |
| 2118 | + enum nl80211_band band; | |
| 2119 | 2119 | const u8 *ht_mcs_mask; |
| 2120 | 2120 | const u16 *vht_mcs_mask; |
| 2121 | 2121 | int i, n; |
| @@ -2339,7 +2339,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, · 217 unmodified lines | ||
| 2339 | 2339 | const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; |
| 2340 | 2340 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 2341 | 2341 | struct cfg80211_chan_def def; |
| 2342 | − enum ieee80211_band band; | |
| 2342 | + enum nl80211_band band; | |
| 2343 | 2343 | const u16 *vht_mcs_mask; |
| 2344 | 2344 | u8 ampdu_factor; |
| 2345 | 2345 | |
| @@ -2357,7 +2357,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, · 11 unmodified lines | ||
| 2357 | 2357 | |
| 2358 | 2358 | arg->peer_flags |= ar->wmi.peer_flags->vht; |
| 2359 | 2359 | |
| 2360 | − if (def.chan->band == IEEE80211_BAND_2GHZ) | |
| 2360 | + if (def.chan->band == NL80211_BAND_2GHZ) | |
| 2361 | 2361 | arg->peer_flags |= ar->wmi.peer_flags->vht_2g; |
| 2362 | 2362 | |
| 2363 | 2363 | arg->peer_vht_caps = vht_cap->cap; |
| @@ -2426,7 +2426,7 @@ static void ath10k_peer_assoc_h_qos(struct ath10k *ar, · 62 unmodified lines | ||
| 2426 | 2426 | |
| 2427 | 2427 | static bool ath10k_mac_sta_has_ofdm_only(struct ieee80211_sta *sta) |
| 2428 | 2428 | { |
| 2429 | − return sta->supp_rates[IEEE80211_BAND_2GHZ] >> | |
| 2429 | + return sta->supp_rates[NL80211_BAND_2GHZ] >> | |
| 2430 | 2430 | ATH10K_MAC_FIRST_OFDM_RATE_IDX; |
| 2431 | 2431 | } |
| 2432 | 2432 | |
| @@ -2437,7 +2437,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, · 4 unmodified lines | ||
| 2437 | 2437 | { |
| 2438 | 2438 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 2439 | 2439 | struct cfg80211_chan_def def; |
| 2440 | − enum ieee80211_band band; | |
| 2440 | + enum nl80211_band band; | |
| 2441 | 2441 | const u8 *ht_mcs_mask; |
| 2442 | 2442 | const u16 *vht_mcs_mask; |
| 2443 | 2443 | enum wmi_phy_mode phymode = MODE_UNKNOWN; |
| @@ -2450,7 +2450,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, · 6 unmodified lines | ||
| 2450 | 2450 | vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs; |
| 2451 | 2451 | |
| 2452 | 2452 | switch (band) { |
| 2453 | − case IEEE80211_BAND_2GHZ: | |
| 2453 | + case NL80211_BAND_2GHZ: | |
| 2454 | 2454 | if (sta->vht_cap.vht_supported && |
| 2455 | 2455 | !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) { |
| 2456 | 2456 | 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 | ||
| 2470 | 2470 | } |
| 2471 | 2471 | |
| 2472 | 2472 | break; |
| 2473 | − case IEEE80211_BAND_5GHZ: | |
| 2473 | + case NL80211_BAND_5GHZ: | |
| 2474 | 2474 | /* |
| 2475 | 2475 | * Check VHT first. |
| 2476 | 2476 | */ |
| @@ -2848,7 +2848,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 371 unmodified lines | ||
| 2848 | 2848 | { |
| 2849 | 2849 | struct ieee80211_hw *hw = ar->hw; |
| 2850 | 2850 | struct ieee80211_supported_band **bands; |
| 2851 | − enum ieee80211_band band; | |
| 2851 | + enum nl80211_band band; | |
| 2852 | 2852 | struct ieee80211_channel *channel; |
| 2853 | 2853 | struct wmi_scan_chan_list_arg arg = {0}; |
| 2854 | 2854 | struct wmi_channel_arg *ch; |
| @@ -2860,7 +2860,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 5 unmodified lines | ||
| 2860 | 2860 | lockdep_assert_held(&ar->conf_mutex); |
| 2861 | 2861 | |
| 2862 | 2862 | bands = hw->wiphy->bands; |
| 2863 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 2863 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 2864 | 2864 | if (!bands[band]) |
| 2865 | 2865 | continue; |
| 2866 | 2866 | |
| @@ -2879,7 +2879,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 12 unmodified lines | ||
| 2879 | 2879 | return -ENOMEM; |
| 2880 | 2880 | |
| 2881 | 2881 | ch = arg.channels; |
| 2882 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 2882 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 2883 | 2883 | if (!bands[band]) |
| 2884 | 2884 | continue; |
| 2885 | 2885 | |
| @@ -2917,7 +2917,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) · 31 unmodified lines | ||
| 2917 | 2917 | /* FIXME: why use only legacy modes, why not any |
| 2918 | 2918 | * HT/VHT modes? Would that even make any |
| 2919 | 2919 | * difference? */ |
| 2920 | − if (channel->band == IEEE80211_BAND_2GHZ) | |
| 2920 | + if (channel->band == NL80211_BAND_2GHZ) | |
| 2921 | 2921 | ch->mode = MODE_11G; |
| 2922 | 2922 | else |
| 2923 | 2923 | ch->mode = MODE_11A; |
| @@ -4254,14 +4254,14 @@ static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar) · 1330 unmodified lines | ||
| 4254 | 4254 | vht_cap = ath10k_create_vht_cap(ar); |
| 4255 | 4255 | |
| 4256 | 4256 | if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { |
| 4257 | − band = &ar->mac.sbands[IEEE80211_BAND_2GHZ]; | |
| 4257 | + band = &ar->mac.sbands[NL80211_BAND_2GHZ]; | |
| 4258 | 4258 | band->ht_cap = ht_cap; |
| 4259 | 4259 | |
| 4260 | 4260 | /* Enable the VHT support at 2.4 GHz */ |
| 4261 | 4261 | band->vht_cap = vht_cap; |
| 4262 | 4262 | } |
| 4263 | 4263 | if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { |
| 4264 | − band = &ar->mac.sbands[IEEE80211_BAND_5GHZ]; | |
| 4264 | + band = &ar->mac.sbands[NL80211_BAND_5GHZ]; | |
| 4265 | 4265 | band->ht_cap = ht_cap; |
| 4266 | 4266 | band->vht_cap = vht_cap; |
| 4267 | 4267 | } |
| @@ -5595,7 +5595,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) · 1327 unmodified lines | ||
| 5595 | 5595 | struct ath10k_sta *arsta; |
| 5596 | 5596 | struct ieee80211_sta *sta; |
| 5597 | 5597 | struct cfg80211_chan_def def; |
| 5598 | − enum ieee80211_band band; | |
| 5598 | + enum nl80211_band band; | |
| 5599 | 5599 | const u8 *ht_mcs_mask; |
| 5600 | 5600 | const u16 *vht_mcs_mask; |
| 5601 | 5601 | u32 changed, bw, nss, smps; |
| @@ -6394,14 +6394,14 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, · 792 unmodified lines | ||
| 6394 | 6394 | |
| 6395 | 6395 | mutex_lock(&ar->conf_mutex); |
| 6396 | 6396 | |
| 6397 | − sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 6397 | + sband = hw->wiphy->bands[NL80211_BAND_2GHZ]; | |
| 6398 | 6398 | if (sband && idx >= sband->n_channels) { |
| 6399 | 6399 | idx -= sband->n_channels; |
| 6400 | 6400 | sband = NULL; |
| 6401 | 6401 | } |
| 6402 | 6402 | |
| 6403 | 6403 | if (!sband) |
| 6404 | − sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 6404 | + sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; | |
| 6405 | 6405 | |
| 6406 | 6406 | if (!sband || idx >= sband->n_channels) { |
| 6407 | 6407 | ret = -ENOENT; |
| @@ -6424,7 +6424,7 @@ exit: · 16 unmodified lines | ||
| 6424 | 6424 | |
| 6425 | 6425 | static bool |
| 6426 | 6426 | ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, |
| 6427 | − enum ieee80211_band band, | |
| 6427 | + enum nl80211_band band, | |
| 6428 | 6428 | const struct cfg80211_bitrate_mask *mask) |
| 6429 | 6429 | { |
| 6430 | 6430 | int num_rates = 0; |
| @@ -6443,7 +6443,7 @@ ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, · 12 unmodified lines | ||
| 6443 | 6443 | |
| 6444 | 6444 | static bool |
| 6445 | 6445 | ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, |
| 6446 | − enum ieee80211_band band, | |
| 6446 | + enum nl80211_band band, | |
| 6447 | 6447 | const struct cfg80211_bitrate_mask *mask, |
| 6448 | 6448 | int *nss) |
| 6449 | 6449 | { |
| @@ -6492,7 +6492,7 @@ ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, · 42 unmodified lines | ||
| 6492 | 6492 | |
| 6493 | 6493 | static int |
| 6494 | 6494 | ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar, |
| 6495 | − enum ieee80211_band band, | |
| 6495 | + enum nl80211_band band, | |
| 6496 | 6496 | const struct cfg80211_bitrate_mask *mask, |
| 6497 | 6497 | u8 *rate, u8 *nss) |
| 6498 | 6498 | { |
| @@ -6593,7 +6593,7 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif, · 94 unmodified lines | ||
| 6593 | 6593 | |
| 6594 | 6594 | static bool |
| 6595 | 6595 | ath10k_mac_can_set_bitrate_mask(struct ath10k *ar, |
| 6596 | − enum ieee80211_band band, | |
| 6596 | + enum nl80211_band band, | |
| 6597 | 6597 | const struct cfg80211_bitrate_mask *mask) |
| 6598 | 6598 | { |
| 6599 | 6599 | int i; |
| @@ -6645,7 +6645,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, · 45 unmodified lines | ||
| 6645 | 6645 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 6646 | 6646 | struct cfg80211_chan_def def; |
| 6647 | 6647 | struct ath10k *ar = arvif->ar; |
| 6648 | − enum ieee80211_band band; | |
| 6648 | + enum nl80211_band band; | |
| 6649 | 6649 | const u8 *ht_mcs_mask; |
| 6650 | 6650 | const u16 *vht_mcs_mask; |
| 6651 | 6651 | u8 rate; |
| @@ -7275,7 +7275,7 @@ static const struct ieee80211_ops ath10k_ops = { · 623 unmodified lines | ||
| 7275 | 7275 | }; |
| 7276 | 7276 | |
| 7277 | 7277 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 7278 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 7278 | + .band = NL80211_BAND_2GHZ, \ | |
| 7279 | 7279 | .hw_value = (_channel), \ |
| 7280 | 7280 | .center_freq = (_freq), \ |
| 7281 | 7281 | .flags = (_flags), \ |
| @@ -7284,7 +7284,7 @@ static const struct ieee80211_ops ath10k_ops = { · 2 unmodified lines | ||
| 7284 | 7284 | } |
| 7285 | 7285 | |
| 7286 | 7286 | #define CHAN5G(_channel, _freq, _flags) { \ |
| 7287 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 7287 | + .band = NL80211_BAND_5GHZ, \ | |
| 7288 | 7288 | .hw_value = (_channel), \ |
| 7289 | 7289 | .center_freq = (_freq), \ |
| 7290 | 7290 | .flags = (_flags), \ |
| @@ -7604,13 +7604,13 @@ int ath10k_mac_register(struct ath10k *ar) · 313 unmodified lines | ||
| 7604 | 7604 | goto err_free; |
| 7605 | 7605 | } |
| 7606 | 7606 | |
| 7607 | − band = &ar->mac.sbands[IEEE80211_BAND_2GHZ]; | |
| 7607 | + band = &ar->mac.sbands[NL80211_BAND_2GHZ]; | |
| 7608 | 7608 | band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels); |
| 7609 | 7609 | band->channels = channels; |
| 7610 | 7610 | band->n_bitrates = ath10k_g_rates_size; |
| 7611 | 7611 | band->bitrates = ath10k_g_rates; |
| 7612 | 7612 | |
| 7613 | − ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = band; | |
| 7613 | + ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = band; | |
| 7614 | 7614 | } |
| 7615 | 7615 | |
| 7616 | 7616 | if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { |
| @@ -7622,12 +7622,12 @@ int ath10k_mac_register(struct ath10k *ar) · 5 unmodified lines | ||
| 7622 | 7622 | goto err_free; |
| 7623 | 7623 | } |
| 7624 | 7624 | |
| 7625 | − band = &ar->mac.sbands[IEEE80211_BAND_5GHZ]; | |
| 7625 | + band = &ar->mac.sbands[NL80211_BAND_5GHZ]; | |
| 7626 | 7626 | band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels); |
| 7627 | 7627 | band->channels = channels; |
| 7628 | 7628 | band->n_bitrates = ath10k_a_rates_size; |
| 7629 | 7629 | band->bitrates = ath10k_a_rates; |
| 7630 | − ar->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band; | |
| 7630 | + ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band; | |
| 7631 | 7631 | } |
| 7632 | 7632 | |
| 7633 | 7633 | ath10k_mac_setup_ht_vht_cap(ar); |
| @@ -7815,8 +7815,8 @@ err_dfs_detector_exit: · 181 unmodified lines | ||
| 7815 | 7815 | ar->dfs_detector->exit(ar->dfs_detector); |
| 7816 | 7816 | |
| 7817 | 7817 | 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); | |
| 7820 | 7820 | |
| 7821 | 7821 | SET_IEEE80211_DEV(ar->hw, NULL); |
| 7822 | 7822 | return ret; |
| @@ -7829,8 +7829,8 @@ void ath10k_mac_unregister(struct ath10k *ar) · 6 unmodified lines | ||
| 7829 | 7829 | if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) |
| 7830 | 7830 | ar->dfs_detector->exit(ar->dfs_detector); |
| 7831 | 7831 | |
| 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); | |
| 7834 | 7834 | |
| 7835 | 7835 | SET_IEEE80211_DEV(ar->hw, NULL); |
| 7836 | 7836 | } |
| @@ -2281,9 +2281,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) · 2280 unmodified lines | ||
| 2281 | 2281 | * of mgmt rx. |
| 2282 | 2282 | */ |
| 2283 | 2283 | if (channel >= 1 && channel <= 14) { |
| 2284 | − status->band = IEEE80211_BAND_2GHZ; | |
| 2284 | + status->band = NL80211_BAND_2GHZ; | |
| 2285 | 2285 | } else if (channel >= 36 && channel <= 165) { |
| 2286 | − status->band = IEEE80211_BAND_5GHZ; | |
| 2286 | + status->band = NL80211_BAND_5GHZ; | |
| 2287 | 2287 | } else { |
| 2288 | 2288 | /* Shouldn't happen unless list of advertised channels to |
| 2289 | 2289 | * mac80211 has been changed. |
| @@ -2293,7 +2293,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) · 3 unmodified lines | ||
| 2293 | 2293 | return 0; |
| 2294 | 2294 | } |
| 2295 | 2295 | |
| 2296 | − if (phy_mode == MODE_11B && status->band == IEEE80211_BAND_5GHZ) | |
| 2296 | + if (phy_mode == MODE_11B && status->band == NL80211_BAND_5GHZ) | |
| 2297 | 2297 | ath10k_dbg(ar, ATH10K_DBG_MGMT, "wmi mgmt rx 11b (CCK) on 5GHz\n"); |
| 2298 | 2298 | |
| 2299 | 2299 | sband = &ar->mac.sbands[status->band]; |
| @@ -2352,7 +2352,7 @@ static int freq_to_idx(struct ath10k *ar, int freq) · 52 unmodified lines | ||
| 2352 | 2352 | struct ieee80211_supported_band *sband; |
| 2353 | 2353 | int band, ch, idx = 0; |
| 2354 | 2354 | |
| 2355 | − for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) { | |
| 2355 | + for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) { | |
| 2356 | 2356 | sband = ar->hw->wiphy->bands[band]; |
| 2357 | 2357 | if (!sband) |
| 2358 | 2358 | continue; |
| @@ -279,7 +279,7 @@ ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as, · 278 unmodified lines | ||
| 279 | 279 | if (as->firstep_level < ATH5K_ANI_MAX_FIRSTEP_LVL) |
| 280 | 280 | ath5k_ani_set_firstep_level(ah, as->firstep_level + 1); |
| 281 | 281 | return; |
| 282 | − } else if (ah->ah_current_channel->band == IEEE80211_BAND_2GHZ) { | |
| 282 | + } else if (ah->ah_current_channel->band == NL80211_BAND_2GHZ) { | |
| 283 | 283 | /* beacon RSSI is low. in B/G mode turn of OFDM weak signal |
| 284 | 284 | * detect and zero firstep level to maximize CCK sensitivity */ |
| 285 | 285 | ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI, |
| @@ -1265,10 +1265,10 @@ struct ath5k_hw { · 1264 unmodified lines | ||
| 1265 | 1265 | void __iomem *iobase; /* address of the device */ |
| 1266 | 1266 | struct mutex lock; /* dev-level lock */ |
| 1267 | 1267 | 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]; | |
| 1269 | 1269 | 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]; | |
| 1272 | 1272 | enum nl80211_iftype opmode; |
| 1273 | 1273 | |
| 1274 | 1274 | #ifdef CONFIG_ATH5K_DEBUG |
| @@ -1532,7 +1532,7 @@ int ath5k_eeprom_mode_from_channel(struct ath5k_hw *ah, · 257 unmodified lines | ||
| 1532 | 1532 | |
| 1533 | 1533 | /* Protocol Control Unit Functions */ |
| 1534 | 1534 | /* 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, | |
| 1536 | 1536 | int len, struct ieee80211_rate *rate, bool shortpre); |
| 1537 | 1537 | unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah); |
| 1538 | 1538 | 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 | ||
| 1611 | 1611 | |
| 1612 | 1612 | /* PHY functions */ |
| 1613 | 1613 | /* 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); | |
| 1615 | 1615 | int ath5k_hw_phy_disable(struct ath5k_hw *ah); |
| 1616 | 1616 | /* Gain_F optimization */ |
| 1617 | 1617 | enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah); |
| @@ -152,7 +152,7 @@ int ath5k_hw_init(struct ath5k_hw *ah) · 151 unmodified lines | ||
| 152 | 152 | ah->ah_phy_revision = ath5k_hw_reg_read(ah, AR5K_PHY_CHIP_ID) & |
| 153 | 153 | 0xffffffff; |
| 154 | 154 | ah->ah_radio_5ghz_revision = ath5k_hw_radio_revision(ah, |
| 155 | − IEEE80211_BAND_5GHZ); | |
| 155 | + NL80211_BAND_5GHZ); | |
| 156 | 156 | |
| 157 | 157 | /* Try to identify radio chip based on its srev */ |
| 158 | 158 | switch (ah->ah_radio_5ghz_revision & 0xf0) { |
| @@ -160,14 +160,14 @@ int ath5k_hw_init(struct ath5k_hw *ah) · 1 unmodified line | ||
| 160 | 160 | ah->ah_radio = AR5K_RF5111; |
| 161 | 161 | ah->ah_single_chip = false; |
| 162 | 162 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, |
| 163 | − IEEE80211_BAND_2GHZ); | |
| 163 | + NL80211_BAND_2GHZ); | |
| 164 | 164 | break; |
| 165 | 165 | case AR5K_SREV_RAD_5112: |
| 166 | 166 | case AR5K_SREV_RAD_2112: |
| 167 | 167 | ah->ah_radio = AR5K_RF5112; |
| 168 | 168 | ah->ah_single_chip = false; |
| 169 | 169 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, |
| 170 | − IEEE80211_BAND_2GHZ); | |
| 170 | + NL80211_BAND_2GHZ); | |
| 171 | 171 | break; |
| 172 | 172 | case AR5K_SREV_RAD_2413: |
| 173 | 173 | ah->ah_radio = AR5K_RF2413; |
| @@ -204,7 +204,7 @@ int ath5k_hw_init(struct ath5k_hw *ah) · 30 unmodified lines | ||
| 204 | 204 | ah->ah_radio = AR5K_RF5111; |
| 205 | 205 | ah->ah_single_chip = false; |
| 206 | 206 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, |
| 207 | − IEEE80211_BAND_2GHZ); | |
| 207 | + NL80211_BAND_2GHZ); | |
| 208 | 208 | } else if (ah->ah_mac_version == (AR5K_SREV_AR2425 >> 4) || |
| 209 | 209 | ah->ah_mac_version == (AR5K_SREV_AR2417 >> 4) || |
| 210 | 210 | ah->ah_phy_revision == AR5K_SREV_PHY_2425) { |
| @@ -268,15 +268,15 @@ static void ath5k_reg_notifier(struct wiphy *wiphy, · 267 unmodified lines | ||
| 268 | 268 | * Returns true for the channel numbers used. |
| 269 | 269 | */ |
| 270 | 270 | #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) | |
| 272 | 272 | { |
| 273 | 273 | return true; |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | #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) | |
| 278 | 278 | { |
| 279 | − if (band == IEEE80211_BAND_2GHZ && chan <= 14) | |
| 279 | + if (band == NL80211_BAND_2GHZ && chan <= 14) | |
| 280 | 280 | return true; |
| 281 | 281 | |
| 282 | 282 | return /* UNII 1,2 */ |
| @@ -297,18 +297,18 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels, · 14 unmodified lines | ||
| 297 | 297 | unsigned int mode, unsigned int max) |
| 298 | 298 | { |
| 299 | 299 | unsigned int count, size, freq, ch; |
| 300 | − enum ieee80211_band band; | |
| 300 | + enum nl80211_band band; | |
| 301 | 301 | |
| 302 | 302 | switch (mode) { |
| 303 | 303 | case AR5K_MODE_11A: |
| 304 | 304 | /* 1..220, but 2GHz frequencies are filtered by check_channel */ |
| 305 | 305 | size = 220; |
| 306 | − band = IEEE80211_BAND_5GHZ; | |
| 306 | + band = NL80211_BAND_5GHZ; | |
| 307 | 307 | break; |
| 308 | 308 | case AR5K_MODE_11B: |
| 309 | 309 | case AR5K_MODE_11G: |
| 310 | 310 | size = 26; |
| 311 | − band = IEEE80211_BAND_2GHZ; | |
| 311 | + band = NL80211_BAND_2GHZ; | |
| 312 | 312 | break; |
| 313 | 313 | default: |
| 314 | 314 | ATH5K_WARN(ah, "bad mode, not copying channels\n"); |
| @@ -363,13 +363,13 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 48 unmodified lines | ||
| 363 | 363 | int max_c, count_c = 0; |
| 364 | 364 | int i; |
| 365 | 365 | |
| 366 | − BUILD_BUG_ON(ARRAY_SIZE(ah->sbands) < IEEE80211_NUM_BANDS); | |
| 366 | + BUILD_BUG_ON(ARRAY_SIZE(ah->sbands) < NUM_NL80211_BANDS); | |
| 367 | 367 | max_c = ARRAY_SIZE(ah->channels); |
| 368 | 368 | |
| 369 | 369 | /* 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]; | |
| 373 | 373 | |
| 374 | 374 | if (test_bit(AR5K_MODE_11G, ah->ah_capabilities.cap_mode)) { |
| 375 | 375 | /* G mode */ |
| @@ -381,7 +381,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 5 unmodified lines | ||
| 381 | 381 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, |
| 382 | 382 | AR5K_MODE_11G, max_c); |
| 383 | 383 | |
| 384 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband; | |
| 384 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = sband; | |
| 385 | 385 | count_c = sband->n_channels; |
| 386 | 386 | max_c -= count_c; |
| 387 | 387 | } 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 | ||
| 407 | 407 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, |
| 408 | 408 | AR5K_MODE_11B, max_c); |
| 409 | 409 | |
| 410 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband; | |
| 410 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = sband; | |
| 411 | 411 | count_c = sband->n_channels; |
| 412 | 412 | max_c -= count_c; |
| 413 | 413 | } |
| @@ -415,9 +415,9 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 1 unmodified line | ||
| 415 | 415 | |
| 416 | 416 | /* 5GHz band, A mode */ |
| 417 | 417 | 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]; | |
| 421 | 421 | |
| 422 | 422 | memcpy(sband->bitrates, &ath5k_rates[4], |
| 423 | 423 | sizeof(struct ieee80211_rate) * 8); |
| @@ -427,7 +427,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) · 3 unmodified lines | ||
| 427 | 427 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, |
| 428 | 428 | AR5K_MODE_11A, max_c); |
| 429 | 429 | |
| 430 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; | |
| 430 | + hw->wiphy->bands[NL80211_BAND_5GHZ] = sband; | |
| 431 | 431 | } |
| 432 | 432 | ath5k_setup_rate_idx(ah, sband); |
| 433 | 433 | |
| @@ -1043,14 +1043,14 @@ ath5k_debug_dump_bands(struct ath5k_hw *ah) · 1042 unmodified lines | ||
| 1043 | 1043 | |
| 1044 | 1044 | BUG_ON(!ah->sbands); |
| 1045 | 1045 | |
| 1046 | − for (b = 0; b < IEEE80211_NUM_BANDS; b++) { | |
| 1046 | + for (b = 0; b < NUM_NL80211_BANDS; b++) { | |
| 1047 | 1047 | struct ieee80211_supported_band *band = &ah->sbands[b]; |
| 1048 | 1048 | char bname[6]; |
| 1049 | 1049 | switch (band->band) { |
| 1050 | − case IEEE80211_BAND_2GHZ: | |
| 1050 | + case NL80211_BAND_2GHZ: | |
| 1051 | 1051 | strcpy(bname, "2 GHz"); |
| 1052 | 1052 | break; |
| 1053 | − case IEEE80211_BAND_5GHZ: | |
| 1053 | + case NL80211_BAND_5GHZ: | |
| 1054 | 1054 | strcpy(bname, "5 GHz"); |
| 1055 | 1055 | break; |
| 1056 | 1056 | default: |
| @@ -110,7 +110,7 @@ static const unsigned int ack_rates_high[] = · 109 unmodified lines | ||
| 110 | 110 | * bwmodes. |
| 111 | 111 | */ |
| 112 | 112 | 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, | |
| 114 | 114 | int len, struct ieee80211_rate *rate, bool shortpre) |
| 115 | 115 | { |
| 116 | 116 | int sifs, preamble, plcp_bits, sym_time; |
| @@ -221,7 +221,7 @@ ath5k_hw_get_default_sifs(struct ath5k_hw *ah) · 104 unmodified lines | ||
| 221 | 221 | case AR5K_BWMODE_DEFAULT: |
| 222 | 222 | sifs = AR5K_INIT_SIFS_DEFAULT_BG; |
| 223 | 223 | default: |
| 224 | − if (channel->band == IEEE80211_BAND_5GHZ) | |
| 224 | + if (channel->band == NL80211_BAND_5GHZ) | |
| 225 | 225 | sifs = AR5K_INIT_SIFS_DEFAULT_A; |
| 226 | 226 | break; |
| 227 | 227 | } |
| @@ -279,7 +279,7 @@ ath5k_hw_write_rate_duration(struct ath5k_hw *ah) · 51 unmodified lines | ||
| 279 | 279 | struct ieee80211_rate *rate; |
| 280 | 280 | unsigned int i; |
| 281 | 281 | /* 802.11g covers both OFDM and CCK */ |
| 282 | − u8 band = IEEE80211_BAND_2GHZ; | |
| 282 | + u8 band = NL80211_BAND_2GHZ; | |
| 283 | 283 | |
| 284 | 284 | /* Write rate duration table */ |
| 285 | 285 | for (i = 0; i < ah->sbands[band].n_bitrates; i++) { |
| @@ -75,13 +75,13 @@ · 74 unmodified lines | ||
| 75 | 75 | /** |
| 76 | 76 | * ath5k_hw_radio_revision() - Get the PHY Chip revision |
| 77 | 77 | * @ah: The &struct ath5k_hw |
| 78 | − * @band: One of enum ieee80211_band | |
| 78 | + * @band: One of enum nl80211_band | |
| 79 | 79 | * |
| 80 | 80 | * Returns the revision number of a 2GHz, 5GHz or single chip |
| 81 | 81 | * radio. |
| 82 | 82 | */ |
| 83 | 83 | 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) | |
| 85 | 85 | { |
| 86 | 86 | unsigned int i; |
| 87 | 87 | u32 srev; |
| @@ -91,10 +91,10 @@ ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band) · 3 unmodified lines | ||
| 91 | 91 | * Set the radio chip access register |
| 92 | 92 | */ |
| 93 | 93 | switch (band) { |
| 94 | − case IEEE80211_BAND_2GHZ: | |
| 94 | + case NL80211_BAND_2GHZ: | |
| 95 | 95 | ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_2GHZ, AR5K_PHY(0)); |
| 96 | 96 | break; |
| 97 | − case IEEE80211_BAND_5GHZ: | |
| 97 | + case NL80211_BAND_5GHZ: | |
| 98 | 98 | ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_5GHZ, AR5K_PHY(0)); |
| 99 | 99 | break; |
| 100 | 100 | default: |
| @@ -138,11 +138,11 @@ ath5k_channel_ok(struct ath5k_hw *ah, struct ieee80211_channel *channel) · 37 unmodified lines | ||
| 138 | 138 | u16 freq = channel->center_freq; |
| 139 | 139 | |
| 140 | 140 | /* Check if the channel is in our supported range */ |
| 141 | − if (channel->band == IEEE80211_BAND_2GHZ) { | |
| 141 | + if (channel->band == NL80211_BAND_2GHZ) { | |
| 142 | 142 | if ((freq >= ah->ah_capabilities.cap_range.range_2ghz_min) && |
| 143 | 143 | (freq <= ah->ah_capabilities.cap_range.range_2ghz_max)) |
| 144 | 144 | return true; |
| 145 | − } else if (channel->band == IEEE80211_BAND_5GHZ) | |
| 145 | + } else if (channel->band == NL80211_BAND_5GHZ) | |
| 146 | 146 | if ((freq >= ah->ah_capabilities.cap_range.range_5ghz_min) && |
| 147 | 147 | (freq <= ah->ah_capabilities.cap_range.range_5ghz_max)) |
| 148 | 148 | return true; |
| @@ -743,7 +743,7 @@ done: · 594 unmodified lines | ||
| 743 | 743 | /** |
| 744 | 744 | * ath5k_hw_rfgain_init() - Write initial RF gain settings to hw |
| 745 | 745 | * @ah: The &struct ath5k_hw |
| 746 | − * @band: One of enum ieee80211_band | |
| 746 | + * @band: One of enum nl80211_band | |
| 747 | 747 | * |
| 748 | 748 | * Write initial RF gain table to set the RF sensitivity. |
| 749 | 749 | * |
| @@ -751,7 +751,7 @@ done: · 1 unmodified line | ||
| 751 | 751 | * with Gain_F calibration |
| 752 | 752 | */ |
| 753 | 753 | 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) | |
| 755 | 755 | { |
| 756 | 756 | const struct ath5k_ini_rfgain *ath5k_rfg; |
| 757 | 757 | unsigned int i, size, index; |
| @@ -786,7 +786,7 @@ ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum ieee80211_band band) · 28 unmodified lines | ||
| 786 | 786 | return -EINVAL; |
| 787 | 787 | } |
| 788 | 788 | |
| 789 | − index = (band == IEEE80211_BAND_2GHZ) ? 1 : 0; | |
| 789 | + index = (band == NL80211_BAND_2GHZ) ? 1 : 0; | |
| 790 | 790 | |
| 791 | 791 | for (i = 0; i < size; i++) { |
| 792 | 792 | AR5K_REG_WAIT(i); |
| @@ -917,7 +917,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, · 124 unmodified lines | ||
| 917 | 917 | } |
| 918 | 918 | |
| 919 | 919 | /* Set Output and Driver bias current (OB/DB) */ |
| 920 | − if (channel->band == IEEE80211_BAND_2GHZ) { | |
| 920 | + if (channel->band == NL80211_BAND_2GHZ) { | |
| 921 | 921 | |
| 922 | 922 | if (channel->hw_value == AR5K_MODE_11B) |
| 923 | 923 | ee_mode = AR5K_EEPROM_MODE_11B; |
| @@ -944,7 +944,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, · 20 unmodified lines | ||
| 944 | 944 | AR5K_RF_DB_2GHZ, true); |
| 945 | 945 | |
| 946 | 946 | /* 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) || | |
| 948 | 948 | (ah->ah_radio == AR5K_RF5111)) { |
| 949 | 949 | |
| 950 | 950 | /* For 11a, Turbo and XR we need to choose |
| @@ -1145,7 +1145,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, · 194 unmodified lines | ||
| 1145 | 1145 | } |
| 1146 | 1146 | |
| 1147 | 1147 | if (ah->ah_radio == AR5K_RF5413 && |
| 1148 | − channel->band == IEEE80211_BAND_2GHZ) { | |
| 1148 | + channel->band == NL80211_BAND_2GHZ) { | |
| 1149 | 1149 | |
| 1150 | 1150 | ath5k_hw_rfb_op(ah, rf_regs, 1, AR5K_RF_DERBY_CHAN_SEL_MODE, |
| 1151 | 1151 | true); |
| @@ -1270,7 +1270,7 @@ ath5k_hw_rf5111_channel(struct ath5k_hw *ah, · 118 unmodified lines | ||
| 1270 | 1270 | */ |
| 1271 | 1271 | data0 = data1 = 0; |
| 1272 | 1272 | |
| 1273 | − if (channel->band == IEEE80211_BAND_2GHZ) { | |
| 1273 | + if (channel->band == NL80211_BAND_2GHZ) { | |
| 1274 | 1274 | /* Map 2GHz channel to 5GHz Atheros channel ID */ |
| 1275 | 1275 | ret = ath5k_hw_rf5111_chan2athchan( |
| 1276 | 1276 | ieee80211_frequency_to_channel(channel->center_freq), |
| @@ -1919,7 +1919,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah, · 642 unmodified lines | ||
| 1919 | 1919 | /* Convert current frequency to fbin value (the same way channels |
| 1920 | 1920 | * are stored on EEPROM, check out ath5k_eeprom_bin2freq) and scale |
| 1921 | 1921 | * up by 2 so we can compare it later */ |
| 1922 | − if (channel->band == IEEE80211_BAND_2GHZ) { | |
| 1922 | + if (channel->band == NL80211_BAND_2GHZ) { | |
| 1923 | 1923 | chan_fbin = (channel->center_freq - 2300) * 10; |
| 1924 | 1924 | freq_band = AR5K_EEPROM_BAND_2GHZ; |
| 1925 | 1925 | } else { |
| @@ -1983,7 +1983,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah, · 57 unmodified lines | ||
| 1983 | 1983 | symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 4; |
| 1984 | 1984 | break; |
| 1985 | 1985 | default: |
| 1986 | − if (channel->band == IEEE80211_BAND_5GHZ) { | |
| 1986 | + if (channel->band == NL80211_BAND_5GHZ) { | |
| 1987 | 1987 | /* Both sample_freq and chip_freq are 40MHz */ |
| 1988 | 1988 | spur_delta_phase = (spur_offset << 17) / 25; |
| 1989 | 1989 | spur_freq_sigma_delta = |
| @@ -559,7 +559,7 @@ ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue) · 558 unmodified lines | ||
| 559 | 559 | int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time) |
| 560 | 560 | { |
| 561 | 561 | struct ieee80211_channel *channel = ah->ah_current_channel; |
| 562 | − enum ieee80211_band band; | |
| 562 | + enum nl80211_band band; | |
| 563 | 563 | struct ieee80211_supported_band *sband; |
| 564 | 564 | struct ieee80211_rate *rate; |
| 565 | 565 | 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 | ||
| 596 | 596 | * |
| 597 | 597 | * Also we have different lowest rate for 802.11a |
| 598 | 598 | */ |
| 599 | − if (channel->band == IEEE80211_BAND_5GHZ) | |
| 600 | − band = IEEE80211_BAND_5GHZ; | |
| 599 | + if (channel->band == NL80211_BAND_5GHZ) | |
| 600 | + band = NL80211_BAND_5GHZ; | |
| 601 | 601 | else |
| 602 | − band = IEEE80211_BAND_2GHZ; | |
| 602 | + band = NL80211_BAND_2GHZ; | |
| 603 | 603 | |
| 604 | 604 | switch (ah->ah_bwmode) { |
| 605 | 605 | case AR5K_BWMODE_5MHZ: |
| @@ -752,7 +752,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel) · 751 unmodified lines | ||
| 752 | 752 | clock = AR5K_PHY_PLL_RF5111; /*Zero*/ |
| 753 | 753 | } |
| 754 | 754 | |
| 755 | − if (channel->band == IEEE80211_BAND_2GHZ) { | |
| 755 | + if (channel->band == NL80211_BAND_2GHZ) { | |
| 756 | 756 | mode |= AR5K_PHY_MODE_FREQ_2GHZ; |
| 757 | 757 | clock |= AR5K_PHY_PLL_44MHZ; |
| 758 | 758 | |
| @@ -771,7 +771,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel) · 12 unmodified lines | ||
| 771 | 771 | else |
| 772 | 772 | mode |= AR5K_PHY_MODE_MOD_DYN; |
| 773 | 773 | } |
| 774 | − } else if (channel->band == IEEE80211_BAND_5GHZ) { | |
| 774 | + } else if (channel->band == NL80211_BAND_5GHZ) { | |
| 775 | 775 | mode |= (AR5K_PHY_MODE_FREQ_5GHZ | |
| 776 | 776 | AR5K_PHY_MODE_MOD_OFDM); |
| 777 | 777 | |
| @@ -906,7 +906,7 @@ ath5k_hw_tweak_initval_settings(struct ath5k_hw *ah, · 128 unmodified lines | ||
| 906 | 906 | u32 data; |
| 907 | 907 | ath5k_hw_reg_write(ah, AR5K_PHY_CCKTXCTL_WORLD, |
| 908 | 908 | AR5K_PHY_CCKTXCTL); |
| 909 | − if (channel->band == IEEE80211_BAND_5GHZ) | |
| 909 | + if (channel->band == NL80211_BAND_5GHZ) | |
| 910 | 910 | data = 0xffb81020; |
| 911 | 911 | else |
| 912 | 912 | data = 0xffb80d20; |
| @@ -34,7 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 37 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 37 | + .band = NL80211_BAND_2GHZ, \ | |
| 38 | 38 | .hw_value = (_channel), \ |
| 39 | 39 | .center_freq = (_freq), \ |
| 40 | 40 | .flags = (_flags), \ |
| @@ -43,7 +43,7 @@ · 2 unmodified lines | ||
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | #define CHAN5G(_channel, _flags) { \ |
| 46 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 46 | + .band = NL80211_BAND_5GHZ, \ | |
| 47 | 47 | .hw_value = (_channel), \ |
| 48 | 48 | .center_freq = 5000 + (5 * (_channel)), \ |
| 49 | 49 | .flags = (_flags), \ |
| @@ -2583,7 +2583,7 @@ void ath6kl_check_wow_status(struct ath6kl *ar) · 2533 unmodified lines | ||
| 2583 | 2583 | } |
| 2584 | 2584 | #endif |
| 2585 | 2585 | |
| 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, | |
| 2587 | 2587 | bool ht_enable) |
| 2588 | 2588 | { |
| 2589 | 2589 | 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 | ||
| 2594 | 2594 | if (ht_enable) { |
| 2595 | 2595 | /* Set default ht capabilities */ |
| 2596 | 2596 | htcap->ht_enable = true; |
| 2597 | − htcap->cap_info = (band == IEEE80211_BAND_2GHZ) ? | |
| 2597 | + htcap->cap_info = (band == NL80211_BAND_2GHZ) ? | |
| 2598 | 2598 | ath6kl_g_htcap : ath6kl_a_htcap; |
| 2599 | 2599 | htcap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K; |
| 2600 | 2600 | } else /* Disable ht */ |
| @@ -2609,7 +2609,7 @@ static int ath6kl_restore_htcap(struct ath6kl_vif *vif) · 8 unmodified lines | ||
| 2609 | 2609 | struct wiphy *wiphy = vif->ar->wiphy; |
| 2610 | 2610 | int band, ret = 0; |
| 2611 | 2611 | |
| 2612 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 2612 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 2613 | 2613 | if (!wiphy->bands[band]) |
| 2614 | 2614 | continue; |
| 2615 | 2615 | |
| @@ -3530,7 +3530,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy, · 914 unmodified lines | ||
| 3530 | 3530 | struct regulatory_request *request) |
| 3531 | 3531 | { |
| 3532 | 3532 | struct ath6kl *ar = wiphy_priv(wiphy); |
| 3533 | − u32 rates[IEEE80211_NUM_BANDS]; | |
| 3533 | + u32 rates[NUM_NL80211_BANDS]; | |
| 3534 | 3534 | int ret, i; |
| 3535 | 3535 | |
| 3536 | 3536 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
| @@ -3555,7 +3555,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy, · 18 unmodified lines | ||
| 3555 | 3555 | * changed. |
| 3556 | 3556 | */ |
| 3557 | 3557 | |
| 3558 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) | |
| 3558 | + for (i = 0; i < NUM_NL80211_BANDS; i++) | |
| 3559 | 3559 | if (wiphy->bands[i]) |
| 3560 | 3560 | rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1; |
| 3561 | 3561 | |
| @@ -3791,8 +3791,8 @@ struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name, · 229 unmodified lines | ||
| 3791 | 3791 | vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL; |
| 3792 | 3792 | vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME; |
| 3793 | 3793 | 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; | |
| 3796 | 3796 | |
| 3797 | 3797 | memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN); |
| 3798 | 3798 | if (fw_vif_idx != 0) { |
| @@ -3943,9 +3943,9 @@ int ath6kl_cfg80211_init(struct ath6kl *ar) · 144 unmodified lines | ||
| 3943 | 3943 | wiphy->available_antennas_rx = ar->hw.rx_ant; |
| 3944 | 3944 | |
| 3945 | 3945 | if (band_2gig) |
| 3946 | − wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz; | |
| 3946 | + wiphy->bands[NL80211_BAND_2GHZ] = &ath6kl_band_2ghz; | |
| 3947 | 3947 | if (band_5gig) |
| 3948 | − wiphy->bands[IEEE80211_BAND_5GHZ] = &ath6kl_band_5ghz; | |
| 3948 | + wiphy->bands[NL80211_BAND_5GHZ] = &ath6kl_band_5ghz; | |
| 3949 | 3949 | |
| 3950 | 3950 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; |
| 3951 | 3951 | |
| @@ -623,7 +623,7 @@ struct ath6kl_vif { · 622 unmodified lines | ||
| 623 | 623 | struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1]; |
| 624 | 624 | struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1]; |
| 625 | 625 | struct aggr_info *aggr_cntxt; |
| 626 | − struct ath6kl_htcap htcap[IEEE80211_NUM_BANDS]; | |
| 626 | + struct ath6kl_htcap htcap[NUM_NL80211_BANDS]; | |
| 627 | 627 | |
| 628 | 628 | struct timer_list disconnect_timer; |
| 629 | 629 | struct timer_list sched_scan_timer; |
| @@ -2048,7 +2048,7 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx, · 2047 unmodified lines | ||
| 2048 | 2048 | sc->no_cck = cpu_to_le32(no_cck); |
| 2049 | 2049 | sc->num_ch = num_chan; |
| 2050 | 2050 | |
| 2051 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 2051 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 2052 | 2052 | sband = ar->wiphy->bands[band]; |
| 2053 | 2053 | |
| 2054 | 2054 | if (!sband) |
| @@ -2770,10 +2770,10 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, · 715 unmodified lines | ||
| 2770 | 2770 | memset(&ratemask, 0, sizeof(ratemask)); |
| 2771 | 2771 | |
| 2772 | 2772 | /* 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++) { | |
| 2774 | 2774 | /* copy legacy rate mask */ |
| 2775 | 2775 | ratemask[band] = mask->control[band].legacy; |
| 2776 | − if (band == IEEE80211_BAND_5GHZ) | |
| 2776 | + if (band == NL80211_BAND_5GHZ) | |
| 2777 | 2777 | ratemask[band] = |
| 2778 | 2778 | mask->control[band].legacy << 4; |
| 2779 | 2779 | |
| @@ -2799,9 +2799,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, · 19 unmodified lines | ||
| 2799 | 2799 | if (mode == WMI_RATES_MODE_11A || |
| 2800 | 2800 | mode == WMI_RATES_MODE_11A_HT20 || |
| 2801 | 2801 | mode == WMI_RATES_MODE_11A_HT40) |
| 2802 | − band = IEEE80211_BAND_5GHZ; | |
| 2802 | + band = NL80211_BAND_5GHZ; | |
| 2803 | 2803 | else |
| 2804 | − band = IEEE80211_BAND_2GHZ; | |
| 2804 | + band = NL80211_BAND_2GHZ; | |
| 2805 | 2805 | cmd->ratemask[mode] = cpu_to_le64(ratemask[band]); |
| 2806 | 2806 | } |
| 2807 | 2807 | |
| @@ -2822,10 +2822,10 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx, · 14 unmodified lines | ||
| 2822 | 2822 | memset(&ratemask, 0, sizeof(ratemask)); |
| 2823 | 2823 | |
| 2824 | 2824 | /* 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++) { | |
| 2826 | 2826 | /* copy legacy rate mask */ |
| 2827 | 2827 | ratemask[band] = mask->control[band].legacy; |
| 2828 | − if (band == IEEE80211_BAND_5GHZ) | |
| 2828 | + if (band == NL80211_BAND_5GHZ) | |
| 2829 | 2829 | ratemask[band] = |
| 2830 | 2830 | mask->control[band].legacy << 4; |
| 2831 | 2831 | |
| @@ -2849,9 +2849,9 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx, · 17 unmodified lines | ||
| 2849 | 2849 | if (mode == WMI_RATES_MODE_11A || |
| 2850 | 2850 | mode == WMI_RATES_MODE_11A_HT20 || |
| 2851 | 2851 | mode == WMI_RATES_MODE_11A_HT40) |
| 2852 | − band = IEEE80211_BAND_5GHZ; | |
| 2852 | + band = NL80211_BAND_5GHZ; | |
| 2853 | 2853 | else |
| 2854 | − band = IEEE80211_BAND_2GHZ; | |
| 2854 | + band = NL80211_BAND_2GHZ; | |
| 2855 | 2855 | cmd->ratemask[mode] = cpu_to_le32(ratemask[band]); |
| 2856 | 2856 | } |
| 2857 | 2857 | |
| @@ -3174,7 +3174,7 @@ int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx, · 316 unmodified lines | ||
| 3174 | 3174 | } |
| 3175 | 3175 | |
| 3176 | 3176 | int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, |
| 3177 | − enum ieee80211_band band, | |
| 3177 | + enum nl80211_band band, | |
| 3178 | 3178 | struct ath6kl_htcap *htcap) |
| 3179 | 3179 | { |
| 3180 | 3180 | struct sk_buff *skb; |
| @@ -3187,7 +3187,7 @@ int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, · 6 unmodified lines | ||
| 3187 | 3187 | cmd = (struct wmi_set_htcap_cmd *) skb->data; |
| 3188 | 3188 | |
| 3189 | 3189 | /* |
| 3190 | − * NOTE: Band in firmware matches enum ieee80211_band, it is unlikely | |
| 3190 | + * NOTE: Band in firmware matches enum nl80211_band, it is unlikely | |
| 3191 | 3191 | * this will be changed in firmware. If at all there is any change in |
| 3192 | 3192 | * band value, the host needs to be fixed. |
| 3193 | 3193 | */ |
| @@ -2628,7 +2628,7 @@ int ath6kl_wmi_set_wmm_txop(struct wmi *wmi, u8 if_idx, enum wmi_txop_cfg cfg); · 2627 unmodified lines | ||
| 2628 | 2628 | int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx, |
| 2629 | 2629 | u8 keep_alive_intvl); |
| 2630 | 2630 | int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, |
| 2631 | − enum ieee80211_band band, | |
| 2631 | + enum nl80211_band band, | |
| 2632 | 2632 | struct ath6kl_htcap *htcap); |
| 2633 | 2633 | int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len); |
| 2634 | 2634 | |
| @@ -145,14 +145,14 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah, · 144 unmodified lines | ||
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | static bool ath9k_hw_get_nf_thresh(struct ath_hw *ah, |
| 148 | − enum ieee80211_band band, | |
| 148 | + enum nl80211_band band, | |
| 149 | 149 | int16_t *nft) |
| 150 | 150 | { |
| 151 | 151 | switch (band) { |
| 152 | − case IEEE80211_BAND_5GHZ: | |
| 152 | + case NL80211_BAND_5GHZ: | |
| 153 | 153 | *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_5); |
| 154 | 154 | break; |
| 155 | − case IEEE80211_BAND_2GHZ: | |
| 155 | + case NL80211_BAND_2GHZ: | |
| 156 | 156 | *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_2); |
| 157 | 157 | break; |
| 158 | 158 | default: |
| @@ -107,9 +107,9 @@ void ath_chanctx_init(struct ath_softc *sc) · 106 unmodified lines | ||
| 107 | 107 | struct ieee80211_channel *chan; |
| 108 | 108 | int i, j; |
| 109 | 109 | |
| 110 | − sband = &common->sbands[IEEE80211_BAND_2GHZ]; | |
| 110 | + sband = &common->sbands[NL80211_BAND_2GHZ]; | |
| 111 | 111 | if (!sband->n_channels) |
| 112 | − sband = &common->sbands[IEEE80211_BAND_5GHZ]; | |
| 112 | + sband = &common->sbands[NL80211_BAND_5GHZ]; | |
| 113 | 113 | |
| 114 | 114 | chan = &sband->channels[0]; |
| 115 | 115 | for (i = 0; i < ATH9K_NUM_CHANCTX; i++) { |
| @@ -1333,9 +1333,9 @@ void ath9k_offchannel_init(struct ath_softc *sc) · 1217 unmodified lines | ||
| 1333 | 1333 | struct ieee80211_channel *chan; |
| 1334 | 1334 | int i; |
| 1335 | 1335 | |
| 1336 | − sband = &common->sbands[IEEE80211_BAND_2GHZ]; | |
| 1336 | + sband = &common->sbands[NL80211_BAND_2GHZ]; | |
| 1337 | 1337 | if (!sband->n_channels) |
| 1338 | − sband = &common->sbands[IEEE80211_BAND_5GHZ]; | |
| 1338 | + sband = &common->sbands[NL80211_BAND_5GHZ]; | |
| 1339 | 1339 | |
| 1340 | 1340 | chan = &sband->channels[0]; |
| 1341 | 1341 | |
| @@ -19,14 +19,14 @@ · 18 unmodified lines | ||
| 19 | 19 | #include "common.h" |
| 20 | 20 | |
| 21 | 21 | #define CHAN2G(_freq, _idx) { \ |
| 22 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 22 | + .band = NL80211_BAND_2GHZ, \ | |
| 23 | 23 | .center_freq = (_freq), \ |
| 24 | 24 | .hw_value = (_idx), \ |
| 25 | 25 | .max_power = 20, \ |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | #define CHAN5G(_freq, _idx) { \ |
| 29 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 29 | + .band = NL80211_BAND_5GHZ, \ | |
| 30 | 30 | .center_freq = (_freq), \ |
| 31 | 31 | .hw_value = (_idx), \ |
| 32 | 32 | .max_power = 20, \ |
| @@ -139,12 +139,12 @@ int ath9k_cmn_init_channels_rates(struct ath_common *common) · 106 unmodified lines | ||
| 139 | 139 | |
| 140 | 140 | memcpy(channels, ath9k_2ghz_chantable, |
| 141 | 141 | 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 = | |
| 145 | 145 | 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 = | |
| 148 | 148 | ARRAY_SIZE(ath9k_legacy_rates); |
| 149 | 149 | } |
| 150 | 150 | |
| @@ -156,13 +156,13 @@ int ath9k_cmn_init_channels_rates(struct ath_common *common) · 5 unmodified lines | ||
| 156 | 156 | |
| 157 | 157 | memcpy(channels, ath9k_5ghz_chantable, |
| 158 | 158 | 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 = | |
| 162 | 162 | ARRAY_SIZE(ath9k_5ghz_chantable); |
| 163 | − common->sbands[IEEE80211_BAND_5GHZ].bitrates = | |
| 163 | + common->sbands[NL80211_BAND_5GHZ].bitrates = | |
| 164 | 164 | ath9k_legacy_rates + 4; |
| 165 | − common->sbands[IEEE80211_BAND_5GHZ].n_bitrates = | |
| 165 | + common->sbands[NL80211_BAND_5GHZ].n_bitrates = | |
| 166 | 166 | ARRAY_SIZE(ath9k_legacy_rates) - 4; |
| 167 | 167 | } |
| 168 | 168 | return 0; |
| @@ -236,9 +236,9 @@ void ath9k_cmn_reload_chainmask(struct ath_hw *ah) · 67 unmodified lines | ||
| 236 | 236 | |
| 237 | 237 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
| 238 | 238 | ath9k_cmn_setup_ht_cap(ah, |
| 239 | − &common->sbands[IEEE80211_BAND_2GHZ].ht_cap); | |
| 239 | + &common->sbands[NL80211_BAND_2GHZ].ht_cap); | |
| 240 | 240 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
| 241 | 241 | ath9k_cmn_setup_ht_cap(ah, |
| 242 | − &common->sbands[IEEE80211_BAND_5GHZ].ht_cap); | |
| 242 | + &common->sbands[NL80211_BAND_5GHZ].ht_cap); | |
| 243 | 243 | } |
| 244 | 244 | EXPORT_SYMBOL(ath9k_cmn_reload_chainmask); |
| @@ -173,7 +173,7 @@ int ath9k_cmn_process_rate(struct ath_common *common, · 172 unmodified lines | ||
| 173 | 173 | struct ieee80211_rx_status *rxs) |
| 174 | 174 | { |
| 175 | 175 | struct ieee80211_supported_band *sband; |
| 176 | − enum ieee80211_band band; | |
| 176 | + enum nl80211_band band; | |
| 177 | 177 | unsigned int i = 0; |
| 178 | 178 | struct ath_hw *ah = common->ah; |
| 179 | 179 | |
| @@ -305,7 +305,7 @@ static void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan, · 125 unmodified lines | ||
| 305 | 305 | ichan->channel = chan->center_freq; |
| 306 | 306 | ichan->chan = chan; |
| 307 | 307 | |
| 308 | − if (chan->band == IEEE80211_BAND_5GHZ) | |
| 308 | + if (chan->band == NL80211_BAND_5GHZ) | |
| 309 | 309 | flags |= CHANNEL_5GHZ; |
| 310 | 310 | |
| 311 | 311 | switch (chandef->width) { |
| @@ -139,7 +139,7 @@ void ath_debug_rate_stats(struct ath_softc *sc, · 138 unmodified lines | ||
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | 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) | |
| 143 | 143 | rstats->ofdm_stats[rxs->rate_idx - 4].ofdm_cnt++; |
| 144 | 144 | else |
| 145 | 145 | 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 | ||
| 173 | 173 | struct ath_hw *ah = sc->sc_ah; |
| 174 | 174 | struct ath_rx_rate_stats *rstats; |
| 175 | 175 | struct ieee80211_sta *sta = an->sta; |
| 176 | − enum ieee80211_band band; | |
| 176 | + enum nl80211_band band; | |
| 177 | 177 | u32 len = 0, size = 4096; |
| 178 | 178 | char *buf; |
| 179 | 179 | size_t retval; |
| @@ -206,7 +206,7 @@ static ssize_t read_file_node_recv(struct file *file, char __user *user_buf, · 26 unmodified lines | ||
| 206 | 206 | len += scnprintf(buf + len, size - len, "\n"); |
| 207 | 207 | |
| 208 | 208 | legacy: |
| 209 | − if (band == IEEE80211_BAND_2GHZ) { | |
| 209 | + if (band == NL80211_BAND_2GHZ) { | |
| 210 | 210 | PRINT_CCK_RATE("CCK-1M/LP", 0, false); |
| 211 | 211 | PRINT_CCK_RATE("CCK-2M/LP", 1, false); |
| 212 | 212 | PRINT_CCK_RATE("CCK-5.5M/LP", 2, false); |
| @@ -212,7 +212,7 @@ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb, · 211 unmodified lines | ||
| 212 | 212 | struct ieee80211_tx_rate *rates = info->status.rates; |
| 213 | 213 | |
| 214 | 214 | rate = &common->sbands[info->band].bitrates[rates[ridx].idx]; |
| 215 | − if (info->band == IEEE80211_BAND_2GHZ && | |
| 215 | + if (info->band == NL80211_BAND_2GHZ && | |
| 216 | 216 | !(rate->flags & IEEE80211_RATE_ERP_G)) |
| 217 | 217 | phy = WLAN_RC_PHY_CCK; |
| 218 | 218 | else |
| @@ -765,11 +765,11 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv, · 764 unmodified lines | ||
| 765 | 765 | sizeof(struct htc_frame_hdr) + 4; |
| 766 | 766 | |
| 767 | 767 | 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]; | |
| 770 | 770 | 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]; | |
| 773 | 773 | |
| 774 | 774 | ath9k_cmn_reload_chainmask(ah); |
| 775 | 775 | |
| @@ -1770,8 +1770,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, · 1769 unmodified lines | ||
| 1770 | 1770 | memset(&tmask, 0, sizeof(struct ath9k_htc_target_rate_mask)); |
| 1771 | 1771 | |
| 1772 | 1772 | 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); | |
| 1775 | 1775 | |
| 1776 | 1776 | WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask); |
| 1777 | 1777 | if (ret) { |
| @@ -1781,8 +1781,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, · 3 unmodified lines | ||
| 1781 | 1781 | goto out; |
| 1782 | 1782 | } |
| 1783 | 1783 | |
| 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); | |
| 1786 | 1786 | |
| 1787 | 1787 | WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask); |
| 1788 | 1788 | if (ret) { |
| @@ -1793,8 +1793,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, · 4 unmodified lines | ||
| 1793 | 1793 | } |
| 1794 | 1794 | |
| 1795 | 1795 | 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); | |
| 1798 | 1798 | out: |
| 1799 | 1799 | return ret; |
| 1800 | 1800 | } |
| @@ -494,7 +494,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv, · 493 unmodified lines | ||
| 494 | 494 | if (txs->ts_flags & ATH9K_HTC_TXSTAT_SGI) |
| 495 | 495 | rate->flags |= IEEE80211_TX_RC_SHORT_GI; |
| 496 | 496 | } else { |
| 497 | − if (cur_conf->chandef.chan->band == IEEE80211_BAND_5GHZ) | |
| 497 | + if (cur_conf->chandef.chan->band == NL80211_BAND_5GHZ) | |
| 498 | 498 | rate->idx += 4; /* No CCK rates */ |
| 499 | 499 | } |
| 500 | 500 | |
| @@ -705,9 +705,9 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc) · 704 unmodified lines | ||
| 705 | 705 | struct ath9k_channel *curchan = ah->curchan; |
| 706 | 706 | |
| 707 | 707 | 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); | |
| 709 | 709 | 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); | |
| 711 | 711 | |
| 712 | 712 | ah->curchan = curchan; |
| 713 | 713 | } |
| @@ -879,11 +879,11 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) · 165 unmodified lines | ||
| 879 | 879 | sc->ant_tx = hw->wiphy->available_antennas_tx; |
| 880 | 880 | |
| 881 | 881 | 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]; | |
| 884 | 884 | 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]; | |
| 887 | 887 | |
| 888 | 888 | #ifdef CONFIG_ATH9K_CHANNEL_CONTEXT |
| 889 | 889 | ath9k_set_mcc_capab(sc, hw); |
| @@ -1933,14 +1933,14 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx, · 1932 unmodified lines | ||
| 1933 | 1933 | if (idx == 0) |
| 1934 | 1934 | ath_update_survey_stats(sc); |
| 1935 | 1935 | |
| 1936 | − sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 1936 | + sband = hw->wiphy->bands[NL80211_BAND_2GHZ]; | |
| 1937 | 1937 | if (sband && idx >= sband->n_channels) { |
| 1938 | 1938 | idx -= sband->n_channels; |
| 1939 | 1939 | sband = NULL; |
| 1940 | 1940 | } |
| 1941 | 1941 | |
| 1942 | 1942 | if (!sband) |
| 1943 | − sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 1943 | + sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; | |
| 1944 | 1944 | |
| 1945 | 1945 | if (!sband || idx >= sband->n_channels) { |
| 1946 | 1946 | spin_unlock_bh(&common->cc_lock); |
| @@ -1112,7 +1112,7 @@ static u8 ath_get_rate_txpower(struct ath_softc *sc, struct ath_buf *bf, · 1111 unmodified lines | ||
| 1112 | 1112 | bool is_2ghz; |
| 1113 | 1113 | struct modal_eep_header *pmodal; |
| 1114 | 1114 | |
| 1115 | − is_2ghz = info->band == IEEE80211_BAND_2GHZ; | |
| 1115 | + is_2ghz = info->band == NL80211_BAND_2GHZ; | |
| 1116 | 1116 | pmodal = &eep->modalHeader[is_2ghz]; |
| 1117 | 1117 | power_ht40delta = pmodal->ht40PowerIncForPdadc; |
| 1118 | 1118 | } else { |
| @@ -1236,7 +1236,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, · 117 unmodified lines | ||
| 1236 | 1236 | |
| 1237 | 1237 | /* legacy rates */ |
| 1238 | 1238 | 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) && | |
| 1240 | 1240 | !(rate->flags & IEEE80211_RATE_ERP_G)) |
| 1241 | 1241 | phy = WLAN_RC_PHY_CCK; |
| 1242 | 1242 | else |
| @@ -48,7 +48,7 @@ int carl9170_set_dyn_sifs_ack(struct ar9170 *ar) · 47 unmodified lines | ||
| 48 | 48 | if (conf_is_ht40(&ar->hw->conf)) |
| 49 | 49 | val = 0x010a; |
| 50 | 50 | else { |
| 51 | − if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) | |
| 51 | + if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) | |
| 52 | 52 | val = 0x105; |
| 53 | 53 | else |
| 54 | 54 | val = 0x104; |
| @@ -66,7 +66,7 @@ int carl9170_set_rts_cts_rate(struct ar9170 *ar) · 11 unmodified lines | ||
| 66 | 66 | rts_rate = 0x1da; |
| 67 | 67 | cts_rate = 0x10a; |
| 68 | 68 | } else { |
| 69 | − if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) { | |
| 69 | + if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) { | |
| 70 | 70 | /* 11 mbit CCK */ |
| 71 | 71 | rts_rate = 033; |
| 72 | 72 | cts_rate = 003; |
| @@ -93,7 +93,7 @@ int carl9170_set_slot_time(struct ar9170 *ar) · 20 unmodified lines | ||
| 93 | 93 | return 0; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | − if ((ar->hw->conf.chandef.chan->band == IEEE80211_BAND_5GHZ) || | |
| 96 | + if ((ar->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ) || | |
| 97 | 97 | vif->bss_conf.use_short_slot) |
| 98 | 98 | slottime = 9; |
| 99 | 99 | |
| @@ -120,7 +120,7 @@ int carl9170_set_mac_rates(struct ar9170 *ar) · 20 unmodified lines | ||
| 120 | 120 | basic |= (vif->bss_conf.basic_rates & 0xff0) << 4; |
| 121 | 121 | rcu_read_unlock(); |
| 122 | 122 | |
| 123 | − if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_5GHZ) | |
| 123 | + if (ar->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ) | |
| 124 | 124 | mandatory = 0xff00; /* OFDM 6/9/12/18/24/36/48/54 */ |
| 125 | 125 | else |
| 126 | 126 | 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 | ||
| 512 | 512 | chains = AR9170_TX_PHY_TXCHAIN_1; |
| 513 | 513 | |
| 514 | 514 | switch (channel->band) { |
| 515 | − case IEEE80211_BAND_2GHZ: | |
| 515 | + case NL80211_BAND_2GHZ: | |
| 516 | 516 | power = ar->power_2G_ofdm[0] & 0x3f; |
| 517 | 517 | break; |
| 518 | − case IEEE80211_BAND_5GHZ: | |
| 518 | + case NL80211_BAND_5GHZ: | |
| 519 | 519 | power = ar->power_5G_leg[0] & 0x3f; |
| 520 | 520 | break; |
| 521 | 521 | default: |
| @@ -1666,7 +1666,7 @@ static int carl9170_op_get_survey(struct ieee80211_hw *hw, int idx, · 1665 unmodified lines | ||
| 1666 | 1666 | return err; |
| 1667 | 1667 | } |
| 1668 | 1668 | |
| 1669 | − for (b = 0; b < IEEE80211_NUM_BANDS; b++) { | |
| 1669 | + for (b = 0; b < NUM_NL80211_BANDS; b++) { | |
| 1670 | 1670 | band = ar->hw->wiphy->bands[b]; |
| 1671 | 1671 | |
| 1672 | 1672 | if (!band) |
| @@ -1941,13 +1941,13 @@ static int carl9170_parse_eeprom(struct ar9170 *ar) · 268 unmodified lines | ||
| 1941 | 1941 | } |
| 1942 | 1942 | |
| 1943 | 1943 | if (ar->eeprom.operating_flags & AR9170_OPFLAG_2GHZ) { |
| 1944 | − ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | |
| 1944 | + ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = | |
| 1945 | 1945 | &carl9170_band_2GHz; |
| 1946 | 1946 | chans += carl9170_band_2GHz.n_channels; |
| 1947 | 1947 | bands++; |
| 1948 | 1948 | } |
| 1949 | 1949 | if (ar->eeprom.operating_flags & AR9170_OPFLAG_5GHZ) { |
| 1950 | − ar->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | |
| 1950 | + ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = | |
| 1951 | 1951 | &carl9170_band_5GHz; |
| 1952 | 1952 | chans += carl9170_band_5GHz.n_channels; |
| 1953 | 1953 | bands++; |
| @@ -540,11 +540,11 @@ static int carl9170_init_phy_from_eeprom(struct ar9170 *ar, · 539 unmodified lines | ||
| 540 | 540 | return carl9170_regwrite_result(); |
| 541 | 541 | } |
| 542 | 542 | |
| 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) | |
| 544 | 544 | { |
| 545 | 545 | int i, err; |
| 546 | 546 | u32 val; |
| 547 | − bool is_2ghz = band == IEEE80211_BAND_2GHZ; | |
| 547 | + bool is_2ghz = band == NL80211_BAND_2GHZ; | |
| 548 | 548 | bool is_40mhz = conf_is_ht40(&ar->hw->conf); |
| 549 | 549 | |
| 550 | 550 | carl9170_regwrite_begin(ar); |
| @@ -1125,13 +1125,13 @@ static int carl9170_set_freq_cal_data(struct ar9170 *ar, · 574 unmodified lines | ||
| 1125 | 1125 | u8 f, tmp; |
| 1126 | 1126 | |
| 1127 | 1127 | switch (channel->band) { |
| 1128 | − case IEEE80211_BAND_2GHZ: | |
| 1128 | + case NL80211_BAND_2GHZ: | |
| 1129 | 1129 | f = channel->center_freq - 2300; |
| 1130 | 1130 | cal_freq_pier = ar->eeprom.cal_freq_pier_2G; |
| 1131 | 1131 | i = AR5416_NUM_2G_CAL_PIERS - 1; |
| 1132 | 1132 | break; |
| 1133 | 1133 | |
| 1134 | − case IEEE80211_BAND_5GHZ: | |
| 1134 | + case NL80211_BAND_5GHZ: | |
| 1135 | 1135 | f = (channel->center_freq - 4800) / 5; |
| 1136 | 1136 | cal_freq_pier = ar->eeprom.cal_freq_pier_5G; |
| 1137 | 1137 | i = AR5416_NUM_5G_CAL_PIERS - 1; |
| @@ -1158,12 +1158,12 @@ static int carl9170_set_freq_cal_data(struct ar9170 *ar, · 20 unmodified lines | ||
| 1158 | 1158 | int j; |
| 1159 | 1159 | |
| 1160 | 1160 | switch (channel->band) { |
| 1161 | − case IEEE80211_BAND_2GHZ: | |
| 1161 | + case NL80211_BAND_2GHZ: | |
| 1162 | 1162 | cal_pier_data = &ar->eeprom. |
| 1163 | 1163 | cal_pier_data_2G[chain][idx]; |
| 1164 | 1164 | break; |
| 1165 | 1165 | |
| 1166 | − case IEEE80211_BAND_5GHZ: | |
| 1166 | + case NL80211_BAND_5GHZ: | |
| 1167 | 1167 | cal_pier_data = &ar->eeprom. |
| 1168 | 1168 | cal_pier_data_5G[chain][idx]; |
| 1169 | 1169 | break; |
| @@ -1340,7 +1340,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw) · 170 unmodified lines | ||
| 1340 | 1340 | /* skip CTL and heavy clip for CTL_MKK and CTL_ETSI */ |
| 1341 | 1341 | return; |
| 1342 | 1342 | |
| 1343 | − if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) { | |
| 1343 | + if (ar->hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) { | |
| 1344 | 1344 | modes = mode_list_2ghz; |
| 1345 | 1345 | nr_modes = ARRAY_SIZE(mode_list_2ghz); |
| 1346 | 1346 | } else { |
| @@ -1607,7 +1607,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, · 260 unmodified lines | ||
| 1607 | 1607 | return err; |
| 1608 | 1608 | |
| 1609 | 1609 | err = carl9170_init_rf_banks_0_7(ar, |
| 1610 | − channel->band == IEEE80211_BAND_5GHZ); | |
| 1610 | + channel->band == NL80211_BAND_5GHZ); | |
| 1611 | 1611 | if (err) |
| 1612 | 1612 | return err; |
| 1613 | 1613 | |
| @@ -1621,7 +1621,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, · 7 unmodified lines | ||
| 1621 | 1621 | return err; |
| 1622 | 1622 | |
| 1623 | 1623 | err = carl9170_init_rf_bank4_pwr(ar, |
| 1624 | − channel->band == IEEE80211_BAND_5GHZ, | |
| 1624 | + channel->band == NL80211_BAND_5GHZ, | |
| 1625 | 1625 | channel->center_freq, bw); |
| 1626 | 1626 | if (err) |
| 1627 | 1627 | return err; |
| @@ -417,7 +417,7 @@ static int carl9170_rx_mac_status(struct ar9170 *ar, · 416 unmodified lines | ||
| 417 | 417 | |
| 418 | 418 | return -EINVAL; |
| 419 | 419 | } |
| 420 | − if (status->band == IEEE80211_BAND_2GHZ) | |
| 420 | + if (status->band == NL80211_BAND_2GHZ) | |
| 421 | 421 | status->rate_idx += 4; |
| 422 | 422 | break; |
| 423 | 423 | |
| @@ -720,12 +720,12 @@ static void carl9170_tx_rate_tpc_chains(struct ar9170 *ar, · 719 unmodified lines | ||
| 720 | 720 | /* +1 dBm for HT40 */ |
| 721 | 721 | *tpc += 2; |
| 722 | 722 | |
| 723 | − if (info->band == IEEE80211_BAND_2GHZ) | |
| 723 | + if (info->band == NL80211_BAND_2GHZ) | |
| 724 | 724 | txpower = ar->power_2G_ht40; |
| 725 | 725 | else |
| 726 | 726 | txpower = ar->power_5G_ht40; |
| 727 | 727 | } else { |
| 728 | − if (info->band == IEEE80211_BAND_2GHZ) | |
| 728 | + if (info->band == NL80211_BAND_2GHZ) | |
| 729 | 729 | txpower = ar->power_2G_ht20; |
| 730 | 730 | else |
| 731 | 731 | txpower = ar->power_5G_ht20; |
| @@ -734,7 +734,7 @@ static void carl9170_tx_rate_tpc_chains(struct ar9170 *ar, · 2 unmodified lines | ||
| 734 | 734 | *phyrate = txrate->idx; |
| 735 | 735 | *tpc += txpower[idx & 7]; |
| 736 | 736 | } else { |
| 737 | − if (info->band == IEEE80211_BAND_2GHZ) { | |
| 737 | + if (info->band == NL80211_BAND_2GHZ) { | |
| 738 | 738 | if (idx < 4) |
| 739 | 739 | txpower = ar->power_2G_cck; |
| 740 | 740 | else |
| @@ -797,7 +797,7 @@ static __le32 carl9170_tx_physet(struct ar9170 *ar, · 56 unmodified lines | ||
| 797 | 797 | * tmp |= cpu_to_le32(AR9170_TX_PHY_GREENFIELD); |
| 798 | 798 | */ |
| 799 | 799 | } else { |
| 800 | − if (info->band == IEEE80211_BAND_2GHZ) { | |
| 800 | + if (info->band == NL80211_BAND_2GHZ) { | |
| 801 | 801 | if (txrate->idx <= AR9170_TX_PHY_RATE_CCK_11M) |
| 802 | 802 | tmp |= cpu_to_le32(AR9170_TX_PHY_MOD_CCK); |
| 803 | 803 | else |
| @@ -336,12 +336,12 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy, · 335 unmodified lines | ||
| 336 | 336 | struct ath_regulatory *reg, |
| 337 | 337 | enum nl80211_reg_initiator initiator) |
| 338 | 338 | { |
| 339 | − enum ieee80211_band band; | |
| 339 | + enum nl80211_band band; | |
| 340 | 340 | struct ieee80211_supported_band *sband; |
| 341 | 341 | struct ieee80211_channel *ch; |
| 342 | 342 | unsigned int i; |
| 343 | 343 | |
| 344 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 344 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 345 | 345 | if (!wiphy->bands[band]) |
| 346 | 346 | continue; |
| 347 | 347 | sband = wiphy->bands[band]; |
| @@ -374,7 +374,7 @@ ath_reg_apply_ir_flags(struct wiphy *wiphy, · 26 unmodified lines | ||
| 374 | 374 | { |
| 375 | 375 | struct ieee80211_supported_band *sband; |
| 376 | 376 | |
| 377 | − sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 377 | + sband = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 378 | 378 | if (!sband) |
| 379 | 379 | return; |
| 380 | 380 | |
| @@ -402,10 +402,10 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy) · 21 unmodified lines | ||
| 402 | 402 | struct ieee80211_channel *ch; |
| 403 | 403 | unsigned int i; |
| 404 | 404 | |
| 405 | − if (!wiphy->bands[IEEE80211_BAND_5GHZ]) | |
| 405 | + if (!wiphy->bands[NL80211_BAND_5GHZ]) | |
| 406 | 406 | return; |
| 407 | 407 | |
| 408 | − sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 408 | + sband = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 409 | 409 | |
| 410 | 410 | for (i = 0; i < sband->n_channels; i++) { |
| 411 | 411 | ch = &sband->channels[i]; |
| @@ -772,7 +772,7 @@ ath_regd_init(struct ath_regulatory *reg, · 360 unmodified lines | ||
| 772 | 772 | EXPORT_SYMBOL(ath_regd_init); |
| 773 | 773 | |
| 774 | 774 | u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, |
| 775 | − enum ieee80211_band band) | |
| 775 | + enum nl80211_band band) | |
| 776 | 776 | { |
| 777 | 777 | if (!reg->regpair || |
| 778 | 778 | (reg->country_code == CTRY_DEFAULT && |
| @@ -794,9 +794,9 @@ u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, · 15 unmodified lines | ||
| 794 | 794 | } |
| 795 | 795 | |
| 796 | 796 | switch (band) { |
| 797 | − case IEEE80211_BAND_2GHZ: | |
| 797 | + case NL80211_BAND_2GHZ: | |
| 798 | 798 | return reg->regpair->reg_2ghz_ctl; |
| 799 | − case IEEE80211_BAND_5GHZ: | |
| 799 | + case NL80211_BAND_5GHZ: | |
| 800 | 800 | return reg->regpair->reg_5ghz_ctl; |
| 801 | 801 | default: |
| 802 | 802 | return NO_CTL; |
| @@ -255,7 +255,7 @@ int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, · 254 unmodified lines | ||
| 255 | 255 | void (*reg_notifier)(struct wiphy *wiphy, |
| 256 | 256 | struct regulatory_request *request)); |
| 257 | 257 | u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, |
| 258 | − enum ieee80211_band band); | |
| 258 | + enum nl80211_band band); | |
| 259 | 259 | void ath_reg_notifier_apply(struct wiphy *wiphy, |
| 260 | 260 | struct regulatory_request *request, |
| 261 | 261 | struct ath_regulatory *reg); |
| @@ -26,14 +26,14 @@ module_param_named(debug_mask, wcn36xx_dbg_mask, uint, 0644); · 25 unmodified lines | ||
| 26 | 26 | MODULE_PARM_DESC(debug_mask, "Debugging mask"); |
| 27 | 27 | |
| 28 | 28 | #define CHAN2G(_freq, _idx) { \ |
| 29 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 29 | + .band = NL80211_BAND_2GHZ, \ | |
| 30 | 30 | .center_freq = (_freq), \ |
| 31 | 31 | .hw_value = (_idx), \ |
| 32 | 32 | .max_power = 25, \ |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | #define CHAN5G(_freq, _idx) { \ |
| 36 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 36 | + .band = NL80211_BAND_5GHZ, \ | |
| 37 | 37 | .center_freq = (_freq), \ |
| 38 | 38 | .hw_value = (_idx), \ |
| 39 | 39 | .max_power = 25, \ |
| @@ -516,7 +516,7 @@ static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw, · 476 unmodified lines | ||
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, |
| 519 | − enum ieee80211_band band) | |
| 519 | + enum nl80211_band band) | |
| 520 | 520 | { |
| 521 | 521 | int i, size; |
| 522 | 522 | u16 *rates_table; |
| @@ -529,7 +529,7 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, · 6 unmodified lines | ||
| 529 | 529 | |
| 530 | 530 | size = ARRAY_SIZE(sta_priv->supported_rates.dsss_rates); |
| 531 | 531 | rates_table = sta_priv->supported_rates.dsss_rates; |
| 532 | − if (band == IEEE80211_BAND_2GHZ) { | |
| 532 | + if (band == NL80211_BAND_2GHZ) { | |
| 533 | 533 | for (i = 0; i < size; i++) { |
| 534 | 534 | if (rates & 0x01) { |
| 535 | 535 | rates_table[i] = wcn_2ghz_rates[i].hw_value; |
| @@ -958,8 +958,8 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) · 422 unmodified lines | ||
| 958 | 958 | BIT(NL80211_IFTYPE_ADHOC) | |
| 959 | 959 | BIT(NL80211_IFTYPE_MESH_POINT); |
| 960 | 960 | |
| 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; | |
| 963 | 963 | |
| 964 | 964 | wcn->hw->wiphy->cipher_suites = cipher_suites; |
| 965 | 965 | wcn->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); |
| @@ -104,11 +104,11 @@ static void wcn36xx_smd_set_bss_nw_type(struct wcn36xx *wcn, · 103 unmodified lines | ||
| 104 | 104 | struct ieee80211_sta *sta, |
| 105 | 105 | struct wcn36xx_hal_config_bss_params *bss_params) |
| 106 | 106 | { |
| 107 | − if (IEEE80211_BAND_5GHZ == WCN36XX_BAND(wcn)) | |
| 107 | + if (NL80211_BAND_5GHZ == WCN36XX_BAND(wcn)) | |
| 108 | 108 | bss_params->nw_type = WCN36XX_HAL_11A_NW_TYPE; |
| 109 | 109 | else if (sta && sta->ht_cap.ht_supported) |
| 110 | 110 | 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)) | |
| 112 | 112 | bss_params->nw_type = WCN36XX_HAL_11G_NW_TYPE; |
| 113 | 113 | else |
| 114 | 114 | bss_params->nw_type = WCN36XX_HAL_11B_NW_TYPE; |
| @@ -225,7 +225,7 @@ static void wcn36xx_set_tx_mgmt(struct wcn36xx_tx_bd *bd, · 224 unmodified lines | ||
| 225 | 225 | |
| 226 | 226 | /* default rate for unicast */ |
| 227 | 227 | 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) ? | |
| 229 | 229 | WCN36XX_BD_RATE_CTRL : |
| 230 | 230 | WCN36XX_BD_RATE_MGMT; |
| 231 | 231 | else if (ieee80211_is_ctl(hdr->frame_control)) |
| @@ -21,7 +21,7 @@ · 20 unmodified lines | ||
| 21 | 21 | #define WIL_MAX_ROC_DURATION_MS 5000 |
| 22 | 22 | |
| 23 | 23 | #define CHAN60G(_channel, _flags) { \ |
| 24 | − .band = IEEE80211_BAND_60GHZ, \ | |
| 24 | + .band = NL80211_BAND_60GHZ, \ | |
| 25 | 25 | .center_freq = 56160 + (2160 * (_channel)), \ |
| 26 | 26 | .hw_value = (_channel), \ |
| 27 | 27 | .flags = (_flags), \ |
| @@ -1411,7 +1411,7 @@ static void wil_wiphy_init(struct wiphy *wiphy) · 1383 unmodified lines | ||
| 1411 | 1411 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | |
| 1412 | 1412 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P; |
| 1413 | 1413 | |
| 1414 | − wiphy->bands[IEEE80211_BAND_60GHZ] = &wil_band_60ghz; | |
| 1414 | + wiphy->bands[NL80211_BAND_60GHZ] = &wil_band_60ghz; | |
| 1415 | 1415 | |
| 1416 | 1416 | /* TODO: figure this out */ |
| 1417 | 1417 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; |
| @@ -157,7 +157,7 @@ void *wil_if_alloc(struct device *dev) · 156 unmodified lines | ||
| 157 | 157 | |
| 158 | 158 | wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */ |
| 159 | 159 | /* default monitor channel */ |
| 160 | − ch = wdev->wiphy->bands[IEEE80211_BAND_60GHZ]->channels; | |
| 160 | + ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels; | |
| 161 | 161 | cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT); |
| 162 | 162 | |
| 163 | 163 | ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup); |
| @@ -333,7 +333,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) · 332 unmodified lines | ||
| 333 | 333 | } |
| 334 | 334 | |
| 335 | 335 | 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); | |
| 337 | 337 | channel = ieee80211_get_channel(wiphy, freq); |
| 338 | 338 | signal = data->info.sqi; |
| 339 | 339 | d_status = le16_to_cpu(data->info.status); |
| @@ -1547,7 +1547,7 @@ static inline int at76_guess_freq(struct at76_priv *priv) · 1546 unmodified lines | ||
| 1547 | 1547 | channel = el[2]; |
| 1548 | 1548 | |
| 1549 | 1549 | exit: |
| 1550 | − return ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); | |
| 1550 | + return ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ); | |
| 1551 | 1551 | } |
| 1552 | 1552 | |
| 1553 | 1553 | static void at76_rx_tasklet(unsigned long param) |
| @@ -1590,7 +1590,7 @@ static void at76_rx_tasklet(unsigned long param) · 36 unmodified lines | ||
| 1590 | 1590 | rx_status.signal = buf->rssi; |
| 1591 | 1591 | rx_status.flag |= RX_FLAG_DECRYPTED; |
| 1592 | 1592 | rx_status.flag |= RX_FLAG_IV_STRIPPED; |
| 1593 | − rx_status.band = IEEE80211_BAND_2GHZ; | |
| 1593 | + rx_status.band = NL80211_BAND_2GHZ; | |
| 1594 | 1594 | rx_status.freq = at76_guess_freq(priv); |
| 1595 | 1595 | |
| 1596 | 1596 | 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 | ||
| 2359 | 2359 | priv->hw->wiphy->max_scan_ssids = 1; |
| 2360 | 2360 | priv->hw->wiphy->max_scan_ie_len = 0; |
| 2361 | 2361 | 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; | |
| 2363 | 2363 | ieee80211_hw_set(priv->hw, RX_INCLUDES_FCS); |
| 2364 | 2364 | ieee80211_hw_set(priv->hw, SIGNAL_UNSPEC); |
| 2365 | 2365 | priv->hw->max_signal = 100; |
| @@ -2434,7 +2434,7 @@ static int atmel_get_range(struct net_device *dev, · 2433 unmodified lines | ||
| 2434 | 2434 | |
| 2435 | 2435 | /* Values in MHz -> * 10^5 * 10 */ |
| 2436 | 2436 | range->freq[k].m = 100000 * |
| 2437 | − ieee80211_channel_to_frequency(i, IEEE80211_BAND_2GHZ); | |
| 2437 | + ieee80211_channel_to_frequency(i, NL80211_BAND_2GHZ); | |
| 2438 | 2438 | range->freq[k++].e = 1; |
| 2439 | 2439 | } |
| 2440 | 2440 | range->num_frequency = k; |
| @@ -992,9 +992,9 @@ static inline int b43_is_mode(struct b43_wl *wl, int type) · 991 unmodified lines | ||
| 992 | 992 | |
| 993 | 993 | /** |
| 994 | 994 | * 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. | |
| 996 | 996 | */ |
| 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) | |
| 998 | 998 | { |
| 999 | 999 | return wl->hw->conf.chandef.chan->band; |
| 1000 | 1000 | } |
| @@ -187,7 +187,7 @@ static struct ieee80211_rate __b43_ratetable[] = { · 186 unmodified lines | ||
| 187 | 187 | #define b43_g_ratetable_size 12 |
| 188 | 188 | |
| 189 | 189 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 190 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 190 | + .band = NL80211_BAND_2GHZ, \ | |
| 191 | 191 | .center_freq = (_freq), \ |
| 192 | 192 | .hw_value = (_channel), \ |
| 193 | 193 | .flags = (_flags), \ |
| @@ -216,7 +216,7 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { · 22 unmodified lines | ||
| 216 | 216 | #undef CHAN2G |
| 217 | 217 | |
| 218 | 218 | #define CHAN4G(_channel, _flags) { \ |
| 219 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 219 | + .band = NL80211_BAND_5GHZ, \ | |
| 220 | 220 | .center_freq = 4000 + (5 * (_channel)), \ |
| 221 | 221 | .hw_value = (_channel), \ |
| 222 | 222 | .flags = (_flags), \ |
| @@ -224,7 +224,7 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { · 1 unmodified line | ||
| 224 | 224 | .max_power = 30, \ |
| 225 | 225 | } |
| 226 | 226 | #define CHAN5G(_channel, _flags) { \ |
| 227 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 227 | + .band = NL80211_BAND_5GHZ, \ | |
| 228 | 228 | .center_freq = 5000 + (5 * (_channel)), \ |
| 229 | 229 | .hw_value = (_channel), \ |
| 230 | 230 | .flags = (_flags), \ |
| @@ -323,7 +323,7 @@ static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { · 92 unmodified lines | ||
| 323 | 323 | #undef CHAN5G |
| 324 | 324 | |
| 325 | 325 | static struct ieee80211_supported_band b43_band_5GHz_nphy = { |
| 326 | − .band = IEEE80211_BAND_5GHZ, | |
| 326 | + .band = NL80211_BAND_5GHZ, | |
| 327 | 327 | .channels = b43_5ghz_nphy_chantable, |
| 328 | 328 | .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable), |
| 329 | 329 | .bitrates = b43_a_ratetable, |
| @@ -331,7 +331,7 @@ static struct ieee80211_supported_band b43_band_5GHz_nphy = { · 1 unmodified line | ||
| 331 | 331 | }; |
| 332 | 332 | |
| 333 | 333 | static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = { |
| 334 | − .band = IEEE80211_BAND_5GHZ, | |
| 334 | + .band = NL80211_BAND_5GHZ, | |
| 335 | 335 | .channels = b43_5ghz_nphy_chantable_limited, |
| 336 | 336 | .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable_limited), |
| 337 | 337 | .bitrates = b43_a_ratetable, |
| @@ -339,7 +339,7 @@ static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = { · 1 unmodified line | ||
| 339 | 339 | }; |
| 340 | 340 | |
| 341 | 341 | static struct ieee80211_supported_band b43_band_5GHz_aphy = { |
| 342 | − .band = IEEE80211_BAND_5GHZ, | |
| 342 | + .band = NL80211_BAND_5GHZ, | |
| 343 | 343 | .channels = b43_5ghz_aphy_chantable, |
| 344 | 344 | .n_channels = ARRAY_SIZE(b43_5ghz_aphy_chantable), |
| 345 | 345 | .bitrates = b43_a_ratetable, |
| @@ -347,7 +347,7 @@ static struct ieee80211_supported_band b43_band_5GHz_aphy = { · 1 unmodified line | ||
| 347 | 347 | }; |
| 348 | 348 | |
| 349 | 349 | static struct ieee80211_supported_band b43_band_2GHz = { |
| 350 | − .band = IEEE80211_BAND_2GHZ, | |
| 350 | + .band = NL80211_BAND_2GHZ, | |
| 351 | 351 | .channels = b43_2ghz_chantable, |
| 352 | 352 | .n_channels = ARRAY_SIZE(b43_2ghz_chantable), |
| 353 | 353 | .bitrates = b43_g_ratetable, |
| @@ -355,7 +355,7 @@ static struct ieee80211_supported_band b43_band_2GHz = { · 1 unmodified line | ||
| 355 | 355 | }; |
| 356 | 356 | |
| 357 | 357 | static struct ieee80211_supported_band b43_band_2ghz_limited = { |
| 358 | − .band = IEEE80211_BAND_2GHZ, | |
| 358 | + .band = NL80211_BAND_2GHZ, | |
| 359 | 359 | .channels = b43_2ghz_chantable, |
| 360 | 360 | .n_channels = b43_2ghz_chantable_limited_size, |
| 361 | 361 | .bitrates = b43_g_ratetable, |
| @@ -717,7 +717,7 @@ static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) · 355 unmodified lines | ||
| 717 | 717 | { |
| 718 | 718 | /* slot_time is in usec. */ |
| 719 | 719 | /* 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) | |
| 721 | 721 | return; |
| 722 | 722 | b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time); |
| 723 | 723 | /* 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 | ||
| 3880 | 3880 | mutex_unlock(&wl->mutex); |
| 3881 | 3881 | } |
| 3882 | 3882 | |
| 3883 | −static const char *band_to_string(enum ieee80211_band band) | |
| 3883 | +static const char *band_to_string(enum nl80211_band band) | |
| 3884 | 3884 | { |
| 3885 | 3885 | switch (band) { |
| 3886 | − case IEEE80211_BAND_5GHZ: | |
| 3886 | + case NL80211_BAND_5GHZ: | |
| 3887 | 3887 | return "5"; |
| 3888 | − case IEEE80211_BAND_2GHZ: | |
| 3888 | + case NL80211_BAND_2GHZ: | |
| 3889 | 3889 | return "2.4"; |
| 3890 | 3890 | default: |
| 3891 | 3891 | break; |
| @@ -3903,10 +3903,10 @@ static int b43_switch_band(struct b43_wldev *dev, · 11 unmodified lines | ||
| 3903 | 3903 | u32 tmp; |
| 3904 | 3904 | |
| 3905 | 3905 | switch (chan->band) { |
| 3906 | − case IEEE80211_BAND_5GHZ: | |
| 3906 | + case NL80211_BAND_5GHZ: | |
| 3907 | 3907 | gmode = false; |
| 3908 | 3908 | break; |
| 3909 | − case IEEE80211_BAND_2GHZ: | |
| 3909 | + case NL80211_BAND_2GHZ: | |
| 3910 | 3910 | gmode = true; |
| 3911 | 3911 | break; |
| 3912 | 3912 | default: |
| @@ -5294,16 +5294,16 @@ static int b43_setup_bands(struct b43_wldev *dev, · 1381 unmodified lines | ||
| 5294 | 5294 | phy->radio_rev == 9; |
| 5295 | 5295 | |
| 5296 | 5296 | if (have_2ghz_phy) |
| 5297 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = limited_2g ? | |
| 5297 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = limited_2g ? | |
| 5298 | 5298 | &b43_band_2ghz_limited : &b43_band_2GHz; |
| 5299 | 5299 | if (dev->phy.type == B43_PHYTYPE_N) { |
| 5300 | 5300 | if (have_5ghz_phy) |
| 5301 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ] = limited_5g ? | |
| 5301 | + hw->wiphy->bands[NL80211_BAND_5GHZ] = limited_5g ? | |
| 5302 | 5302 | &b43_band_5GHz_nphy_limited : |
| 5303 | 5303 | &b43_band_5GHz_nphy; |
| 5304 | 5304 | } else { |
| 5305 | 5305 | 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; | |
| 5307 | 5307 | } |
| 5308 | 5308 | |
| 5309 | 5309 | dev->phy.supports_2ghz = have_2ghz_phy; |
| @@ -61,7 +61,7 @@ static void b43_phy_ac_op_radio_write(struct b43_wldev *dev, u16 reg, · 60 unmodified lines | ||
| 61 | 61 | |
| 62 | 62 | static unsigned int b43_phy_ac_op_get_default_chan(struct b43_wldev *dev) |
| 63 | 63 | { |
| 64 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 64 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 65 | 65 | return 11; |
| 66 | 66 | return 36; |
| 67 | 67 | } |
| @@ -436,7 +436,7 @@ int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel) · 435 unmodified lines | ||
| 436 | 436 | * firmware from sending ghost packets. |
| 437 | 437 | */ |
| 438 | 438 | channelcookie = new_channel; |
| 439 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 439 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 440 | 440 | channelcookie |= B43_SHM_SH_CHAN_5GHZ; |
| 441 | 441 | /* FIXME: set 40Mhz flag if required */ |
| 442 | 442 | if (0) |
| @@ -568,7 +568,7 @@ static void b43_phy_ht_tx_power_ctl(struct b43_wldev *dev, bool enable) · 567 unmodified lines | ||
| 568 | 568 | } else { |
| 569 | 569 | b43_phy_set(dev, B43_PHY_HT_TXPCTL_CMD_C1, en_bits); |
| 570 | 570 | |
| 571 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { | |
| 571 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) { | |
| 572 | 572 | for (i = 0; i < 3; i++) |
| 573 | 573 | b43_phy_write(dev, cmd_regs[i], 0x32); |
| 574 | 574 | } |
| @@ -643,7 +643,7 @@ static void b43_phy_ht_tx_power_ctl_setup(struct b43_wldev *dev) · 68 unmodified lines | ||
| 643 | 643 | u16 freq = dev->phy.chandef->chan->center_freq; |
| 644 | 644 | int i, c; |
| 645 | 645 | |
| 646 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 646 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 647 | 647 | for (c = 0; c < 3; c++) { |
| 648 | 648 | target[c] = sprom->core_pwr_info[c].maxpwr_2g; |
| 649 | 649 | 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 | ||
| 777 | 777 | const struct b43_phy_ht_channeltab_e_phy *e, |
| 778 | 778 | struct ieee80211_channel *new_channel) |
| 779 | 779 | { |
| 780 | − if (new_channel->band == IEEE80211_BAND_5GHZ) { | |
| 780 | + if (new_channel->band == NL80211_BAND_5GHZ) { | |
| 781 | 781 | /* Switch to 2 GHz for a moment to access B-PHY regs */ |
| 782 | 782 | b43_phy_mask(dev, B43_PHY_HT_BANDCTL, ~B43_PHY_HT_BANDCTL_5GHZ); |
| 783 | 783 | |
| @@ -805,7 +805,7 @@ static void b43_phy_ht_channel_setup(struct b43_wldev *dev, · 21 unmodified lines | ||
| 805 | 805 | } else { |
| 806 | 806 | b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_OFDM_EN, |
| 807 | 807 | B43_PHY_HT_CLASS_CTL_OFDM_EN); |
| 808 | − if (new_channel->band == IEEE80211_BAND_2GHZ) | |
| 808 | + if (new_channel->band == NL80211_BAND_2GHZ) | |
| 809 | 809 | b43_phy_mask(dev, B43_PHY_HT_TEST, ~0x840); |
| 810 | 810 | } |
| 811 | 811 | |
| @@ -916,7 +916,7 @@ static int b43_phy_ht_op_init(struct b43_wldev *dev) · 104 unmodified lines | ||
| 916 | 916 | if (0) /* TODO: condition */ |
| 917 | 917 | ; /* TODO: PHY op on reg 0x217 */ |
| 918 | 918 | |
| 919 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 919 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 920 | 920 | b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_CCK_EN, 0); |
| 921 | 921 | else |
| 922 | 922 | 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 | ||
| 1005 | 1005 | b43_phy_ht_classifier(dev, 0, 0); |
| 1006 | 1006 | b43_phy_ht_read_clip_detection(dev, clip_state); |
| 1007 | 1007 | |
| 1008 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 1008 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 1009 | 1009 | b43_phy_ht_bphy_init(dev); |
| 1010 | 1010 | |
| 1011 | 1011 | 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 | ||
| 1077 | 1077 | enum nl80211_channel_type channel_type = |
| 1078 | 1078 | cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef); |
| 1079 | 1079 | |
| 1080 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 1080 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 1081 | 1081 | if ((new_channel < 1) || (new_channel > 14)) |
| 1082 | 1082 | return -EINVAL; |
| 1083 | 1083 | } else { |
| @@ -1089,7 +1089,7 @@ static int b43_phy_ht_op_switch_channel(struct b43_wldev *dev, · 5 unmodified lines | ||
| 1089 | 1089 | |
| 1090 | 1090 | static unsigned int b43_phy_ht_op_get_default_chan(struct b43_wldev *dev) |
| 1091 | 1091 | { |
| 1092 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 1092 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 1093 | 1093 | return 11; |
| 1094 | 1094 | return 36; |
| 1095 | 1095 | } |
| @@ -108,7 +108,7 @@ static void b43_radio_2064_channel_setup(struct b43_wldev *dev) · 107 unmodified lines | ||
| 108 | 108 | /* wlc_radio_2064_init */ |
| 109 | 109 | static void b43_radio_2064_init(struct b43_wldev *dev) |
| 110 | 110 | { |
| 111 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 111 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 112 | 112 | b43_radio_write(dev, 0x09c, 0x0020); |
| 113 | 113 | b43_radio_write(dev, 0x105, 0x0008); |
| 114 | 114 | } else { |
| @@ -535,7 +535,7 @@ static void b43_phy_lcn_tx_pwr_ctl_init(struct b43_wldev *dev) · 420 unmodified lines | ||
| 535 | 535 | b43_mac_suspend(dev); |
| 536 | 536 | |
| 537 | 537 | 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) { | |
| 539 | 539 | tx_gains.gm_gain = 4; |
| 540 | 540 | tx_gains.pga_gain = 12; |
| 541 | 541 | tx_gains.pad_gain = 12; |
| @@ -720,7 +720,7 @@ static int b43_phy_lcn_op_init(struct b43_wldev *dev) · 178 unmodified lines | ||
| 720 | 720 | else |
| 721 | 721 | B43_WARN_ON(1); |
| 722 | 722 | |
| 723 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 723 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 724 | 724 | b43_phy_lcn_tx_pwr_ctl_init(dev); |
| 725 | 725 | |
| 726 | 726 | 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 | ||
| 779 | 779 | enum nl80211_channel_type channel_type = |
| 780 | 780 | cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef); |
| 781 | 781 | |
| 782 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 782 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 783 | 783 | if ((new_channel < 1) || (new_channel > 14)) |
| 784 | 784 | return -EINVAL; |
| 785 | 785 | } else { |
| @@ -791,7 +791,7 @@ static int b43_phy_lcn_op_switch_channel(struct b43_wldev *dev, · 5 unmodified lines | ||
| 791 | 791 | |
| 792 | 792 | static unsigned int b43_phy_lcn_op_get_default_chan(struct b43_wldev *dev) |
| 793 | 793 | { |
| 794 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 794 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 795 | 795 | return 1; |
| 796 | 796 | return 36; |
| 797 | 797 | } |
| @@ -46,7 +46,7 @@ static inline u16 channel2freq_lp(u8 channel) · 45 unmodified lines | ||
| 46 | 46 | |
| 47 | 47 | static unsigned int b43_lpphy_op_get_default_chan(struct b43_wldev *dev) |
| 48 | 48 | { |
| 49 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 49 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 50 | 50 | return 1; |
| 51 | 51 | return 36; |
| 52 | 52 | } |
| @@ -91,7 +91,7 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev) · 38 unmodified lines | ||
| 91 | 91 | u32 ofdmpo; |
| 92 | 92 | int i; |
| 93 | 93 | |
| 94 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 94 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 95 | 95 | lpphy->tx_isolation_med_band = sprom->tri2g; |
| 96 | 96 | lpphy->bx_arch = sprom->bxa2g; |
| 97 | 97 | 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 | ||
| 174 | 174 | |
| 175 | 175 | B43_WARN_ON(dev->phy.rev >= 2); |
| 176 | 176 | |
| 177 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 177 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 178 | 178 | isolation = lpphy->tx_isolation_med_band; |
| 179 | 179 | else if (freq <= 5320) |
| 180 | 180 | isolation = lpphy->tx_isolation_low_band; |
| @@ -238,7 +238,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) · 57 unmodified lines | ||
| 238 | 238 | b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB, |
| 239 | 239 | 0xFF00, lpphy->rx_pwr_offset); |
| 240 | 240 | 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) || | |
| 242 | 242 | (sprom->boardflags_hi & B43_BFH_PAREF))) { |
| 243 | 243 | ssb_pmu_set_ldo_voltage(&bus->chipco, LDO_PAREF, 0x28); |
| 244 | 244 | 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 | ||
| 280 | 280 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_7, 0xC0FF, 0x0900); |
| 281 | 281 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xFFC0, 0x000A); |
| 282 | 282 | 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 || | |
| 284 | 284 | (dev->dev->board_type == SSB_BOARD_BU4312) || |
| 285 | 285 | (dev->phy.rev == 0 && (sprom->boardflags_lo & B43_BFL_FEM))) { |
| 286 | 286 | 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 | ||
| 326 | 326 | //FIXME the Broadcom driver caches & delays this HF write! |
| 327 | 327 | b43_hf_write(dev, b43_hf_read(dev) | B43_HF_PR45960W); |
| 328 | 328 | } |
| 329 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 329 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 330 | 330 | b43_phy_set(dev, B43_LPPHY_LP_PHY_CTL, 0x8000); |
| 331 | 331 | b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0040); |
| 332 | 332 | 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 | ||
| 466 | 466 | b43_lptab_write(dev, B43_LPTAB16(0x08, 0x12), 0x40); |
| 467 | 467 | } |
| 468 | 468 | |
| 469 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 469 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 470 | 470 | b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x40); |
| 471 | 471 | b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xF0FF, 0xB00); |
| 472 | 472 | 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 | ||
| 547 | 547 | b43_radio_write(dev, B2062_S_BG_CTL1, |
| 548 | 548 | (b43_radio_read(dev, B2062_N_COMM2) >> 1) | 0x80); |
| 549 | 549 | } |
| 550 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 550 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 551 | 551 | b43_radio_set(dev, B2062_N_TSSI_CTL0, 0x1); |
| 552 | 552 | else |
| 553 | 553 | 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 | ||
| 746 | 746 | lpphy->crs_sys_disable = false; |
| 747 | 747 | |
| 748 | 748 | 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) | |
| 750 | 750 | b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, |
| 751 | 751 | 0xFF1F, 0x60); |
| 752 | 752 | else |
| @@ -807,7 +807,7 @@ static void lpphy_disable_rx_gain_override(struct b43_wldev *dev) · 54 unmodified lines | ||
| 807 | 807 | b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF); |
| 808 | 808 | if (dev->phy.rev >= 2) { |
| 809 | 809 | 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) { | |
| 811 | 811 | b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF); |
| 812 | 812 | b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7); |
| 813 | 813 | } |
| @@ -823,7 +823,7 @@ static void lpphy_enable_rx_gain_override(struct b43_wldev *dev) · 9 unmodified lines | ||
| 823 | 823 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40); |
| 824 | 824 | if (dev->phy.rev >= 2) { |
| 825 | 825 | 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) { | |
| 827 | 827 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400); |
| 828 | 828 | b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8); |
| 829 | 829 | } |
| @@ -951,7 +951,7 @@ static void lpphy_rev2plus_set_rx_gain(struct b43_wldev *dev, u32 gain) · 121 unmodified lines | ||
| 951 | 951 | 0xFBFF, ext_lna << 10); |
| 952 | 952 | b43_phy_write(dev, B43_LPPHY_RX_GAIN_CTL_OVERRIDE_VAL, low_gain); |
| 953 | 953 | 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) { | |
| 955 | 955 | tmp = (gain >> 2) & 0x3; |
| 956 | 956 | b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, |
| 957 | 957 | 0xE7FF, tmp<<11); |
| @@ -1344,7 +1344,7 @@ static void lpphy_calibrate_rc(struct b43_wldev *dev) · 386 unmodified lines | ||
| 1344 | 1344 | if (dev->phy.rev >= 2) { |
| 1345 | 1345 | lpphy_rev2plus_rc_calib(dev); |
| 1346 | 1346 | } 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) | |
| 1348 | 1348 | lpphy_rev0_1_rc_calib(dev); |
| 1349 | 1349 | } else { |
| 1350 | 1350 | lpphy_set_rc_cap(dev); |
| @@ -1548,7 +1548,7 @@ static void lpphy_tx_pctl_init_sw(struct b43_wldev *dev) · 197 unmodified lines | ||
| 1548 | 1548 | { |
| 1549 | 1549 | struct lpphy_tx_gains gains; |
| 1550 | 1550 | |
| 1551 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 1551 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 1552 | 1552 | gains.gm = 4; |
| 1553 | 1553 | gains.pad = 12; |
| 1554 | 1554 | gains.pga = 12; |
| @@ -1902,7 +1902,7 @@ static int lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx, · 347 unmodified lines | ||
| 1902 | 1902 | |
| 1903 | 1903 | lpphy_set_trsw_over(dev, tx, rx); |
| 1904 | 1904 | |
| 1905 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 1905 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 1906 | 1906 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8); |
| 1907 | 1907 | b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, |
| 1908 | 1908 | 0xFFF7, pa << 3); |
| @@ -105,9 +105,9 @@ enum n_rail_type { · 104 unmodified lines | ||
| 105 | 105 | |
| 106 | 106 | static inline bool b43_nphy_ipa(struct b43_wldev *dev) |
| 107 | 107 | { |
| 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)); | |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /* 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 | ||
| 357 | 357 | break; |
| 358 | 358 | case N_INTC_OVERRIDE_PA: |
| 359 | 359 | tmp = 0x0030; |
| 360 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 360 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 361 | 361 | val = value << 5; |
| 362 | 362 | else |
| 363 | 363 | val = value << 4; |
| @@ -365,7 +365,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, · 1 unmodified line | ||
| 365 | 365 | b43_phy_set(dev, reg, 0x1000); |
| 366 | 366 | break; |
| 367 | 367 | 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) { | |
| 369 | 369 | tmp = 0x0001; |
| 370 | 370 | tmp2 = 0x0004; |
| 371 | 371 | val = value; |
| @@ -378,7 +378,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, · 6 unmodified lines | ||
| 378 | 378 | b43_phy_mask(dev, reg, ~tmp2); |
| 379 | 379 | break; |
| 380 | 380 | 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) { | |
| 382 | 382 | tmp = 0x0002; |
| 383 | 383 | tmp2 = 0x0008; |
| 384 | 384 | val = value << 1; |
| @@ -465,7 +465,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, · 80 unmodified lines | ||
| 465 | 465 | } |
| 466 | 466 | break; |
| 467 | 467 | 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) { | |
| 469 | 469 | tmp = 0x0020; |
| 470 | 470 | val = value << 5; |
| 471 | 471 | } else { |
| @@ -475,7 +475,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, · 3 unmodified lines | ||
| 475 | 475 | b43_phy_maskset(dev, reg, ~tmp, val); |
| 476 | 476 | break; |
| 477 | 477 | 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) { | |
| 479 | 479 | tmp = 0x0001; |
| 480 | 480 | val = value; |
| 481 | 481 | } else { |
| @@ -485,7 +485,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, · 3 unmodified lines | ||
| 485 | 485 | b43_phy_maskset(dev, reg, ~tmp, val); |
| 486 | 486 | break; |
| 487 | 487 | 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) { | |
| 489 | 489 | tmp = 0x0002; |
| 490 | 490 | val = value << 1; |
| 491 | 491 | } else { |
| @@ -600,7 +600,7 @@ static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev) · 108 unmodified lines | ||
| 600 | 600 | b43_nphy_stay_in_carrier_search(dev, 1); |
| 601 | 601 | |
| 602 | 602 | if (nphy->gain_boost) { |
| 603 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 603 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 604 | 604 | gain[0] = 6; |
| 605 | 605 | gain[1] = 6; |
| 606 | 606 | } else { |
| @@ -736,7 +736,7 @@ static void b43_radio_2057_setup(struct b43_wldev *dev, · 129 unmodified lines | ||
| 736 | 736 | switch (phy->radio_rev) { |
| 737 | 737 | case 0 ... 4: |
| 738 | 738 | case 6: |
| 739 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 739 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 740 | 740 | b43_radio_write(dev, R2057_RFPLL_LOOPFILTER_R1, 0x3f); |
| 741 | 741 | b43_radio_write(dev, R2057_CP_KPD_IDAC, 0x3f); |
| 742 | 742 | 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 | ||
| 751 | 751 | case 9: /* e.g. PHY rev 16 */ |
| 752 | 752 | b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x20); |
| 753 | 753 | 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) { | |
| 755 | 755 | b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x38); |
| 756 | 756 | b43_radio_write(dev, R2057_VCOBUF_IDACS, 0x0f); |
| 757 | 757 | |
| @@ -775,7 +775,7 @@ static void b43_radio_2057_setup(struct b43_wldev *dev, · 17 unmodified lines | ||
| 775 | 775 | break; |
| 776 | 776 | } |
| 777 | 777 | |
| 778 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 778 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 779 | 779 | u16 txmix2g_tune_boost_pu = 0; |
| 780 | 780 | u16 pad2g_tune_pus = 0; |
| 781 | 781 | |
| @@ -1135,7 +1135,7 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, · 353 unmodified lines | ||
| 1135 | 1135 | { |
| 1136 | 1136 | struct b43_phy *phy = &dev->phy; |
| 1137 | 1137 | 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); | |
| 1139 | 1139 | u16 offset; |
| 1140 | 1140 | u8 i; |
| 1141 | 1141 | u16 bias, cbias; |
| @@ -1152,10 +1152,10 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, · 10 unmodified lines | ||
| 1152 | 1152 | dev->dev->chip_pkg == BCMA_PKG_ID_BCM43224_FAB_SMIC); |
| 1153 | 1153 | |
| 1154 | 1154 | 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); | |
| 1156 | 1156 | |
| 1157 | 1157 | 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) { | |
| 1159 | 1159 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F); |
| 1160 | 1160 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F); |
| 1161 | 1161 | 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 | ||
| 1168 | 1168 | } |
| 1169 | 1169 | } |
| 1170 | 1170 | 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) { | |
| 1172 | 1172 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1f); |
| 1173 | 1173 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1f); |
| 1174 | 1174 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x0b); |
| 1175 | 1175 | b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x20); |
| 1176 | 1176 | } |
| 1177 | 1177 | 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) { | |
| 1179 | 1179 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F); |
| 1180 | 1180 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F); |
| 1181 | 1181 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x05); |
| 1182 | 1182 | b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x0C); |
| 1183 | 1183 | } |
| 1184 | 1184 | |
| 1185 | − if (dev->phy.n->ipa2g_on && band == IEEE80211_BAND_2GHZ) { | |
| 1185 | + if (dev->phy.n->ipa2g_on && band == NL80211_BAND_2GHZ) { | |
| 1186 | 1186 | for (i = 0; i < 2; i++) { |
| 1187 | 1187 | offset = i ? B2056_TX1 : B2056_TX0; |
| 1188 | 1188 | if (dev->phy.rev >= 5) { |
| @@ -1244,7 +1244,7 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, · 55 unmodified lines | ||
| 1244 | 1244 | } |
| 1245 | 1245 | b43_radio_write(dev, offset | B2056_TX_PA_SPARE1, 0xee); |
| 1246 | 1246 | } |
| 1247 | − } else if (dev->phy.n->ipa5g_on && band == IEEE80211_BAND_5GHZ) { | |
| 1247 | + } else if (dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ) { | |
| 1248 | 1248 | u16 freq = phy->chandef->chan->center_freq; |
| 1249 | 1249 | if (freq < 5100) { |
| 1250 | 1250 | paa_boost = 0xA; |
| @@ -1501,7 +1501,7 @@ static void b43_radio_init2055(struct b43_wldev *dev) · 250 unmodified lines | ||
| 1501 | 1501 | /* Follow wl, not specs. Do not force uploading all regs */ |
| 1502 | 1502 | b2055_upload_inittab(dev, 0, 0); |
| 1503 | 1503 | } else { |
| 1504 | − bool ghz5 = b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ; | |
| 1504 | + bool ghz5 = b43_current_band(dev->wl) == NL80211_BAND_5GHZ; | |
| 1505 | 1505 | b2055_upload_inittab(dev, ghz5, 0); |
| 1506 | 1506 | } |
| 1507 | 1507 | 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 | ||
| 1785 | 1785 | b43_phy_maskset(dev, reg, 0xFFC3, 0); |
| 1786 | 1786 | |
| 1787 | 1787 | 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; | |
| 1789 | 1789 | else if (rssi_type == N_RSSI_W2) |
| 1790 | 1790 | val = 16; |
| 1791 | 1791 | else |
| @@ -1813,12 +1813,12 @@ static void b43_nphy_rev3_rssi_select(struct b43_wldev *dev, u8 code, · 21 unmodified lines | ||
| 1813 | 1813 | |
| 1814 | 1814 | if (rssi_type != N_RSSI_IQ && |
| 1815 | 1815 | rssi_type != N_RSSI_TBD) { |
| 1816 | − enum ieee80211_band band = | |
| 1816 | + enum nl80211_band band = | |
| 1817 | 1817 | b43_current_band(dev->wl); |
| 1818 | 1818 | |
| 1819 | 1819 | if (dev->phy.rev < 7) { |
| 1820 | 1820 | if (b43_nphy_ipa(dev)) |
| 1821 | − val = (band == IEEE80211_BAND_5GHZ) ? 0xC : 0xE; | |
| 1821 | + val = (band == NL80211_BAND_5GHZ) ? 0xC : 0xE; | |
| 1822 | 1822 | else |
| 1823 | 1823 | val = 0x11; |
| 1824 | 1824 | 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 | ||
| 2120 | 2120 | 1, 0, false); |
| 2121 | 2121 | b43_nphy_rf_ctl_override_rev7(dev, 0x80, 1, 0, false, 0); |
| 2122 | 2122 | 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) { | |
| 2124 | 2124 | b43_nphy_rf_ctl_override_rev7(dev, 0x20, 0, 0, false, |
| 2125 | 2125 | 0); |
| 2126 | 2126 | 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 | ||
| 2136 | 2136 | b43_nphy_rf_ctl_override(dev, 0x2, 1, 0, false); |
| 2137 | 2137 | b43_nphy_rf_ctl_override(dev, 0x80, 1, 0, false); |
| 2138 | 2138 | 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) { | |
| 2140 | 2140 | b43_nphy_rf_ctl_override(dev, 0x20, 0, 0, false); |
| 2141 | 2141 | b43_nphy_rf_ctl_override(dev, 0x10, 1, 0, false); |
| 2142 | 2142 | } else { |
| @@ -2257,7 +2257,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) · 114 unmodified lines | ||
| 2257 | 2257 | b43_phy_write(dev, regs_to_store[i], saved_regs_phy[i]); |
| 2258 | 2258 | |
| 2259 | 2259 | /* Store for future configuration */ |
| 2260 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 2260 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 2261 | 2261 | rssical_radio_regs = nphy->rssical_cache.rssical_radio_regs_2G; |
| 2262 | 2262 | rssical_phy_regs = nphy->rssical_cache.rssical_phy_regs_2G; |
| 2263 | 2263 | } else { |
| @@ -2289,7 +2289,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) · 25 unmodified lines | ||
| 2289 | 2289 | rssical_phy_regs[11] = b43_phy_read(dev, B43_NPHY_RSSIMC_1Q_RSSI_Y); |
| 2290 | 2290 | |
| 2291 | 2291 | /* 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) | |
| 2293 | 2293 | nphy->rssical_chanspec_2G.center_freq = phy->chandef->chan->center_freq; |
| 2294 | 2294 | else |
| 2295 | 2295 | 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 | ||
| 2336 | 2336 | b43_nphy_read_clip_detection(dev, clip_state); |
| 2337 | 2337 | b43_nphy_write_clip_detection(dev, clip_off); |
| 2338 | 2338 | |
| 2339 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 2339 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 2340 | 2340 | override = 0x140; |
| 2341 | 2341 | else |
| 2342 | 2342 | override = 0x110; |
| @@ -2629,7 +2629,7 @@ static void b43_nphy_gain_ctl_workarounds_rev1_2(struct b43_wldev *dev) · 286 unmodified lines | ||
| 2629 | 2629 | b43_phy_write(dev, B43_NPHY_CCK_SHIFTB_REF, 0x809C); |
| 2630 | 2630 | |
| 2631 | 2631 | if (nphy->gain_boost) { |
| 2632 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ && | |
| 2632 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ && | |
| 2633 | 2633 | b43_is_40mhz(dev)) |
| 2634 | 2634 | code = 4; |
| 2635 | 2635 | else |
| @@ -2688,7 +2688,7 @@ static void b43_nphy_gain_ctl_workarounds_rev1_2(struct b43_wldev *dev) · 52 unmodified lines | ||
| 2688 | 2688 | ~B43_NPHY_OVER_DGAIN_CCKDGECV & 0xFFFF, |
| 2689 | 2689 | 0x5A << B43_NPHY_OVER_DGAIN_CCKDGECV_SHIFT); |
| 2690 | 2690 | |
| 2691 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 2691 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 2692 | 2692 | b43_phy_maskset(dev, B43_PHY_N(0xC5D), 0xFF80, 4); |
| 2693 | 2693 | } |
| 2694 | 2694 | |
| @@ -2803,7 +2803,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 108 unmodified lines | ||
| 2803 | 2803 | scap_val = b43_radio_read(dev, R2057_RCCAL_SCAP_VAL); |
| 2804 | 2804 | |
| 2805 | 2805 | 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; | |
| 2807 | 2807 | |
| 2808 | 2808 | switch (phy->radio_rev) { |
| 2809 | 2809 | case 5: |
| @@ -2831,7 +2831,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 21 unmodified lines | ||
| 2831 | 2831 | bcap_val_11b[core] = bcap_val; |
| 2832 | 2832 | lpf_ofdm_20mhz[core] = 4; |
| 2833 | 2833 | lpf_11b[core] = 1; |
| 2834 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 2834 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 2835 | 2835 | scap_val_11n_20[core] = 0xc; |
| 2836 | 2836 | bcap_val_11n_20[core] = 0xc; |
| 2837 | 2837 | scap_val_11n_40[core] = 0xa; |
| @@ -2982,7 +2982,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 144 unmodified lines | ||
| 2982 | 2982 | conv = 0x7f; |
| 2983 | 2983 | filt = 0xee; |
| 2984 | 2984 | } |
| 2985 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 2985 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 2986 | 2986 | for (core = 0; core < 2; core++) { |
| 2987 | 2987 | if (core == 0) { |
| 2988 | 2988 | b43_radio_write(dev, 0x5F, bias); |
| @@ -2998,7 +2998,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) · 9 unmodified lines | ||
| 2998 | 2998 | } |
| 2999 | 2999 | |
| 3000 | 3000 | 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) { | |
| 3002 | 3002 | if (phy->radio_rev == 3 || phy->radio_rev == 4 || |
| 3003 | 3003 | phy->radio_rev == 6) { |
| 3004 | 3004 | for (core = 0; core < 2; core++) { |
| @@ -3221,7 +3221,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 216 unmodified lines | ||
| 3221 | 3221 | ARRAY_SIZE(rx2tx_events)); |
| 3222 | 3222 | } |
| 3223 | 3223 | |
| 3224 | − tmp16 = (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) ? | |
| 3224 | + tmp16 = (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) ? | |
| 3225 | 3225 | 0x2 : 0x9C40; |
| 3226 | 3226 | b43_phy_write(dev, B43_NPHY_ENDROP_TLEN, tmp16); |
| 3227 | 3227 | |
| @@ -3240,7 +3240,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 12 unmodified lines | ||
| 3240 | 3240 | b43_ntab_write(dev, B43_NTAB16(8, 0), 2); |
| 3241 | 3241 | b43_ntab_write(dev, B43_NTAB16(8, 16), 2); |
| 3242 | 3242 | |
| 3243 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 3243 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 3244 | 3244 | pdet_range = sprom->fem.ghz2.pdet_range; |
| 3245 | 3245 | else |
| 3246 | 3246 | pdet_range = sprom->fem.ghz5.pdet_range; |
| @@ -3249,7 +3249,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 2 unmodified lines | ||
| 3249 | 3249 | switch (pdet_range) { |
| 3250 | 3250 | case 3: |
| 3251 | 3251 | if (!(dev->phy.rev >= 4 && |
| 3252 | − b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)) | |
| 3252 | + b43_current_band(dev->wl) == NL80211_BAND_2GHZ)) | |
| 3253 | 3253 | break; |
| 3254 | 3254 | /* FALL THROUGH */ |
| 3255 | 3255 | case 0: |
| @@ -3261,7 +3261,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 5 unmodified lines | ||
| 3261 | 3261 | break; |
| 3262 | 3262 | case 2: |
| 3263 | 3263 | 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) | |
| 3265 | 3265 | vmid[3] = 0x94; |
| 3266 | 3266 | else |
| 3267 | 3267 | vmid[3] = 0x8e; |
| @@ -3277,7 +3277,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 9 unmodified lines | ||
| 3277 | 3277 | break; |
| 3278 | 3278 | case 4: |
| 3279 | 3279 | case 5: |
| 3280 | − if (b43_current_band(dev->wl) != IEEE80211_BAND_2GHZ) { | |
| 3280 | + if (b43_current_band(dev->wl) != NL80211_BAND_2GHZ) { | |
| 3281 | 3281 | if (pdet_range == 4) { |
| 3282 | 3282 | vmid[3] = 0x8e; |
| 3283 | 3283 | tmp16 = 0x96; |
| @@ -3322,9 +3322,9 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 38 unmodified lines | ||
| 3322 | 3322 | /* N PHY WAR TX Chain Update with hw_phytxchain as argument */ |
| 3323 | 3323 | |
| 3324 | 3324 | 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) || | |
| 3326 | 3326 | (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)) | |
| 3328 | 3328 | tmp32 = 0x00088888; |
| 3329 | 3329 | else |
| 3330 | 3330 | tmp32 = 0x88888888; |
| @@ -3333,7 +3333,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) · 2 unmodified lines | ||
| 3333 | 3333 | b43_ntab_write(dev, B43_NTAB32(30, 3), tmp32); |
| 3334 | 3334 | |
| 3335 | 3335 | if (dev->phy.rev == 4 && |
| 3336 | − b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { | |
| 3336 | + b43_current_band(dev->wl) == NL80211_BAND_5GHZ) { | |
| 3337 | 3337 | b43_radio_write(dev, B2056_TX0 | B2056_TX_GMBB_IDAC, |
| 3338 | 3338 | 0x70); |
| 3339 | 3339 | 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 | ||
| 3376 | 3376 | delays1[5] = 0x14; |
| 3377 | 3377 | } |
| 3378 | 3378 | |
| 3379 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ && | |
| 3379 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ && | |
| 3380 | 3380 | nphy->band5g_pwrgain) { |
| 3381 | 3381 | b43_radio_mask(dev, B2055_C1_TX_RF_SPARE, ~0x8); |
| 3382 | 3382 | 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 | ||
| 3451 | 3451 | struct b43_phy *phy = &dev->phy; |
| 3452 | 3452 | struct b43_phy_n *nphy = phy->n; |
| 3453 | 3453 | |
| 3454 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 3454 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 3455 | 3455 | b43_nphy_classifier(dev, 1, 0); |
| 3456 | 3456 | else |
| 3457 | 3457 | 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 | ||
| 3586 | 3586 | gain = (target.pad[core]) | (target.pga[core] << 4) | |
| 3587 | 3587 | (target.txgm[core] << 8); |
| 3588 | 3588 | |
| 3589 | − indx = (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) ? | |
| 3589 | + indx = (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) ? | |
| 3590 | 3590 | 1 : 0; |
| 3591 | 3591 | for (i = 0; i < 9; i++) |
| 3592 | 3592 | 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 | ||
| 3614 | 3614 | struct b43_phy_n *nphy = dev->phy.n; |
| 3615 | 3615 | u8 i; |
| 3616 | 3616 | u16 bmask, val, tmp; |
| 3617 | − enum ieee80211_band band = b43_current_band(dev->wl); | |
| 3617 | + enum nl80211_band band = b43_current_band(dev->wl); | |
| 3618 | 3618 | |
| 3619 | 3619 | if (nphy->hang_avoid) |
| 3620 | 3620 | 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 | ||
| 3679 | 3679 | } |
| 3680 | 3680 | b43_phy_maskset(dev, B43_NPHY_TXPCTL_CMD, ~(bmask), val); |
| 3681 | 3681 | |
| 3682 | − if (band == IEEE80211_BAND_5GHZ) { | |
| 3682 | + if (band == NL80211_BAND_5GHZ) { | |
| 3683 | 3683 | if (phy->rev >= 19) { |
| 3684 | 3684 | /* TODO */ |
| 3685 | 3685 | } else if (phy->rev >= 7) { |
| @@ -3770,7 +3770,7 @@ static void b43_nphy_tx_power_fix(struct b43_wldev *dev) · 84 unmodified lines | ||
| 3770 | 3770 | txpi[0] = 72; |
| 3771 | 3771 | txpi[1] = 72; |
| 3772 | 3772 | } else { |
| 3773 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 3773 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 3774 | 3774 | txpi[0] = sprom->txpid2g[0]; |
| 3775 | 3775 | txpi[1] = sprom->txpid2g[1]; |
| 3776 | 3776 | } 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 | ||
| 3868 | 3868 | } else if (phy->rev >= 7) { |
| 3869 | 3869 | for (core = 0; core < 2; core++) { |
| 3870 | 3870 | r = core ? 0x190 : 0x170; |
| 3871 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 3871 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 3872 | 3872 | b43_radio_write(dev, r + 0x5, 0x5); |
| 3873 | 3873 | b43_radio_write(dev, r + 0x9, 0xE); |
| 3874 | 3874 | if (phy->rev != 5) |
| @@ -3892,7 +3892,7 @@ static void b43_nphy_ipa_internal_tssi_setup(struct b43_wldev *dev) · 17 unmodified lines | ||
| 3892 | 3892 | b43_radio_write(dev, r + 0xC, 0); |
| 3893 | 3893 | } |
| 3894 | 3894 | } else { |
| 3895 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 3895 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 3896 | 3896 | b43_radio_write(dev, B2056_SYN_RESERVED_ADDR31, 0x128); |
| 3897 | 3897 | else |
| 3898 | 3898 | 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 | ||
| 3909 | 3909 | b43_radio_write(dev, r | B2056_TX_TSSI_MISC1, 8); |
| 3910 | 3910 | b43_radio_write(dev, r | B2056_TX_TSSI_MISC2, 0); |
| 3911 | 3911 | 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) { | |
| 3913 | 3913 | b43_radio_write(dev, r | B2056_TX_TX_SSI_MASTER, |
| 3914 | 3914 | 0x5); |
| 3915 | 3915 | if (phy->rev != 5) |
| @@ -4098,7 +4098,7 @@ static void b43_nphy_tx_power_ctl_setup(struct b43_wldev *dev) · 182 unmodified lines | ||
| 4098 | 4098 | b0[0] = b0[1] = 5612; |
| 4099 | 4099 | b1[0] = b1[1] = -1393; |
| 4100 | 4100 | } else { |
| 4101 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 4101 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 4102 | 4102 | for (c = 0; c < 2; c++) { |
| 4103 | 4103 | idle[c] = nphy->pwr_ctl_info[c].idle_tssi_2g; |
| 4104 | 4104 | 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 | ||
| 4153 | 4153 | for (c = 0; c < 2; c++) { |
| 4154 | 4154 | r = c ? 0x190 : 0x170; |
| 4155 | 4155 | 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); | |
| 4157 | 4157 | } |
| 4158 | 4158 | } else { |
| 4159 | 4159 | 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; | |
| 4161 | 4161 | b43_radio_write(dev, |
| 4162 | 4162 | B2056_TX0 | B2056_TX_TX_SSI_MUX, tmp); |
| 4163 | 4163 | b43_radio_write(dev, |
| @@ -4267,13 +4267,13 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) · 103 unmodified lines | ||
| 4267 | 4267 | } else if (phy->rev >= 7) { |
| 4268 | 4268 | pga_gain = (table[i] >> 24) & 0xf; |
| 4269 | 4269 | 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) | |
| 4271 | 4271 | rfpwr_offset = rf_pwr_offset_table[pad_gain]; |
| 4272 | 4272 | else |
| 4273 | 4273 | rfpwr_offset = rf_pwr_offset_table[pga_gain]; |
| 4274 | 4274 | } else { |
| 4275 | 4275 | 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) | |
| 4277 | 4277 | rfpwr_offset = b43_ntab_papd_pga_gain_delta_ipa_2g[pga_gain]; |
| 4278 | 4278 | else |
| 4279 | 4279 | rfpwr_offset = 0; /* FIXME */ |
| @@ -4288,7 +4288,7 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) · 8 unmodified lines | ||
| 4288 | 4288 | static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable) |
| 4289 | 4289 | { |
| 4290 | 4290 | struct b43_phy_n *nphy = dev->phy.n; |
| 4291 | − enum ieee80211_band band; | |
| 4291 | + enum nl80211_band band; | |
| 4292 | 4292 | u16 tmp; |
| 4293 | 4293 | |
| 4294 | 4294 | if (!enable) { |
| @@ -4300,12 +4300,12 @@ static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable) · 5 unmodified lines | ||
| 4300 | 4300 | if (dev->phy.rev >= 7) { |
| 4301 | 4301 | tmp = 0x1480; |
| 4302 | 4302 | } else if (dev->phy.rev >= 3) { |
| 4303 | − if (band == IEEE80211_BAND_5GHZ) | |
| 4303 | + if (band == NL80211_BAND_5GHZ) | |
| 4304 | 4304 | tmp = 0x600; |
| 4305 | 4305 | else |
| 4306 | 4306 | tmp = 0x480; |
| 4307 | 4307 | } else { |
| 4308 | − if (band == IEEE80211_BAND_5GHZ) | |
| 4308 | + if (band == NL80211_BAND_5GHZ) | |
| 4309 | 4309 | tmp = 0x180; |
| 4310 | 4310 | else |
| 4311 | 4311 | tmp = 0x120; |
| @@ -4734,7 +4734,7 @@ static void b43_nphy_restore_rssi_cal(struct b43_wldev *dev) · 422 unmodified lines | ||
| 4734 | 4734 | u16 *rssical_radio_regs = NULL; |
| 4735 | 4735 | u16 *rssical_phy_regs = NULL; |
| 4736 | 4736 | |
| 4737 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 4737 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 4738 | 4738 | if (!nphy->rssical_chanspec_2G.center_freq) |
| 4739 | 4739 | return; |
| 4740 | 4740 | 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 | ||
| 4804 | 4804 | save[off + 7] = b43_radio_read(dev, r + R2057_TX0_TSSIG); |
| 4805 | 4805 | save[off + 8] = b43_radio_read(dev, r + R2057_TX0_TSSI_MISC1); |
| 4806 | 4806 | |
| 4807 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { | |
| 4807 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) { | |
| 4808 | 4808 | b43_radio_write(dev, r + R2057_TX0_TX_SSI_MASTER, 0xA); |
| 4809 | 4809 | b43_radio_write(dev, r + R2057_TX0_IQCAL_VCM_HG, 0x43); |
| 4810 | 4810 | 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 | ||
| 4864 | 4864 | save[offset + 9] = b43_radio_read(dev, B2055_XOMISC); |
| 4865 | 4865 | save[offset + 10] = b43_radio_read(dev, B2055_PLL_LFC1); |
| 4866 | 4866 | |
| 4867 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) { | |
| 4867 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) { | |
| 4868 | 4868 | b43_radio_write(dev, tmp | B2055_CAL_RVARCTL, 0x0A); |
| 4869 | 4869 | b43_radio_write(dev, tmp | B2055_CAL_LPOCTL, 0x40); |
| 4870 | 4870 | 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 | ||
| 5005 | 5005 | b43_nphy_pa_set_tx_dig_filter(dev, 0x186, |
| 5006 | 5006 | tbl_tx_filter_coef_rev4[3]); |
| 5007 | 5007 | } else { |
| 5008 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 5008 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 5009 | 5009 | b43_nphy_pa_set_tx_dig_filter(dev, 0x186, |
| 5010 | 5010 | tbl_tx_filter_coef_rev4[5]); |
| 5011 | 5011 | if (dev->phy.channel == 14) |
| @@ -5185,7 +5185,7 @@ static void b43_nphy_tx_cal_phy_setup(struct b43_wldev *dev) · 173 unmodified lines | ||
| 5185 | 5185 | false, 0); |
| 5186 | 5186 | } else if (phy->rev == 7) { |
| 5187 | 5187 | 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) { | |
| 5189 | 5189 | b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE0, ~1, 0); |
| 5190 | 5190 | b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE1, ~1, 0); |
| 5191 | 5191 | } else { |
| @@ -5210,7 +5210,7 @@ static void b43_nphy_tx_cal_phy_setup(struct b43_wldev *dev) · 18 unmodified lines | ||
| 5210 | 5210 | b43_ntab_write(dev, B43_NTAB16(8, 18), tmp); |
| 5211 | 5211 | regs[5] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC1); |
| 5212 | 5212 | 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) | |
| 5214 | 5214 | tmp = 0x0180; |
| 5215 | 5215 | else |
| 5216 | 5216 | tmp = 0x0120; |
| @@ -5233,7 +5233,7 @@ static void b43_nphy_save_cal(struct b43_wldev *dev) · 16 unmodified lines | ||
| 5233 | 5233 | if (nphy->hang_avoid) |
| 5234 | 5234 | b43_nphy_stay_in_carrier_search(dev, 1); |
| 5235 | 5235 | |
| 5236 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 5236 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 5237 | 5237 | rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G; |
| 5238 | 5238 | txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G; |
| 5239 | 5239 | iqcal_chanspec = &nphy->iqcal_chanspec_2G; |
| @@ -5304,7 +5304,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev) · 64 unmodified lines | ||
| 5304 | 5304 | u16 *txcal_radio_regs = NULL; |
| 5305 | 5305 | struct b43_phy_n_iq_comp *rxcal_coeffs = NULL; |
| 5306 | 5306 | |
| 5307 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 5307 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 5308 | 5308 | if (!nphy->iqcal_chanspec_2G.center_freq) |
| 5309 | 5309 | return; |
| 5310 | 5310 | table = nphy->cal_cache.txcal_coeffs_2G; |
| @@ -5332,7 +5332,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev) · 21 unmodified lines | ||
| 5332 | 5332 | if (dev->phy.rev < 2) |
| 5333 | 5333 | b43_nphy_tx_iq_workaround(dev); |
| 5334 | 5334 | |
| 5335 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 5335 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 5336 | 5336 | txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G; |
| 5337 | 5337 | rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G; |
| 5338 | 5338 | } else { |
| @@ -5422,7 +5422,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev, · 83 unmodified lines | ||
| 5422 | 5422 | |
| 5423 | 5423 | phy6or5x = dev->phy.rev >= 6 || |
| 5424 | 5424 | (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); | |
| 5426 | 5426 | if (phy6or5x) { |
| 5427 | 5427 | if (b43_is_40mhz(dev)) { |
| 5428 | 5428 | 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 | ||
| 5657 | 5657 | u16 tmp[6]; |
| 5658 | 5658 | u16 uninitialized_var(cur_hpf1), uninitialized_var(cur_hpf2), cur_lna; |
| 5659 | 5659 | u32 real, imag; |
| 5660 | − enum ieee80211_band band; | |
| 5660 | + enum nl80211_band band; | |
| 5661 | 5661 | |
| 5662 | 5662 | u8 use; |
| 5663 | 5663 | u16 cur_hpf; |
| @@ -5712,18 +5712,18 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev, · 48 unmodified lines | ||
| 5712 | 5712 | band = b43_current_band(dev->wl); |
| 5713 | 5713 | |
| 5714 | 5714 | if (nphy->rxcalparams & 0xFF000000) { |
| 5715 | − if (band == IEEE80211_BAND_5GHZ) | |
| 5715 | + if (band == NL80211_BAND_5GHZ) | |
| 5716 | 5716 | b43_phy_write(dev, rfctl[0], 0x140); |
| 5717 | 5717 | else |
| 5718 | 5718 | b43_phy_write(dev, rfctl[0], 0x110); |
| 5719 | 5719 | } else { |
| 5720 | − if (band == IEEE80211_BAND_5GHZ) | |
| 5720 | + if (band == NL80211_BAND_5GHZ) | |
| 5721 | 5721 | b43_phy_write(dev, rfctl[0], 0x180); |
| 5722 | 5722 | else |
| 5723 | 5723 | b43_phy_write(dev, rfctl[0], 0x120); |
| 5724 | 5724 | } |
| 5725 | 5725 | |
| 5726 | − if (band == IEEE80211_BAND_5GHZ) | |
| 5726 | + if (band == NL80211_BAND_5GHZ) | |
| 5727 | 5727 | b43_phy_write(dev, rfctl[1], 0x148); |
| 5728 | 5728 | else |
| 5729 | 5729 | 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 | ||
| 5919 | 5919 | #if 0 |
| 5920 | 5920 | /* Some extra gains */ |
| 5921 | 5921 | 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) | |
| 5923 | 5923 | hw_gain += sprom->antenna_gain.a0; |
| 5924 | 5924 | else |
| 5925 | 5925 | hw_gain += sprom->antenna_gain.a1; |
| @@ -6043,7 +6043,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 117 unmodified lines | ||
| 6043 | 6043 | u8 tx_pwr_state; |
| 6044 | 6044 | struct nphy_txgains target; |
| 6045 | 6045 | u16 tmp; |
| 6046 | − enum ieee80211_band tmp2; | |
| 6046 | + enum nl80211_band tmp2; | |
| 6047 | 6047 | bool do_rssi_cal; |
| 6048 | 6048 | |
| 6049 | 6049 | u16 clip[2]; |
| @@ -6051,7 +6051,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 1 unmodified line | ||
| 6051 | 6051 | |
| 6052 | 6052 | if ((dev->phy.rev >= 3) && |
| 6053 | 6053 | (sprom->boardflags_lo & B43_BFL_EXTLNA) && |
| 6054 | − (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ)) { | |
| 6054 | + (b43_current_band(dev->wl) == NL80211_BAND_2GHZ)) { | |
| 6055 | 6055 | switch (dev->dev->bus_type) { |
| 6056 | 6056 | #ifdef CONFIG_B43_BCMA |
| 6057 | 6057 | case B43_BUS_BCMA: |
| @@ -6170,7 +6170,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 112 unmodified lines | ||
| 6170 | 6170 | |
| 6171 | 6171 | b43_nphy_classifier(dev, 0, 0); |
| 6172 | 6172 | 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) | |
| 6174 | 6174 | b43_nphy_bphy_init(dev); |
| 6175 | 6175 | |
| 6176 | 6176 | tx_pwr_state = nphy->txpwrctrl; |
| @@ -6187,7 +6187,7 @@ static int b43_phy_initn(struct b43_wldev *dev) · 10 unmodified lines | ||
| 6187 | 6187 | |
| 6188 | 6188 | do_rssi_cal = false; |
| 6189 | 6189 | if (phy->rev >= 3) { |
| 6190 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 6190 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 6191 | 6191 | do_rssi_cal = !nphy->rssical_chanspec_2G.center_freq; |
| 6192 | 6192 | else |
| 6193 | 6193 | 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 | ||
| 6201 | 6201 | } |
| 6202 | 6202 | |
| 6203 | 6203 | 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) | |
| 6205 | 6205 | do_cal = !nphy->iqcal_chanspec_2G.center_freq; |
| 6206 | 6206 | else |
| 6207 | 6207 | 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 | ||
| 6291 | 6291 | int ch = new_channel->hw_value; |
| 6292 | 6292 | u16 tmp16; |
| 6293 | 6293 | |
| 6294 | − if (new_channel->band == IEEE80211_BAND_5GHZ) { | |
| 6294 | + if (new_channel->band == NL80211_BAND_5GHZ) { | |
| 6295 | 6295 | /* Switch to 2 GHz for a moment to access B43_PHY_B_BBCFG */ |
| 6296 | 6296 | b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); |
| 6297 | 6297 | |
| @@ -6302,7 +6302,7 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev, · 4 unmodified lines | ||
| 6302 | 6302 | B43_PHY_B_BBCFG_RSTCCA | B43_PHY_B_BBCFG_RSTRX); |
| 6303 | 6303 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16); |
| 6304 | 6304 | 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) { | |
| 6306 | 6306 | b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); |
| 6307 | 6307 | tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); |
| 6308 | 6308 | 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 | ||
| 6319 | 6319 | b43_phy_set(dev, B43_PHY_B_TEST, 0x0800); |
| 6320 | 6320 | } else { |
| 6321 | 6321 | b43_nphy_classifier(dev, 2, 2); |
| 6322 | − if (new_channel->band == IEEE80211_BAND_2GHZ) | |
| 6322 | + if (new_channel->band == NL80211_BAND_2GHZ) | |
| 6323 | 6323 | b43_phy_mask(dev, B43_PHY_B_TEST, ~0x840); |
| 6324 | 6324 | } |
| 6325 | 6325 | |
| @@ -6449,7 +6449,7 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, · 123 unmodified lines | ||
| 6449 | 6449 | &(tabent_r7->phy_regs) : &(tabent_r7_2g->phy_regs); |
| 6450 | 6450 | |
| 6451 | 6451 | 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; | |
| 6453 | 6453 | b43_radio_maskset(dev, R2057_TIA_CONFIG_CORE0, ~2, tmp); |
| 6454 | 6454 | b43_radio_maskset(dev, R2057_TIA_CONFIG_CORE1, ~2, tmp); |
| 6455 | 6455 | } |
| @@ -6457,12 +6457,12 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, · 1 unmodified line | ||
| 6457 | 6457 | b43_radio_2057_setup(dev, tabent_r7, tabent_r7_2g); |
| 6458 | 6458 | b43_nphy_channel_setup(dev, phy_regs, channel); |
| 6459 | 6459 | } else if (phy->rev >= 3) { |
| 6460 | − tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 4 : 0; | |
| 6460 | + tmp = (channel->band == NL80211_BAND_5GHZ) ? 4 : 0; | |
| 6461 | 6461 | b43_radio_maskset(dev, 0x08, 0xFFFB, tmp); |
| 6462 | 6462 | b43_radio_2056_setup(dev, tabent_r3); |
| 6463 | 6463 | b43_nphy_channel_setup(dev, &(tabent_r3->phy_regs), channel); |
| 6464 | 6464 | } else { |
| 6465 | − tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 0x0020 : 0x0050; | |
| 6465 | + tmp = (channel->band == NL80211_BAND_5GHZ) ? 0x0020 : 0x0050; | |
| 6466 | 6466 | b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp); |
| 6467 | 6467 | b43_radio_2055_setup(dev, tabent_r2); |
| 6468 | 6468 | 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 | ||
| 6692 | 6692 | enum nl80211_channel_type channel_type = |
| 6693 | 6693 | cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef); |
| 6694 | 6694 | |
| 6695 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 6695 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 6696 | 6696 | if ((new_channel < 1) || (new_channel > 14)) |
| 6697 | 6697 | return -EINVAL; |
| 6698 | 6698 | } else { |
| @@ -6705,7 +6705,7 @@ static int b43_nphy_op_switch_channel(struct b43_wldev *dev, · 6 unmodified lines | ||
| 6705 | 6705 | |
| 6706 | 6706 | static unsigned int b43_nphy_op_get_default_chan(struct b43_wldev *dev) |
| 6707 | 6707 | { |
| 6708 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | |
| 6708 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) | |
| 6709 | 6709 | return 1; |
| 6710 | 6710 | return 36; |
| 6711 | 6711 | } |
| @@ -560,7 +560,7 @@ void b2062_upload_init_table(struct b43_wldev *dev) · 559 unmodified lines | ||
| 560 | 560 | |
| 561 | 561 | for (i = 0; i < ARRAY_SIZE(b2062_init_tab); i++) { |
| 562 | 562 | 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) { | |
| 564 | 564 | if (!(e->flags & B206X_FLAG_G)) |
| 565 | 565 | continue; |
| 566 | 566 | 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 | ||
| 579 | 579 | |
| 580 | 580 | for (i = 0; i < ARRAY_SIZE(b2063_init_tab); i++) { |
| 581 | 581 | 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) { | |
| 583 | 583 | if (!(e->flags & B206X_FLAG_G)) |
| 584 | 584 | continue; |
| 585 | 585 | 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 | ||
| 2379 | 2379 | tmp |= data.pga << 8; |
| 2380 | 2380 | tmp |= data.gm; |
| 2381 | 2381 | 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) | |
| 2383 | 2383 | tmp |= 0x10 << 24; |
| 2384 | 2384 | else |
| 2385 | 2385 | tmp |= 0x70 << 24; |
| 2386 | 2386 | } else { |
| 2387 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 2387 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 2388 | 2388 | tmp |= 0x14 << 24; |
| 2389 | 2389 | else |
| 2390 | 2390 | tmp |= 0x7F << 24; |
| @@ -2423,7 +2423,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) · 32 unmodified lines | ||
| 2423 | 2423 | (sprom->boardflags_lo & B43_BFL_HGPA)) |
| 2424 | 2424 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2425 | 2425 | 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) | |
| 2427 | 2427 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2428 | 2428 | lpphy_rev0_2ghz_tx_gain_table); |
| 2429 | 2429 | else |
| @@ -2435,7 +2435,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) · 5 unmodified lines | ||
| 2435 | 2435 | (sprom->boardflags_lo & B43_BFL_HGPA)) |
| 2436 | 2436 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2437 | 2437 | 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) | |
| 2439 | 2439 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2440 | 2440 | lpphy_rev1_2ghz_tx_gain_table); |
| 2441 | 2441 | else |
| @@ -2446,7 +2446,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) · 4 unmodified lines | ||
| 2446 | 2446 | if (sprom->boardflags_hi & B43_BFH_NOPA) |
| 2447 | 2447 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2448 | 2448 | 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) | |
| 2450 | 2450 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2451 | 2451 | lpphy_rev2_2ghz_tx_gain_table); |
| 2452 | 2452 | else |
| @@ -3502,7 +3502,7 @@ static void b43_nphy_tables_init_rev7_volatile(struct b43_wldev *dev) · 3501 unmodified lines | ||
| 3502 | 3502 | { 0x2, 0x18, 0x2 }, /* Core 1 */ |
| 3503 | 3503 | }; |
| 3504 | 3504 | |
| 3505 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 3505 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 3506 | 3506 | antswlut = sprom->fem.ghz5.antswlut; |
| 3507 | 3507 | else |
| 3508 | 3508 | antswlut = sprom->fem.ghz2.antswlut; |
| @@ -3566,7 +3566,7 @@ static void b43_nphy_tables_init_rev3(struct b43_wldev *dev) · 57 unmodified lines | ||
| 3566 | 3566 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
| 3567 | 3567 | u8 antswlut; |
| 3568 | 3568 | |
| 3569 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | |
| 3569 | + if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) | |
| 3570 | 3570 | antswlut = sprom->fem.ghz5.antswlut; |
| 3571 | 3571 | else |
| 3572 | 3572 | 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 | ||
| 3651 | 3651 | { |
| 3652 | 3652 | struct b43_phy *phy = &dev->phy; |
| 3653 | 3653 | |
| 3654 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 3654 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 3655 | 3655 | switch (phy->rev) { |
| 3656 | 3656 | case 17: |
| 3657 | 3657 | 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 | ||
| 3698 | 3698 | const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev) |
| 3699 | 3699 | { |
| 3700 | 3700 | 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); | |
| 3702 | 3702 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
| 3703 | 3703 | |
| 3704 | 3704 | if (dev->phy.rev < 3) |
| 3705 | 3705 | return b43_ntab_tx_gain_rev0_1_2; |
| 3706 | 3706 | |
| 3707 | 3707 | /* 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)) { | |
| 3710 | 3710 | 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) { | |
| 3712 | 3712 | switch (phy->rev) { |
| 3713 | 3713 | case 6: |
| 3714 | 3714 | case 5: |
| @@ -3746,7 +3746,7 @@ const s16 *b43_ntab_get_rf_pwr_offset_table(struct b43_wldev *dev) · 31 unmodified lines | ||
| 3746 | 3746 | { |
| 3747 | 3747 | struct b43_phy *phy = &dev->phy; |
| 3748 | 3748 | |
| 3749 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 3749 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 3750 | 3750 | switch (phy->rev) { |
| 3751 | 3751 | case 17: |
| 3752 | 3752 | if (phy->radio_rev == 14) |
| @@ -701,7 +701,7 @@ void b43_phy_lcn_tables_init(struct b43_wldev *dev) · 700 unmodified lines | ||
| 701 | 701 | |
| 702 | 702 | b43_phy_lcn_upload_static_tables(dev); |
| 703 | 703 | |
| 704 | − if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | |
| 704 | + if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { | |
| 705 | 705 | if (sprom->boardflags_lo & B43_BFL_FEM) |
| 706 | 706 | b43_phy_lcn_load_tx_gain_tab(dev, |
| 707 | 707 | b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0); |
| @@ -803,7 +803,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) · 802 unmodified lines | ||
| 803 | 803 | chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT; |
| 804 | 804 | switch (chanstat & B43_RX_CHAN_PHYTYPE) { |
| 805 | 805 | case B43_PHYTYPE_A: |
| 806 | − status.band = IEEE80211_BAND_5GHZ; | |
| 806 | + status.band = NL80211_BAND_5GHZ; | |
| 807 | 807 | B43_WARN_ON(1); |
| 808 | 808 | /* FIXME: We don't really know which value the "chanid" contains. |
| 809 | 809 | * 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 | ||
| 811 | 811 | ieee80211_channel_to_frequency(chanid, status.band); |
| 812 | 812 | break; |
| 813 | 813 | case B43_PHYTYPE_G: |
| 814 | − status.band = IEEE80211_BAND_2GHZ; | |
| 814 | + status.band = NL80211_BAND_2GHZ; | |
| 815 | 815 | /* Somewhere between 478.104 and 508.1084 firmware for G-PHY |
| 816 | 816 | * has been modified to be compatible with N-PHY and others. |
| 817 | 817 | */ |
| @@ -826,9 +826,9 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) · 8 unmodified lines | ||
| 826 | 826 | /* chanid is the SHM channel cookie. Which is the plain |
| 827 | 827 | * channel number in b43. */ |
| 828 | 828 | if (chanstat & B43_RX_CHAN_5GHZ) |
| 829 | − status.band = IEEE80211_BAND_5GHZ; | |
| 829 | + status.band = NL80211_BAND_5GHZ; | |
| 830 | 830 | else |
| 831 | − status.band = IEEE80211_BAND_2GHZ; | |
| 831 | + status.band = NL80211_BAND_2GHZ; | |
| 832 | 832 | status.freq = |
| 833 | 833 | ieee80211_channel_to_frequency(chanid, status.band); |
| 834 | 834 | break; |
| @@ -1056,7 +1056,7 @@ static void b43legacy_write_probe_resp_plcp(struct b43legacy_wldev *dev, · 1055 unmodified lines | ||
| 1056 | 1056 | b43legacy_generate_plcp_hdr(&plcp, size + FCS_LEN, rate->hw_value); |
| 1057 | 1057 | dur = ieee80211_generic_frame_duration(dev->wl->hw, |
| 1058 | 1058 | dev->wl->vif, |
| 1059 | − IEEE80211_BAND_2GHZ, | |
| 1059 | + NL80211_BAND_2GHZ, | |
| 1060 | 1060 | size, |
| 1061 | 1061 | rate); |
| 1062 | 1062 | /* 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 | ||
| 1122 | 1122 | IEEE80211_STYPE_PROBE_RESP); |
| 1123 | 1123 | dur = ieee80211_generic_frame_duration(dev->wl->hw, |
| 1124 | 1124 | dev->wl->vif, |
| 1125 | − IEEE80211_BAND_2GHZ, | |
| 1125 | + NL80211_BAND_2GHZ, | |
| 1126 | 1126 | *dest_size, |
| 1127 | 1127 | rate); |
| 1128 | 1128 | hdr->duration_id = dur; |
| @@ -2719,7 +2719,7 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw, · 1590 unmodified lines | ||
| 2719 | 2719 | |
| 2720 | 2720 | /* Switch the PHY mode (if necessary). */ |
| 2721 | 2721 | switch (conf->chandef.chan->band) { |
| 2722 | − case IEEE80211_BAND_2GHZ: | |
| 2722 | + case NL80211_BAND_2GHZ: | |
| 2723 | 2723 | if (phy->type == B43legacy_PHYTYPE_B) |
| 2724 | 2724 | new_phymode = B43legacy_PHYMODE_B; |
| 2725 | 2725 | else |
| @@ -2792,7 +2792,7 @@ out_unlock_mutex: · 66 unmodified lines | ||
| 2792 | 2792 | static void b43legacy_update_basic_rates(struct b43legacy_wldev *dev, u32 brates) |
| 2793 | 2793 | { |
| 2794 | 2794 | struct ieee80211_supported_band *sband = |
| 2795 | − dev->wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 2795 | + dev->wl->hw->wiphy->bands[NL80211_BAND_2GHZ]; | |
| 2796 | 2796 | struct ieee80211_rate *rate; |
| 2797 | 2797 | int i; |
| 2798 | 2798 | u16 basic, direct, offset, basic_offset, rateptr; |
| @@ -3630,13 +3630,13 @@ static int b43legacy_setup_modes(struct b43legacy_wldev *dev, · 831 unmodified lines | ||
| 3630 | 3630 | |
| 3631 | 3631 | phy->possible_phymodes = 0; |
| 3632 | 3632 | if (have_bphy) { |
| 3633 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | |
| 3633 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = | |
| 3634 | 3634 | &b43legacy_band_2GHz_BPHY; |
| 3635 | 3635 | phy->possible_phymodes |= B43legacy_PHYMODE_B; |
| 3636 | 3636 | } |
| 3637 | 3637 | |
| 3638 | 3638 | if (have_gphy) { |
| 3639 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | |
| 3639 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = | |
| 3640 | 3640 | &b43legacy_band_2GHz_GPHY; |
| 3641 | 3641 | phy->possible_phymodes |= B43legacy_PHYMODE_G; |
| 3642 | 3642 | } |
| @@ -565,7 +565,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev, · 564 unmodified lines | ||
| 565 | 565 | switch (chanstat & B43legacy_RX_CHAN_PHYTYPE) { |
| 566 | 566 | case B43legacy_PHYTYPE_B: |
| 567 | 567 | case B43legacy_PHYTYPE_G: |
| 568 | − status.band = IEEE80211_BAND_2GHZ; | |
| 568 | + status.band = NL80211_BAND_2GHZ; | |
| 569 | 569 | status.freq = chanid + 2400; |
| 570 | 570 | break; |
| 571 | 571 | default: |
| @@ -144,7 +144,7 @@ static struct ieee80211_rate __wl_rates[] = { · 143 unmodified lines | ||
| 144 | 144 | #define wl_a_rates_size (wl_g_rates_size - 4) |
| 145 | 145 | |
| 146 | 146 | #define CHAN2G(_channel, _freq) { \ |
| 147 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 147 | + .band = NL80211_BAND_2GHZ, \ | |
| 148 | 148 | .center_freq = (_freq), \ |
| 149 | 149 | .hw_value = (_channel), \ |
| 150 | 150 | .flags = IEEE80211_CHAN_DISABLED, \ |
| @@ -153,7 +153,7 @@ static struct ieee80211_rate __wl_rates[] = { · 2 unmodified lines | ||
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | #define CHAN5G(_channel) { \ |
| 156 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 156 | + .band = NL80211_BAND_5GHZ, \ | |
| 157 | 157 | .center_freq = 5000 + (5 * (_channel)), \ |
| 158 | 158 | .hw_value = (_channel), \ |
| 159 | 159 | .flags = IEEE80211_CHAN_DISABLED, \ |
| @@ -181,13 +181,13 @@ static struct ieee80211_channel __wl_5ghz_channels[] = { · 21 unmodified lines | ||
| 181 | 181 | * above is added to the band during setup. |
| 182 | 182 | */ |
| 183 | 183 | static const struct ieee80211_supported_band __wl_band_2ghz = { |
| 184 | − .band = IEEE80211_BAND_2GHZ, | |
| 184 | + .band = NL80211_BAND_2GHZ, | |
| 185 | 185 | .bitrates = wl_g_rates, |
| 186 | 186 | .n_bitrates = wl_g_rates_size, |
| 187 | 187 | }; |
| 188 | 188 | |
| 189 | 189 | static const struct ieee80211_supported_band __wl_band_5ghz = { |
| 190 | − .band = IEEE80211_BAND_5GHZ, | |
| 190 | + .band = NL80211_BAND_5GHZ, | |
| 191 | 191 | .bitrates = wl_a_rates, |
| 192 | 192 | .n_bitrates = wl_a_rates_size, |
| 193 | 193 | }; |
| @@ -292,13 +292,13 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf, · 98 unmodified lines | ||
| 292 | 292 | WARN_ON_ONCE(1); |
| 293 | 293 | } |
| 294 | 294 | switch (ch->chan->band) { |
| 295 | − case IEEE80211_BAND_2GHZ: | |
| 295 | + case NL80211_BAND_2GHZ: | |
| 296 | 296 | ch_inf.band = BRCMU_CHAN_BAND_2G; |
| 297 | 297 | break; |
| 298 | − case IEEE80211_BAND_5GHZ: | |
| 298 | + case NL80211_BAND_5GHZ: | |
| 299 | 299 | ch_inf.band = BRCMU_CHAN_BAND_5G; |
| 300 | 300 | break; |
| 301 | − case IEEE80211_BAND_60GHZ: | |
| 301 | + case NL80211_BAND_60GHZ: | |
| 302 | 302 | default: |
| 303 | 303 | WARN_ON_ONCE(1); |
| 304 | 304 | } |
| @@ -2679,9 +2679,9 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, · 2374 unmodified lines | ||
| 2679 | 2679 | channel = bi->ctl_ch; |
| 2680 | 2680 | |
| 2681 | 2681 | if (channel <= CH_MAX_2G_CHANNEL) |
| 2682 | − band = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 2682 | + band = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 2683 | 2683 | else |
| 2684 | − band = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 2684 | + band = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 2685 | 2685 | |
| 2686 | 2686 | freq = ieee80211_channel_to_frequency(channel, band->band); |
| 2687 | 2687 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| @@ -2788,9 +2788,9 @@ static s32 brcmf_inform_ibss(struct brcmf_cfg80211_info *cfg, · 100 unmodified lines | ||
| 2788 | 2788 | cfg->d11inf.decchspec(&ch); |
| 2789 | 2789 | |
| 2790 | 2790 | if (ch.band == BRCMU_CHAN_BAND_2G) |
| 2791 | − band = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 2791 | + band = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 2792 | 2792 | else |
| 2793 | − band = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 2793 | + band = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 2794 | 2794 | |
| 2795 | 2795 | freq = ieee80211_channel_to_frequency(ch.chnum, band->band); |
| 2796 | 2796 | cfg->channel = freq; |
| @@ -5215,9 +5215,9 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg, · 2418 unmodified lines | ||
| 5215 | 5215 | cfg->d11inf.decchspec(&ch); |
| 5216 | 5216 | |
| 5217 | 5217 | if (ch.band == BRCMU_CHAN_BAND_2G) |
| 5218 | − band = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 5218 | + band = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 5219 | 5219 | else |
| 5220 | − band = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 5220 | + band = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 5221 | 5221 | |
| 5222 | 5222 | freq = ieee80211_channel_to_frequency(ch.chnum, band->band); |
| 5223 | 5223 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| @@ -5707,11 +5707,11 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, · 483 unmodified lines | ||
| 5707 | 5707 | } |
| 5708 | 5708 | |
| 5709 | 5709 | wiphy = cfg_to_wiphy(cfg); |
| 5710 | − band = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 5710 | + band = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 5711 | 5711 | if (band) |
| 5712 | 5712 | for (i = 0; i < band->n_channels; i++) |
| 5713 | 5713 | band->channels[i].flags = IEEE80211_CHAN_DISABLED; |
| 5714 | − band = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 5714 | + band = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 5715 | 5715 | if (band) |
| 5716 | 5716 | for (i = 0; i < band->n_channels; i++) |
| 5717 | 5717 | band->channels[i].flags = IEEE80211_CHAN_DISABLED; |
| @@ -5722,9 +5722,9 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, · 4 unmodified lines | ||
| 5722 | 5722 | cfg->d11inf.decchspec(&ch); |
| 5723 | 5723 | |
| 5724 | 5724 | if (ch.band == BRCMU_CHAN_BAND_2G) { |
| 5725 | − band = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 5725 | + band = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 5726 | 5726 | } else if (ch.band == BRCMU_CHAN_BAND_5G) { |
| 5727 | − band = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 5727 | + band = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 5728 | 5728 | } else { |
| 5729 | 5729 | brcmf_err("Invalid channel Spec. 0x%x.\n", ch.chspec); |
| 5730 | 5730 | continue; |
| @@ -5839,7 +5839,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg) · 108 unmodified lines | ||
| 5839 | 5839 | return err; |
| 5840 | 5840 | } |
| 5841 | 5841 | |
| 5842 | − band = cfg_to_wiphy(cfg)->bands[IEEE80211_BAND_2GHZ]; | |
| 5842 | + band = cfg_to_wiphy(cfg)->bands[NL80211_BAND_2GHZ]; | |
| 5843 | 5843 | list = (struct brcmf_chanspec_list *)pbuf; |
| 5844 | 5844 | num_chan = le32_to_cpu(list->count); |
| 5845 | 5845 | 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 | ||
| 5871 | 5871 | band = WLC_BAND_2G; |
| 5872 | 5872 | err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); |
| 5873 | 5873 | if (!err) { |
| 5874 | − bw_cap[IEEE80211_BAND_2GHZ] = band; | |
| 5874 | + bw_cap[NL80211_BAND_2GHZ] = band; | |
| 5875 | 5875 | band = WLC_BAND_5G; |
| 5876 | 5876 | err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); |
| 5877 | 5877 | if (!err) { |
| 5878 | − bw_cap[IEEE80211_BAND_5GHZ] = band; | |
| 5878 | + bw_cap[NL80211_BAND_5GHZ] = band; | |
| 5879 | 5879 | return; |
| 5880 | 5880 | } |
| 5881 | 5881 | WARN_ON(1); |
| @@ -5890,14 +5890,14 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) · 8 unmodified lines | ||
| 5890 | 5890 | |
| 5891 | 5891 | switch (mimo_bwcap) { |
| 5892 | 5892 | 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; | |
| 5894 | 5894 | /* fall-thru */ |
| 5895 | 5895 | 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; | |
| 5897 | 5897 | /* fall-thru */ |
| 5898 | 5898 | 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; | |
| 5901 | 5901 | break; |
| 5902 | 5902 | default: |
| 5903 | 5903 | 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 | ||
| 5938 | 5938 | __le16 mcs_map; |
| 5939 | 5939 | |
| 5940 | 5940 | /* not allowed in 2.4G band */ |
| 5941 | − if (band->band == IEEE80211_BAND_2GHZ) | |
| 5941 | + if (band->band == NL80211_BAND_2GHZ) | |
| 5942 | 5942 | return; |
| 5943 | 5943 | |
| 5944 | 5944 | band->vht_cap.vht_supported = true; |
| @@ -5997,8 +5997,8 @@ static int brcmf_setup_wiphybands(struct wiphy *wiphy) · 52 unmodified lines | ||
| 5997 | 5997 | brcmf_get_bwcap(ifp, bw_cap); |
| 5998 | 5998 | } |
| 5999 | 5999 | 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]); | |
| 6002 | 6002 | |
| 6003 | 6003 | err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); |
| 6004 | 6004 | if (err) { |
| @@ -6321,7 +6321,7 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) · 316 unmodified lines | ||
| 6321 | 6321 | } |
| 6322 | 6322 | |
| 6323 | 6323 | band->n_channels = ARRAY_SIZE(__wl_2ghz_channels); |
| 6324 | − wiphy->bands[IEEE80211_BAND_2GHZ] = band; | |
| 6324 | + wiphy->bands[NL80211_BAND_2GHZ] = band; | |
| 6325 | 6325 | } |
| 6326 | 6326 | if (bandlist[i] == cpu_to_le32(WLC_BAND_5G)) { |
| 6327 | 6327 | 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 | ||
| 6338 | 6338 | } |
| 6339 | 6339 | |
| 6340 | 6340 | band->n_channels = ARRAY_SIZE(__wl_5ghz_channels); |
| 6341 | − wiphy->bands[IEEE80211_BAND_5GHZ] = band; | |
| 6341 | + wiphy->bands[NL80211_BAND_5GHZ] = band; | |
| 6342 | 6342 | } |
| 6343 | 6343 | } |
| 6344 | 6344 | err = brcmf_setup_wiphybands(wiphy); |
| @@ -6604,13 +6604,13 @@ static void brcmf_free_wiphy(struct wiphy *wiphy) · 259 unmodified lines | ||
| 6604 | 6604 | kfree(wiphy->iface_combinations[i].limits); |
| 6605 | 6605 | } |
| 6606 | 6606 | 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]); | |
| 6610 | 6610 | } |
| 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]); | |
| 6614 | 6614 | } |
| 6615 | 6615 | wiphy_free(wiphy); |
| 6616 | 6616 | } |
| @@ -6698,8 +6698,8 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, · 81 unmodified lines | ||
| 6698 | 6698 | * cfg80211 here that we do and have it decide we can enable |
| 6699 | 6699 | * it. But first check if device does support 2G operation. |
| 6700 | 6700 | */ |
| 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; | |
| 6703 | 6703 | *cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
| 6704 | 6704 | } |
| 6705 | 6705 | err = wiphy_register(wiphy); |
| @@ -1430,8 +1430,8 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, · 1429 unmodified lines | ||
| 1430 | 1430 | |
| 1431 | 1431 | freq = ieee80211_channel_to_frequency(ch.chnum, |
| 1432 | 1432 | ch.band == BRCMU_CHAN_BAND_2G ? |
| 1433 | − IEEE80211_BAND_2GHZ : | |
| 1434 | − IEEE80211_BAND_5GHZ); | |
| 1433 | + NL80211_BAND_2GHZ : | |
| 1434 | + NL80211_BAND_5GHZ); | |
| 1435 | 1435 | |
| 1436 | 1436 | wdev = &ifp->vif->wdev; |
| 1437 | 1437 | 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 | ||
| 1900 | 1900 | mgmt_frame_len = e->datalen - sizeof(*rxframe); |
| 1901 | 1901 | freq = ieee80211_channel_to_frequency(ch.chnum, |
| 1902 | 1902 | ch.band == BRCMU_CHAN_BAND_2G ? |
| 1903 | − IEEE80211_BAND_2GHZ : | |
| 1904 | − IEEE80211_BAND_5GHZ); | |
| 1903 | + NL80211_BAND_2GHZ : | |
| 1904 | + NL80211_BAND_5GHZ); | |
| 1905 | 1905 | |
| 1906 | 1906 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, 0); |
| 1907 | 1907 | |
| @@ -636,7 +636,7 @@ static void brcms_reg_apply_radar_flags(struct wiphy *wiphy) · 635 unmodified lines | ||
| 636 | 636 | struct ieee80211_channel *ch; |
| 637 | 637 | int i; |
| 638 | 638 | |
| 639 | − sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 639 | + sband = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 640 | 640 | if (!sband) |
| 641 | 641 | return; |
| 642 | 642 | |
| @@ -666,7 +666,7 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy, · 23 unmodified lines | ||
| 666 | 666 | const struct ieee80211_reg_rule *rule; |
| 667 | 667 | int band, i; |
| 668 | 668 | |
| 669 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 669 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 670 | 670 | sband = wiphy->bands[band]; |
| 671 | 671 | if (!sband) |
| 672 | 672 | continue; |
| @@ -710,7 +710,7 @@ static void brcms_reg_notifier(struct wiphy *wiphy, · 37 unmodified lines | ||
| 710 | 710 | brcms_reg_apply_beaconing_flags(wiphy, request->initiator); |
| 711 | 711 | |
| 712 | 712 | /* 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++) { | |
| 714 | 714 | sband = wiphy->bands[band]; |
| 715 | 715 | if (!sband) |
| 716 | 716 | continue; |
| @@ -755,9 +755,9 @@ void brcms_c_regd_init(struct brcms_c_info *wlc) · 38 unmodified lines | ||
| 755 | 755 | &sup_chan); |
| 756 | 756 | |
| 757 | 757 | if (band_idx == BAND_2G_INDEX) |
| 758 | − sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 758 | + sband = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 759 | 759 | else |
| 760 | − sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 760 | + sband = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 761 | 761 | |
| 762 | 762 | for (i = 0; i < sband->n_channels; i++) { |
| 763 | 763 | ch = &sband->channels[i]; |
| @@ -49,7 +49,7 @@ · 48 unmodified lines | ||
| 49 | 49 | FIF_PSPOLL) |
| 50 | 50 | |
| 51 | 51 | #define CHAN2GHZ(channel, freqency, chflags) { \ |
| 52 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 52 | + .band = NL80211_BAND_2GHZ, \ | |
| 53 | 53 | .center_freq = (freqency), \ |
| 54 | 54 | .hw_value = (channel), \ |
| 55 | 55 | .flags = chflags, \ |
| @@ -58,7 +58,7 @@ · 2 unmodified lines | ||
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | #define CHAN5GHZ(channel, chflags) { \ |
| 61 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 61 | + .band = NL80211_BAND_5GHZ, \ | |
| 62 | 62 | .center_freq = 5000 + 5*(channel), \ |
| 63 | 63 | .hw_value = (channel), \ |
| 64 | 64 | .flags = chflags, \ |
| @@ -217,7 +217,7 @@ static struct ieee80211_rate legacy_ratetable[] = { · 152 unmodified lines | ||
| 217 | 217 | }; |
| 218 | 218 | |
| 219 | 219 | static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = { |
| 220 | − .band = IEEE80211_BAND_2GHZ, | |
| 220 | + .band = NL80211_BAND_2GHZ, | |
| 221 | 221 | .channels = brcms_2ghz_chantable, |
| 222 | 222 | .n_channels = ARRAY_SIZE(brcms_2ghz_chantable), |
| 223 | 223 | .bitrates = legacy_ratetable, |
| @@ -238,7 +238,7 @@ static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = { · 14 unmodified lines | ||
| 238 | 238 | }; |
| 239 | 239 | |
| 240 | 240 | static const struct ieee80211_supported_band brcms_band_5GHz_nphy_template = { |
| 241 | − .band = IEEE80211_BAND_5GHZ, | |
| 241 | + .band = NL80211_BAND_5GHZ, | |
| 242 | 242 | .channels = brcms_5ghz_nphy_chantable, |
| 243 | 243 | .n_channels = ARRAY_SIZE(brcms_5ghz_nphy_chantable), |
| 244 | 244 | .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 | ||
| 1026 | 1026 | int has_5g = 0; |
| 1027 | 1027 | u16 phy_type; |
| 1028 | 1028 | |
| 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; | |
| 1031 | 1031 | |
| 1032 | 1032 | phy_type = brcms_c_get_phy_type(wl->wlc, 0); |
| 1033 | 1033 | 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 | ||
| 1038 | 1038 | band->ht_cap.mcs.rx_mask[1] = 0; |
| 1039 | 1039 | band->ht_cap.mcs.rx_highest = cpu_to_le16(72); |
| 1040 | 1040 | } |
| 1041 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = band; | |
| 1041 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = band; | |
| 1042 | 1042 | } else { |
| 1043 | 1043 | return -EPERM; |
| 1044 | 1044 | } |
| @@ -1049,7 +1049,7 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw) · 4 unmodified lines | ||
| 1049 | 1049 | if (phy_type == PHY_TYPE_N || phy_type == PHY_TYPE_LCN) { |
| 1050 | 1050 | band = &wlc->bandstate[BAND_5G_INDEX]->band; |
| 1051 | 1051 | *band = brcms_band_5GHz_nphy_template; |
| 1052 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band; | |
| 1052 | + hw->wiphy->bands[NL80211_BAND_5GHZ] = band; | |
| 1053 | 1053 | } else { |
| 1054 | 1054 | return -EPERM; |
| 1055 | 1055 | } |
| @@ -7076,7 +7076,7 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, · 7075 unmodified lines | ||
| 7076 | 7076 | channel = BRCMS_CHAN_CHANNEL(rxh->RxChan); |
| 7077 | 7077 | |
| 7078 | 7078 | rx_status->band = |
| 7079 | − channel > 14 ? IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; | |
| 7079 | + channel > 14 ? NL80211_BAND_5GHZ : NL80211_BAND_2GHZ; | |
| 7080 | 7080 | rx_status->freq = |
| 7081 | 7081 | ieee80211_channel_to_frequency(channel, rx_status->band); |
| 7082 | 7082 | |
| @@ -7143,7 +7143,7 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, · 60 unmodified lines | ||
| 7143 | 7143 | * a subset of the 2.4G rates. See bitrates field |
| 7144 | 7144 | * of brcms_band_5GHz_nphy (in mac80211_if.c). |
| 7145 | 7145 | */ |
| 7146 | − if (rx_status->band == IEEE80211_BAND_5GHZ) | |
| 7146 | + if (rx_status->band == NL80211_BAND_5GHZ) | |
| 7147 | 7147 | rx_status->rate_idx -= BRCMS_LEGACY_5G_RATE_OFFSET; |
| 7148 | 7148 | |
| 7149 | 7149 | /* Determine short preamble and rate_idx */ |
| @@ -5836,7 +5836,7 @@ static int airo_get_freq(struct net_device *dev, · 5835 unmodified lines | ||
| 5836 | 5836 | ch = le16_to_cpu(status_rid.channel); |
| 5837 | 5837 | if((ch > 0) && (ch < 15)) { |
| 5838 | 5838 | fwrq->m = 100000 * |
| 5839 | − ieee80211_channel_to_frequency(ch, IEEE80211_BAND_2GHZ); | |
| 5839 | + ieee80211_channel_to_frequency(ch, NL80211_BAND_2GHZ); | |
| 5840 | 5840 | fwrq->e = 1; |
| 5841 | 5841 | } else { |
| 5842 | 5842 | fwrq->m = ch; |
| @@ -6894,7 +6894,7 @@ static int airo_get_range(struct net_device *dev, · 1051 unmodified lines | ||
| 6894 | 6894 | for(i = 0; i < 14; i++) { |
| 6895 | 6895 | range->freq[k].i = i + 1; /* List index */ |
| 6896 | 6896 | 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); | |
| 6898 | 6898 | range->freq[k++].e = 1; /* Values in MHz -> * 10^5 * 10 */ |
| 6899 | 6899 | } |
| 6900 | 6900 | range->num_frequency = k; |
| @@ -7302,7 +7302,7 @@ static inline char *airo_translate_scan(struct net_device *dev, · 401 unmodified lines | ||
| 7302 | 7302 | iwe.cmd = SIOCGIWFREQ; |
| 7303 | 7303 | iwe.u.freq.m = le16_to_cpu(bss->dsChannel); |
| 7304 | 7304 | 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); | |
| 7306 | 7306 | iwe.u.freq.e = 1; |
| 7307 | 7307 | current_ev = iwe_stream_add_event(info, current_ev, end_buf, |
| 7308 | 7308 | &iwe, IW_EV_FREQ_LEN); |
| @@ -1913,7 +1913,7 @@ static int ipw2100_wdev_init(struct net_device *dev) · 1912 unmodified lines | ||
| 1913 | 1913 | if (geo->bg_channels) { |
| 1914 | 1914 | struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; |
| 1915 | 1915 | |
| 1916 | − bg_band->band = IEEE80211_BAND_2GHZ; | |
| 1916 | + bg_band->band = NL80211_BAND_2GHZ; | |
| 1917 | 1917 | bg_band->n_channels = geo->bg_channels; |
| 1918 | 1918 | bg_band->channels = kcalloc(geo->bg_channels, |
| 1919 | 1919 | sizeof(struct ieee80211_channel), |
| @@ -1924,7 +1924,7 @@ static int ipw2100_wdev_init(struct net_device *dev) · 4 unmodified lines | ||
| 1924 | 1924 | } |
| 1925 | 1925 | /* translate geo->bg to bg_band.channels */ |
| 1926 | 1926 | for (i = 0; i < geo->bg_channels; i++) { |
| 1927 | − bg_band->channels[i].band = IEEE80211_BAND_2GHZ; | |
| 1927 | + bg_band->channels[i].band = NL80211_BAND_2GHZ; | |
| 1928 | 1928 | bg_band->channels[i].center_freq = geo->bg[i].freq; |
| 1929 | 1929 | bg_band->channels[i].hw_value = geo->bg[i].channel; |
| 1930 | 1930 | bg_band->channels[i].max_power = geo->bg[i].max_power; |
| @@ -1945,7 +1945,7 @@ static int ipw2100_wdev_init(struct net_device *dev) · 14 unmodified lines | ||
| 1945 | 1945 | bg_band->bitrates = ipw2100_bg_rates; |
| 1946 | 1946 | bg_band->n_bitrates = RATE_COUNT; |
| 1947 | 1947 | |
| 1948 | − wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band; | |
| 1948 | + wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band; | |
| 1949 | 1949 | } |
| 1950 | 1950 | |
| 1951 | 1951 | wdev->wiphy->cipher_suites = ipw_cipher_suites; |
| @@ -11359,7 +11359,7 @@ static int ipw_wdev_init(struct net_device *dev) · 11358 unmodified lines | ||
| 11359 | 11359 | if (geo->bg_channels) { |
| 11360 | 11360 | struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; |
| 11361 | 11361 | |
| 11362 | − bg_band->band = IEEE80211_BAND_2GHZ; | |
| 11362 | + bg_band->band = NL80211_BAND_2GHZ; | |
| 11363 | 11363 | bg_band->n_channels = geo->bg_channels; |
| 11364 | 11364 | bg_band->channels = kcalloc(geo->bg_channels, |
| 11365 | 11365 | sizeof(struct ieee80211_channel), |
| @@ -11370,7 +11370,7 @@ static int ipw_wdev_init(struct net_device *dev) · 4 unmodified lines | ||
| 11370 | 11370 | } |
| 11371 | 11371 | /* translate geo->bg to bg_band.channels */ |
| 11372 | 11372 | for (i = 0; i < geo->bg_channels; i++) { |
| 11373 | − bg_band->channels[i].band = IEEE80211_BAND_2GHZ; | |
| 11373 | + bg_band->channels[i].band = NL80211_BAND_2GHZ; | |
| 11374 | 11374 | bg_band->channels[i].center_freq = geo->bg[i].freq; |
| 11375 | 11375 | bg_band->channels[i].hw_value = geo->bg[i].channel; |
| 11376 | 11376 | bg_band->channels[i].max_power = geo->bg[i].max_power; |
| @@ -11391,14 +11391,14 @@ static int ipw_wdev_init(struct net_device *dev) · 14 unmodified lines | ||
| 11391 | 11391 | bg_band->bitrates = ipw2200_bg_rates; |
| 11392 | 11392 | bg_band->n_bitrates = ipw2200_num_bg_rates; |
| 11393 | 11393 | |
| 11394 | − wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band; | |
| 11394 | + wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band; | |
| 11395 | 11395 | } |
| 11396 | 11396 | |
| 11397 | 11397 | /* fill-out priv->ieee->a_band */ |
| 11398 | 11398 | if (geo->a_channels) { |
| 11399 | 11399 | struct ieee80211_supported_band *a_band = &priv->ieee->a_band; |
| 11400 | 11400 | |
| 11401 | − a_band->band = IEEE80211_BAND_5GHZ; | |
| 11401 | + a_band->band = NL80211_BAND_5GHZ; | |
| 11402 | 11402 | a_band->n_channels = geo->a_channels; |
| 11403 | 11403 | a_band->channels = kcalloc(geo->a_channels, |
| 11404 | 11404 | sizeof(struct ieee80211_channel), |
| @@ -11409,7 +11409,7 @@ static int ipw_wdev_init(struct net_device *dev) · 4 unmodified lines | ||
| 11409 | 11409 | } |
| 11410 | 11410 | /* translate geo->a to a_band.channels */ |
| 11411 | 11411 | for (i = 0; i < geo->a_channels; i++) { |
| 11412 | − a_band->channels[i].band = IEEE80211_BAND_5GHZ; | |
| 11412 | + a_band->channels[i].band = NL80211_BAND_5GHZ; | |
| 11413 | 11413 | a_band->channels[i].center_freq = geo->a[i].freq; |
| 11414 | 11414 | a_band->channels[i].hw_value = geo->a[i].channel; |
| 11415 | 11415 | a_band->channels[i].max_power = geo->a[i].max_power; |
| @@ -11430,7 +11430,7 @@ static int ipw_wdev_init(struct net_device *dev) · 14 unmodified lines | ||
| 11430 | 11430 | a_band->bitrates = ipw2200_a_rates; |
| 11431 | 11431 | a_band->n_bitrates = ipw2200_num_a_rates; |
| 11432 | 11432 | |
| 11433 | − wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = a_band; | |
| 11433 | + wdev->wiphy->bands[NL80211_BAND_5GHZ] = a_band; | |
| 11434 | 11434 | } |
| 11435 | 11435 | |
| 11436 | 11436 | wdev->wiphy->cipher_suites = ipw_cipher_suites; |
| @@ -1547,7 +1547,7 @@ il3945_irq_tasklet(struct il_priv *il) · 1546 unmodified lines | ||
| 1547 | 1547 | } |
| 1548 | 1548 | |
| 1549 | 1549 | 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, | |
| 1551 | 1551 | u8 is_active, u8 n_probes, |
| 1552 | 1552 | struct il3945_scan_channel *scan_ch, |
| 1553 | 1553 | struct ieee80211_vif *vif) |
| @@ -1618,7 +1618,7 @@ il3945_get_channels_for_scan(struct il_priv *il, enum ieee80211_band band, · 64 unmodified lines | ||
| 1618 | 1618 | /* scan_pwr_info->tpc.dsp_atten; */ |
| 1619 | 1619 | |
| 1620 | 1620 | /*scan_pwr_info->tpc.tx_gain; */ |
| 1621 | − if (band == IEEE80211_BAND_5GHZ) | |
| 1621 | + if (band == NL80211_BAND_5GHZ) | |
| 1622 | 1622 | scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 1623 | 1623 | else { |
| 1624 | 1624 | scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3)); |
| @@ -2534,7 +2534,7 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 909 unmodified lines | ||
| 2534 | 2534 | }; |
| 2535 | 2535 | struct il3945_scan_cmd *scan; |
| 2536 | 2536 | u8 n_probes = 0; |
| 2537 | − enum ieee80211_band band; | |
| 2537 | + enum nl80211_band band; | |
| 2538 | 2538 | bool is_active = false; |
| 2539 | 2539 | int ret; |
| 2540 | 2540 | u16 len; |
| @@ -2615,14 +2615,14 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 74 unmodified lines | ||
| 2615 | 2615 | /* flags + rate selection */ |
| 2616 | 2616 | |
| 2617 | 2617 | switch (il->scan_band) { |
| 2618 | − case IEEE80211_BAND_2GHZ: | |
| 2618 | + case NL80211_BAND_2GHZ: | |
| 2619 | 2619 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; |
| 2620 | 2620 | scan->tx_cmd.rate = RATE_1M_PLCP; |
| 2621 | − band = IEEE80211_BAND_2GHZ; | |
| 2621 | + band = NL80211_BAND_2GHZ; | |
| 2622 | 2622 | break; |
| 2623 | − case IEEE80211_BAND_5GHZ: | |
| 2623 | + case NL80211_BAND_5GHZ: | |
| 2624 | 2624 | scan->tx_cmd.rate = RATE_6M_PLCP; |
| 2625 | − band = IEEE80211_BAND_5GHZ; | |
| 2625 | + band = NL80211_BAND_5GHZ; | |
| 2626 | 2626 | break; |
| 2627 | 2627 | default: |
| 2628 | 2628 | IL_WARN("Invalid scan band\n"); |
| @@ -3507,7 +3507,7 @@ il3945_init_drv(struct il_priv *il) · 878 unmodified lines | ||
| 3507 | 3507 | |
| 3508 | 3508 | il->ieee_channels = NULL; |
| 3509 | 3509 | il->ieee_rates = NULL; |
| 3510 | − il->band = IEEE80211_BAND_2GHZ; | |
| 3510 | + il->band = NL80211_BAND_2GHZ; | |
| 3511 | 3511 | |
| 3512 | 3512 | il->iw_mode = NL80211_IFTYPE_STATION; |
| 3513 | 3513 | il->missed_beacon_threshold = IL_MISSED_BEACON_THRESHOLD_DEF; |
| @@ -3582,13 +3582,13 @@ il3945_setup_mac(struct il_priv *il) · 68 unmodified lines | ||
| 3582 | 3582 | /* Default value; 4 EDCA QOS priorities */ |
| 3583 | 3583 | hw->queues = 4; |
| 3584 | 3584 | |
| 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]; | |
| 3588 | 3588 | |
| 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]; | |
| 3592 | 3592 | |
| 3593 | 3593 | il_leds_init(il); |
| 3594 | 3594 | |
| @@ -3761,7 +3761,7 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · 166 unmodified lines | ||
| 3761 | 3761 | goto out_release_irq; |
| 3762 | 3762 | } |
| 3763 | 3763 | |
| 3764 | − il_set_rxon_channel(il, &il->bands[IEEE80211_BAND_2GHZ].channels[5]); | |
| 3764 | + il_set_rxon_channel(il, &il->bands[NL80211_BAND_2GHZ].channels[5]); | |
| 3765 | 3765 | il3945_setup_deferred_work(il); |
| 3766 | 3766 | il3945_setup_handlers(il); |
| 3767 | 3767 | il_power_initialize(il); |
| @@ -97,7 +97,7 @@ static struct il3945_tpt_entry il3945_tpt_table_g[] = { · 96 unmodified lines | ||
| 97 | 97 | #define RATE_RETRY_TH 15 |
| 98 | 98 | |
| 99 | 99 | 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) | |
| 101 | 101 | { |
| 102 | 102 | u32 idx = 0; |
| 103 | 103 | u32 table_size = 0; |
| @@ -107,11 +107,11 @@ il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band) · 3 unmodified lines | ||
| 107 | 107 | rssi = IL_MIN_RSSI_VAL; |
| 108 | 108 | |
| 109 | 109 | switch (band) { |
| 110 | − case IEEE80211_BAND_2GHZ: | |
| 110 | + case NL80211_BAND_2GHZ: | |
| 111 | 111 | tpt_table = il3945_tpt_table_g; |
| 112 | 112 | table_size = ARRAY_SIZE(il3945_tpt_table_g); |
| 113 | 113 | break; |
| 114 | − case IEEE80211_BAND_5GHZ: | |
| 114 | + case NL80211_BAND_5GHZ: | |
| 115 | 115 | tpt_table = il3945_tpt_table_a; |
| 116 | 116 | table_size = ARRAY_SIZE(il3945_tpt_table_a); |
| 117 | 117 | break; |
| @@ -380,7 +380,7 @@ il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) · 262 unmodified lines | ||
| 380 | 380 | |
| 381 | 381 | il->_3945.sta_supp_rates = sta->supp_rates[sband->band]; |
| 382 | 382 | /* For 5 GHz band it start at IL_FIRST_OFDM_RATE */ |
| 383 | − if (sband->band == IEEE80211_BAND_5GHZ) { | |
| 383 | + if (sband->band == NL80211_BAND_5GHZ) { | |
| 384 | 384 | rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; |
| 385 | 385 | il->_3945.sta_supp_rates <<= IL_FIRST_OFDM_RATE; |
| 386 | 386 | } |
| @@ -541,7 +541,7 @@ il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband, · 154 unmodified lines | ||
| 541 | 541 | |
| 542 | 542 | static u16 |
| 543 | 543 | 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) | |
| 545 | 545 | { |
| 546 | 546 | u8 high = RATE_INVALID; |
| 547 | 547 | 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 | ||
| 549 | 549 | |
| 550 | 550 | /* 802.11A walks to the next literal adjacent rate in |
| 551 | 551 | * the rate table */ |
| 552 | − if (unlikely(band == IEEE80211_BAND_5GHZ)) { | |
| 552 | + if (unlikely(band == NL80211_BAND_5GHZ)) { | |
| 553 | 553 | int i; |
| 554 | 554 | u32 mask; |
| 555 | 555 | |
| @@ -657,14 +657,14 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, · 101 unmodified lines | ||
| 657 | 657 | |
| 658 | 658 | /* get user max rate if set */ |
| 659 | 659 | max_rate_idx = txrc->max_rate_idx; |
| 660 | − if (sband->band == IEEE80211_BAND_5GHZ && max_rate_idx != -1) | |
| 660 | + if (sband->band == NL80211_BAND_5GHZ && max_rate_idx != -1) | |
| 661 | 661 | max_rate_idx += IL_FIRST_OFDM_RATE; |
| 662 | 662 | if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT) |
| 663 | 663 | max_rate_idx = -1; |
| 664 | 664 | |
| 665 | 665 | idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1); |
| 666 | 666 | |
| 667 | − if (sband->band == IEEE80211_BAND_5GHZ) | |
| 667 | + if (sband->band == NL80211_BAND_5GHZ) | |
| 668 | 668 | rate_mask = rate_mask << IL_FIRST_OFDM_RATE; |
| 669 | 669 | |
| 670 | 670 | spin_lock_irqsave(&rs_sta->lock, flags); |
| @@ -806,7 +806,7 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, · 135 unmodified lines | ||
| 806 | 806 | |
| 807 | 807 | out: |
| 808 | 808 | |
| 809 | − if (sband->band == IEEE80211_BAND_5GHZ) { | |
| 809 | + if (sband->band == NL80211_BAND_5GHZ) { | |
| 810 | 810 | if (WARN_ON_ONCE(idx < IL_FIRST_OFDM_RATE)) |
| 811 | 811 | idx = IL_FIRST_OFDM_RATE; |
| 812 | 812 | rs_sta->last_txrate_idx = idx; |
| @@ -935,7 +935,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) · 122 unmodified lines | ||
| 935 | 935 | |
| 936 | 936 | rs_sta->tgg = 0; |
| 937 | 937 | switch (il->band) { |
| 938 | − case IEEE80211_BAND_2GHZ: | |
| 938 | + case NL80211_BAND_2GHZ: | |
| 939 | 939 | /* TODO: this always does G, not a regression */ |
| 940 | 940 | if (il->active.flags & RXON_FLG_TGG_PROTECT_MSK) { |
| 941 | 941 | rs_sta->tgg = 1; |
| @@ -943,7 +943,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) · 1 unmodified line | ||
| 943 | 943 | } else |
| 944 | 944 | rs_sta->expected_tpt = il3945_expected_tpt_g; |
| 945 | 945 | break; |
| 946 | − case IEEE80211_BAND_5GHZ: | |
| 946 | + case NL80211_BAND_5GHZ: | |
| 947 | 947 | rs_sta->expected_tpt = il3945_expected_tpt_a; |
| 948 | 948 | break; |
| 949 | 949 | default: |
| @@ -255,13 +255,13 @@ il3945_rs_next_rate(struct il_priv *il, int rate) · 254 unmodified lines | ||
| 255 | 255 | int next_rate = il3945_get_prev_ieee_rate(rate); |
| 256 | 256 | |
| 257 | 257 | switch (il->band) { |
| 258 | − case IEEE80211_BAND_5GHZ: | |
| 258 | + case NL80211_BAND_5GHZ: | |
| 259 | 259 | if (rate == RATE_12M_IDX) |
| 260 | 260 | next_rate = RATE_9M_IDX; |
| 261 | 261 | else if (rate == RATE_6M_IDX) |
| 262 | 262 | next_rate = RATE_6M_IDX; |
| 263 | 263 | break; |
| 264 | − case IEEE80211_BAND_2GHZ: | |
| 264 | + case NL80211_BAND_2GHZ: | |
| 265 | 265 | if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) && |
| 266 | 266 | il_is_associated(il)) { |
| 267 | 267 | if (rate == RATE_11M_IDX) |
| @@ -349,7 +349,7 @@ il3945_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb) · 81 unmodified lines | ||
| 349 | 349 | |
| 350 | 350 | /* Fill the MRR chain with some info about on-chip retransmissions */ |
| 351 | 351 | rate_idx = il3945_hwrate_to_plcp_idx(tx_resp->rate); |
| 352 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 352 | + if (info->band == NL80211_BAND_5GHZ) | |
| 353 | 353 | rate_idx -= IL_FIRST_OFDM_RATE; |
| 354 | 354 | |
| 355 | 355 | fail = tx_resp->failure_frame; |
| @@ -554,14 +554,14 @@ il3945_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) · 198 unmodified lines | ||
| 554 | 554 | rx_status.mactime = le64_to_cpu(rx_end->timestamp); |
| 555 | 555 | rx_status.band = |
| 556 | 556 | (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; | |
| 559 | 559 | rx_status.freq = |
| 560 | 560 | ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel), |
| 561 | 561 | rx_status.band); |
| 562 | 562 | |
| 563 | 563 | rx_status.rate_idx = il3945_hwrate_to_plcp_idx(rx_hdr->rate); |
| 564 | − if (rx_status.band == IEEE80211_BAND_5GHZ) | |
| 564 | + if (rx_status.band == NL80211_BAND_5GHZ) | |
| 565 | 565 | rx_status.rate_idx -= IL_FIRST_OFDM_RATE; |
| 566 | 566 | |
| 567 | 567 | rx_status.antenna = |
| @@ -1409,7 +1409,7 @@ il3945_send_tx_power(struct il_priv *il) · 841 unmodified lines | ||
| 1409 | 1409 | |
| 1410 | 1410 | chan = le16_to_cpu(il->active.channel); |
| 1411 | 1411 | |
| 1412 | − txpower.band = (il->band == IEEE80211_BAND_5GHZ) ? 0 : 1; | |
| 1412 | + txpower.band = (il->band == NL80211_BAND_5GHZ) ? 0 : 1; | |
| 1413 | 1413 | ch_info = il_get_channel_info(il, il->band, chan); |
| 1414 | 1414 | if (!ch_info) { |
| 1415 | 1415 | IL_ERR("Failed to get channel info for channel %d [%d]\n", chan, |
| @@ -2310,7 +2310,7 @@ il3945_manage_ibss_station(struct il_priv *il, struct ieee80211_vif *vif, · 894 unmodified lines | ||
| 2310 | 2310 | |
| 2311 | 2311 | il3945_sync_sta(il, vif_priv->ibss_bssid_sta_id, |
| 2312 | 2312 | (il->band == |
| 2313 | − IEEE80211_BAND_5GHZ) ? RATE_6M_PLCP : | |
| 2313 | + NL80211_BAND_5GHZ) ? RATE_6M_PLCP : | |
| 2314 | 2314 | RATE_1M_PLCP); |
| 2315 | 2315 | il3945_rate_scale_init(il->hw, vif_priv->ibss_bssid_sta_id); |
| 2316 | 2316 | |
| @@ -2343,7 +2343,7 @@ il3945_init_hw_rate_table(struct il_priv *il) · 26 unmodified lines | ||
| 2343 | 2343 | } |
| 2344 | 2344 | |
| 2345 | 2345 | switch (il->band) { |
| 2346 | − case IEEE80211_BAND_5GHZ: | |
| 2346 | + case NL80211_BAND_5GHZ: | |
| 2347 | 2347 | D_RATE("Select A mode rate scale\n"); |
| 2348 | 2348 | /* If one of the following CCK rates is used, |
| 2349 | 2349 | * 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 | ||
| 2359 | 2359 | il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx; |
| 2360 | 2360 | break; |
| 2361 | 2361 | |
| 2362 | − case IEEE80211_BAND_2GHZ: | |
| 2362 | + case NL80211_BAND_2GHZ: | |
| 2363 | 2363 | D_RATE("Select B/G mode rate scale\n"); |
| 2364 | 2364 | /* If an OFDM rate is used, have it fall back to the |
| 2365 | 2365 | * 1M CCK rates */ |
| @@ -457,7 +457,7 @@ il4965_rxq_stop(struct il_priv *il) · 456 unmodified lines | ||
| 457 | 457 | } |
| 458 | 458 | |
| 459 | 459 | 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) | |
| 461 | 461 | { |
| 462 | 462 | int idx = 0; |
| 463 | 463 | int band_offset = 0; |
| @@ -468,7 +468,7 @@ il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) · 4 unmodified lines | ||
| 468 | 468 | return idx; |
| 469 | 469 | /* Legacy rate format, search for match in table */ |
| 470 | 470 | } else { |
| 471 | − if (band == IEEE80211_BAND_5GHZ) | |
| 471 | + if (band == NL80211_BAND_5GHZ) | |
| 472 | 472 | band_offset = IL_FIRST_OFDM_RATE; |
| 473 | 473 | for (idx = band_offset; idx < RATE_COUNT_LEGACY; idx++) |
| 474 | 474 | if (il_rates[idx].plcp == (rate_n_flags & 0xFF)) |
| @@ -688,8 +688,8 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) · 213 unmodified lines | ||
| 688 | 688 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); |
| 689 | 689 | rx_status.band = |
| 690 | 690 | (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; | |
| 693 | 693 | rx_status.freq = |
| 694 | 694 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), |
| 695 | 695 | rx_status.band); |
| @@ -766,7 +766,7 @@ il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb) · 70 unmodified lines | ||
| 766 | 766 | |
| 767 | 767 | static int |
| 768 | 768 | 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, | |
| 770 | 770 | u8 n_probes, struct il_scan_channel *scan_ch) |
| 771 | 771 | { |
| 772 | 772 | struct ieee80211_channel *chan; |
| @@ -822,7 +822,7 @@ il4965_get_channels_for_scan(struct il_priv *il, struct ieee80211_vif *vif, · 49 unmodified lines | ||
| 822 | 822 | * power level: |
| 823 | 823 | * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; |
| 824 | 824 | */ |
| 825 | − if (band == IEEE80211_BAND_5GHZ) | |
| 825 | + if (band == NL80211_BAND_5GHZ) | |
| 826 | 826 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 827 | 827 | else |
| 828 | 828 | 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 | ||
| 870 | 870 | u32 rate_flags = 0; |
| 871 | 871 | u16 cmd_len; |
| 872 | 872 | u16 rx_chain = 0; |
| 873 | − enum ieee80211_band band; | |
| 873 | + enum nl80211_band band; | |
| 874 | 874 | u8 n_probes = 0; |
| 875 | 875 | u8 rx_ant = il->hw_params.valid_rx_ant; |
| 876 | 876 | u8 rate; |
| @@ -944,7 +944,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 67 unmodified lines | ||
| 944 | 944 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
| 945 | 945 | |
| 946 | 946 | switch (il->scan_band) { |
| 947 | − case IEEE80211_BAND_2GHZ: | |
| 947 | + case NL80211_BAND_2GHZ: | |
| 948 | 948 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; |
| 949 | 949 | chan_mod = |
| 950 | 950 | le32_to_cpu(il->active.flags & RXON_FLG_CHANNEL_MODE_MSK) >> |
| @@ -956,7 +956,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) · 5 unmodified lines | ||
| 956 | 956 | rate_flags = RATE_MCS_CCK_MSK; |
| 957 | 957 | } |
| 958 | 958 | break; |
| 959 | − case IEEE80211_BAND_5GHZ: | |
| 959 | + case NL80211_BAND_5GHZ: | |
| 960 | 960 | rate = RATE_6M_PLCP; |
| 961 | 961 | break; |
| 962 | 962 | default: |
| @@ -1590,7 +1590,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, · 627 unmodified lines | ||
| 1590 | 1590 | || rate_idx > RATE_COUNT_LEGACY) |
| 1591 | 1591 | rate_idx = rate_lowest_index(&il->bands[info->band], sta); |
| 1592 | 1592 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
| 1593 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 1593 | + if (info->band == NL80211_BAND_5GHZ) | |
| 1594 | 1594 | rate_idx += IL_FIRST_OFDM_RATE; |
| 1595 | 1595 | /* Get PLCP rate for tx_cmd->rate_n_flags */ |
| 1596 | 1596 | 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 | ||
| 3051 | 3051 | } |
| 3052 | 3052 | /* Set up the rate scaling to start at selected rate, fall back |
| 3053 | 3053 | * all the way down to 1M in IEEE order, and then spin on 1M */ |
| 3054 | − if (il->band == IEEE80211_BAND_5GHZ) | |
| 3054 | + if (il->band == NL80211_BAND_5GHZ) | |
| 3055 | 3055 | r = RATE_6M_IDX; |
| 3056 | 3056 | else |
| 3057 | 3057 | r = RATE_1M_IDX; |
| @@ -5790,12 +5790,12 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length) · 2732 unmodified lines | ||
| 5790 | 5790 | |
| 5791 | 5791 | hw->max_listen_interval = IL_CONN_MAX_LISTEN_INTERVAL; |
| 5792 | 5792 | |
| 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]; | |
| 5799 | 5799 | |
| 5800 | 5800 | il_leds_init(il); |
| 5801 | 5801 | |
| @@ -6368,7 +6368,7 @@ il4965_init_drv(struct il_priv *il) · 566 unmodified lines | ||
| 6368 | 6368 | |
| 6369 | 6369 | il->ieee_channels = NULL; |
| 6370 | 6370 | il->ieee_rates = NULL; |
| 6371 | − il->band = IEEE80211_BAND_2GHZ; | |
| 6371 | + il->band = NL80211_BAND_2GHZ; | |
| 6372 | 6372 | |
| 6373 | 6373 | il->iw_mode = NL80211_IFTYPE_STATION; |
| 6374 | 6374 | il->current_ht_config.smps = IEEE80211_SMPS_STATIC; |
| @@ -6480,7 +6480,7 @@ il4965_set_hw_params(struct il_priv *il) · 105 unmodified lines | ||
| 6480 | 6480 | il->hw_params.max_data_size = IL49_RTC_DATA_SIZE; |
| 6481 | 6481 | il->hw_params.max_inst_size = IL49_RTC_INST_SIZE; |
| 6482 | 6482 | 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); | |
| 6484 | 6484 | |
| 6485 | 6485 | il->hw_params.rx_wrt_ptr_reg = FH49_RSCSR_CHNL0_WPTR; |
| 6486 | 6486 | |
| @@ -549,7 +549,7 @@ il4965_rate_n_flags_from_tbl(struct il_priv *il, struct il_scale_tbl_info *tbl, · 548 unmodified lines | ||
| 549 | 549 | */ |
| 550 | 550 | static int |
| 551 | 551 | il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, |
| 552 | − enum ieee80211_band band, | |
| 552 | + enum nl80211_band band, | |
| 553 | 553 | struct il_scale_tbl_info *tbl, int *rate_idx) |
| 554 | 554 | { |
| 555 | 555 | u32 ant_msk = (rate_n_flags & RATE_MCS_ANT_ABC_MSK); |
| @@ -574,7 +574,7 @@ il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, · 18 unmodified lines | ||
| 574 | 574 | /* legacy rate format */ |
| 575 | 575 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { |
| 576 | 576 | if (il4965_num_of_ant == 1) { |
| 577 | − if (band == IEEE80211_BAND_5GHZ) | |
| 577 | + if (band == NL80211_BAND_5GHZ) | |
| 578 | 578 | tbl->lq_type = LQ_A; |
| 579 | 579 | else |
| 580 | 580 | tbl->lq_type = LQ_G; |
| @@ -743,7 +743,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, · 162 unmodified lines | ||
| 743 | 743 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) { |
| 744 | 744 | switch_to_legacy = 1; |
| 745 | 745 | scale_idx = rs_ht_to_legacy[scale_idx]; |
| 746 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 746 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 747 | 747 | tbl->lq_type = LQ_A; |
| 748 | 748 | else |
| 749 | 749 | tbl->lq_type = LQ_G; |
| @@ -762,7 +762,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, · 12 unmodified lines | ||
| 762 | 762 | /* Mask with station rate restriction */ |
| 763 | 763 | if (is_legacy(tbl->lq_type)) { |
| 764 | 764 | /* supp_rates has no CCK bits in A mode */ |
| 765 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 765 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 766 | 766 | rate_mask = |
| 767 | 767 | (u16) (rate_mask & |
| 768 | 768 | (lq_sta->supp_rates << IL_FIRST_OFDM_RATE)); |
| @@ -851,7 +851,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, · 82 unmodified lines | ||
| 851 | 851 | table = &lq_sta->lq; |
| 852 | 852 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); |
| 853 | 853 | il4965_rs_get_tbl_info_from_mcs(tx_rate, il->band, &tbl_type, &rs_idx); |
| 854 | − if (il->band == IEEE80211_BAND_5GHZ) | |
| 854 | + if (il->band == NL80211_BAND_5GHZ) | |
| 855 | 855 | rs_idx -= IL_FIRST_OFDM_RATE; |
| 856 | 856 | mac_flags = info->status.rates[0].flags; |
| 857 | 857 | 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 | ||
| 864 | 864 | * mac80211 HT idx is always zero-idxed; we need to move |
| 865 | 865 | * HT OFDM rates after CCK rates in 2.4 GHz band |
| 866 | 866 | */ |
| 867 | − if (il->band == IEEE80211_BAND_2GHZ) | |
| 867 | + if (il->band == NL80211_BAND_2GHZ) | |
| 868 | 868 | mac_idx += IL_FIRST_OFDM_RATE; |
| 869 | 869 | } |
| 870 | 870 | /* Here we actually compare this rate to the latest LQ command */ |
| @@ -1816,7 +1816,7 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb, · 945 unmodified lines | ||
| 1816 | 1816 | |
| 1817 | 1817 | /* mask with station rate restriction */ |
| 1818 | 1818 | if (is_legacy(tbl->lq_type)) { |
| 1819 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 1819 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 1820 | 1820 | /* supp_rates has no CCK bits in A mode */ |
| 1821 | 1821 | rate_scale_idx_msk = |
| 1822 | 1822 | (u16) (rate_mask & |
| @@ -2212,7 +2212,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, · 389 unmodified lines | ||
| 2212 | 2212 | /* Get max rate if user set max rate */ |
| 2213 | 2213 | if (lq_sta) { |
| 2214 | 2214 | lq_sta->max_rate_idx = txrc->max_rate_idx; |
| 2215 | − if (sband->band == IEEE80211_BAND_5GHZ && | |
| 2215 | + if (sband->band == NL80211_BAND_5GHZ && | |
| 2216 | 2216 | lq_sta->max_rate_idx != -1) |
| 2217 | 2217 | lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; |
| 2218 | 2218 | if (lq_sta->max_rate_idx < 0 || |
| @@ -2258,11 +2258,11 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, · 39 unmodified lines | ||
| 2258 | 2258 | } else { |
| 2259 | 2259 | /* Check for invalid rates */ |
| 2260 | 2260 | if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY || |
| 2261 | − (sband->band == IEEE80211_BAND_5GHZ && | |
| 2261 | + (sband->band == NL80211_BAND_5GHZ && | |
| 2262 | 2262 | rate_idx < IL_FIRST_OFDM_RATE)) |
| 2263 | 2263 | rate_idx = rate_lowest_index(sband, sta); |
| 2264 | 2264 | /* On valid 5 GHz rate, adjust idx */ |
| 2265 | − else if (sband->band == IEEE80211_BAND_5GHZ) | |
| 2265 | + else if (sband->band == NL80211_BAND_5GHZ) | |
| 2266 | 2266 | rate_idx -= IL_FIRST_OFDM_RATE; |
| 2267 | 2267 | info->control.rates[0].flags = 0; |
| 2268 | 2268 | } |
| @@ -2362,7 +2362,7 @@ il4965_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) · 93 unmodified lines | ||
| 2362 | 2362 | |
| 2363 | 2363 | /* Set last_txrate_idx to lowest rate */ |
| 2364 | 2364 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); |
| 2365 | − if (sband->band == IEEE80211_BAND_5GHZ) | |
| 2365 | + if (sband->band == NL80211_BAND_5GHZ) | |
| 2366 | 2366 | lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; |
| 2367 | 2367 | lq_sta->is_agg = 0; |
| 2368 | 2368 | |
| @@ -1267,7 +1267,7 @@ il4965_send_tx_power(struct il_priv *il) · 1266 unmodified lines | ||
| 1267 | 1267 | "TX Power requested while scanning!\n")) |
| 1268 | 1268 | return -EAGAIN; |
| 1269 | 1269 | |
| 1270 | − band = il->band == IEEE80211_BAND_2GHZ; | |
| 1270 | + band = il->band == NL80211_BAND_2GHZ; | |
| 1271 | 1271 | |
| 1272 | 1272 | is_ht40 = iw4965_is_ht40_channel(il->active.flags); |
| 1273 | 1273 | |
| @@ -1480,7 +1480,7 @@ il4965_hw_channel_switch(struct il_priv *il, · 206 unmodified lines | ||
| 1480 | 1480 | u8 switch_count; |
| 1481 | 1481 | u16 beacon_interval = le16_to_cpu(il->timing.beacon_interval); |
| 1482 | 1482 | struct ieee80211_vif *vif = il->vif; |
| 1483 | − band = (il->band == IEEE80211_BAND_2GHZ); | |
| 1483 | + band = (il->band == NL80211_BAND_2GHZ); | |
| 1484 | 1484 | |
| 1485 | 1485 | if (WARN_ON_ONCE(vif == NULL)) |
| 1486 | 1486 | return -EIO; |
| @@ -1918,7 +1918,7 @@ struct il_cfg il4965_cfg = { · 431 unmodified lines | ||
| 1918 | 1918 | * Force use of chains B and C for scan RX on 5 GHz band |
| 1919 | 1919 | * because the device has off-channel reception on chain A. |
| 1920 | 1920 | */ |
| 1921 | − .scan_rx_antennas[IEEE80211_BAND_5GHZ] = ANT_BC, | |
| 1921 | + .scan_rx_antennas[NL80211_BAND_5GHZ] = ANT_BC, | |
| 1922 | 1922 | |
| 1923 | 1923 | .eeprom_size = IL4965_EEPROM_IMG_SIZE, |
| 1924 | 1924 | .num_of_queues = IL49_NUM_QUEUES, |
| @@ -68,7 +68,7 @@ void il4965_rx_replenish(struct il_priv *il); · 67 unmodified lines | ||
| 68 | 68 | void il4965_rx_replenish_now(struct il_priv *il); |
| 69 | 69 | void il4965_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq); |
| 70 | 70 | 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); | |
| 72 | 72 | void il4965_rx_handle(struct il_priv *il); |
| 73 | 73 | |
| 74 | 74 | /* tx */ |
| @@ -860,7 +860,7 @@ il_init_band_reference(const struct il_priv *il, int eep_band, · 859 unmodified lines | ||
| 860 | 860 | * Does not set up a command, or touch hardware. |
| 861 | 861 | */ |
| 862 | 862 | 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, | |
| 864 | 864 | const struct il_eeprom_channel *eeprom_ch, |
| 865 | 865 | u8 clear_ht40_extension_channel) |
| 866 | 866 | { |
| @@ -945,7 +945,7 @@ il_init_channel_map(struct il_priv *il) · 78 unmodified lines | ||
| 945 | 945 | ch_info->channel = eeprom_ch_idx[ch]; |
| 946 | 946 | ch_info->band = |
| 947 | 947 | (band == |
| 948 | − 1) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | |
| 948 | + 1) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; | |
| 949 | 949 | |
| 950 | 950 | /* permanently store EEPROM's channel regulatory flags |
| 951 | 951 | * and max power in channel info database. */ |
| @@ -1003,14 +1003,14 @@ il_init_channel_map(struct il_priv *il) · 51 unmodified lines | ||
| 1003 | 1003 | |
| 1004 | 1004 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ |
| 1005 | 1005 | for (band = 6; band <= 7; band++) { |
| 1006 | − enum ieee80211_band ieeeband; | |
| 1006 | + enum nl80211_band ieeeband; | |
| 1007 | 1007 | |
| 1008 | 1008 | il_init_band_reference(il, band, &eeprom_ch_count, |
| 1009 | 1009 | &eeprom_ch_info, &eeprom_ch_idx); |
| 1010 | 1010 | |
| 1011 | 1011 | /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ |
| 1012 | 1012 | ieeeband = |
| 1013 | − (band == 6) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | |
| 1013 | + (band == 6) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; | |
| 1014 | 1014 | |
| 1015 | 1015 | /* Loop through each band adding each of the channels */ |
| 1016 | 1016 | for (ch = 0; ch < eeprom_ch_count; ch++) { |
| @@ -1048,19 +1048,19 @@ EXPORT_SYMBOL(il_free_channel_map); · 31 unmodified lines | ||
| 1048 | 1048 | * Based on band and channel number. |
| 1049 | 1049 | */ |
| 1050 | 1050 | 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, | |
| 1052 | 1052 | u16 channel) |
| 1053 | 1053 | { |
| 1054 | 1054 | int i; |
| 1055 | 1055 | |
| 1056 | 1056 | switch (band) { |
| 1057 | − case IEEE80211_BAND_5GHZ: | |
| 1057 | + case NL80211_BAND_5GHZ: | |
| 1058 | 1058 | for (i = 14; i < il->channel_count; i++) { |
| 1059 | 1059 | if (il->channel_info[i].channel == channel) |
| 1060 | 1060 | return &il->channel_info[i]; |
| 1061 | 1061 | } |
| 1062 | 1062 | break; |
| 1063 | − case IEEE80211_BAND_2GHZ: | |
| 1063 | + case NL80211_BAND_2GHZ: | |
| 1064 | 1064 | if (channel >= 1 && channel <= 14) |
| 1065 | 1065 | return &il->channel_info[channel - 1]; |
| 1066 | 1066 | break; |
| @@ -1457,7 +1457,7 @@ il_hdl_scan_complete(struct il_priv *il, struct il_rx_buf *rxb) · 390 unmodified lines | ||
| 1457 | 1457 | clear_bit(S_SCAN_HW, &il->status); |
| 1458 | 1458 | |
| 1459 | 1459 | 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", | |
| 1461 | 1461 | jiffies_to_msecs(jiffies - il->scan_start)); |
| 1462 | 1462 | |
| 1463 | 1463 | queue_work(il->workqueue, &il->scan_completed); |
| @@ -1475,10 +1475,10 @@ il_setup_rx_scan_handlers(struct il_priv *il) · 11 unmodified lines | ||
| 1475 | 1475 | EXPORT_SYMBOL(il_setup_rx_scan_handlers); |
| 1476 | 1476 | |
| 1477 | 1477 | 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, | |
| 1479 | 1479 | u8 n_probes) |
| 1480 | 1480 | { |
| 1481 | − if (band == IEEE80211_BAND_5GHZ) | |
| 1481 | + if (band == NL80211_BAND_5GHZ) | |
| 1482 | 1482 | return IL_ACTIVE_DWELL_TIME_52 + |
| 1483 | 1483 | IL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); |
| 1484 | 1484 | else |
| @@ -1488,14 +1488,14 @@ il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, · 3 unmodified lines | ||
| 1488 | 1488 | EXPORT_SYMBOL(il_get_active_dwell_time); |
| 1489 | 1489 | |
| 1490 | 1490 | 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, | |
| 1492 | 1492 | struct ieee80211_vif *vif) |
| 1493 | 1493 | { |
| 1494 | 1494 | u16 value; |
| 1495 | 1495 | |
| 1496 | 1496 | u16 passive = |
| 1497 | 1497 | (band == |
| 1498 | − IEEE80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE + | |
| 1498 | + NL80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE + | |
| 1499 | 1499 | IL_PASSIVE_DWELL_TIME_24 : IL_PASSIVE_DWELL_BASE + |
| 1500 | 1500 | IL_PASSIVE_DWELL_TIME_52; |
| 1501 | 1501 | |
| @@ -1520,10 +1520,10 @@ void · 18 unmodified lines | ||
| 1520 | 1520 | il_init_scan_params(struct il_priv *il) |
| 1521 | 1521 | { |
| 1522 | 1522 | 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; | |
| 1527 | 1527 | } |
| 1528 | 1528 | EXPORT_SYMBOL(il_init_scan_params); |
| 1529 | 1529 | |
| @@ -2003,7 +2003,7 @@ il_prep_station(struct il_priv *il, const u8 *addr, bool is_ap, · 473 unmodified lines | ||
| 2003 | 2003 | il_set_ht_add_station(il, sta_id, sta); |
| 2004 | 2004 | |
| 2005 | 2005 | /* 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; | |
| 2007 | 2007 | /* Turn on both antennas for the station... */ |
| 2008 | 2008 | station->sta.rate_n_flags = cpu_to_le16(rate | RATE_MCS_ANT_AB_MSK); |
| 2009 | 2009 | |
| @@ -3382,7 +3382,7 @@ EXPORT_SYMBOL(il_bcast_addr); · 1372 unmodified lines | ||
| 3382 | 3382 | static void |
| 3383 | 3383 | il_init_ht_hw_capab(const struct il_priv *il, |
| 3384 | 3384 | struct ieee80211_sta_ht_cap *ht_info, |
| 3385 | − enum ieee80211_band band) | |
| 3385 | + enum nl80211_band band) | |
| 3386 | 3386 | { |
| 3387 | 3387 | u16 max_bit_rate = 0; |
| 3388 | 3388 | u8 rx_chains_num = il->hw_params.rx_chains_num; |
| @@ -3443,8 +3443,8 @@ il_init_geos(struct il_priv *il) · 54 unmodified lines | ||
| 3443 | 3443 | int i = 0; |
| 3444 | 3444 | s8 max_tx_power = 0; |
| 3445 | 3445 | |
| 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) { | |
| 3448 | 3448 | D_INFO("Geography modes already initialized.\n"); |
| 3449 | 3449 | set_bit(S_GEO_CONFIGURED, &il->status); |
| 3450 | 3450 | return 0; |
| @@ -3465,23 +3465,23 @@ il_init_geos(struct il_priv *il) · 14 unmodified lines | ||
| 3465 | 3465 | } |
| 3466 | 3466 | |
| 3467 | 3467 | /* 5.2GHz channels start after the 2.4GHz channels */ |
| 3468 | − sband = &il->bands[IEEE80211_BAND_5GHZ]; | |
| 3468 | + sband = &il->bands[NL80211_BAND_5GHZ]; | |
| 3469 | 3469 | sband->channels = &channels[ARRAY_SIZE(il_eeprom_band_1)]; |
| 3470 | 3470 | /* just OFDM */ |
| 3471 | 3471 | sband->bitrates = &rates[IL_FIRST_OFDM_RATE]; |
| 3472 | 3472 | sband->n_bitrates = RATE_COUNT_LEGACY - IL_FIRST_OFDM_RATE; |
| 3473 | 3473 | |
| 3474 | 3474 | 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); | |
| 3476 | 3476 | |
| 3477 | − sband = &il->bands[IEEE80211_BAND_2GHZ]; | |
| 3477 | + sband = &il->bands[NL80211_BAND_2GHZ]; | |
| 3478 | 3478 | sband->channels = channels; |
| 3479 | 3479 | /* OFDM & CCK */ |
| 3480 | 3480 | sband->bitrates = rates; |
| 3481 | 3481 | sband->n_bitrates = RATE_COUNT_LEGACY; |
| 3482 | 3482 | |
| 3483 | 3483 | 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); | |
| 3485 | 3485 | |
| 3486 | 3486 | il->ieee_channels = channels; |
| 3487 | 3487 | il->ieee_rates = rates; |
| @@ -3532,7 +3532,7 @@ il_init_geos(struct il_priv *il) · 44 unmodified lines | ||
| 3532 | 3532 | il->tx_power_user_lmt = max_tx_power; |
| 3533 | 3533 | il->tx_power_next = max_tx_power; |
| 3534 | 3534 | |
| 3535 | − if (il->bands[IEEE80211_BAND_5GHZ].n_channels == 0 && | |
| 3535 | + if (il->bands[NL80211_BAND_5GHZ].n_channels == 0 && | |
| 3536 | 3536 | (il->cfg->sku & IL_SKU_A)) { |
| 3537 | 3537 | IL_INFO("Incorrectly detected BG card as ABG. " |
| 3538 | 3538 | "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 | ||
| 3541 | 3541 | } |
| 3542 | 3542 | |
| 3543 | 3543 | 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); | |
| 3546 | 3546 | |
| 3547 | 3547 | set_bit(S_GEO_CONFIGURED, &il->status); |
| 3548 | 3548 | |
| @@ -3563,7 +3563,7 @@ il_free_geos(struct il_priv *il) · 14 unmodified lines | ||
| 3563 | 3563 | EXPORT_SYMBOL(il_free_geos); |
| 3564 | 3564 | |
| 3565 | 3565 | 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, | |
| 3567 | 3567 | u16 channel, u8 extension_chan_offset) |
| 3568 | 3568 | { |
| 3569 | 3569 | const struct il_channel_info *ch_info; |
| @@ -3926,14 +3926,14 @@ EXPORT_SYMBOL(il_set_rxon_ht); · 356 unmodified lines | ||
| 3926 | 3926 | |
| 3927 | 3927 | /* Return valid, unused, channel for a passive scan to reset the RF */ |
| 3928 | 3928 | 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) | |
| 3930 | 3930 | { |
| 3931 | 3931 | const struct il_channel_info *ch_info; |
| 3932 | 3932 | int i; |
| 3933 | 3933 | u8 channel = 0; |
| 3934 | 3934 | u8 min, max; |
| 3935 | 3935 | |
| 3936 | − if (band == IEEE80211_BAND_5GHZ) { | |
| 3936 | + if (band == NL80211_BAND_5GHZ) { | |
| 3937 | 3937 | min = 14; |
| 3938 | 3938 | max = il->channel_count; |
| 3939 | 3939 | } else { |
| @@ -3965,14 +3965,14 @@ EXPORT_SYMBOL(il_get_single_channel_number); · 25 unmodified lines | ||
| 3965 | 3965 | int |
| 3966 | 3966 | il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch) |
| 3967 | 3967 | { |
| 3968 | − enum ieee80211_band band = ch->band; | |
| 3968 | + enum nl80211_band band = ch->band; | |
| 3969 | 3969 | u16 channel = ch->hw_value; |
| 3970 | 3970 | |
| 3971 | 3971 | if (le16_to_cpu(il->staging.channel) == channel && il->band == band) |
| 3972 | 3972 | return 0; |
| 3973 | 3973 | |
| 3974 | 3974 | il->staging.channel = cpu_to_le16(channel); |
| 3975 | − if (band == IEEE80211_BAND_5GHZ) | |
| 3975 | + if (band == NL80211_BAND_5GHZ) | |
| 3976 | 3976 | il->staging.flags &= ~RXON_FLG_BAND_24G_MSK; |
| 3977 | 3977 | else |
| 3978 | 3978 | 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 | ||
| 3986 | 3986 | EXPORT_SYMBOL(il_set_rxon_channel); |
| 3987 | 3987 | |
| 3988 | 3988 | 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, | |
| 3990 | 3990 | struct ieee80211_vif *vif) |
| 3991 | 3991 | { |
| 3992 | − if (band == IEEE80211_BAND_5GHZ) { | |
| 3992 | + if (band == NL80211_BAND_5GHZ) { | |
| 3993 | 3993 | il->staging.flags &= |
| 3994 | 3994 | ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK | |
| 3995 | 3995 | RXON_FLG_CCK_MSK); |
| @@ -5415,7 +5415,7 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 1419 unmodified lines | ||
| 5415 | 5415 | |
| 5416 | 5416 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { |
| 5417 | 5417 | 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) | |
| 5419 | 5419 | il->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; |
| 5420 | 5420 | else |
| 5421 | 5421 | il->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; |
| @@ -432,7 +432,7 @@ u16 il_eeprom_query16(const struct il_priv *il, size_t offset); · 431 unmodified lines | ||
| 432 | 432 | int il_init_channel_map(struct il_priv *il); |
| 433 | 433 | void il_free_channel_map(struct il_priv *il); |
| 434 | 434 | const struct il_channel_info *il_get_channel_info(const struct il_priv *il, |
| 435 | − enum ieee80211_band band, | |
| 435 | + enum nl80211_band band, | |
| 436 | 436 | u16 channel); |
| 437 | 437 | |
| 438 | 438 | #define IL_NUM_SCAN_RATES (2) |
| @@ -497,7 +497,7 @@ struct il_channel_info { · 58 unmodified lines | ||
| 497 | 497 | |
| 498 | 498 | u8 group_idx; /* 0-4, maps channel to group1/2/3/4/5 */ |
| 499 | 499 | u8 band_idx; /* 0-4, maps channel to band1/2/3/4/5 */ |
| 500 | − enum ieee80211_band band; | |
| 500 | + enum nl80211_band band; | |
| 501 | 501 | |
| 502 | 502 | /* HT40 channel info */ |
| 503 | 503 | s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */ |
| @@ -811,7 +811,7 @@ struct il_sensitivity_ranges { · 307 unmodified lines | ||
| 811 | 811 | * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR |
| 812 | 812 | * @max_stations: |
| 813 | 813 | * @ht40_channel: is 40MHz width possible in band 2.4 |
| 814 | − * BIT(IEEE80211_BAND_5GHZ) BIT(IEEE80211_BAND_5GHZ) | |
| 814 | + * BIT(NL80211_BAND_5GHZ) BIT(NL80211_BAND_5GHZ) | |
| 815 | 815 | * @sw_crypto: 0 for hw, 1 for sw |
| 816 | 816 | * @max_xxx_size: for ucode uses |
| 817 | 817 | * @ct_kill_threshold: temperature threshold |
| @@ -1141,13 +1141,13 @@ struct il_priv { · 323 unmodified lines | ||
| 1141 | 1141 | struct list_head free_frames; |
| 1142 | 1142 | int frames_count; |
| 1143 | 1143 | |
| 1144 | − enum ieee80211_band band; | |
| 1144 | + enum nl80211_band band; | |
| 1145 | 1145 | int alloc_rxb_page; |
| 1146 | 1146 | |
| 1147 | 1147 | void (*handlers[IL_CN_MAX]) (struct il_priv *il, |
| 1148 | 1148 | struct il_rx_buf *rxb); |
| 1149 | 1149 | |
| 1150 | − struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | |
| 1150 | + struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; | |
| 1151 | 1151 | |
| 1152 | 1152 | /* spectrum measurement report caching */ |
| 1153 | 1153 | struct il_spectrum_notification measure_report; |
| @@ -1176,10 +1176,10 @@ struct il_priv { · 22 unmodified lines | ||
| 1176 | 1176 | unsigned long scan_start; |
| 1177 | 1177 | unsigned long scan_start_tsf; |
| 1178 | 1178 | void *scan_cmd; |
| 1179 | − enum ieee80211_band scan_band; | |
| 1179 | + enum nl80211_band scan_band; | |
| 1180 | 1180 | struct cfg80211_scan_request *scan_request; |
| 1181 | 1181 | struct ieee80211_vif *scan_vif; |
| 1182 | − u8 scan_tx_ant[IEEE80211_NUM_BANDS]; | |
| 1182 | + u8 scan_tx_ant[NUM_NL80211_BANDS]; | |
| 1183 | 1183 | u8 mgmt_tx_ant; |
| 1184 | 1184 | |
| 1185 | 1185 | /* spinlock */ |
| @@ -1479,7 +1479,7 @@ il_is_channel_radar(const struct il_channel_info *ch_info) · 293 unmodified lines | ||
| 1479 | 1479 | static inline u8 |
| 1480 | 1480 | il_is_channel_a_band(const struct il_channel_info *ch_info) |
| 1481 | 1481 | { |
| 1482 | − return ch_info->band == IEEE80211_BAND_5GHZ; | |
| 1482 | + return ch_info->band == NL80211_BAND_5GHZ; | |
| 1483 | 1483 | } |
| 1484 | 1484 | |
| 1485 | 1485 | static inline int |
| @@ -1673,7 +1673,7 @@ struct il_cfg { · 187 unmodified lines | ||
| 1673 | 1673 | /* params not likely to change within a device family */ |
| 1674 | 1674 | struct il_base_params *base_params; |
| 1675 | 1675 | /* params likely to change within a device family */ |
| 1676 | − u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; | |
| 1676 | + u8 scan_rx_antennas[NUM_NL80211_BANDS]; | |
| 1677 | 1677 | enum il_led_mode led_mode; |
| 1678 | 1678 | |
| 1679 | 1679 | int eeprom_size; |
| @@ -1707,9 +1707,9 @@ void il_set_rxon_hwcrypto(struct il_priv *il, int hw_decrypt); · 27 unmodified lines | ||
| 1707 | 1707 | int il_check_rxon_cmd(struct il_priv *il); |
| 1708 | 1708 | int il_full_rxon_required(struct il_priv *il); |
| 1709 | 1709 | 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, | |
| 1711 | 1711 | 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); | |
| 1713 | 1713 | void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf); |
| 1714 | 1714 | bool il_is_ht40_tx_allowed(struct il_priv *il, |
| 1715 | 1715 | struct ieee80211_sta_ht_cap *ht_cap); |
| @@ -1793,9 +1793,9 @@ int il_force_reset(struct il_priv *il, bool external); · 77 unmodified lines | ||
| 1793 | 1793 | u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, |
| 1794 | 1794 | const u8 *ta, const u8 *ie, int ie_len, int left); |
| 1795 | 1795 | 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, | |
| 1797 | 1797 | 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, | |
| 1799 | 1799 | struct ieee80211_vif *vif); |
| 1800 | 1800 | void il_setup_scan_deferred_work(struct il_priv *il); |
| 1801 | 1801 | void il_cancel_scan_deferred_work(struct il_priv *il); |
| @@ -1955,7 +1955,7 @@ il_commit_rxon(struct il_priv *il) · 153 unmodified lines | ||
| 1955 | 1955 | } |
| 1956 | 1956 | |
| 1957 | 1957 | 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) | |
| 1959 | 1959 | { |
| 1960 | 1960 | return il->hw->wiphy->bands[band]; |
| 1961 | 1961 | } |
| @@ -2813,7 +2813,7 @@ struct il_lq_sta { · 851 unmodified lines | ||
| 2813 | 2813 | u8 action_counter; /* # mode-switch actions tried */ |
| 2814 | 2814 | u8 is_green; |
| 2815 | 2815 | u8 is_dup; |
| 2816 | − enum ieee80211_band band; | |
| 2816 | + enum nl80211_band band; | |
| 2817 | 2817 | |
| 2818 | 2818 | /* The following are bitmaps of rates; RATE_6M_MASK, etc. */ |
| 2819 | 2819 | u32 supp_rates; |
| @@ -544,7 +544,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count, · 543 unmodified lines | ||
| 544 | 544 | return -ENOMEM; |
| 545 | 545 | } |
| 546 | 546 | |
| 547 | − supp_band = il_get_hw_mode(il, IEEE80211_BAND_2GHZ); | |
| 547 | + supp_band = il_get_hw_mode(il, NL80211_BAND_2GHZ); | |
| 548 | 548 | if (supp_band) { |
| 549 | 549 | channels = supp_band->channels; |
| 550 | 550 | |
| @@ -571,7 +571,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count, · 20 unmodified lines | ||
| 571 | 571 | flags & IEEE80211_CHAN_NO_IR ? |
| 572 | 572 | "passive only" : "active/passive"); |
| 573 | 573 | } |
| 574 | − supp_band = il_get_hw_mode(il, IEEE80211_BAND_5GHZ); | |
| 574 | + supp_band = il_get_hw_mode(il, NL80211_BAND_5GHZ); | |
| 575 | 575 | if (supp_band) { |
| 576 | 576 | channels = supp_band->channels; |
| 577 | 577 | |
| @@ -158,7 +158,7 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, · 157 unmodified lines | ||
| 158 | 158 | struct iwl_rxon_context *ctx); |
| 159 | 159 | void iwl_set_flags_for_band(struct iwl_priv *priv, |
| 160 | 160 | struct iwl_rxon_context *ctx, |
| 161 | − enum ieee80211_band band, | |
| 161 | + enum nl80211_band band, | |
| 162 | 162 | struct ieee80211_vif *vif); |
| 163 | 163 | |
| 164 | 164 | /* uCode */ |
| @@ -186,7 +186,7 @@ int iwl_send_statistics_request(struct iwl_priv *priv, · 21 unmodified lines | ||
| 186 | 186 | u8 flags, bool clear); |
| 187 | 187 | |
| 188 | 188 | 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) | |
| 190 | 190 | { |
| 191 | 191 | return priv->hw->wiphy->bands[band]; |
| 192 | 192 | } |
| @@ -198,7 +198,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan); · 5 unmodified lines | ||
| 198 | 198 | #endif |
| 199 | 199 | |
| 200 | 200 | /* 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); | |
| 202 | 202 | void iwl_setup_rx_handlers(struct iwl_priv *priv); |
| 203 | 203 | void iwl_chswitch_done(struct iwl_priv *priv, bool is_success); |
| 204 | 204 | |
| @@ -258,7 +258,7 @@ void iwl_cancel_scan_deferred_work(struct iwl_priv *priv); · 53 unmodified lines | ||
| 258 | 258 | int __must_check iwl_scan_initiate(struct iwl_priv *priv, |
| 259 | 259 | struct ieee80211_vif *vif, |
| 260 | 260 | enum iwl_scan_type scan_type, |
| 261 | − enum ieee80211_band band); | |
| 261 | + enum nl80211_band band); | |
| 262 | 262 | |
| 263 | 263 | /* For faster active scanning, scan will move to the next channel if fewer than |
| 264 | 264 | * PLCP_QUIET_THRESH packets are heard on this channel within |
| @@ -335,7 +335,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf, · 334 unmodified lines | ||
| 335 | 335 | if (!buf) |
| 336 | 336 | return -ENOMEM; |
| 337 | 337 | |
| 338 | − supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_2GHZ); | |
| 338 | + supp_band = iwl_get_hw_mode(priv, NL80211_BAND_2GHZ); | |
| 339 | 339 | if (supp_band) { |
| 340 | 340 | channels = supp_band->channels; |
| 341 | 341 | |
| @@ -358,7 +358,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf, · 16 unmodified lines | ||
| 358 | 358 | IEEE80211_CHAN_NO_IR ? |
| 359 | 359 | "passive only" : "active/passive"); |
| 360 | 360 | } |
| 361 | − supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_5GHZ); | |
| 361 | + supp_band = iwl_get_hw_mode(priv, NL80211_BAND_5GHZ); | |
| 362 | 362 | if (supp_band) { |
| 363 | 363 | channels = supp_band->channels; |
| 364 | 364 | |
| @@ -677,7 +677,7 @@ struct iwl_priv { · 676 unmodified lines | ||
| 677 | 677 | |
| 678 | 678 | struct iwl_hw_params hw_params; |
| 679 | 679 | |
| 680 | − enum ieee80211_band band; | |
| 680 | + enum nl80211_band band; | |
| 681 | 681 | u8 valid_contexts; |
| 682 | 682 | |
| 683 | 683 | void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv, |
| @@ -722,11 +722,11 @@ struct iwl_priv { · 38 unmodified lines | ||
| 722 | 722 | unsigned long scan_start; |
| 723 | 723 | unsigned long scan_start_tsf; |
| 724 | 724 | void *scan_cmd; |
| 725 | − enum ieee80211_band scan_band; | |
| 725 | + enum nl80211_band scan_band; | |
| 726 | 726 | struct cfg80211_scan_request *scan_request; |
| 727 | 727 | struct ieee80211_vif *scan_vif; |
| 728 | 728 | enum iwl_scan_type scan_type; |
| 729 | − u8 scan_tx_ant[IEEE80211_NUM_BANDS]; | |
| 729 | + u8 scan_tx_ant[NUM_NL80211_BANDS]; | |
| 730 | 730 | u8 mgmt_tx_ant; |
| 731 | 731 | |
| 732 | 732 | /* max number of station keys */ |
| @@ -420,7 +420,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, · 419 unmodified lines | ||
| 420 | 420 | .data = { &cmd, }, |
| 421 | 421 | }; |
| 422 | 422 | |
| 423 | − cmd.band = priv->band == IEEE80211_BAND_2GHZ; | |
| 423 | + cmd.band = priv->band == NL80211_BAND_2GHZ; | |
| 424 | 424 | ch = ch_switch->chandef.chan->hw_value; |
| 425 | 425 | IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", |
| 426 | 426 | ctx->active.channel, ch); |
| @@ -588,7 +588,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, · 161 unmodified lines | ||
| 588 | 588 | |
| 589 | 589 | hcmd.data[0] = cmd; |
| 590 | 590 | |
| 591 | − cmd->band = priv->band == IEEE80211_BAND_2GHZ; | |
| 591 | + cmd->band = priv->band == NL80211_BAND_2GHZ; | |
| 592 | 592 | ch = ch_switch->chandef.chan->hw_value; |
| 593 | 593 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", |
| 594 | 594 | ctx->active.channel, ch); |
| @@ -94,7 +94,7 @@ void iwlagn_temperature(struct iwl_priv *priv) · 93 unmodified lines | ||
| 94 | 94 | iwl_tt_handler(priv); |
| 95 | 95 | } |
| 96 | 96 | |
| 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) | |
| 98 | 98 | { |
| 99 | 99 | int idx = 0; |
| 100 | 100 | 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 | ||
| 105 | 105 | return idx; |
| 106 | 106 | /* Legacy rate format, search for match in table */ |
| 107 | 107 | } else { |
| 108 | − if (band == IEEE80211_BAND_5GHZ) | |
| 108 | + if (band == NL80211_BAND_5GHZ) | |
| 109 | 109 | band_offset = IWL_FIRST_OFDM_RATE; |
| 110 | 110 | for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) |
| 111 | 111 | if (iwl_rates[idx].plcp == (rate_n_flags & 0xFF)) |
| @@ -878,7 +878,7 @@ u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant, u8 valid) · 766 unmodified lines | ||
| 878 | 878 | int i; |
| 879 | 879 | u8 ind = ant; |
| 880 | 880 | |
| 881 | − if (priv->band == IEEE80211_BAND_2GHZ && | |
| 881 | + if (priv->band == NL80211_BAND_2GHZ && | |
| 882 | 882 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) |
| 883 | 883 | return 0; |
| 884 | 884 | |
| @@ -202,12 +202,12 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, · 201 unmodified lines | ||
| 202 | 202 | |
| 203 | 203 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; |
| 204 | 204 | |
| 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]; | |
| 211 | 211 | |
| 212 | 212 | hw->wiphy->hw_version = priv->trans->hw_id; |
| 213 | 213 | |
| @@ -262,7 +262,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) · 261 unmodified lines | ||
| 262 | 262 | rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant); |
| 263 | 263 | |
| 264 | 264 | /* In mac80211, rates for 5 GHz start at 0 */ |
| 265 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 265 | + if (info->band == NL80211_BAND_5GHZ) | |
| 266 | 266 | rate += IWL_FIRST_OFDM_RATE; |
| 267 | 267 | else if (rate >= IWL_FIRST_CCK_RATE && rate <= IWL_LAST_CCK_RATE) |
| 268 | 268 | rate_flags |= RATE_MCS_CCK_MSK; |
| @@ -1117,7 +1117,7 @@ static int iwl_init_drv(struct iwl_priv *priv) · 848 unmodified lines | ||
| 1117 | 1117 | |
| 1118 | 1118 | INIT_LIST_HEAD(&priv->calib_results); |
| 1119 | 1119 | |
| 1120 | − priv->band = IEEE80211_BAND_2GHZ; | |
| 1120 | + priv->band = NL80211_BAND_2GHZ; | |
| 1121 | 1121 | |
| 1122 | 1122 | priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold; |
| 1123 | 1123 | |
| @@ -599,7 +599,7 @@ static u32 rate_n_flags_from_tbl(struct iwl_priv *priv, · 598 unmodified lines | ||
| 599 | 599 | * fill "search" or "active" tx mode table. |
| 600 | 600 | */ |
| 601 | 601 | static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags, |
| 602 | − enum ieee80211_band band, | |
| 602 | + enum nl80211_band band, | |
| 603 | 603 | struct iwl_scale_tbl_info *tbl, |
| 604 | 604 | int *rate_idx) |
| 605 | 605 | { |
| @@ -624,7 +624,7 @@ static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags, · 18 unmodified lines | ||
| 624 | 624 | /* legacy rate format */ |
| 625 | 625 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { |
| 626 | 626 | if (num_of_ant == 1) { |
| 627 | − if (band == IEEE80211_BAND_5GHZ) | |
| 627 | + if (band == NL80211_BAND_5GHZ) | |
| 628 | 628 | tbl->lq_type = LQ_A; |
| 629 | 629 | else |
| 630 | 630 | tbl->lq_type = LQ_G; |
| @@ -802,7 +802,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, · 171 unmodified lines | ||
| 802 | 802 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { |
| 803 | 803 | switch_to_legacy = 1; |
| 804 | 804 | scale_index = rs_ht_to_legacy[scale_index]; |
| 805 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 805 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 806 | 806 | tbl->lq_type = LQ_A; |
| 807 | 807 | else |
| 808 | 808 | tbl->lq_type = LQ_G; |
| @@ -821,7 +821,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, · 12 unmodified lines | ||
| 821 | 821 | /* Mask with station rate restriction */ |
| 822 | 822 | if (is_legacy(tbl->lq_type)) { |
| 823 | 823 | /* supp_rates has no CCK bits in A mode */ |
| 824 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 824 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 825 | 825 | rate_mask = (u16)(rate_mask & |
| 826 | 826 | (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); |
| 827 | 827 | else |
| @@ -939,7 +939,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, · 111 unmodified lines | ||
| 939 | 939 | table = &lq_sta->lq; |
| 940 | 940 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); |
| 941 | 941 | rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, &rs_index); |
| 942 | − if (priv->band == IEEE80211_BAND_5GHZ) | |
| 942 | + if (priv->band == NL80211_BAND_5GHZ) | |
| 943 | 943 | rs_index -= IWL_FIRST_OFDM_RATE; |
| 944 | 944 | mac_flags = info->status.rates[0].flags; |
| 945 | 945 | mac_index = info->status.rates[0].idx; |
| @@ -952,7 +952,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, · 6 unmodified lines | ||
| 952 | 952 | * mac80211 HT index is always zero-indexed; we need to move |
| 953 | 953 | * HT OFDM rates after CCK rates in 2.4 GHz band |
| 954 | 954 | */ |
| 955 | − if (priv->band == IEEE80211_BAND_2GHZ) | |
| 955 | + if (priv->band == NL80211_BAND_2GHZ) | |
| 956 | 956 | mac_index += IWL_FIRST_OFDM_RATE; |
| 957 | 957 | } |
| 958 | 958 | /* Here we actually compare this rate to the latest LQ command */ |
| @@ -2284,7 +2284,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, · 1325 unmodified lines | ||
| 2284 | 2284 | |
| 2285 | 2285 | /* mask with station rate restriction */ |
| 2286 | 2286 | if (is_legacy(tbl->lq_type)) { |
| 2287 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 2287 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 2288 | 2288 | /* supp_rates has no CCK bits in A mode */ |
| 2289 | 2289 | rate_scale_index_msk = (u16) (rate_mask & |
| 2290 | 2290 | (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); |
| @@ -2721,7 +2721,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, · 430 unmodified lines | ||
| 2721 | 2721 | /* Get max rate if user set max rate */ |
| 2722 | 2722 | if (lq_sta) { |
| 2723 | 2723 | lq_sta->max_rate_idx = txrc->max_rate_idx; |
| 2724 | − if ((sband->band == IEEE80211_BAND_5GHZ) && | |
| 2724 | + if ((sband->band == NL80211_BAND_5GHZ) && | |
| 2725 | 2725 | (lq_sta->max_rate_idx != -1)) |
| 2726 | 2726 | lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE; |
| 2727 | 2727 | if ((lq_sta->max_rate_idx < 0) || |
| @@ -2763,11 +2763,11 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, · 35 unmodified lines | ||
| 2763 | 2763 | } else { |
| 2764 | 2764 | /* Check for invalid rates */ |
| 2765 | 2765 | if ((rate_idx < 0) || (rate_idx >= IWL_RATE_COUNT_LEGACY) || |
| 2766 | − ((sband->band == IEEE80211_BAND_5GHZ) && | |
| 2766 | + ((sband->band == NL80211_BAND_5GHZ) && | |
| 2767 | 2767 | (rate_idx < IWL_FIRST_OFDM_RATE))) |
| 2768 | 2768 | rate_idx = rate_lowest_index(sband, sta); |
| 2769 | 2769 | /* On valid 5 GHz rate, adjust index */ |
| 2770 | − else if (sband->band == IEEE80211_BAND_5GHZ) | |
| 2770 | + else if (sband->band == NL80211_BAND_5GHZ) | |
| 2771 | 2771 | rate_idx -= IWL_FIRST_OFDM_RATE; |
| 2772 | 2772 | info->control.rates[0].flags = 0; |
| 2773 | 2773 | } |
| @@ -2880,7 +2880,7 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i · 106 unmodified lines | ||
| 2880 | 2880 | |
| 2881 | 2881 | /* Set last_txrate_idx to lowest rate */ |
| 2882 | 2882 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); |
| 2883 | − if (sband->band == IEEE80211_BAND_5GHZ) | |
| 2883 | + if (sband->band == NL80211_BAND_5GHZ) | |
| 2884 | 2884 | lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; |
| 2885 | 2885 | lq_sta->is_agg = 0; |
| 2886 | 2886 | #ifdef CONFIG_MAC80211_DEBUGFS |
| @@ -355,7 +355,7 @@ struct iwl_lq_sta { · 354 unmodified lines | ||
| 355 | 355 | u8 action_counter; /* # mode-switch actions tried */ |
| 356 | 356 | u8 is_green; |
| 357 | 357 | u8 is_dup; |
| 358 | − enum ieee80211_band band; | |
| 358 | + enum nl80211_band band; | |
| 359 | 359 | |
| 360 | 360 | /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ |
| 361 | 361 | u32 supp_rates; |
| @@ -834,7 +834,7 @@ static void iwlagn_rx_reply_rx(struct iwl_priv *priv, · 833 unmodified lines | ||
| 834 | 834 | /* rx_status carries information about the packet to mac80211 */ |
| 835 | 835 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); |
| 836 | 836 | rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? |
| 837 | − IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | |
| 837 | + NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; | |
| 838 | 838 | rx_status.freq = |
| 839 | 839 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), |
| 840 | 840 | rx_status.band); |
| @@ -719,7 +719,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf) · 718 unmodified lines | ||
| 719 | 719 | void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, |
| 720 | 720 | struct iwl_rxon_context *ctx) |
| 721 | 721 | { |
| 722 | − enum ieee80211_band band = ch->band; | |
| 722 | + enum nl80211_band band = ch->band; | |
| 723 | 723 | u16 channel = ch->hw_value; |
| 724 | 724 | |
| 725 | 725 | if ((le16_to_cpu(ctx->staging.channel) == channel) && |
| @@ -727,7 +727,7 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, · 1 unmodified line | ||
| 727 | 727 | return; |
| 728 | 728 | |
| 729 | 729 | ctx->staging.channel = cpu_to_le16(channel); |
| 730 | − if (band == IEEE80211_BAND_5GHZ) | |
| 730 | + if (band == NL80211_BAND_5GHZ) | |
| 731 | 731 | ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK; |
| 732 | 732 | else |
| 733 | 733 | ctx->staging.flags |= RXON_FLG_BAND_24G_MSK; |
| @@ -740,10 +740,10 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, · 6 unmodified lines | ||
| 740 | 740 | |
| 741 | 741 | void iwl_set_flags_for_band(struct iwl_priv *priv, |
| 742 | 742 | struct iwl_rxon_context *ctx, |
| 743 | − enum ieee80211_band band, | |
| 743 | + enum nl80211_band band, | |
| 744 | 744 | struct ieee80211_vif *vif) |
| 745 | 745 | { |
| 746 | − if (band == IEEE80211_BAND_5GHZ) { | |
| 746 | + if (band == NL80211_BAND_5GHZ) { | |
| 747 | 747 | ctx->staging.flags &= |
| 748 | 748 | ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK |
| 749 | 749 | | RXON_FLG_CCK_MSK); |
| @@ -1476,7 +1476,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, · 726 unmodified lines | ||
| 1476 | 1476 | |
| 1477 | 1477 | iwlagn_set_rxon_chain(priv, ctx); |
| 1478 | 1478 | |
| 1479 | − if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) | |
| 1479 | + if (bss_conf->use_cts_prot && (priv->band != NL80211_BAND_5GHZ)) | |
| 1480 | 1480 | ctx->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; |
| 1481 | 1481 | else |
| 1482 | 1482 | ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; |
| @@ -312,7 +312,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv, · 311 unmodified lines | ||
| 312 | 312 | scan_notif->tsf_high, scan_notif->status); |
| 313 | 313 | |
| 314 | 314 | IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n", |
| 315 | − (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", | |
| 315 | + (priv->scan_band == NL80211_BAND_2GHZ) ? "2.4" : "5.2", | |
| 316 | 316 | jiffies_to_msecs(jiffies - priv->scan_start)); |
| 317 | 317 | |
| 318 | 318 | /* |
| @@ -362,9 +362,9 @@ void iwl_setup_rx_scan_handlers(struct iwl_priv *priv) · 43 unmodified lines | ||
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | 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) | |
| 366 | 366 | { |
| 367 | − if (band == IEEE80211_BAND_5GHZ) | |
| 367 | + if (band == NL80211_BAND_5GHZ) | |
| 368 | 368 | return IWL_ACTIVE_DWELL_TIME_52 + |
| 369 | 369 | IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); |
| 370 | 370 | else |
| @@ -431,9 +431,9 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time) · 60 unmodified lines | ||
| 431 | 431 | } |
| 432 | 432 | |
| 433 | 433 | static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, |
| 434 | − enum ieee80211_band band) | |
| 434 | + enum nl80211_band band) | |
| 435 | 435 | { |
| 436 | − u16 passive = (band == IEEE80211_BAND_2GHZ) ? | |
| 436 | + u16 passive = (band == NL80211_BAND_2GHZ) ? | |
| 437 | 437 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : |
| 438 | 438 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52; |
| 439 | 439 | |
| @@ -442,7 +442,7 @@ static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, · 2 unmodified lines | ||
| 442 | 442 | |
| 443 | 443 | /* Return valid, unused, channel for a passive scan to reset the RF */ |
| 444 | 444 | static u8 iwl_get_single_channel_number(struct iwl_priv *priv, |
| 445 | − enum ieee80211_band band) | |
| 445 | + enum nl80211_band band) | |
| 446 | 446 | { |
| 447 | 447 | struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band]; |
| 448 | 448 | struct iwl_rxon_context *ctx; |
| @@ -470,7 +470,7 @@ static u8 iwl_get_single_channel_number(struct iwl_priv *priv, · 21 unmodified lines | ||
| 470 | 470 | |
| 471 | 471 | static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, |
| 472 | 472 | struct ieee80211_vif *vif, |
| 473 | − enum ieee80211_band band, | |
| 473 | + enum nl80211_band band, | |
| 474 | 474 | struct iwl_scan_channel *scan_ch) |
| 475 | 475 | { |
| 476 | 476 | 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 | ||
| 492 | 492 | cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME); |
| 493 | 493 | /* Set txpower levels to defaults */ |
| 494 | 494 | scan_ch->dsp_atten = 110; |
| 495 | − if (band == IEEE80211_BAND_5GHZ) | |
| 495 | + if (band == NL80211_BAND_5GHZ) | |
| 496 | 496 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 497 | 497 | else |
| 498 | 498 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); |
| @@ -505,7 +505,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, · 6 unmodified lines | ||
| 505 | 505 | |
| 506 | 506 | static int iwl_get_channels_for_scan(struct iwl_priv *priv, |
| 507 | 507 | struct ieee80211_vif *vif, |
| 508 | − enum ieee80211_band band, | |
| 508 | + enum nl80211_band band, | |
| 509 | 509 | u8 is_active, u8 n_probes, |
| 510 | 510 | struct iwl_scan_channel *scan_ch) |
| 511 | 511 | { |
| @@ -553,7 +553,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv, · 41 unmodified lines | ||
| 553 | 553 | * power level: |
| 554 | 554 | * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; |
| 555 | 555 | */ |
| 556 | − if (band == IEEE80211_BAND_5GHZ) | |
| 556 | + if (band == NL80211_BAND_5GHZ) | |
| 557 | 557 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 558 | 558 | else |
| 559 | 559 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); |
| @@ -636,7 +636,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · 76 unmodified lines | ||
| 636 | 636 | u32 rate_flags = 0; |
| 637 | 637 | u16 cmd_len = 0; |
| 638 | 638 | u16 rx_chain = 0; |
| 639 | − enum ieee80211_band band; | |
| 639 | + enum nl80211_band band; | |
| 640 | 640 | u8 n_probes = 0; |
| 641 | 641 | u8 rx_ant = priv->nvm_data->valid_rx_ant; |
| 642 | 642 | u8 rate; |
| @@ -750,7 +750,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · 107 unmodified lines | ||
| 750 | 750 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
| 751 | 751 | |
| 752 | 752 | switch (priv->scan_band) { |
| 753 | − case IEEE80211_BAND_2GHZ: | |
| 753 | + case NL80211_BAND_2GHZ: | |
| 754 | 754 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; |
| 755 | 755 | chan_mod = le32_to_cpu( |
| 756 | 756 | priv->contexts[IWL_RXON_CTX_BSS].active.flags & |
| @@ -771,7 +771,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · 14 unmodified lines | ||
| 771 | 771 | priv->lib->bt_params->advanced_bt_coexist) |
| 772 | 772 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; |
| 773 | 773 | break; |
| 774 | − case IEEE80211_BAND_5GHZ: | |
| 774 | + case NL80211_BAND_5GHZ: | |
| 775 | 775 | rate = IWL_RATE_6M_PLCP; |
| 776 | 776 | break; |
| 777 | 777 | default: |
| @@ -809,7 +809,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · 31 unmodified lines | ||
| 809 | 809 | |
| 810 | 810 | band = priv->scan_band; |
| 811 | 811 | |
| 812 | − if (band == IEEE80211_BAND_2GHZ && | |
| 812 | + if (band == NL80211_BAND_2GHZ && | |
| 813 | 813 | priv->lib->bt_params && |
| 814 | 814 | priv->lib->bt_params->advanced_bt_coexist) { |
| 815 | 815 | /* transmit 2.4 GHz probes only on first antenna */ |
| @@ -925,16 +925,16 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · 109 unmodified lines | ||
| 925 | 925 | void iwl_init_scan_params(struct iwl_priv *priv) |
| 926 | 926 | { |
| 927 | 927 | 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; | |
| 932 | 932 | } |
| 933 | 933 | |
| 934 | 934 | int __must_check iwl_scan_initiate(struct iwl_priv *priv, |
| 935 | 935 | struct ieee80211_vif *vif, |
| 936 | 936 | enum iwl_scan_type scan_type, |
| 937 | − enum ieee80211_band band) | |
| 937 | + enum nl80211_band band) | |
| 938 | 938 | { |
| 939 | 939 | int ret; |
| 940 | 940 | |
| @@ -579,7 +579,7 @@ static void iwl_sta_fill_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, · 578 unmodified lines | ||
| 579 | 579 | |
| 580 | 580 | /* Set up the rate scaling to start at selected rate, fall back |
| 581 | 581 | * all the way down to 1M in IEEE order, and then spin on 1M */ |
| 582 | − if (priv->band == IEEE80211_BAND_5GHZ) | |
| 582 | + if (priv->band == NL80211_BAND_5GHZ) | |
| 583 | 583 | r = IWL_RATE_6M_INDEX; |
| 584 | 584 | else if (ctx && ctx->vif && ctx->vif->p2p) |
| 585 | 585 | r = IWL_RATE_6M_INDEX; |
| @@ -81,7 +81,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, · 80 unmodified lines | ||
| 81 | 81 | tx_flags |= TX_CMD_FLG_TSF_MSK; |
| 82 | 82 | else if (ieee80211_is_back_req(fc)) |
| 83 | 83 | tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; |
| 84 | − else if (info->band == IEEE80211_BAND_2GHZ && | |
| 84 | + else if (info->band == NL80211_BAND_2GHZ && | |
| 85 | 85 | priv->lib->bt_params && |
| 86 | 86 | priv->lib->bt_params->advanced_bt_coexist && |
| 87 | 87 | (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || |
| @@ -177,7 +177,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, · 89 unmodified lines | ||
| 177 | 177 | rate_idx = rate_lowest_index( |
| 178 | 178 | &priv->nvm_data->bands[info->band], sta); |
| 179 | 179 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
| 180 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 180 | + if (info->band == NL80211_BAND_5GHZ) | |
| 181 | 181 | rate_idx += IWL_FIRST_OFDM_RATE; |
| 182 | 182 | /* Get PLCP rate for tx_cmd->rate_n_flags */ |
| 183 | 183 | rate_plcp = iwl_rates[rate_idx].plcp; |
| @@ -64,7 +64,7 @@ static const struct iwl_base_params iwl1000_base_params = { · 63 unmodified lines | ||
| 64 | 64 | static const struct iwl_ht_params iwl1000_ht_params = { |
| 65 | 65 | .ht_greenfield_support = true, |
| 66 | 66 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
| 67 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ), | |
| 67 | + .ht40_bands = BIT(NL80211_BAND_2GHZ), | |
| 68 | 68 | }; |
| 69 | 69 | |
| 70 | 70 | static const struct iwl_eeprom_params iwl1000_eeprom_params = { |
| @@ -89,7 +89,7 @@ static const struct iwl_base_params iwl2030_base_params = { · 88 unmodified lines | ||
| 89 | 89 | static const struct iwl_ht_params iwl2000_ht_params = { |
| 90 | 90 | .ht_greenfield_support = true, |
| 91 | 91 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
| 92 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ), | |
| 92 | + .ht40_bands = BIT(NL80211_BAND_2GHZ), | |
| 93 | 93 | }; |
| 94 | 94 | |
| 95 | 95 | static const struct iwl_eeprom_params iwl20x0_eeprom_params = { |
| @@ -62,7 +62,7 @@ static const struct iwl_base_params iwl5000_base_params = { · 61 unmodified lines | ||
| 62 | 62 | |
| 63 | 63 | static const struct iwl_ht_params iwl5000_ht_params = { |
| 64 | 64 | .ht_greenfield_support = true, |
| 65 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | |
| 65 | + .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), | |
| 66 | 66 | }; |
| 67 | 67 | |
| 68 | 68 | static const struct iwl_eeprom_params iwl5000_eeprom_params = { |
| @@ -110,7 +110,7 @@ static const struct iwl_base_params iwl6000_g2_base_params = { · 109 unmodified lines | ||
| 110 | 110 | static const struct iwl_ht_params iwl6000_ht_params = { |
| 111 | 111 | .ht_greenfield_support = true, |
| 112 | 112 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
| 113 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | |
| 113 | + .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), | |
| 114 | 114 | }; |
| 115 | 115 | |
| 116 | 116 | static const struct iwl_eeprom_params iwl6000_eeprom_params = { |
| @@ -156,7 +156,7 @@ static const struct iwl_tt_params iwl7000_high_temp_tt_params = { · 155 unmodified lines | ||
| 156 | 156 | |
| 157 | 157 | static const struct iwl_ht_params iwl7000_ht_params = { |
| 158 | 158 | .stbc = true, |
| 159 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | |
| 159 | + .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), | |
| 160 | 160 | }; |
| 161 | 161 | |
| 162 | 162 | #define IWL_DEVICE_7000_COMMON \ |
| @@ -287,7 +287,7 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = { · 124 unmodified lines | ||
| 287 | 287 | static const struct iwl_ht_params iwl7265_ht_params = { |
| 288 | 288 | .stbc = true, |
| 289 | 289 | .ldpc = true, |
| 290 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | |
| 290 | + .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), | |
| 291 | 291 | }; |
| 292 | 292 | |
| 293 | 293 | const struct iwl_cfg iwl3165_2ac_cfg = { |
| @@ -124,7 +124,7 @@ static const struct iwl_base_params iwl8000_base_params = { · 123 unmodified lines | ||
| 124 | 124 | static const struct iwl_ht_params iwl8000_ht_params = { |
| 125 | 125 | .stbc = true, |
| 126 | 126 | .ldpc = true, |
| 127 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | |
| 127 | + .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), | |
| 128 | 128 | }; |
| 129 | 129 | |
| 130 | 130 | static const struct iwl_tt_params iwl8000_tt_params = { |
| @@ -93,7 +93,7 @@ static const struct iwl_base_params iwl9000_base_params = { · 92 unmodified lines | ||
| 93 | 93 | static const struct iwl_ht_params iwl9000_ht_params = { |
| 94 | 94 | .stbc = true, |
| 95 | 95 | .ldpc = true, |
| 96 | − .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | |
| 96 | + .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), | |
| 97 | 97 | }; |
| 98 | 98 | |
| 99 | 99 | static const struct iwl_tt_params iwl9000_tt_params = { |
| @@ -185,7 +185,7 @@ struct iwl_base_params { · 184 unmodified lines | ||
| 185 | 185 | * @stbc: support Tx STBC and 1*SS Rx STBC |
| 186 | 186 | * @ldpc: support Tx/Rx with LDPC |
| 187 | 187 | * @use_rts_for_aggregation: use rts/cts protection for HT traffic |
| 188 | − * @ht40_bands: bitmap of bands (using %IEEE80211_BAND_*) that support HT40 | |
| 188 | + * @ht40_bands: bitmap of bands (using %NL80211_BAND_*) that support HT40 | |
| 189 | 189 | */ |
| 190 | 190 | struct iwl_ht_params { |
| 191 | 191 | enum ieee80211_smps_mode smps_mode; |
| @@ -390,10 +390,10 @@ iwl_eeprom_enh_txp_read_element(struct iwl_nvm_data *data, · 389 unmodified lines | ||
| 390 | 390 | int n_channels, s8 max_txpower_avg) |
| 391 | 391 | { |
| 392 | 392 | int ch_idx; |
| 393 | − enum ieee80211_band band; | |
| 393 | + enum nl80211_band band; | |
| 394 | 394 | |
| 395 | 395 | band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ? |
| 396 | − IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; | |
| 396 | + NL80211_BAND_5GHZ : NL80211_BAND_2GHZ; | |
| 397 | 397 | |
| 398 | 398 | for (ch_idx = 0; ch_idx < n_channels; ch_idx++) { |
| 399 | 399 | 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 | ||
| 526 | 526 | |
| 527 | 527 | static void iwl_mod_ht40_chan_info(struct device *dev, |
| 528 | 528 | struct iwl_nvm_data *data, int n_channels, |
| 529 | − enum ieee80211_band band, u16 channel, | |
| 529 | + enum nl80211_band band, u16 channel, | |
| 530 | 530 | const struct iwl_eeprom_channel *eeprom_ch, |
| 531 | 531 | u8 clear_ht40_extension_channel) |
| 532 | 532 | { |
| @@ -548,7 +548,7 @@ static void iwl_mod_ht40_chan_info(struct device *dev, · 15 unmodified lines | ||
| 548 | 548 | IWL_DEBUG_EEPROM(dev, |
| 549 | 549 | "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm): Ad-Hoc %ssupported\n", |
| 550 | 550 | channel, |
| 551 | − band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4", | |
| 551 | + band == NL80211_BAND_5GHZ ? "5.2" : "2.4", | |
| 552 | 552 | CHECK_AND_PRINT(IBSS), |
| 553 | 553 | CHECK_AND_PRINT(ACTIVE), |
| 554 | 554 | 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 | ||
| 606 | 606 | n_channels++; |
| 607 | 607 | |
| 608 | 608 | 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; | |
| 611 | 611 | channel->center_freq = |
| 612 | 612 | ieee80211_channel_to_frequency( |
| 613 | 613 | 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 | ||
| 677 | 677 | |
| 678 | 678 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ |
| 679 | 679 | for (band = 6; band <= 7; band++) { |
| 680 | − enum ieee80211_band ieeeband; | |
| 680 | + enum nl80211_band ieeeband; | |
| 681 | 681 | |
| 682 | 682 | iwl_init_band_reference(cfg, eeprom, eeprom_size, band, |
| 683 | 683 | &eeprom_ch_count, &eeprom_ch_info, |
| 684 | 684 | &eeprom_ch_array); |
| 685 | 685 | |
| 686 | 686 | /* 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; | |
| 689 | 689 | |
| 690 | 690 | /* Loop through each band adding each of the channels */ |
| 691 | 691 | for (ch_idx = 0; ch_idx < eeprom_ch_count; ch_idx++) { |
| @@ -708,7 +708,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, · 16 unmodified lines | ||
| 708 | 708 | |
| 709 | 709 | int iwl_init_sband_channels(struct iwl_nvm_data *data, |
| 710 | 710 | struct ieee80211_supported_band *sband, |
| 711 | − int n_channels, enum ieee80211_band band) | |
| 711 | + int n_channels, enum nl80211_band band) | |
| 712 | 712 | { |
| 713 | 713 | struct ieee80211_channel *chan = &data->channels[0]; |
| 714 | 714 | int n = 0, idx = 0; |
| @@ -734,7 +734,7 @@ int iwl_init_sband_channels(struct iwl_nvm_data *data, · 19 unmodified lines | ||
| 734 | 734 | void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, |
| 735 | 735 | struct iwl_nvm_data *data, |
| 736 | 736 | struct ieee80211_sta_ht_cap *ht_info, |
| 737 | − enum ieee80211_band band, | |
| 737 | + enum nl80211_band band, | |
| 738 | 738 | u8 tx_chains, u8 rx_chains) |
| 739 | 739 | { |
| 740 | 740 | 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 | ||
| 813 | 813 | int n_used = 0; |
| 814 | 814 | struct ieee80211_supported_band *sband; |
| 815 | 815 | |
| 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; | |
| 818 | 818 | sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; |
| 819 | 819 | sband->n_bitrates = N_RATES_24; |
| 820 | 820 | 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, | |
| 823 | 823 | data->valid_tx_ant, data->valid_rx_ant); |
| 824 | 824 | |
| 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; | |
| 827 | 827 | sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; |
| 828 | 828 | sband->n_bitrates = N_RATES_52; |
| 829 | 829 | 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, | |
| 832 | 832 | data->valid_tx_ant, data->valid_rx_ant); |
| 833 | 833 | |
| 834 | 834 | if (n_channels != n_used) |
| @@ -98,7 +98,7 @@ struct iwl_nvm_data { · 97 unmodified lines | ||
| 98 | 98 | s8 max_tx_pwr_half_dbm; |
| 99 | 99 | |
| 100 | 100 | bool lar_enabled; |
| 101 | − struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | |
| 101 | + struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; | |
| 102 | 102 | struct ieee80211_channel channels[]; |
| 103 | 103 | }; |
| 104 | 104 | |
| @@ -133,12 +133,12 @@ int iwl_nvm_check_version(struct iwl_nvm_data *data, · 28 unmodified lines | ||
| 133 | 133 | |
| 134 | 134 | int iwl_init_sband_channels(struct iwl_nvm_data *data, |
| 135 | 135 | struct ieee80211_supported_band *sband, |
| 136 | − int n_channels, enum ieee80211_band band); | |
| 136 | + int n_channels, enum nl80211_band band); | |
| 137 | 137 | |
| 138 | 138 | void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, |
| 139 | 139 | struct iwl_nvm_data *data, |
| 140 | 140 | struct ieee80211_sta_ht_cap *ht_info, |
| 141 | − enum ieee80211_band band, | |
| 141 | + enum nl80211_band band, | |
| 142 | 142 | u8 tx_chains, u8 rx_chains); |
| 143 | 143 | |
| 144 | 144 | #endif /* __iwl_eeprom_parse_h__ */ |
| @@ -308,7 +308,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, · 307 unmodified lines | ||
| 308 | 308 | |
| 309 | 309 | channel->hw_value = nvm_chan[ch_idx]; |
| 310 | 310 | channel->band = (ch_idx < num_2ghz_channels) ? |
| 311 | − IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | |
| 311 | + NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; | |
| 312 | 312 | channel->center_freq = |
| 313 | 313 | ieee80211_channel_to_frequency( |
| 314 | 314 | 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 | ||
| 320 | 320 | * is not used in mvm, and is used for backwards compatibility |
| 321 | 321 | */ |
| 322 | 322 | channel->max_power = IWL_DEFAULT_MAX_TX_POWER; |
| 323 | − is_5ghz = channel->band == IEEE80211_BAND_5GHZ; | |
| 323 | + is_5ghz = channel->band == NL80211_BAND_5GHZ; | |
| 324 | 324 | |
| 325 | 325 | /* don't put limitations in case we're using LAR */ |
| 326 | 326 | if (!lar_supported) |
| @@ -439,22 +439,22 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, · 112 unmodified lines | ||
| 439 | 439 | &ch_section[NVM_CHANNELS_FAMILY_8000], |
| 440 | 440 | lar_supported); |
| 441 | 441 | |
| 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; | |
| 444 | 444 | sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; |
| 445 | 445 | sband->n_bitrates = N_RATES_24; |
| 446 | 446 | 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, | |
| 449 | 449 | tx_chains, rx_chains); |
| 450 | 450 | |
| 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; | |
| 453 | 453 | sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; |
| 454 | 454 | sband->n_bitrates = N_RATES_52; |
| 455 | 455 | 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, | |
| 458 | 458 | tx_chains, rx_chains); |
| 459 | 459 | if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac) |
| 460 | 460 | iwl_init_vht_hw_capab(cfg, data, &sband->vht_cap, |
| @@ -781,7 +781,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, · 320 unmodified lines | ||
| 781 | 781 | struct ieee80211_regdomain *regd; |
| 782 | 782 | int size_of_regd; |
| 783 | 783 | struct ieee80211_reg_rule *rule; |
| 784 | − enum ieee80211_band band; | |
| 784 | + enum nl80211_band band; | |
| 785 | 785 | int center_freq, prev_center_freq = 0; |
| 786 | 786 | int valid_rules = 0; |
| 787 | 787 | bool new_rule; |
| @@ -809,7 +809,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, · 21 unmodified lines | ||
| 809 | 809 | for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { |
| 810 | 810 | ch_flags = (u16)__le32_to_cpup(channels + ch_idx); |
| 811 | 811 | band = (ch_idx < NUM_2GHZ_CHANNELS) ? |
| 812 | − IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | |
| 812 | + NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; | |
| 813 | 813 | center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx], |
| 814 | 814 | band); |
| 815 | 815 | new_rule = false; |
| @@ -857,7 +857,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, · 41 unmodified lines | ||
| 857 | 857 | IWL_DEBUG_DEV(dev, IWL_DL_LAR, |
| 858 | 858 | "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n", |
| 859 | 859 | center_freq, |
| 860 | − band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4", | |
| 860 | + band == NL80211_BAND_5GHZ ? "5.2" : "2.4", | |
| 861 | 861 | CHECK_AND_PRINT_I(VALID), |
| 862 | 862 | CHECK_AND_PRINT_I(ACTIVE), |
| 863 | 863 | CHECK_AND_PRINT_I(RADAR), |
| @@ -378,7 +378,7 @@ iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif) · 377 unmodified lines | ||
| 378 | 378 | chanctx_conf = rcu_dereference(vif->chanctx_conf); |
| 379 | 379 | |
| 380 | 380 | if (!chanctx_conf || |
| 381 | − chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ) { | |
| 381 | + chanctx_conf->def.chan->band != NL80211_BAND_2GHZ) { | |
| 382 | 382 | rcu_read_unlock(); |
| 383 | 383 | return BT_COEX_INVALID_LUT; |
| 384 | 384 | } |
| @@ -537,7 +537,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, · 152 unmodified lines | ||
| 537 | 537 | |
| 538 | 538 | /* If channel context is invalid or not on 2.4GHz .. */ |
| 539 | 539 | if ((!chanctx_conf || |
| 540 | − chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ)) { | |
| 540 | + chanctx_conf->def.chan->band != NL80211_BAND_2GHZ)) { | |
| 541 | 541 | if (vif->type == NL80211_IFTYPE_STATION) { |
| 542 | 542 | /* ... relax constraints and disable rssi events */ |
| 543 | 543 | iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, |
| @@ -857,11 +857,11 @@ bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm) · 313 unmodified lines | ||
| 857 | 857 | } |
| 858 | 858 | |
| 859 | 859 | bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, |
| 860 | − enum ieee80211_band band) | |
| 860 | + enum nl80211_band band) | |
| 861 | 861 | { |
| 862 | 862 | u32 bt_activity = le32_to_cpu(mvm->last_bt_notif.bt_activity_grading); |
| 863 | 863 | |
| 864 | − if (band != IEEE80211_BAND_2GHZ) | |
| 864 | + if (band != NL80211_BAND_2GHZ) | |
| 865 | 865 | return false; |
| 866 | 866 | |
| 867 | 867 | return bt_activity >= BT_LOW_TRAFFIC; |
| @@ -873,7 +873,7 @@ u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, · 5 unmodified lines | ||
| 873 | 873 | __le16 fc = hdr->frame_control; |
| 874 | 874 | bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm); |
| 875 | 875 | |
| 876 | − if (info->band != IEEE80211_BAND_2GHZ) | |
| 876 | + if (info->band != NL80211_BAND_2GHZ) | |
| 877 | 877 | return 0; |
| 878 | 878 | |
| 879 | 879 | if (unlikely(mvm->bt_tx_prio)) |
| @@ -724,9 +724,9 @@ static ssize_t iwl_dbgfs_tof_responder_params_write(struct ieee80211_vif *vif, · 723 unmodified lines | ||
| 724 | 724 | |
| 725 | 725 | ret = kstrtou32(data, 10, &value); |
| 726 | 726 | 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; | |
| 730 | 730 | struct ieee80211_channel chn = { |
| 731 | 731 | .band = band, |
| 732 | 732 | .center_freq = ieee80211_channel_to_frequency( |
| @@ -980,7 +980,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm) · 979 unmodified lines | ||
| 980 | 980 | goto error; |
| 981 | 981 | |
| 982 | 982 | /* Add all the PHY contexts */ |
| 983 | − chan = &mvm->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->channels[0]; | |
| 983 | + chan = &mvm->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[0]; | |
| 984 | 984 | cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT); |
| 985 | 985 | for (i = 0; i < NUM_PHY_CTX; i++) { |
| 986 | 986 | /* |
| @@ -559,7 +559,7 @@ void iwl_mvm_mac_ctxt_release(struct iwl_mvm *mvm, struct ieee80211_vif *vif) · 558 unmodified lines | ||
| 559 | 559 | |
| 560 | 560 | static void iwl_mvm_ack_rates(struct iwl_mvm *mvm, |
| 561 | 561 | struct ieee80211_vif *vif, |
| 562 | − enum ieee80211_band band, | |
| 562 | + enum nl80211_band band, | |
| 563 | 563 | u8 *cck_rates, u8 *ofdm_rates) |
| 564 | 564 | { |
| 565 | 565 | struct ieee80211_supported_band *sband; |
| @@ -730,7 +730,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm, · 164 unmodified lines | ||
| 730 | 730 | rcu_read_lock(); |
| 731 | 731 | chanctx = rcu_dereference(vif->chanctx_conf); |
| 732 | 732 | iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band |
| 733 | − : IEEE80211_BAND_2GHZ, | |
| 733 | + : NL80211_BAND_2GHZ, | |
| 734 | 734 | &cck_ack_rates, &ofdm_ack_rates); |
| 735 | 735 | rcu_read_unlock(); |
| 736 | 736 | |
| @@ -1065,7 +1065,7 @@ static int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm, · 328 unmodified lines | ||
| 1065 | 1065 | cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << |
| 1066 | 1066 | RATE_MCS_ANT_POS); |
| 1067 | 1067 | |
| 1068 | − if (info->band == IEEE80211_BAND_5GHZ || vif->p2p) { | |
| 1068 | + if (info->band == NL80211_BAND_5GHZ || vif->p2p) { | |
| 1069 | 1069 | rate = IWL_FIRST_OFDM_RATE; |
| 1070 | 1070 | } else { |
| 1071 | 1071 | rate = IWL_FIRST_CCK_RATE; |
| @@ -1516,7 +1516,7 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm, · 444 unmodified lines | ||
| 1516 | 1516 | rx_status.device_timestamp = le32_to_cpu(sb->system_time); |
| 1517 | 1517 | rx_status.band = |
| 1518 | 1518 | (sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? |
| 1519 | − IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | |
| 1519 | + NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; | |
| 1520 | 1520 | rx_status.freq = |
| 1521 | 1521 | ieee80211_channel_to_frequency(le16_to_cpu(sb->channel), |
| 1522 | 1522 | rx_status.band); |
| @@ -550,18 +550,18 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) · 549 unmodified lines | ||
| 550 | 550 | else |
| 551 | 551 | mvm->max_scans = IWL_MVM_MAX_LMAC_SCANS; |
| 552 | 552 | |
| 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]; | |
| 559 | 559 | |
| 560 | 560 | if (fw_has_capa(&mvm->fw->ucode_capa, |
| 561 | 561 | IWL_UCODE_TLV_CAPA_BEAMFORMER) && |
| 562 | 562 | fw_has_api(&mvm->fw->ucode_capa, |
| 563 | 563 | IWL_UCODE_TLV_API_LQ_SS_PARAMS)) |
| 564 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ]->vht_cap.cap |= | |
| 564 | + hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.cap |= | |
| 565 | 565 | IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE; |
| 566 | 566 | } |
| 567 | 567 | |
| @@ -2911,7 +2911,7 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm, · 2343 unmodified lines | ||
| 2911 | 2911 | cpu_to_le32(FW_CMD_ID_AND_COLOR(MAC_INDEX_AUX, 0)), |
| 2912 | 2912 | .sta_id_and_color = cpu_to_le32(mvm->aux_sta.sta_id), |
| 2913 | 2913 | /* Set the channel info data */ |
| 2914 | − .channel_info.band = (channel->band == IEEE80211_BAND_2GHZ) ? | |
| 2914 | + .channel_info.band = (channel->band == NL80211_BAND_2GHZ) ? | |
| 2915 | 2915 | PHY_BAND_24 : PHY_BAND_5, |
| 2916 | 2916 | .channel_info.channel = channel->hw_value, |
| 2917 | 2917 | .channel_info.width = PHY_VHT_CHANNEL_MODE20, |
| @@ -1133,9 +1133,9 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm); · 1132 unmodified lines | ||
| 1133 | 1133 | |
| 1134 | 1134 | /* Utils */ |
| 1135 | 1135 | int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, |
| 1136 | − enum ieee80211_band band); | |
| 1136 | + enum nl80211_band band); | |
| 1137 | 1137 | void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, |
| 1138 | − enum ieee80211_band band, | |
| 1138 | + enum nl80211_band band, | |
| 1139 | 1139 | struct ieee80211_tx_rate *r); |
| 1140 | 1140 | u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx); |
| 1141 | 1141 | 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 | ||
| 1468 | 1468 | bool iwl_mvm_bt_coex_is_ant_avail(struct iwl_mvm *mvm, u8 ant); |
| 1469 | 1469 | bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm); |
| 1470 | 1470 | bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, |
| 1471 | − enum ieee80211_band band); | |
| 1471 | + enum nl80211_band band); | |
| 1472 | 1472 | u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, |
| 1473 | 1473 | struct ieee80211_tx_info *info, u8 ac); |
| 1474 | 1474 | |
| @@ -147,7 +147,7 @@ static void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm, · 146 unmodified lines | ||
| 147 | 147 | u8 active_cnt, idle_cnt; |
| 148 | 148 | |
| 149 | 149 | /* Set the channel info data */ |
| 150 | − cmd->ci.band = (chandef->chan->band == IEEE80211_BAND_2GHZ ? | |
| 150 | + cmd->ci.band = (chandef->chan->band == NL80211_BAND_2GHZ ? | |
| 151 | 151 | PHY_BAND_24 : PHY_BAND_5); |
| 152 | 152 | |
| 153 | 153 | cmd->ci.channel = chandef->chan->hw_value; |
| @@ -829,7 +829,7 @@ static u32 ucode_rate_from_rs_rate(struct iwl_mvm *mvm, · 828 unmodified lines | ||
| 829 | 829 | |
| 830 | 830 | /* Convert a ucode rate into an rs_rate object */ |
| 831 | 831 | static int rs_rate_from_ucode_rate(const u32 ucode_rate, |
| 832 | − enum ieee80211_band band, | |
| 832 | + enum nl80211_band band, | |
| 833 | 833 | struct rs_rate *rate) |
| 834 | 834 | { |
| 835 | 835 | u32 ant_msk = ucode_rate & RATE_MCS_ANT_ABC_MSK; |
| @@ -848,7 +848,7 @@ static int rs_rate_from_ucode_rate(const u32 ucode_rate, · 12 unmodified lines | ||
| 848 | 848 | if (!(ucode_rate & RATE_MCS_HT_MSK) && |
| 849 | 849 | !(ucode_rate & RATE_MCS_VHT_MSK)) { |
| 850 | 850 | if (num_of_ant == 1) { |
| 851 | − if (band == IEEE80211_BAND_5GHZ) | |
| 851 | + if (band == NL80211_BAND_5GHZ) | |
| 852 | 852 | rate->type = LQ_LEGACY_A; |
| 853 | 853 | else |
| 854 | 854 | 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 | ||
| 1043 | 1043 | return; |
| 1044 | 1044 | } else if (is_siso(rate)) { |
| 1045 | 1045 | /* Downgrade to Legacy if we were in SISO */ |
| 1046 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 1046 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 1047 | 1047 | rate->type = LQ_LEGACY_A; |
| 1048 | 1048 | else |
| 1049 | 1049 | rate->type = LQ_LEGACY_G; |
| @@ -1850,7 +1850,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm, · 800 unmodified lines | ||
| 1850 | 1850 | rate->ant = column->ant; |
| 1851 | 1851 | |
| 1852 | 1852 | if (column->mode == RS_LEGACY) { |
| 1853 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 1853 | + if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 1854 | 1854 | rate->type = LQ_LEGACY_A; |
| 1855 | 1855 | else |
| 1856 | 1856 | rate->type = LQ_LEGACY_G; |
| @@ -2020,7 +2020,7 @@ static void rs_get_adjacent_txp(struct iwl_mvm *mvm, int index, · 163 unmodified lines | ||
| 2020 | 2020 | } |
| 2021 | 2021 | |
| 2022 | 2022 | 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) | |
| 2024 | 2024 | { |
| 2025 | 2025 | int index = rate->index; |
| 2026 | 2026 | bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM); |
| @@ -2126,7 +2126,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, · 99 unmodified lines | ||
| 2126 | 2126 | struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); |
| 2127 | 2127 | struct ieee80211_vif *vif = mvm_sta->vif; |
| 2128 | 2128 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 2129 | − enum ieee80211_band band; | |
| 2129 | + enum nl80211_band band; | |
| 2130 | 2130 | struct iwl_rate_scale_data *window; |
| 2131 | 2131 | struct rs_rate *rate = &tbl->rate; |
| 2132 | 2132 | enum tpc_action action; |
| @@ -2148,7 +2148,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, · 15 unmodified lines | ||
| 2148 | 2148 | rcu_read_lock(); |
| 2149 | 2149 | chanctx_conf = rcu_dereference(vif->chanctx_conf); |
| 2150 | 2150 | if (WARN_ON(!chanctx_conf)) |
| 2151 | − band = IEEE80211_NUM_BANDS; | |
| 2151 | + band = NUM_NL80211_BANDS; | |
| 2152 | 2152 | else |
| 2153 | 2153 | band = chanctx_conf->def.chan->band; |
| 2154 | 2154 | rcu_read_unlock(); |
| @@ -2606,7 +2606,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, · 451 unmodified lines | ||
| 2606 | 2606 | rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; |
| 2607 | 2607 | else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID) |
| 2608 | 2608 | rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO; |
| 2609 | − else if (lq_sta->band == IEEE80211_BAND_5GHZ) | |
| 2609 | + else if (lq_sta->band == NL80211_BAND_5GHZ) | |
| 2610 | 2610 | rate->type = LQ_LEGACY_A; |
| 2611 | 2611 | else |
| 2612 | 2612 | rate->type = LQ_LEGACY_G; |
| @@ -2623,7 +2623,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, · 10 unmodified lines | ||
| 2623 | 2623 | } else { |
| 2624 | 2624 | lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate; |
| 2625 | 2625 | |
| 2626 | − if (lq_sta->band == IEEE80211_BAND_5GHZ) { | |
| 2626 | + if (lq_sta->band == NL80211_BAND_5GHZ) { | |
| 2627 | 2627 | lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy; |
| 2628 | 2628 | lq_sta->optimal_nentries = |
| 2629 | 2629 | 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 | ||
| 2679 | 2679 | static void rs_get_initial_rate(struct iwl_mvm *mvm, |
| 2680 | 2680 | struct ieee80211_sta *sta, |
| 2681 | 2681 | struct iwl_lq_sta *lq_sta, |
| 2682 | − enum ieee80211_band band, | |
| 2682 | + enum nl80211_band band, | |
| 2683 | 2683 | struct rs_rate *rate) |
| 2684 | 2684 | { |
| 2685 | 2685 | int i, nentries; |
| @@ -2714,7 +2714,7 @@ static void rs_get_initial_rate(struct iwl_mvm *mvm, · 28 unmodified lines | ||
| 2714 | 2714 | rate->index = find_first_bit(&lq_sta->active_legacy_rate, |
| 2715 | 2715 | BITS_PER_LONG); |
| 2716 | 2716 | |
| 2717 | − if (band == IEEE80211_BAND_5GHZ) { | |
| 2717 | + if (band == NL80211_BAND_5GHZ) { | |
| 2718 | 2718 | rate->type = LQ_LEGACY_A; |
| 2719 | 2719 | initial_rates = rs_optimal_rates_5ghz_legacy; |
| 2720 | 2720 | nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); |
| @@ -2814,7 +2814,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm, · 93 unmodified lines | ||
| 2814 | 2814 | static void rs_initialize_lq(struct iwl_mvm *mvm, |
| 2815 | 2815 | struct ieee80211_sta *sta, |
| 2816 | 2816 | struct iwl_lq_sta *lq_sta, |
| 2817 | − enum ieee80211_band band, | |
| 2817 | + enum nl80211_band band, | |
| 2818 | 2818 | bool init) |
| 2819 | 2819 | { |
| 2820 | 2820 | struct iwl_scale_tbl_info *tbl; |
| @@ -3097,7 +3097,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg) · 276 unmodified lines | ||
| 3097 | 3097 | * Called after adding a new station to initialize rate scaling |
| 3098 | 3098 | */ |
| 3099 | 3099 | 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) | |
| 3101 | 3101 | { |
| 3102 | 3102 | int i, j; |
| 3103 | 3103 | struct ieee80211_hw *hw = mvm->hw; |
| @@ -3203,7 +3203,7 @@ static void rs_rate_update(void *mvm_r, · 99 unmodified lines | ||
| 3203 | 3203 | #ifdef CONFIG_MAC80211_DEBUGFS |
| 3204 | 3204 | static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, |
| 3205 | 3205 | struct iwl_lq_cmd *lq_cmd, |
| 3206 | − enum ieee80211_band band, | |
| 3206 | + enum nl80211_band band, | |
| 3207 | 3207 | u32 ucode_rate) |
| 3208 | 3208 | { |
| 3209 | 3209 | struct rs_rate rate; |
| @@ -305,7 +305,7 @@ struct iwl_lq_sta { · 304 unmodified lines | ||
| 305 | 305 | bool stbc_capable; /* Tx STBC is supported by chip and Rx by STA */ |
| 306 | 306 | bool bfer_capable; /* Remote supports beamformee and we BFer */ |
| 307 | 307 | |
| 308 | − enum ieee80211_band band; | |
| 308 | + enum nl80211_band band; | |
| 309 | 309 | |
| 310 | 310 | /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ |
| 311 | 311 | unsigned long active_legacy_rate; |
| @@ -358,7 +358,7 @@ struct iwl_lq_sta { · 46 unmodified lines | ||
| 358 | 358 | |
| 359 | 359 | /* Initialize station's rate scaling information after adding station */ |
| 360 | 360 | 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); | |
| 362 | 362 | |
| 363 | 363 | /* Notify RS about Tx status */ |
| 364 | 364 | void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, |
| @@ -319,7 +319,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, · 318 unmodified lines | ||
| 319 | 319 | rx_status->device_timestamp = le32_to_cpu(phy_info->system_timestamp); |
| 320 | 320 | rx_status->band = |
| 321 | 321 | (phy_info->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? |
| 322 | − IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | |
| 322 | + NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; | |
| 323 | 323 | rx_status->freq = |
| 324 | 324 | ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel), |
| 325 | 325 | rx_status->band); |
| @@ -456,8 +456,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, · 455 unmodified lines | ||
| 456 | 456 | |
| 457 | 457 | rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise); |
| 458 | 458 | 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; | |
| 461 | 461 | rx_status->freq = ieee80211_channel_to_frequency(desc->channel, |
| 462 | 462 | rx_status->band); |
| 463 | 463 | iwl_mvm_get_signal_strength(mvm, desc, rx_status); |
| @@ -163,16 +163,16 @@ static inline __le16 iwl_mvm_scan_rx_chain(struct iwl_mvm *mvm) · 162 unmodified lines | ||
| 163 | 163 | return cpu_to_le16(rx_chain); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | −static __le32 iwl_mvm_scan_rxon_flags(enum ieee80211_band band) | |
| 166 | +static __le32 iwl_mvm_scan_rxon_flags(enum nl80211_band band) | |
| 167 | 167 | { |
| 168 | − if (band == IEEE80211_BAND_2GHZ) | |
| 168 | + if (band == NL80211_BAND_2GHZ) | |
| 169 | 169 | return cpu_to_le32(PHY_BAND_24); |
| 170 | 170 | else |
| 171 | 171 | return cpu_to_le32(PHY_BAND_5); |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | 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, | |
| 176 | 176 | bool no_cck) |
| 177 | 177 | { |
| 178 | 178 | u32 tx_ant; |
| @@ -182,7 +182,7 @@ iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band, · 3 unmodified lines | ||
| 182 | 182 | mvm->scan_last_antenna_idx); |
| 183 | 183 | tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS; |
| 184 | 184 | |
| 185 | − if (band == IEEE80211_BAND_2GHZ && !no_cck) | |
| 185 | + if (band == NL80211_BAND_2GHZ && !no_cck) | |
| 186 | 186 | return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK | |
| 187 | 187 | tx_ant); |
| 188 | 188 | else |
| @@ -591,14 +591,14 @@ static void iwl_mvm_scan_fill_tx_cmd(struct iwl_mvm *mvm, · 402 unmodified lines | ||
| 591 | 591 | tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | |
| 592 | 592 | TX_CMD_FLG_BT_DIS); |
| 593 | 593 | tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, |
| 594 | − IEEE80211_BAND_2GHZ, | |
| 594 | + NL80211_BAND_2GHZ, | |
| 595 | 595 | no_cck); |
| 596 | 596 | tx_cmd[0].sta_id = mvm->aux_sta.sta_id; |
| 597 | 597 | |
| 598 | 598 | tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | |
| 599 | 599 | TX_CMD_FLG_BT_DIS); |
| 600 | 600 | tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, |
| 601 | − IEEE80211_BAND_5GHZ, | |
| 601 | + NL80211_BAND_5GHZ, | |
| 602 | 602 | no_cck); |
| 603 | 603 | tx_cmd[1].sta_id = mvm->aux_sta.sta_id; |
| 604 | 604 | } |
| @@ -695,19 +695,19 @@ iwl_mvm_build_scan_probe(struct iwl_mvm *mvm, struct ieee80211_vif *vif, · 90 unmodified lines | ||
| 695 | 695 | |
| 696 | 696 | /* Insert ds parameter set element on 2.4 GHz band */ |
| 697 | 697 | 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], | |
| 700 | 700 | pos); |
| 701 | 701 | params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf); |
| 702 | 702 | params->preq.band_data[0].len = cpu_to_le16(newpos - pos); |
| 703 | 703 | pos = newpos; |
| 704 | 704 | |
| 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]); | |
| 707 | 707 | params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf); |
| 708 | 708 | 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]; | |
| 711 | 711 | |
| 712 | 712 | memcpy(pos, ies->common_ies, ies->common_ie_len); |
| 713 | 713 | params->preq.common_data.offset = cpu_to_le16(pos - params->preq.buf); |
| @@ -921,10 +921,10 @@ static __le32 iwl_mvm_scan_config_rates(struct iwl_mvm *mvm) · 207 unmodified lines | ||
| 921 | 921 | unsigned int rates = 0; |
| 922 | 922 | int i; |
| 923 | 923 | |
| 924 | − band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; | |
| 924 | + band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ]; | |
| 925 | 925 | for (i = 0; i < band->n_bitrates; i++) |
| 926 | 926 | rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); |
| 927 | − band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; | |
| 927 | + band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ]; | |
| 928 | 928 | for (i = 0; i < band->n_bitrates; i++) |
| 929 | 929 | rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); |
| 930 | 930 | |
| @@ -939,8 +939,8 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm) · 8 unmodified lines | ||
| 939 | 939 | struct iwl_scan_config *scan_config; |
| 940 | 940 | struct ieee80211_supported_band *band; |
| 941 | 941 | 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; | |
| 944 | 944 | int ret, i, j = 0, cmd_size; |
| 945 | 945 | struct iwl_host_cmd cmd = { |
| 946 | 946 | .id = iwl_cmd_id(SCAN_CFG_CMD, IWL_ALWAYS_LONG_GROUP, 0), |
| @@ -994,10 +994,10 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm) · 47 unmodified lines | ||
| 994 | 994 | IWL_CHANNEL_FLAG_EBS_ADD | |
| 995 | 995 | IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE; |
| 996 | 996 | |
| 997 | − band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; | |
| 997 | + band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ]; | |
| 998 | 998 | for (i = 0; i < band->n_channels; i++, j++) |
| 999 | 999 | scan_config->channel_array[j] = band->channels[i].hw_value; |
| 1000 | − band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; | |
| 1000 | + band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ]; | |
| 1001 | 1001 | for (i = 0; i < band->n_channels; i++, j++) |
| 1002 | 1002 | scan_config->channel_array[j] = band->channels[i].hw_value; |
| 1003 | 1003 | |
| @@ -444,7 +444,7 @@ iwl_mvm_tdls_config_channel_switch(struct iwl_mvm *mvm, · 443 unmodified lines | ||
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | if (chandef) { |
| 447 | − cmd.ci.band = (chandef->chan->band == IEEE80211_BAND_2GHZ ? | |
| 447 | + cmd.ci.band = (chandef->chan->band == NL80211_BAND_2GHZ ? | |
| 448 | 448 | PHY_BAND_24 : PHY_BAND_5); |
| 449 | 449 | cmd.ci.channel = chandef->chan->hw_value; |
| 450 | 450 | cmd.ci.width = iwl_mvm_get_channel_width(chandef); |
| @@ -359,7 +359,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, · 358 unmodified lines | ||
| 359 | 359 | &mvm->nvm_data->bands[info->band], sta); |
| 360 | 360 | |
| 361 | 361 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
| 362 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 362 | + if (info->band == NL80211_BAND_5GHZ) | |
| 363 | 363 | rate_idx += IWL_FIRST_OFDM_RATE; |
| 364 | 364 | |
| 365 | 365 | /* For 2.4 GHZ band, check that there is no need to remap */ |
| @@ -372,7 +372,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, · 6 unmodified lines | ||
| 372 | 372 | iwl_mvm_next_antenna(mvm, iwl_mvm_get_valid_tx_ant(mvm), |
| 373 | 373 | mvm->mgmt_last_antenna_idx); |
| 374 | 374 | |
| 375 | − if (info->band == IEEE80211_BAND_2GHZ && | |
| 375 | + if (info->band == NL80211_BAND_2GHZ && | |
| 376 | 376 | !iwl_mvm_bt_coex_is_shared_ant_avail(mvm)) |
| 377 | 377 | rate_flags = mvm->cfg->non_shared_ant << RATE_MCS_ANT_POS; |
| 378 | 378 | else |
| @@ -1052,7 +1052,7 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status) · 673 unmodified lines | ||
| 1052 | 1052 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
| 1053 | 1053 | |
| 1054 | 1054 | void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, |
| 1055 | − enum ieee80211_band band, | |
| 1055 | + enum nl80211_band band, | |
| 1056 | 1056 | struct ieee80211_tx_rate *r) |
| 1057 | 1057 | { |
| 1058 | 1058 | if (rate_n_flags & RATE_HT_MCS_GF_MSK) |
| @@ -217,14 +217,14 @@ static const u8 fw_rate_idx_to_plcp[IWL_RATE_COUNT] = { · 216 unmodified lines | ||
| 217 | 217 | }; |
| 218 | 218 | |
| 219 | 219 | int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, |
| 220 | − enum ieee80211_band band) | |
| 220 | + enum nl80211_band band) | |
| 221 | 221 | { |
| 222 | 222 | int rate = rate_n_flags & RATE_LEGACY_RATE_MSK; |
| 223 | 223 | int idx; |
| 224 | 224 | int band_offset = 0; |
| 225 | 225 | |
| 226 | 226 | /* Legacy rate format, search for match in table */ |
| 227 | − if (band == IEEE80211_BAND_5GHZ) | |
| 227 | + if (band == NL80211_BAND_5GHZ) | |
| 228 | 228 | band_offset = IWL_FIRST_OFDM_RATE; |
| 229 | 229 | for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) |
| 230 | 230 | if (fw_rate_idx_to_plcp[idx] == rate) |
| @@ -60,14 +60,14 @@ int orinoco_wiphy_register(struct wiphy *wiphy) · 59 unmodified lines | ||
| 60 | 60 | if (priv->channel_mask & (1 << i)) { |
| 61 | 61 | priv->channels[i].center_freq = |
| 62 | 62 | ieee80211_channel_to_frequency(i + 1, |
| 63 | − IEEE80211_BAND_2GHZ); | |
| 63 | + NL80211_BAND_2GHZ); | |
| 64 | 64 | channels++; |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | priv->band.channels = priv->channels; |
| 68 | 68 | priv->band.n_channels = channels; |
| 69 | 69 | |
| 70 | − wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | |
| 70 | + wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; | |
| 71 | 71 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; |
| 72 | 72 | |
| 73 | 73 | i = 0; |
| @@ -175,7 +175,7 @@ static int orinoco_set_monitor_channel(struct wiphy *wiphy, · 101 unmodified lines | ||
| 175 | 175 | if (cfg80211_get_chandef_type(chandef) != NL80211_CHAN_NO_HT) |
| 176 | 176 | return -EINVAL; |
| 177 | 177 | |
| 178 | − if (chandef->chan->band != IEEE80211_BAND_2GHZ) | |
| 178 | + if (chandef->chan->band != NL80211_BAND_2GHZ) | |
| 179 | 179 | return -EINVAL; |
| 180 | 180 | |
| 181 | 181 | channel = ieee80211_frequency_to_channel(chandef->chan->center_freq); |
| @@ -1193,7 +1193,7 @@ int orinoco_hw_get_freq(struct orinoco_private *priv) · 1192 unmodified lines | ||
| 1193 | 1193 | goto out; |
| 1194 | 1194 | |
| 1195 | 1195 | } |
| 1196 | − freq = ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); | |
| 1196 | + freq = ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ); | |
| 1197 | 1197 | |
| 1198 | 1198 | out: |
| 1199 | 1199 | orinoco_unlock(priv, &flags); |
| @@ -111,7 +111,7 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, · 110 unmodified lines | ||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | 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); | |
| 115 | 115 | channel = ieee80211_get_channel(wiphy, freq); |
| 116 | 116 | if (!channel) { |
| 117 | 117 | printk(KERN_DEBUG "Invalid channel designation %04X(%04X)", |
| @@ -148,7 +148,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, · 30 unmodified lines | ||
| 148 | 148 | ie_len = len - sizeof(*bss); |
| 149 | 149 | ie = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bss->data, ie_len); |
| 150 | 150 | 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); | |
| 152 | 152 | channel = ieee80211_get_channel(wiphy, freq); |
| 153 | 153 | |
| 154 | 154 | timestamp = le64_to_cpu(bss->timestamp); |
| @@ -76,14 +76,14 @@ struct p54_channel_entry { · 75 unmodified lines | ||
| 76 | 76 | u16 data; |
| 77 | 77 | int index; |
| 78 | 78 | int max_power; |
| 79 | − enum ieee80211_band band; | |
| 79 | + enum nl80211_band band; | |
| 80 | 80 | }; |
| 81 | 81 | |
| 82 | 82 | struct p54_channel_list { |
| 83 | 83 | struct p54_channel_entry *channels; |
| 84 | 84 | size_t entries; |
| 85 | 85 | size_t max_entries; |
| 86 | − size_t band_channel_num[IEEE80211_NUM_BANDS]; | |
| 86 | + size_t band_channel_num[NUM_NL80211_BANDS]; | |
| 87 | 87 | }; |
| 88 | 88 | |
| 89 | 89 | 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 | ||
| 91 | 91 | /* FIXME: sync these values with the 802.11 spec */ |
| 92 | 92 | |
| 93 | 93 | if ((freq >= 2412) && (freq <= 2484)) |
| 94 | − return IEEE80211_BAND_2GHZ; | |
| 94 | + return NL80211_BAND_2GHZ; | |
| 95 | 95 | |
| 96 | 96 | if ((freq >= 4920) && (freq <= 5825)) |
| 97 | − return IEEE80211_BAND_5GHZ; | |
| 97 | + return NL80211_BAND_5GHZ; | |
| 98 | 98 | |
| 99 | 99 | return -1; |
| 100 | 100 | } |
| @@ -124,16 +124,16 @@ static int p54_compare_rssichan(const void *_a, · 23 unmodified lines | ||
| 124 | 124 | |
| 125 | 125 | static int p54_fill_band_bitrates(struct ieee80211_hw *dev, |
| 126 | 126 | struct ieee80211_supported_band *band_entry, |
| 127 | − enum ieee80211_band band) | |
| 127 | + enum nl80211_band band) | |
| 128 | 128 | { |
| 129 | 129 | /* TODO: generate rate array dynamically */ |
| 130 | 130 | |
| 131 | 131 | switch (band) { |
| 132 | − case IEEE80211_BAND_2GHZ: | |
| 132 | + case NL80211_BAND_2GHZ: | |
| 133 | 133 | band_entry->bitrates = p54_bgrates; |
| 134 | 134 | band_entry->n_bitrates = ARRAY_SIZE(p54_bgrates); |
| 135 | 135 | break; |
| 136 | − case IEEE80211_BAND_5GHZ: | |
| 136 | + case NL80211_BAND_5GHZ: | |
| 137 | 137 | band_entry->bitrates = p54_arates; |
| 138 | 138 | band_entry->n_bitrates = ARRAY_SIZE(p54_arates); |
| 139 | 139 | break; |
| @@ -147,7 +147,7 @@ static int p54_fill_band_bitrates(struct ieee80211_hw *dev, · 7 unmodified lines | ||
| 147 | 147 | static int p54_generate_band(struct ieee80211_hw *dev, |
| 148 | 148 | struct p54_channel_list *list, |
| 149 | 149 | unsigned int *chan_num, |
| 150 | − enum ieee80211_band band) | |
| 150 | + enum nl80211_band band) | |
| 151 | 151 | { |
| 152 | 152 | struct p54_common *priv = dev->priv; |
| 153 | 153 | struct ieee80211_supported_band *tmp, *old; |
| @@ -206,7 +206,7 @@ static int p54_generate_band(struct ieee80211_hw *dev, · 52 unmodified lines | ||
| 206 | 206 | |
| 207 | 207 | if (j == 0) { |
| 208 | 208 | 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); | |
| 210 | 210 | |
| 211 | 211 | ret = -ENODATA; |
| 212 | 212 | goto err_out; |
| @@ -396,7 +396,7 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev) · 183 unmodified lines | ||
| 396 | 396 | p54_compare_channels, NULL); |
| 397 | 397 | |
| 398 | 398 | k = 0; |
| 399 | − for (i = 0, j = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 399 | + for (i = 0, j = 0; i < NUM_NL80211_BANDS; i++) { | |
| 400 | 400 | if (p54_generate_band(dev, list, &k, i) == 0) |
| 401 | 401 | j++; |
| 402 | 402 | } |
| @@ -573,10 +573,10 @@ static int p54_parse_rssical(struct ieee80211_hw *dev, · 170 unmodified lines | ||
| 573 | 573 | for (i = 0; i < entries; i++) { |
| 574 | 574 | u16 freq = 0; |
| 575 | 575 | switch (i) { |
| 576 | − case IEEE80211_BAND_2GHZ: | |
| 576 | + case NL80211_BAND_2GHZ: | |
| 577 | 577 | freq = 2437; |
| 578 | 578 | break; |
| 579 | − case IEEE80211_BAND_5GHZ: | |
| 579 | + case NL80211_BAND_5GHZ: | |
| 580 | 580 | freq = 5240; |
| 581 | 581 | break; |
| 582 | 582 | } |
| @@ -902,11 +902,11 @@ good_eeprom: · 319 unmodified lines | ||
| 902 | 902 | if (priv->rxhw == PDR_SYNTH_FRONTEND_XBOW) |
| 903 | 903 | p54_init_xbow_synth(priv); |
| 904 | 904 | 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]; | |
| 907 | 907 | 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]; | |
| 910 | 910 | if ((synth & PDR_SYNTH_RX_DIV_MASK) == PDR_SYNTH_RX_DIV_SUPPORTED) |
| 911 | 911 | priv->rx_diversity_mask = 3; |
| 912 | 912 | if ((synth & PDR_SYNTH_TX_DIV_MASK) == PDR_SYNTH_TX_DIV_SUPPORTED) |
| @@ -477,7 +477,7 @@ static void p54_bss_info_changed(struct ieee80211_hw *dev, · 476 unmodified lines | ||
| 477 | 477 | p54_set_edcf(priv); |
| 478 | 478 | } |
| 479 | 479 | 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) | |
| 481 | 481 | priv->basic_rate_mask = (info->basic_rates << 4); |
| 482 | 482 | else |
| 483 | 483 | priv->basic_rate_mask = info->basic_rates; |
| @@ -829,7 +829,7 @@ void p54_free_common(struct ieee80211_hw *dev) · 345 unmodified lines | ||
| 829 | 829 | struct p54_common *priv = dev->priv; |
| 830 | 830 | unsigned int i; |
| 831 | 831 | |
| 832 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) | |
| 832 | + for (i = 0; i < NUM_NL80211_BANDS; i++) | |
| 833 | 833 | kfree(priv->band_table[i]); |
| 834 | 834 | |
| 835 | 835 | kfree(priv->iq_autocal); |
| @@ -223,7 +223,7 @@ struct p54_common { · 222 unmodified lines | ||
| 223 | 223 | struct p54_cal_database *curve_data; |
| 224 | 224 | struct p54_cal_database *output_limit; |
| 225 | 225 | 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]; | |
| 227 | 227 | |
| 228 | 228 | /* BBP/MAC state */ |
| 229 | 229 | u8 mac_addr[ETH_ALEN]; |
| @@ -353,7 +353,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb) · 352 unmodified lines | ||
| 353 | 353 | rx_status->signal = p54_rssi_to_dbm(priv, hdr->rssi); |
| 354 | 354 | if (hdr->rate & 0x10) |
| 355 | 355 | 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) | |
| 357 | 357 | rx_status->rate_idx = (rate < 4) ? 0 : rate - 4; |
| 358 | 358 | else |
| 359 | 359 | rx_status->rate_idx = rate; |
| @@ -867,7 +867,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, · 507 unmodified lines | ||
| 867 | 867 | for (i = 0; i < nrates && ridx < 8; i++) { |
| 868 | 868 | /* we register the rates in perfect order */ |
| 869 | 869 | rate = info->control.rates[i].idx; |
| 870 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 870 | + if (info->band == NL80211_BAND_5GHZ) | |
| 871 | 871 | rate += 4; |
| 872 | 872 | |
| 873 | 873 | /* store the count we actually calculated for TX status */ |
| @@ -255,14 +255,14 @@ static struct class *hwsim_class; · 254 unmodified lines | ||
| 255 | 255 | static struct net_device *hwsim_mon; /* global monitor netdev */ |
| 256 | 256 | |
| 257 | 257 | #define CHAN2G(_freq) { \ |
| 258 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 258 | + .band = NL80211_BAND_2GHZ, \ | |
| 259 | 259 | .center_freq = (_freq), \ |
| 260 | 260 | .hw_value = (_freq), \ |
| 261 | 261 | .max_power = 20, \ |
| 262 | 262 | } |
| 263 | 263 | |
| 264 | 264 | #define CHAN5G(_freq) { \ |
| 265 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 265 | + .band = NL80211_BAND_5GHZ, \ | |
| 266 | 266 | .center_freq = (_freq), \ |
| 267 | 267 | .hw_value = (_freq), \ |
| 268 | 268 | .max_power = 20, \ |
| @@ -479,7 +479,7 @@ struct mac80211_hwsim_data { · 210 unmodified lines | ||
| 479 | 479 | struct list_head list; |
| 480 | 480 | struct ieee80211_hw *hw; |
| 481 | 481 | struct device *dev; |
| 482 | − struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | |
| 482 | + struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; | |
| 483 | 483 | struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)]; |
| 484 | 484 | struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)]; |
| 485 | 485 | 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 | ||
| 2347 | 2347 | u8 addr[ETH_ALEN]; |
| 2348 | 2348 | struct mac80211_hwsim_data *data; |
| 2349 | 2349 | struct ieee80211_hw *hw; |
| 2350 | − enum ieee80211_band band; | |
| 2350 | + enum nl80211_band band; | |
| 2351 | 2351 | const struct ieee80211_ops *ops = &mac80211_hwsim_ops; |
| 2352 | 2352 | int idx; |
| 2353 | 2353 | |
| @@ -2476,16 +2476,16 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, · 122 unmodified lines | ||
| 2476 | 2476 | sizeof(hwsim_channels_5ghz)); |
| 2477 | 2477 | memcpy(data->rates, hwsim_rates, sizeof(hwsim_rates)); |
| 2478 | 2478 | |
| 2479 | − for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) { | |
| 2479 | + for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) { | |
| 2480 | 2480 | struct ieee80211_supported_band *sband = &data->bands[band]; |
| 2481 | 2481 | switch (band) { |
| 2482 | − case IEEE80211_BAND_2GHZ: | |
| 2482 | + case NL80211_BAND_2GHZ: | |
| 2483 | 2483 | sband->channels = data->channels_2ghz; |
| 2484 | 2484 | sband->n_channels = ARRAY_SIZE(hwsim_channels_2ghz); |
| 2485 | 2485 | sband->bitrates = data->rates; |
| 2486 | 2486 | sband->n_bitrates = ARRAY_SIZE(hwsim_rates); |
| 2487 | 2487 | break; |
| 2488 | − case IEEE80211_BAND_5GHZ: | |
| 2488 | + case NL80211_BAND_5GHZ: | |
| 2489 | 2489 | sband->channels = data->channels_5ghz; |
| 2490 | 2490 | sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz); |
| 2491 | 2491 | sband->bitrates = data->rates + 4; |
| @@ -23,7 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 26 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 26 | + .band = NL80211_BAND_2GHZ, \ | |
| 27 | 27 | .center_freq = (_freq), \ |
| 28 | 28 | .hw_value = (_channel), \ |
| 29 | 29 | .flags = (_flags), \ |
| @@ -639,7 +639,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, · 609 unmodified lines | ||
| 639 | 639 | if (chan_no != -1) { |
| 640 | 640 | struct wiphy *wiphy = priv->wdev->wiphy; |
| 641 | 641 | int freq = ieee80211_channel_to_frequency(chan_no, |
| 642 | − IEEE80211_BAND_2GHZ); | |
| 642 | + NL80211_BAND_2GHZ); | |
| 643 | 643 | struct ieee80211_channel *channel = |
| 644 | 644 | ieee80211_get_channel(wiphy, freq); |
| 645 | 645 | |
| @@ -1266,7 +1266,7 @@ _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) · 620 unmodified lines | ||
| 1266 | 1266 | { |
| 1267 | 1267 | struct cfg80211_scan_request *creq = NULL; |
| 1268 | 1268 | int i, n_channels = ieee80211_get_num_supported_channels(wiphy); |
| 1269 | − enum ieee80211_band band; | |
| 1269 | + enum nl80211_band band; | |
| 1270 | 1270 | |
| 1271 | 1271 | creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) + |
| 1272 | 1272 | n_channels * sizeof(void *), |
| @@ -1281,7 +1281,7 @@ _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) · 8 unmodified lines | ||
| 1281 | 1281 | |
| 1282 | 1282 | /* Scan all available channels */ |
| 1283 | 1283 | i = 0; |
| 1284 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 1284 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 1285 | 1285 | int j; |
| 1286 | 1286 | |
| 1287 | 1287 | if (!wiphy->bands[band]) |
| @@ -2200,7 +2200,7 @@ int lbs_cfg_register(struct lbs_private *priv) · 912 unmodified lines | ||
| 2200 | 2200 | if (lbs_mesh_activated(priv)) |
| 2201 | 2201 | wdev->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MESH_POINT); |
| 2202 | 2202 | |
| 2203 | − wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &lbs_band_2ghz; | |
| 2203 | + wdev->wiphy->bands[NL80211_BAND_2GHZ] = &lbs_band_2ghz; | |
| 2204 | 2204 | |
| 2205 | 2205 | /* |
| 2206 | 2206 | * We could check priv->fwcapinfo && FW_CAPINFO_WPA, but I have |
| @@ -743,7 +743,7 @@ int lbs_set_11d_domain_info(struct lbs_private *priv) · 742 unmodified lines | ||
| 743 | 743 | struct cmd_ds_802_11d_domain_info cmd; |
| 744 | 744 | struct mrvl_ie_domain_param_set *domain = &cmd.domain; |
| 745 | 745 | struct ieee80211_country_ie_triplet *t; |
| 746 | − enum ieee80211_band band; | |
| 746 | + enum nl80211_band band; | |
| 747 | 747 | struct ieee80211_channel *ch; |
| 748 | 748 | u8 num_triplet = 0; |
| 749 | 749 | u8 num_parsed_chan = 0; |
| @@ -777,7 +777,7 @@ int lbs_set_11d_domain_info(struct lbs_private *priv) · 27 unmodified lines | ||
| 777 | 777 | * etc. |
| 778 | 778 | */ |
| 779 | 779 | for (band = 0; |
| 780 | − (band < IEEE80211_NUM_BANDS) && (num_triplet < MAX_11D_TRIPLETS); | |
| 780 | + (band < NUM_NL80211_BANDS) && (num_triplet < MAX_11D_TRIPLETS); | |
| 781 | 781 | band++) { |
| 782 | 782 | |
| 783 | 783 | if (!bands[band]) |
| @@ -570,7 +570,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) · 569 unmodified lines | ||
| 570 | 570 | if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) |
| 571 | 571 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; |
| 572 | 572 | stats.freq = priv->cur_freq; |
| 573 | − stats.band = IEEE80211_BAND_2GHZ; | |
| 573 | + stats.band = NL80211_BAND_2GHZ; | |
| 574 | 574 | stats.signal = prxpd->snr; |
| 575 | 575 | priv->noise = prxpd->nf; |
| 576 | 576 | /* 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 | ||
| 642 | 642 | priv->band.bitrates = priv->rates; |
| 643 | 643 | priv->band.n_channels = ARRAY_SIZE(lbtf_channels); |
| 644 | 644 | priv->band.channels = priv->channels; |
| 645 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | |
| 645 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; | |
| 646 | 646 | hw->wiphy->interface_modes = |
| 647 | 647 | BIT(NL80211_IFTYPE_STATION) | |
| 648 | 648 | BIT(NL80211_IFTYPE_ADHOC); |
| @@ -474,7 +474,7 @@ int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy) · 473 unmodified lines | ||
| 474 | 474 | u8 no_of_parsed_chan = 0; |
| 475 | 475 | u8 first_chan = 0, next_chan = 0, max_pwr = 0; |
| 476 | 476 | u8 i, flag = 0; |
| 477 | − enum ieee80211_band band; | |
| 477 | + enum nl80211_band band; | |
| 478 | 478 | struct ieee80211_supported_band *sband; |
| 479 | 479 | struct ieee80211_channel *ch; |
| 480 | 480 | 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 | ||
| 1410 | 1410 | { |
| 1411 | 1411 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); |
| 1412 | 1412 | struct mwifiex_chan_stats *pchan_stats = priv->adapter->chan_stats; |
| 1413 | − enum ieee80211_band band; | |
| 1413 | + enum nl80211_band band; | |
| 1414 | 1414 | |
| 1415 | 1415 | mwifiex_dbg(priv->adapter, DUMP, "dump_survey idx=%d\n", idx); |
| 1416 | 1416 | |
| @@ -1586,7 +1586,7 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy, · 169 unmodified lines | ||
| 1586 | 1586 | { |
| 1587 | 1587 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); |
| 1588 | 1588 | u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; |
| 1589 | − enum ieee80211_band band; | |
| 1589 | + enum nl80211_band band; | |
| 1590 | 1590 | struct mwifiex_adapter *adapter = priv->adapter; |
| 1591 | 1591 | |
| 1592 | 1592 | if (!priv->media_connected) { |
| @@ -1600,11 +1600,11 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy, · 7 unmodified lines | ||
| 1600 | 1600 | memset(bitmap_rates, 0, sizeof(bitmap_rates)); |
| 1601 | 1601 | |
| 1602 | 1602 | /* Fill HR/DSSS rates. */ |
| 1603 | − if (band == IEEE80211_BAND_2GHZ) | |
| 1603 | + if (band == NL80211_BAND_2GHZ) | |
| 1604 | 1604 | bitmap_rates[0] = mask->control[band].legacy & 0x000f; |
| 1605 | 1605 | |
| 1606 | 1606 | /* Fill OFDM rates */ |
| 1607 | − if (band == IEEE80211_BAND_2GHZ) | |
| 1607 | + if (band == NL80211_BAND_2GHZ) | |
| 1608 | 1608 | bitmap_rates[1] = (mask->control[band].legacy & 0x0ff0) >> 4; |
| 1609 | 1609 | else |
| 1610 | 1610 | 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 | ||
| 1771 | 1771 | } else { |
| 1772 | 1772 | struct ieee80211_sta_ht_cap *ht_info; |
| 1773 | 1773 | int rx_mcs_supp; |
| 1774 | − enum ieee80211_band band; | |
| 1774 | + enum nl80211_band band; | |
| 1775 | 1775 | |
| 1776 | 1776 | if ((tx_ant == 0x1 && rx_ant == 0x1)) { |
| 1777 | 1777 | 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 | ||
| 1785 | 1785 | MWIFIEX_11AC_MCS_MAP_2X2; |
| 1786 | 1786 | } |
| 1787 | 1787 | |
| 1788 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 1788 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 1789 | 1789 | if (!adapter->wiphy->bands[band]) |
| 1790 | 1790 | continue; |
| 1791 | 1791 | |
| @@ -1997,7 +1997,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv) · 205 unmodified lines | ||
| 1997 | 1997 | struct cfg80211_bss *bss; |
| 1998 | 1998 | int ie_len; |
| 1999 | 1999 | u8 ie_buf[IEEE80211_MAX_SSID_LEN + sizeof(struct ieee_types_header)]; |
| 2000 | − enum ieee80211_band band; | |
| 2000 | + enum nl80211_band band; | |
| 2001 | 2001 | |
| 2002 | 2002 | if (mwifiex_get_bss_info(priv, &bss_info)) |
| 2003 | 2003 | return -1; |
| @@ -2271,7 +2271,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv, · 267 unmodified lines | ||
| 2271 | 2271 | int index = 0, i; |
| 2272 | 2272 | u8 config_bands = 0; |
| 2273 | 2273 | |
| 2274 | − if (params->chandef.chan->band == IEEE80211_BAND_2GHZ) { | |
| 2274 | + if (params->chandef.chan->band == NL80211_BAND_2GHZ) { | |
| 2275 | 2275 | if (!params->basic_rates) { |
| 2276 | 2276 | config_bands = BAND_B | BAND_G; |
| 2277 | 2277 | } else { |
| @@ -2859,18 +2859,18 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy, · 581 unmodified lines | ||
| 2859 | 2859 | mwifiex_init_priv_params(priv, dev); |
| 2860 | 2860 | priv->netdev = dev; |
| 2861 | 2861 | |
| 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); | |
| 2863 | 2863 | if (adapter->is_hw_11ac_capable) |
| 2864 | 2864 | mwifiex_setup_vht_caps( |
| 2865 | − &wiphy->bands[IEEE80211_BAND_2GHZ]->vht_cap, priv); | |
| 2865 | + &wiphy->bands[NL80211_BAND_2GHZ]->vht_cap, priv); | |
| 2866 | 2866 | |
| 2867 | 2867 | if (adapter->config_bands & BAND_A) |
| 2868 | 2868 | mwifiex_setup_ht_caps( |
| 2869 | − &wiphy->bands[IEEE80211_BAND_5GHZ]->ht_cap, priv); | |
| 2869 | + &wiphy->bands[NL80211_BAND_5GHZ]->ht_cap, priv); | |
| 2870 | 2870 | |
| 2871 | 2871 | if ((adapter->config_bands & BAND_A) && adapter->is_hw_11ac_capable) |
| 2872 | 2872 | mwifiex_setup_vht_caps( |
| 2873 | − &wiphy->bands[IEEE80211_BAND_5GHZ]->vht_cap, priv); | |
| 2873 | + &wiphy->bands[NL80211_BAND_5GHZ]->vht_cap, priv); | |
| 2874 | 2874 | |
| 2875 | 2875 | dev_net_set(dev, wiphy_net(wiphy)); |
| 2876 | 2876 | dev->ieee80211_ptr = &priv->wdev; |
| @@ -3821,7 +3821,7 @@ static int mwifiex_cfg80211_get_channel(struct wiphy *wiphy, · 944 unmodified lines | ||
| 3821 | 3821 | struct ieee80211_channel *chan; |
| 3822 | 3822 | u8 second_chan_offset; |
| 3823 | 3823 | enum nl80211_channel_type chan_type; |
| 3824 | − enum ieee80211_band band; | |
| 3824 | + enum nl80211_band band; | |
| 3825 | 3825 | int freq; |
| 3826 | 3826 | int ret = -ENODATA; |
| 3827 | 3827 | |
| @@ -4053,11 +4053,11 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) · 225 unmodified lines | ||
| 4053 | 4053 | BIT(NL80211_IFTYPE_P2P_GO) | |
| 4054 | 4054 | BIT(NL80211_IFTYPE_AP); |
| 4055 | 4055 | |
| 4056 | − wiphy->bands[IEEE80211_BAND_2GHZ] = &mwifiex_band_2ghz; | |
| 4056 | + wiphy->bands[NL80211_BAND_2GHZ] = &mwifiex_band_2ghz; | |
| 4057 | 4057 | if (adapter->config_bands & BAND_A) |
| 4058 | − wiphy->bands[IEEE80211_BAND_5GHZ] = &mwifiex_band_5ghz; | |
| 4058 | + wiphy->bands[NL80211_BAND_5GHZ] = &mwifiex_band_5ghz; | |
| 4059 | 4059 | else |
| 4060 | − wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; | |
| 4060 | + wiphy->bands[NL80211_BAND_5GHZ] = NULL; | |
| 4061 | 4061 | |
| 4062 | 4062 | if (adapter->drcs_enabled && ISSUPP_DRCS_ENABLED(adapter->fw_cap_info)) |
| 4063 | 4063 | wiphy->iface_combinations = &mwifiex_iface_comb_ap_sta_drcs; |
| @@ -322,9 +322,9 @@ mwifiex_get_cfp(struct mwifiex_private *priv, u8 band, u16 channel, u32 freq) · 321 unmodified lines | ||
| 322 | 322 | return cfp; |
| 323 | 323 | |
| 324 | 324 | 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]; | |
| 326 | 326 | else |
| 327 | − sband = priv->wdev.wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 327 | + sband = priv->wdev.wiphy->bands[NL80211_BAND_5GHZ]; | |
| 328 | 328 | |
| 329 | 329 | if (!sband) { |
| 330 | 330 | mwifiex_dbg(priv->adapter, ERROR, |
| @@ -399,15 +399,15 @@ u32 mwifiex_get_rates_from_cfg80211(struct mwifiex_private *priv, · 68 unmodified lines | ||
| 399 | 399 | int i; |
| 400 | 400 | |
| 401 | 401 | if (radio_type) { |
| 402 | − sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 402 | + sband = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 403 | 403 | if (WARN_ON_ONCE(!sband)) |
| 404 | 404 | return 0; |
| 405 | − rate_mask = request->rates[IEEE80211_BAND_5GHZ]; | |
| 405 | + rate_mask = request->rates[NL80211_BAND_5GHZ]; | |
| 406 | 406 | } else { |
| 407 | − sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 407 | + sband = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 408 | 408 | if (WARN_ON_ONCE(!sband)) |
| 409 | 409 | return 0; |
| 410 | − rate_mask = request->rates[IEEE80211_BAND_2GHZ]; | |
| 410 | + rate_mask = request->rates[NL80211_BAND_2GHZ]; | |
| 411 | 411 | } |
| 412 | 412 | |
| 413 | 413 | num_rates = 0; |
| @@ -494,13 +494,13 @@ mwifiex_scan_create_channel_list(struct mwifiex_private *priv, · 493 unmodified lines | ||
| 494 | 494 | *scan_chan_list, |
| 495 | 495 | u8 filtered_scan) |
| 496 | 496 | { |
| 497 | − enum ieee80211_band band; | |
| 497 | + enum nl80211_band band; | |
| 498 | 498 | struct ieee80211_supported_band *sband; |
| 499 | 499 | struct ieee80211_channel *ch; |
| 500 | 500 | struct mwifiex_adapter *adapter = priv->adapter; |
| 501 | 501 | int chan_idx = 0, i; |
| 502 | 502 | |
| 503 | − for (band = 0; (band < IEEE80211_NUM_BANDS) ; band++) { | |
| 503 | + for (band = 0; (band < NUM_NL80211_BANDS) ; band++) { | |
| 504 | 504 | |
| 505 | 505 | if (!priv->wdev.wiphy->bands[band]) |
| 506 | 506 | continue; |
| @@ -557,13 +557,13 @@ mwifiex_bgscan_create_channel_list(struct mwifiex_private *priv, · 50 unmodified lines | ||
| 557 | 557 | struct mwifiex_chan_scan_param_set |
| 558 | 558 | *scan_chan_list) |
| 559 | 559 | { |
| 560 | − enum ieee80211_band band; | |
| 560 | + enum nl80211_band band; | |
| 561 | 561 | struct ieee80211_supported_band *sband; |
| 562 | 562 | struct ieee80211_channel *ch; |
| 563 | 563 | struct mwifiex_adapter *adapter = priv->adapter; |
| 564 | 564 | int chan_idx = 0, i; |
| 565 | 565 | |
| 566 | − for (band = 0; (band < IEEE80211_NUM_BANDS); band++) { | |
| 566 | + for (band = 0; (band < NUM_NL80211_BANDS); band++) { | |
| 567 | 567 | if (!priv->wdev.wiphy->bands[band]) |
| 568 | 568 | continue; |
| 569 | 569 | |
| @@ -816,7 +816,7 @@ void mwifiex_uap_set_channel(struct mwifiex_private *priv, · 815 unmodified lines | ||
| 816 | 816 | chandef.chan->center_freq); |
| 817 | 817 | |
| 818 | 818 | /* Set appropriate bands */ |
| 819 | − if (chandef.chan->band == IEEE80211_BAND_2GHZ) { | |
| 819 | + if (chandef.chan->band == NL80211_BAND_2GHZ) { | |
| 820 | 820 | bss_cfg->band_cfg = BAND_CONFIG_BG; |
| 821 | 821 | config_bands = BAND_B | BAND_G; |
| 822 | 822 | |
| @@ -346,20 +346,20 @@ struct mwl8k_sta { · 345 unmodified lines | ||
| 346 | 346 | #define MWL8K_STA(_sta) ((struct mwl8k_sta *)&((_sta)->drv_priv)) |
| 347 | 347 | |
| 348 | 348 | 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, }, | |
| 363 | 363 | }; |
| 364 | 364 | |
| 365 | 365 | static const struct ieee80211_rate mwl8k_rates_24[] = { |
| @@ -379,10 +379,10 @@ static const struct ieee80211_rate mwl8k_rates_24[] = { · 13 unmodified lines | ||
| 379 | 379 | }; |
| 380 | 380 | |
| 381 | 381 | 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, }, | |
| 386 | 386 | }; |
| 387 | 387 | |
| 388 | 388 | 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 | ||
| 1010 | 1010 | } |
| 1011 | 1011 | |
| 1012 | 1012 | if (rxd->channel > 14) { |
| 1013 | − status->band = IEEE80211_BAND_5GHZ; | |
| 1013 | + status->band = NL80211_BAND_5GHZ; | |
| 1014 | 1014 | if (!(status->flag & RX_FLAG_HT)) |
| 1015 | 1015 | status->rate_idx -= 5; |
| 1016 | 1016 | } else { |
| 1017 | − status->band = IEEE80211_BAND_2GHZ; | |
| 1017 | + status->band = NL80211_BAND_2GHZ; | |
| 1018 | 1018 | } |
| 1019 | 1019 | status->freq = ieee80211_channel_to_frequency(rxd->channel, |
| 1020 | 1020 | status->band); |
| @@ -1118,11 +1118,11 @@ mwl8k_rxd_sta_process(void *_rxd, struct ieee80211_rx_status *status, · 97 unmodified lines | ||
| 1118 | 1118 | status->flag |= RX_FLAG_HT; |
| 1119 | 1119 | |
| 1120 | 1120 | if (rxd->channel > 14) { |
| 1121 | − status->band = IEEE80211_BAND_5GHZ; | |
| 1121 | + status->band = NL80211_BAND_5GHZ; | |
| 1122 | 1122 | if (!(status->flag & RX_FLAG_HT)) |
| 1123 | 1123 | status->rate_idx -= 5; |
| 1124 | 1124 | } else { |
| 1125 | − status->band = IEEE80211_BAND_2GHZ; | |
| 1125 | + status->band = NL80211_BAND_2GHZ; | |
| 1126 | 1126 | } |
| 1127 | 1127 | status->freq = ieee80211_channel_to_frequency(rxd->channel, |
| 1128 | 1128 | status->band); |
| @@ -2300,13 +2300,13 @@ static void mwl8k_setup_2ghz_band(struct ieee80211_hw *hw) · 1171 unmodified lines | ||
| 2300 | 2300 | BUILD_BUG_ON(sizeof(priv->rates_24) != sizeof(mwl8k_rates_24)); |
| 2301 | 2301 | memcpy(priv->rates_24, mwl8k_rates_24, sizeof(mwl8k_rates_24)); |
| 2302 | 2302 | |
| 2303 | − priv->band_24.band = IEEE80211_BAND_2GHZ; | |
| 2303 | + priv->band_24.band = NL80211_BAND_2GHZ; | |
| 2304 | 2304 | priv->band_24.channels = priv->channels_24; |
| 2305 | 2305 | priv->band_24.n_channels = ARRAY_SIZE(mwl8k_channels_24); |
| 2306 | 2306 | priv->band_24.bitrates = priv->rates_24; |
| 2307 | 2307 | priv->band_24.n_bitrates = ARRAY_SIZE(mwl8k_rates_24); |
| 2308 | 2308 | |
| 2309 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band_24; | |
| 2309 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band_24; | |
| 2310 | 2310 | } |
| 2311 | 2311 | |
| 2312 | 2312 | 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 | ||
| 2319 | 2319 | BUILD_BUG_ON(sizeof(priv->rates_50) != sizeof(mwl8k_rates_50)); |
| 2320 | 2320 | memcpy(priv->rates_50, mwl8k_rates_50, sizeof(mwl8k_rates_50)); |
| 2321 | 2321 | |
| 2322 | − priv->band_50.band = IEEE80211_BAND_5GHZ; | |
| 2322 | + priv->band_50.band = NL80211_BAND_5GHZ; | |
| 2323 | 2323 | priv->band_50.channels = priv->channels_50; |
| 2324 | 2324 | priv->band_50.n_channels = ARRAY_SIZE(mwl8k_channels_50); |
| 2325 | 2325 | priv->band_50.bitrates = priv->rates_50; |
| 2326 | 2326 | priv->band_50.n_bitrates = ARRAY_SIZE(mwl8k_rates_50); |
| 2327 | 2327 | |
| 2328 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->band_50; | |
| 2328 | + hw->wiphy->bands[NL80211_BAND_5GHZ] = &priv->band_50; | |
| 2329 | 2329 | } |
| 2330 | 2330 | |
| 2331 | 2331 | /* |
| @@ -2876,9 +2876,9 @@ static int mwl8k_cmd_tx_power(struct ieee80211_hw *hw, · 544 unmodified lines | ||
| 2876 | 2876 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); |
| 2877 | 2877 | cmd->action = cpu_to_le16(MWL8K_CMD_SET_LIST); |
| 2878 | 2878 | |
| 2879 | − if (channel->band == IEEE80211_BAND_2GHZ) | |
| 2879 | + if (channel->band == NL80211_BAND_2GHZ) | |
| 2880 | 2880 | cmd->band = cpu_to_le16(0x1); |
| 2881 | − else if (channel->band == IEEE80211_BAND_5GHZ) | |
| 2881 | + else if (channel->band == NL80211_BAND_5GHZ) | |
| 2882 | 2882 | cmd->band = cpu_to_le16(0x4); |
| 2883 | 2883 | |
| 2884 | 2884 | 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 | ||
| 3067 | 3067 | struct ieee80211_supported_band *sband; |
| 3068 | 3068 | int band, ch, idx = 0; |
| 3069 | 3069 | |
| 3070 | − for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) { | |
| 3070 | + for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) { | |
| 3071 | 3071 | sband = priv->hw->wiphy->bands[band]; |
| 3072 | 3072 | if (!sband) |
| 3073 | 3073 | continue; |
| @@ -3149,9 +3149,9 @@ static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, · 75 unmodified lines | ||
| 3149 | 3149 | cmd->action = cpu_to_le16(MWL8K_CMD_SET); |
| 3150 | 3150 | cmd->current_channel = channel->hw_value; |
| 3151 | 3151 | |
| 3152 | − if (channel->band == IEEE80211_BAND_2GHZ) | |
| 3152 | + if (channel->band == NL80211_BAND_2GHZ) | |
| 3153 | 3153 | cmd->channel_flags |= cpu_to_le32(0x00000001); |
| 3154 | − else if (channel->band == IEEE80211_BAND_5GHZ) | |
| 3154 | + else if (channel->band == NL80211_BAND_5GHZ) | |
| 3155 | 3155 | cmd->channel_flags |= cpu_to_le32(0x00000004); |
| 3156 | 3156 | |
| 3157 | 3157 | if (!priv->sw_scan_start) { |
| @@ -4094,10 +4094,10 @@ static int mwl8k_cmd_set_new_stn_add(struct ieee80211_hw *hw, · 936 unmodified lines | ||
| 4094 | 4094 | memcpy(cmd->mac_addr, sta->addr, ETH_ALEN); |
| 4095 | 4095 | cmd->stn_id = cpu_to_le16(sta->aid); |
| 4096 | 4096 | 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]; | |
| 4099 | 4099 | else |
| 4100 | − rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; | |
| 4100 | + rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5; | |
| 4101 | 4101 | cmd->legacy_rates = cpu_to_le32(rates); |
| 4102 | 4102 | if (sta->ht_cap.ht_supported) { |
| 4103 | 4103 | 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 | ||
| 4529 | 4529 | p->ht_caps = cpu_to_le16(sta->ht_cap.cap); |
| 4530 | 4530 | p->extended_ht_caps = (sta->ht_cap.ampdu_factor & 3) | |
| 4531 | 4531 | ((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]; | |
| 4534 | 4534 | else |
| 4535 | − rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; | |
| 4535 | + rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5; | |
| 4536 | 4536 | legacy_rate_mask_to_array(p->legacy_rates, rates); |
| 4537 | 4537 | memcpy(p->ht_rates, sta->ht_cap.mcs.rx_mask, 16); |
| 4538 | 4538 | p->interop = 1; |
| @@ -5010,11 +5010,11 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 471 unmodified lines | ||
| 5010 | 5010 | goto out; |
| 5011 | 5011 | } |
| 5012 | 5012 | |
| 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]; | |
| 5015 | 5015 | } else { |
| 5016 | 5016 | ap_legacy_rates = |
| 5017 | − ap->supp_rates[IEEE80211_BAND_5GHZ] << 5; | |
| 5017 | + ap->supp_rates[NL80211_BAND_5GHZ] << 5; | |
| 5018 | 5018 | } |
| 5019 | 5019 | memcpy(ap_mcs_rates, ap->ht_cap.mcs.rx_mask, 16); |
| 5020 | 5020 | |
| @@ -5042,7 +5042,7 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, · 21 unmodified lines | ||
| 5042 | 5042 | idx--; |
| 5043 | 5043 | |
| 5044 | 5044 | if (hw->conf.chandef.chan->band == |
| 5045 | − IEEE80211_BAND_2GHZ) | |
| 5045 | + NL80211_BAND_2GHZ) | |
| 5046 | 5046 | rate = mwl8k_rates_24[idx].hw_value; |
| 5047 | 5047 | else |
| 5048 | 5048 | 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 | ||
| 5116 | 5116 | if (idx) |
| 5117 | 5117 | idx--; |
| 5118 | 5118 | |
| 5119 | − if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) | |
| 5119 | + if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) | |
| 5120 | 5120 | rate = mwl8k_rates_24[idx].hw_value; |
| 5121 | 5121 | else |
| 5122 | 5122 | 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 | ||
| 5388 | 5388 | struct ieee80211_supported_band *sband; |
| 5389 | 5389 | |
| 5390 | 5390 | if (priv->ap_fw) { |
| 5391 | − sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 5391 | + sband = hw->wiphy->bands[NL80211_BAND_2GHZ]; | |
| 5392 | 5392 | |
| 5393 | 5393 | if (sband && idx >= sband->n_channels) { |
| 5394 | 5394 | idx -= sband->n_channels; |
| @@ -5396,7 +5396,7 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, · 1 unmodified line | ||
| 5396 | 5396 | } |
| 5397 | 5397 | |
| 5398 | 5398 | if (!sband) |
| 5399 | − sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 5399 | + sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; | |
| 5400 | 5400 | |
| 5401 | 5401 | if (!sband || idx >= sband->n_channels) |
| 5402 | 5402 | return -ENOENT; |
| @@ -469,7 +469,7 @@ struct mt7601u_dev *mt7601u_alloc_device(struct device *pdev) · 468 unmodified lines | ||
| 469 | 469 | } |
| 470 | 470 | |
| 471 | 471 | #define CHAN2G(_idx, _freq) { \ |
| 472 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 472 | + .band = NL80211_BAND_2GHZ, \ | |
| 473 | 473 | .center_freq = (_freq), \ |
| 474 | 474 | .hw_value = (_idx), \ |
| 475 | 475 | .max_power = 30, \ |
| @@ -563,7 +563,7 @@ mt76_init_sband_2g(struct mt7601u_dev *dev) · 87 unmodified lines | ||
| 563 | 563 | { |
| 564 | 564 | dev->sband_2g = devm_kzalloc(dev->dev, sizeof(*dev->sband_2g), |
| 565 | 565 | GFP_KERNEL); |
| 566 | − dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = dev->sband_2g; | |
| 566 | + dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = dev->sband_2g; | |
| 567 | 567 | |
| 568 | 568 | WARN_ON(dev->ee->reg.start - 1 + dev->ee->reg.num > |
| 569 | 569 | ARRAY_SIZE(mt76_channels_2ghz)); |
| @@ -777,7 +777,7 @@ static int rt2800_agc_to_rssi(struct rt2x00_dev *rt2x00dev, u32 rxwi_w2) · 776 unmodified lines | ||
| 777 | 777 | u8 offset1; |
| 778 | 778 | u8 offset2; |
| 779 | 779 | |
| 780 | − if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) { | |
| 780 | + if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) { | |
| 781 | 781 | rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_BG, &eeprom); |
| 782 | 782 | offset0 = rt2x00_get_field16(eeprom, EEPROM_RSSI_BG_OFFSET0); |
| 783 | 783 | 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 | ||
| 1174 | 1174 | container_of(led_cdev, struct rt2x00_led, led_dev); |
| 1175 | 1175 | unsigned int enabled = brightness != LED_OFF; |
| 1176 | 1176 | unsigned int bg_mode = |
| 1177 | − (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_2GHZ); | |
| 1177 | + (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); | |
| 1178 | 1178 | unsigned int polarity = |
| 1179 | 1179 | rt2x00_get_field16(led->rt2x00dev->led_mcu_reg, |
| 1180 | 1180 | EEPROM_FREQ_LED_POLARITY); |
| @@ -1741,7 +1741,7 @@ static void rt2800_config_3572bt_ant(struct rt2x00_dev *rt2x00dev) · 560 unmodified lines | ||
| 1741 | 1741 | u8 led_ctrl, led_g_mode, led_r_mode; |
| 1742 | 1742 | |
| 1743 | 1743 | rt2800_register_read(rt2x00dev, GPIO_SWITCH, ®); |
| 1744 | − if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | |
| 1744 | + if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { | |
| 1745 | 1745 | rt2x00_set_field32(®, GPIO_SWITCH_0, 1); |
| 1746 | 1746 | rt2x00_set_field32(®, GPIO_SWITCH_1, 1); |
| 1747 | 1747 | } else { |
| @@ -1844,7 +1844,7 @@ void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant) · 96 unmodified lines | ||
| 1844 | 1844 | rt2x00_has_cap_bt_coexist(rt2x00dev)) { |
| 1845 | 1845 | rt2x00_set_field8(&r3, BBP3_RX_ADC, 1); |
| 1846 | 1846 | rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, |
| 1847 | − rt2x00dev->curr_band == IEEE80211_BAND_5GHZ); | |
| 1847 | + rt2x00dev->curr_band == NL80211_BAND_5GHZ); | |
| 1848 | 1848 | rt2800_set_ant_diversity(rt2x00dev, ANTENNA_B); |
| 1849 | 1849 | } else { |
| 1850 | 1850 | 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 | ||
| 3451 | 3451 | * Matching Delta value -4 -3 -2 -1 0 +1 +2 +3 +4 |
| 3452 | 3452 | * Example TSSI bounds 0xF0 0xD0 0xB5 0xA0 0x88 0x45 0x25 0x15 0x00 |
| 3453 | 3453 | */ |
| 3454 | − if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) { | |
| 3454 | + if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) { | |
| 3455 | 3455 | rt2800_eeprom_read(rt2x00dev, EEPROM_TSSI_BOUND_BG1, &eeprom); |
| 3456 | 3456 | tssi_bounds[0] = rt2x00_get_field16(eeprom, |
| 3457 | 3457 | EEPROM_TSSI_BOUND_BG1_MINUS4); |
| @@ -3546,7 +3546,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev) · 88 unmodified lines | ||
| 3546 | 3546 | } |
| 3547 | 3547 | |
| 3548 | 3548 | static int rt2800_get_txpower_bw_comp(struct rt2x00_dev *rt2x00dev, |
| 3549 | − enum ieee80211_band band) | |
| 3549 | + enum nl80211_band band) | |
| 3550 | 3550 | { |
| 3551 | 3551 | u16 eeprom; |
| 3552 | 3552 | u8 comp_en; |
| @@ -3562,7 +3562,7 @@ static int rt2800_get_txpower_bw_comp(struct rt2x00_dev *rt2x00dev, · 9 unmodified lines | ||
| 3562 | 3562 | !test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags)) |
| 3563 | 3563 | return 0; |
| 3564 | 3564 | |
| 3565 | − if (band == IEEE80211_BAND_2GHZ) { | |
| 3565 | + if (band == NL80211_BAND_2GHZ) { | |
| 3566 | 3566 | comp_en = rt2x00_get_field16(eeprom, |
| 3567 | 3567 | EEPROM_TXPOWER_DELTA_ENABLE_2G); |
| 3568 | 3568 | if (comp_en) { |
| @@ -3611,7 +3611,7 @@ static int rt2800_get_txpower_reg_delta(struct rt2x00_dev *rt2x00dev, · 42 unmodified lines | ||
| 3611 | 3611 | } |
| 3612 | 3612 | |
| 3613 | 3613 | 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, | |
| 3615 | 3615 | u8 txpower, int delta) |
| 3616 | 3616 | { |
| 3617 | 3617 | u16 eeprom; |
| @@ -3639,7 +3639,7 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b, · 21 unmodified lines | ||
| 3639 | 3639 | rt2800_eeprom_read(rt2x00dev, EEPROM_EIRP_MAX_TX_POWER, |
| 3640 | 3640 | &eeprom); |
| 3641 | 3641 | |
| 3642 | − if (band == IEEE80211_BAND_2GHZ) | |
| 3642 | + if (band == NL80211_BAND_2GHZ) | |
| 3643 | 3643 | eirp_txpower_criterion = rt2x00_get_field16(eeprom, |
| 3644 | 3644 | EEPROM_EIRP_MAX_TX_POWER_2GHZ); |
| 3645 | 3645 | else |
| @@ -3686,7 +3686,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, · 40 unmodified lines | ||
| 3686 | 3686 | u16 eeprom; |
| 3687 | 3687 | u32 regs[TX_PWR_CFG_IDX_COUNT]; |
| 3688 | 3688 | unsigned int offset; |
| 3689 | − enum ieee80211_band band = chan->band; | |
| 3689 | + enum nl80211_band band = chan->band; | |
| 3690 | 3690 | int delta; |
| 3691 | 3691 | int i; |
| 3692 | 3692 | |
| @@ -3697,7 +3697,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, · 4 unmodified lines | ||
| 3697 | 3697 | /* calculate temperature compensation delta */ |
| 3698 | 3698 | delta = rt2800_get_gain_calibration_delta(rt2x00dev); |
| 3699 | 3699 | |
| 3700 | − if (band == IEEE80211_BAND_5GHZ) | |
| 3700 | + if (band == NL80211_BAND_5GHZ) | |
| 3701 | 3701 | offset = 16; |
| 3702 | 3702 | else |
| 3703 | 3703 | offset = 0; |
| @@ -4055,7 +4055,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, · 351 unmodified lines | ||
| 4055 | 4055 | for (i = 0; i < TX_PWR_CFG_IDX_COUNT; i++) |
| 4056 | 4056 | rt2x00_dbg(rt2x00dev, |
| 4057 | 4057 | "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', | |
| 4059 | 4059 | (test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags)) ? |
| 4060 | 4060 | '4' : '2', |
| 4061 | 4061 | (i > TX_PWR_CFG_9_IDX) ? |
| @@ -4081,7 +4081,7 @@ static void rt2800_config_txpower_rt28xx(struct rt2x00_dev *rt2x00dev, · 19 unmodified lines | ||
| 4081 | 4081 | u16 eeprom; |
| 4082 | 4082 | u32 reg, offset; |
| 4083 | 4083 | int i, is_rate_b, delta, power_ctrl; |
| 4084 | − enum ieee80211_band band = chan->band; | |
| 4084 | + enum nl80211_band band = chan->band; | |
| 4085 | 4085 | |
| 4086 | 4086 | /* |
| 4087 | 4087 | * 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 | ||
| 4436 | 4436 | { |
| 4437 | 4437 | u8 vgc; |
| 4438 | 4438 | |
| 4439 | − if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) { | |
| 4439 | + if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) { | |
| 4440 | 4440 | if (rt2x00_rt(rt2x00dev, RT3070) || |
| 4441 | 4441 | rt2x00_rt(rt2x00dev, RT3071) || |
| 4442 | 4442 | rt2x00_rt(rt2x00dev, RT3090) || |
| @@ -4511,7 +4511,7 @@ void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, · 68 unmodified lines | ||
| 4511 | 4511 | case RT3572: |
| 4512 | 4512 | case RT3593: |
| 4513 | 4513 | if (qual->rssi > -65) { |
| 4514 | − if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) | |
| 4514 | + if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) | |
| 4515 | 4515 | vgc += 0x20; |
| 4516 | 4516 | else |
| 4517 | 4517 | vgc += 0x10; |
| @@ -753,8 +753,8 @@ struct rt2x00_dev { · 752 unmodified lines | ||
| 753 | 753 | * IEEE80211 control structure. |
| 754 | 754 | */ |
| 755 | 755 | 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; | |
| 758 | 758 | int curr_freq; |
| 759 | 759 | |
| 760 | 760 | /* |
| @@ -911,7 +911,7 @@ static void rt2x00lib_channel(struct ieee80211_channel *entry, · 910 unmodified lines | ||
| 911 | 911 | const int value) |
| 912 | 912 | { |
| 913 | 913 | /* 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; | |
| 915 | 915 | entry->center_freq = ieee80211_channel_to_frequency(channel, |
| 916 | 916 | entry->band); |
| 917 | 917 | entry->hw_value = value; |
| @@ -975,13 +975,13 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, · 57 unmodified lines | ||
| 975 | 975 | * Channels: 2.4 GHz |
| 976 | 976 | */ |
| 977 | 977 | 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, | |
| 985 | 985 | &spec->ht, sizeof(spec->ht)); |
| 986 | 986 | } |
| 987 | 987 | |
| @@ -991,15 +991,15 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, · 3 unmodified lines | ||
| 991 | 991 | * Channels: OFDM, UNII, HiperLAN2. |
| 992 | 992 | */ |
| 993 | 993 | if (spec->supported_bands & SUPPORT_BAND_5GHZ) { |
| 994 | − rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_channels = | |
| 994 | + rt2x00dev->bands[NL80211_BAND_5GHZ].n_channels = | |
| 995 | 995 | spec->num_channels - 14; |
| 996 | − rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_bitrates = | |
| 996 | + rt2x00dev->bands[NL80211_BAND_5GHZ].n_bitrates = | |
| 997 | 997 | 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, | |
| 1003 | 1003 | &spec->ht, sizeof(spec->ht)); |
| 1004 | 1004 | } |
| 1005 | 1005 | |
| @@ -1016,11 +1016,11 @@ static void rt2x00lib_remove_hw(struct rt2x00_dev *rt2x00dev) · 10 unmodified lines | ||
| 1016 | 1016 | if (test_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags)) |
| 1017 | 1017 | ieee80211_unregister_hw(rt2x00dev->hw); |
| 1018 | 1018 | |
| 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; | |
| 1024 | 1024 | } |
| 1025 | 1025 | |
| 1026 | 1026 | kfree(rt2x00dev->spec.channels_info); |
| @@ -252,9 +252,9 @@ static void rt61pci_brightness_set(struct led_classdev *led_cdev, · 251 unmodified lines | ||
| 252 | 252 | container_of(led_cdev, struct rt2x00_led, led_dev); |
| 253 | 253 | unsigned int enabled = brightness != LED_OFF; |
| 254 | 254 | unsigned int a_mode = |
| 255 | − (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_5GHZ); | |
| 255 | + (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); | |
| 256 | 256 | unsigned int bg_mode = |
| 257 | − (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_2GHZ); | |
| 257 | + (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); | |
| 258 | 258 | |
| 259 | 259 | if (led->type == LED_TYPE_RADIO) { |
| 260 | 260 | 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 | ||
| 643 | 643 | case ANTENNA_HW_DIVERSITY: |
| 644 | 644 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2); |
| 645 | 645 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, |
| 646 | − (rt2x00dev->curr_band != IEEE80211_BAND_5GHZ)); | |
| 646 | + (rt2x00dev->curr_band != NL80211_BAND_5GHZ)); | |
| 647 | 647 | break; |
| 648 | 648 | case ANTENNA_A: |
| 649 | 649 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 650 | 650 | 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) | |
| 652 | 652 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); |
| 653 | 653 | else |
| 654 | 654 | 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 | ||
| 657 | 657 | default: |
| 658 | 658 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 659 | 659 | 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) | |
| 661 | 661 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); |
| 662 | 662 | else |
| 663 | 663 | 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 | ||
| 808 | 808 | BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY || |
| 809 | 809 | ant->tx == ANTENNA_SW_DIVERSITY); |
| 810 | 810 | |
| 811 | − if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | |
| 811 | + if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { | |
| 812 | 812 | sel = antenna_sel_a; |
| 813 | 813 | lna = rt2x00_has_cap_external_lna_a(rt2x00dev); |
| 814 | 814 | } else { |
| @@ -822,9 +822,9 @@ static void rt61pci_config_ant(struct rt2x00_dev *rt2x00dev, · 7 unmodified lines | ||
| 822 | 822 | rt2x00mmio_register_read(rt2x00dev, PHY_CSR0, ®); |
| 823 | 823 | |
| 824 | 824 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_BG, |
| 825 | − rt2x00dev->curr_band == IEEE80211_BAND_2GHZ); | |
| 825 | + rt2x00dev->curr_band == NL80211_BAND_2GHZ); | |
| 826 | 826 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_A, |
| 827 | − rt2x00dev->curr_band == IEEE80211_BAND_5GHZ); | |
| 827 | + rt2x00dev->curr_band == NL80211_BAND_5GHZ); | |
| 828 | 828 | |
| 829 | 829 | rt2x00mmio_register_write(rt2x00dev, PHY_CSR0, reg); |
| 830 | 830 | |
| @@ -846,7 +846,7 @@ static void rt61pci_config_lna_gain(struct rt2x00_dev *rt2x00dev, · 15 unmodified lines | ||
| 846 | 846 | u16 eeprom; |
| 847 | 847 | short lna_gain = 0; |
| 848 | 848 | |
| 849 | − if (libconf->conf->chandef.chan->band == IEEE80211_BAND_2GHZ) { | |
| 849 | + if (libconf->conf->chandef.chan->band == NL80211_BAND_2GHZ) { | |
| 850 | 850 | if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) |
| 851 | 851 | lna_gain += 14; |
| 852 | 852 | |
| @@ -1048,7 +1048,7 @@ static void rt61pci_link_tuner(struct rt2x00_dev *rt2x00dev, · 195 unmodified lines | ||
| 1048 | 1048 | /* |
| 1049 | 1049 | * Determine r17 bounds. |
| 1050 | 1050 | */ |
| 1051 | − if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | |
| 1051 | + if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { | |
| 1052 | 1052 | low_bound = 0x28; |
| 1053 | 1053 | up_bound = 0x48; |
| 1054 | 1054 | 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 | ||
| 2077 | 2077 | return 0; |
| 2078 | 2078 | } |
| 2079 | 2079 | |
| 2080 | − if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | |
| 2080 | + if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { | |
| 2081 | 2081 | if (lna == 3 || lna == 2) |
| 2082 | 2082 | offset += 10; |
| 2083 | 2083 | } |
| @@ -197,9 +197,9 @@ static void rt73usb_brightness_set(struct led_classdev *led_cdev, · 196 unmodified lines | ||
| 197 | 197 | container_of(led_cdev, struct rt2x00_led, led_dev); |
| 198 | 198 | unsigned int enabled = brightness != LED_OFF; |
| 199 | 199 | unsigned int a_mode = |
| 200 | − (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_5GHZ); | |
| 200 | + (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); | |
| 201 | 201 | unsigned int bg_mode = |
| 202 | − (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_2GHZ); | |
| 202 | + (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); | |
| 203 | 203 | |
| 204 | 204 | if (led->type == LED_TYPE_RADIO) { |
| 205 | 205 | 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 | ||
| 593 | 593 | case ANTENNA_HW_DIVERSITY: |
| 594 | 594 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2); |
| 595 | 595 | temp = !rt2x00_has_cap_frame_type(rt2x00dev) && |
| 596 | − (rt2x00dev->curr_band != IEEE80211_BAND_5GHZ); | |
| 596 | + (rt2x00dev->curr_band != NL80211_BAND_5GHZ); | |
| 597 | 597 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, temp); |
| 598 | 598 | break; |
| 599 | 599 | case ANTENNA_A: |
| 600 | 600 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 601 | 601 | 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) | |
| 603 | 603 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); |
| 604 | 604 | else |
| 605 | 605 | 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 | ||
| 608 | 608 | default: |
| 609 | 609 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 610 | 610 | 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) | |
| 612 | 612 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); |
| 613 | 613 | else |
| 614 | 614 | 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 | ||
| 704 | 704 | BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY || |
| 705 | 705 | ant->tx == ANTENNA_SW_DIVERSITY); |
| 706 | 706 | |
| 707 | − if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | |
| 707 | + if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { | |
| 708 | 708 | sel = antenna_sel_a; |
| 709 | 709 | lna = rt2x00_has_cap_external_lna_a(rt2x00dev); |
| 710 | 710 | } else { |
| @@ -718,9 +718,9 @@ static void rt73usb_config_ant(struct rt2x00_dev *rt2x00dev, · 7 unmodified lines | ||
| 718 | 718 | rt2x00usb_register_read(rt2x00dev, PHY_CSR0, ®); |
| 719 | 719 | |
| 720 | 720 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_BG, |
| 721 | − (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ)); | |
| 721 | + (rt2x00dev->curr_band == NL80211_BAND_2GHZ)); | |
| 722 | 722 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_A, |
| 723 | − (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ)); | |
| 723 | + (rt2x00dev->curr_band == NL80211_BAND_5GHZ)); | |
| 724 | 724 | |
| 725 | 725 | rt2x00usb_register_write(rt2x00dev, PHY_CSR0, reg); |
| 726 | 726 | |
| @@ -736,7 +736,7 @@ static void rt73usb_config_lna_gain(struct rt2x00_dev *rt2x00dev, · 9 unmodified lines | ||
| 736 | 736 | u16 eeprom; |
| 737 | 737 | short lna_gain = 0; |
| 738 | 738 | |
| 739 | − if (libconf->conf->chandef.chan->band == IEEE80211_BAND_2GHZ) { | |
| 739 | + if (libconf->conf->chandef.chan->band == NL80211_BAND_2GHZ) { | |
| 740 | 740 | if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) |
| 741 | 741 | lna_gain += 14; |
| 742 | 742 | |
| @@ -923,7 +923,7 @@ static void rt73usb_link_tuner(struct rt2x00_dev *rt2x00dev, · 180 unmodified lines | ||
| 923 | 923 | /* |
| 924 | 924 | * Determine r17 bounds. |
| 925 | 925 | */ |
| 926 | − if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | |
| 926 | + if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { | |
| 927 | 927 | low_bound = 0x28; |
| 928 | 928 | up_bound = 0x48; |
| 929 | 929 | |
| @@ -1657,7 +1657,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1) · 727 unmodified lines | ||
| 1657 | 1657 | return 0; |
| 1658 | 1658 | } |
| 1659 | 1659 | |
| 1660 | − if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | |
| 1660 | + if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { | |
| 1661 | 1661 | if (rt2x00_has_cap_external_lna_a(rt2x00dev)) { |
| 1662 | 1662 | if (lna == 3 || lna == 2) |
| 1663 | 1663 | offset += 10; |
| @@ -526,7 +526,7 @@ static void rtl8180_tx(struct ieee80211_hw *dev, · 525 unmodified lines | ||
| 526 | 526 | * ieee80211_generic_frame_duration |
| 527 | 527 | */ |
| 528 | 528 | duration = ieee80211_generic_frame_duration(dev, priv->vif, |
| 529 | − IEEE80211_BAND_2GHZ, skb->len, | |
| 529 | + NL80211_BAND_2GHZ, skb->len, | |
| 530 | 530 | ieee80211_get_tx_rate(dev, info)); |
| 531 | 531 | |
| 532 | 532 | 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 | ||
| 1529 | 1529 | priv->ack_time = |
| 1530 | 1530 | le16_to_cpu(ieee80211_generic_frame_duration(dev, |
| 1531 | 1531 | priv->vif, |
| 1532 | − IEEE80211_BAND_2GHZ, 10, | |
| 1532 | + NL80211_BAND_2GHZ, 10, | |
| 1533 | 1533 | &priv->rates[0])) - 10; |
| 1534 | 1534 | |
| 1535 | 1535 | rtl8180_conf_erp(dev, info); |
| @@ -1795,12 +1795,12 @@ static int rtl8180_probe(struct pci_dev *pdev, · 259 unmodified lines | ||
| 1795 | 1795 | memcpy(priv->channels, rtl818x_channels, sizeof(rtl818x_channels)); |
| 1796 | 1796 | memcpy(priv->rates, rtl818x_rates, sizeof(rtl818x_rates)); |
| 1797 | 1797 | |
| 1798 | − priv->band.band = IEEE80211_BAND_2GHZ; | |
| 1798 | + priv->band.band = NL80211_BAND_2GHZ; | |
| 1799 | 1799 | priv->band.channels = priv->channels; |
| 1800 | 1800 | priv->band.n_channels = ARRAY_SIZE(rtl818x_channels); |
| 1801 | 1801 | priv->band.bitrates = priv->rates; |
| 1802 | 1802 | priv->band.n_bitrates = 4; |
| 1803 | − dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | |
| 1803 | + dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; | |
| 1804 | 1804 | |
| 1805 | 1805 | ieee80211_hw_set(dev, HOST_BROADCAST_PS_BUFFERING); |
| 1806 | 1806 | ieee80211_hw_set(dev, RX_INCLUDES_FCS); |
| @@ -1470,12 +1470,12 @@ static int rtl8187_probe(struct usb_interface *intf, · 1469 unmodified lines | ||
| 1470 | 1470 | memcpy(priv->rates, rtl818x_rates, sizeof(rtl818x_rates)); |
| 1471 | 1471 | priv->map = (struct rtl818x_csr *)0xFF00; |
| 1472 | 1472 | |
| 1473 | − priv->band.band = IEEE80211_BAND_2GHZ; | |
| 1473 | + priv->band.band = NL80211_BAND_2GHZ; | |
| 1474 | 1474 | priv->band.channels = priv->channels; |
| 1475 | 1475 | priv->band.n_channels = ARRAY_SIZE(rtl818x_channels); |
| 1476 | 1476 | priv->band.bitrates = priv->rates; |
| 1477 | 1477 | 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; | |
| 1479 | 1479 | |
| 1480 | 1480 | |
| 1481 | 1481 | ieee80211_hw_set(dev, RX_INCLUDES_FCS); |
| @@ -91,33 +91,33 @@ static struct ieee80211_rate rtl8xxxu_rates[] = { · 90 unmodified lines | ||
| 91 | 91 | }; |
| 92 | 92 | |
| 93 | 93 | static struct ieee80211_channel rtl8xxxu_channels_2g[] = { |
| 94 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412, | |
| 94 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2412, | |
| 95 | 95 | .hw_value = 1, .max_power = 30 }, |
| 96 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, | |
| 96 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2417, | |
| 97 | 97 | .hw_value = 2, .max_power = 30 }, |
| 98 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, | |
| 98 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2422, | |
| 99 | 99 | .hw_value = 3, .max_power = 30 }, |
| 100 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, | |
| 100 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2427, | |
| 101 | 101 | .hw_value = 4, .max_power = 30 }, |
| 102 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, | |
| 102 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2432, | |
| 103 | 103 | .hw_value = 5, .max_power = 30 }, |
| 104 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, | |
| 104 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2437, | |
| 105 | 105 | .hw_value = 6, .max_power = 30 }, |
| 106 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, | |
| 106 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2442, | |
| 107 | 107 | .hw_value = 7, .max_power = 30 }, |
| 108 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, | |
| 108 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2447, | |
| 109 | 109 | .hw_value = 8, .max_power = 30 }, |
| 110 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, | |
| 110 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2452, | |
| 111 | 111 | .hw_value = 9, .max_power = 30 }, |
| 112 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, | |
| 112 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2457, | |
| 113 | 113 | .hw_value = 10, .max_power = 30 }, |
| 114 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, | |
| 114 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2462, | |
| 115 | 115 | .hw_value = 11, .max_power = 30 }, |
| 116 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, | |
| 116 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2467, | |
| 117 | 117 | .hw_value = 12, .max_power = 30 }, |
| 118 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, | |
| 118 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2472, | |
| 119 | 119 | .hw_value = 13, .max_power = 30 }, |
| 120 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, | |
| 120 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2484, | |
| 121 | 121 | .hw_value = 14, .max_power = 30 } |
| 122 | 122 | }; |
| 123 | 123 | |
| @@ -8378,7 +8378,7 @@ static int rtl8xxxu_probe(struct usb_interface *interface, · 8254 unmodified lines | ||
| 8378 | 8378 | dev_info(&udev->dev, "Enabling HT_20_40 on the 2.4GHz band\n"); |
| 8379 | 8379 | sband->ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
| 8380 | 8380 | } |
| 8381 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband; | |
| 8381 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = sband; | |
| 8382 | 8382 | |
| 8383 | 8383 | hw->wiphy->rts_threshold = 2347; |
| 8384 | 8384 | |
| @@ -131,7 +131,7 @@ static struct ieee80211_rate rtl_ratetable_5g[] = { · 130 unmodified lines | ||
| 131 | 131 | }; |
| 132 | 132 | |
| 133 | 133 | static const struct ieee80211_supported_band rtl_band_2ghz = { |
| 134 | − .band = IEEE80211_BAND_2GHZ, | |
| 134 | + .band = NL80211_BAND_2GHZ, | |
| 135 | 135 | |
| 136 | 136 | .channels = rtl_channeltable_2g, |
| 137 | 137 | .n_channels = ARRAY_SIZE(rtl_channeltable_2g), |
| @@ -143,7 +143,7 @@ static const struct ieee80211_supported_band rtl_band_2ghz = { · 5 unmodified lines | ||
| 143 | 143 | }; |
| 144 | 144 | |
| 145 | 145 | static struct ieee80211_supported_band rtl_band_5ghz = { |
| 146 | − .band = IEEE80211_BAND_5GHZ, | |
| 146 | + .band = NL80211_BAND_5GHZ, | |
| 147 | 147 | |
| 148 | 148 | .channels = rtl_channeltable_5g, |
| 149 | 149 | .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 | ||
| 197 | 197 | |
| 198 | 198 | ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; |
| 199 | 199 | |
| 200 | − /*hw->wiphy->bands[IEEE80211_BAND_2GHZ] | |
| 200 | + /*hw->wiphy->bands[NL80211_BAND_2GHZ] | |
| 201 | 201 | *base on ant_num |
| 202 | 202 | *rx_mask: RX mask |
| 203 | 203 | *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 | ||
| 328 | 328 | rtlhal->bandset == BAND_ON_BOTH) { |
| 329 | 329 | /* 1: 2.4 G bands */ |
| 330 | 330 | /* <1> use mac->bands as mem for hw->wiphy->bands */ |
| 331 | − sband = &(rtlmac->bands[IEEE80211_BAND_2GHZ]); | |
| 331 | + sband = &(rtlmac->bands[NL80211_BAND_2GHZ]); | |
| 332 | 332 | |
| 333 | − /* <2> set hw->wiphy->bands[IEEE80211_BAND_2GHZ] | |
| 333 | + /* <2> set hw->wiphy->bands[NL80211_BAND_2GHZ] | |
| 334 | 334 | * to default value(1T1R) */ |
| 335 | − memcpy(&(rtlmac->bands[IEEE80211_BAND_2GHZ]), &rtl_band_2ghz, | |
| 335 | + memcpy(&(rtlmac->bands[NL80211_BAND_2GHZ]), &rtl_band_2ghz, | |
| 336 | 336 | sizeof(struct ieee80211_supported_band)); |
| 337 | 337 | |
| 338 | 338 | /* <3> init ht cap base on ant_num */ |
| 339 | 339 | _rtl_init_hw_ht_capab(hw, &sband->ht_cap); |
| 340 | 340 | |
| 341 | 341 | /* <4> set mac->sband to wiphy->sband */ |
| 342 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband; | |
| 342 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = sband; | |
| 343 | 343 | |
| 344 | 344 | /* 2: 5 G bands */ |
| 345 | 345 | /* <1> use mac->bands as mem for hw->wiphy->bands */ |
| 346 | − sband = &(rtlmac->bands[IEEE80211_BAND_5GHZ]); | |
| 346 | + sband = &(rtlmac->bands[NL80211_BAND_5GHZ]); | |
| 347 | 347 | |
| 348 | − /* <2> set hw->wiphy->bands[IEEE80211_BAND_5GHZ] | |
| 348 | + /* <2> set hw->wiphy->bands[NL80211_BAND_5GHZ] | |
| 349 | 349 | * to default value(1T1R) */ |
| 350 | − memcpy(&(rtlmac->bands[IEEE80211_BAND_5GHZ]), &rtl_band_5ghz, | |
| 350 | + memcpy(&(rtlmac->bands[NL80211_BAND_5GHZ]), &rtl_band_5ghz, | |
| 351 | 351 | sizeof(struct ieee80211_supported_band)); |
| 352 | 352 | |
| 353 | 353 | /* <3> init ht cap base on ant_num */ |
| @@ -355,15 +355,15 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) · 1 unmodified line | ||
| 355 | 355 | |
| 356 | 356 | _rtl_init_hw_vht_capab(hw, &sband->vht_cap); |
| 357 | 357 | /* <4> set mac->sband to wiphy->sband */ |
| 358 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; | |
| 358 | + hw->wiphy->bands[NL80211_BAND_5GHZ] = sband; | |
| 359 | 359 | } else { |
| 360 | 360 | if (rtlhal->current_bandtype == BAND_ON_2_4G) { |
| 361 | 361 | /* <1> use mac->bands as mem for hw->wiphy->bands */ |
| 362 | − sband = &(rtlmac->bands[IEEE80211_BAND_2GHZ]); | |
| 362 | + sband = &(rtlmac->bands[NL80211_BAND_2GHZ]); | |
| 363 | 363 | |
| 364 | − /* <2> set hw->wiphy->bands[IEEE80211_BAND_2GHZ] | |
| 364 | + /* <2> set hw->wiphy->bands[NL80211_BAND_2GHZ] | |
| 365 | 365 | * to default value(1T1R) */ |
| 366 | − memcpy(&(rtlmac->bands[IEEE80211_BAND_2GHZ]), | |
| 366 | + memcpy(&(rtlmac->bands[NL80211_BAND_2GHZ]), | |
| 367 | 367 | &rtl_band_2ghz, |
| 368 | 368 | sizeof(struct ieee80211_supported_band)); |
| 369 | 369 | |
| @@ -371,14 +371,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) · 1 unmodified line | ||
| 371 | 371 | _rtl_init_hw_ht_capab(hw, &sband->ht_cap); |
| 372 | 372 | |
| 373 | 373 | /* <4> set mac->sband to wiphy->sband */ |
| 374 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband; | |
| 374 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = sband; | |
| 375 | 375 | } else if (rtlhal->current_bandtype == BAND_ON_5G) { |
| 376 | 376 | /* <1> use mac->bands as mem for hw->wiphy->bands */ |
| 377 | − sband = &(rtlmac->bands[IEEE80211_BAND_5GHZ]); | |
| 377 | + sband = &(rtlmac->bands[NL80211_BAND_5GHZ]); | |
| 378 | 378 | |
| 379 | − /* <2> set hw->wiphy->bands[IEEE80211_BAND_5GHZ] | |
| 379 | + /* <2> set hw->wiphy->bands[NL80211_BAND_5GHZ] | |
| 380 | 380 | * to default value(1T1R) */ |
| 381 | − memcpy(&(rtlmac->bands[IEEE80211_BAND_5GHZ]), | |
| 381 | + memcpy(&(rtlmac->bands[NL80211_BAND_5GHZ]), | |
| 382 | 382 | &rtl_band_5ghz, |
| 383 | 383 | sizeof(struct ieee80211_supported_band)); |
| 384 | 384 | |
| @@ -387,7 +387,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) · 2 unmodified lines | ||
| 387 | 387 | |
| 388 | 388 | _rtl_init_hw_vht_capab(hw, &sband->vht_cap); |
| 389 | 389 | /* <4> set mac->sband to wiphy->sband */ |
| 390 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband; | |
| 390 | + hw->wiphy->bands[NL80211_BAND_5GHZ] = sband; | |
| 391 | 391 | } else { |
| 392 | 392 | RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n", |
| 393 | 393 | rtlhal->current_bandtype); |
| @@ -861,7 +861,7 @@ static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw, · 467 unmodified lines | ||
| 861 | 861 | |
| 862 | 862 | /* mac80211's rate_idx is like this: |
| 863 | 863 | * |
| 864 | − * 2.4G band:rx_status->band == IEEE80211_BAND_2GHZ | |
| 864 | + * 2.4G band:rx_status->band == NL80211_BAND_2GHZ | |
| 865 | 865 | * |
| 866 | 866 | * B/G rate: |
| 867 | 867 | * (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 | ||
| 871 | 871 | * (rx_status->flag & RX_FLAG_HT) = 1, |
| 872 | 872 | * DESC_RATEMCS0-->DESC_RATEMCS15 ==> idx is 0-->15 |
| 873 | 873 | * |
| 874 | − * 5G band:rx_status->band == IEEE80211_BAND_5GHZ | |
| 874 | + * 5G band:rx_status->band == NL80211_BAND_5GHZ | |
| 875 | 875 | * A rate: |
| 876 | 876 | * (rx_status->flag & RX_FLAG_HT) = 0, |
| 877 | 877 | * 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 | ||
| 958 | 958 | return rate_idx; |
| 959 | 959 | } |
| 960 | 960 | if (false == isht) { |
| 961 | − if (IEEE80211_BAND_2GHZ == hw->conf.chandef.chan->band) { | |
| 961 | + if (NL80211_BAND_2GHZ == hw->conf.chandef.chan->band) { | |
| 962 | 962 | switch (desc_rate) { |
| 963 | 963 | case DESC_RATE1M: |
| 964 | 964 | rate_idx = 0; |
| @@ -154,13 +154,13 @@ static bool _rtl_is_radar_freq(u16 center_freq) · 153 unmodified lines | ||
| 154 | 154 | static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, |
| 155 | 155 | enum nl80211_reg_initiator initiator) |
| 156 | 156 | { |
| 157 | − enum ieee80211_band band; | |
| 157 | + enum nl80211_band band; | |
| 158 | 158 | struct ieee80211_supported_band *sband; |
| 159 | 159 | const struct ieee80211_reg_rule *reg_rule; |
| 160 | 160 | struct ieee80211_channel *ch; |
| 161 | 161 | unsigned int i; |
| 162 | 162 | |
| 163 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 163 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 164 | 164 | |
| 165 | 165 | if (!wiphy->bands[band]) |
| 166 | 166 | continue; |
| @@ -210,9 +210,9 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, · 43 unmodified lines | ||
| 210 | 210 | struct ieee80211_channel *ch; |
| 211 | 211 | const struct ieee80211_reg_rule *reg_rule; |
| 212 | 212 | |
| 213 | − if (!wiphy->bands[IEEE80211_BAND_2GHZ]) | |
| 213 | + if (!wiphy->bands[NL80211_BAND_2GHZ]) | |
| 214 | 214 | return; |
| 215 | − sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 215 | + sband = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 216 | 216 | |
| 217 | 217 | /* |
| 218 | 218 | *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 | ||
| 262 | 262 | struct ieee80211_channel *ch; |
| 263 | 263 | unsigned int i; |
| 264 | 264 | |
| 265 | − if (!wiphy->bands[IEEE80211_BAND_5GHZ]) | |
| 265 | + if (!wiphy->bands[NL80211_BAND_5GHZ]) | |
| 266 | 266 | return; |
| 267 | 267 | |
| 268 | − sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 268 | + sband = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 269 | 269 | |
| 270 | 270 | for (i = 0; i < sband->n_channels; i++) { |
| 271 | 271 | ch = &sband->channels[i]; |
| @@ -301,12 +301,12 @@ static void _rtl_reg_apply_world_flags(struct wiphy *wiphy, · 29 unmodified lines | ||
| 301 | 301 | |
| 302 | 302 | static void _rtl_dump_channel_map(struct wiphy *wiphy) |
| 303 | 303 | { |
| 304 | − enum ieee80211_band band; | |
| 304 | + enum nl80211_band band; | |
| 305 | 305 | struct ieee80211_supported_band *sband; |
| 306 | 306 | struct ieee80211_channel *ch; |
| 307 | 307 | unsigned int i; |
| 308 | 308 | |
| 309 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 309 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 310 | 310 | if (!wiphy->bands[band]) |
| 311 | 311 | continue; |
| 312 | 312 | sband = wiphy->bands[band]; |
| @@ -1359,7 +1359,7 @@ struct rtl_mac { · 1358 unmodified lines | ||
| 1359 | 1359 | u32 tx_ss_num; |
| 1360 | 1360 | u32 rx_ss_num; |
| 1361 | 1361 | |
| 1362 | − struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | |
| 1362 | + struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; | |
| 1363 | 1363 | struct ieee80211_hw *hw; |
| 1364 | 1364 | struct ieee80211_vif *vif; |
| 1365 | 1365 | enum nl80211_iftype opmode; |
| @@ -1291,7 +1291,7 @@ static int set_channel(struct usbnet *usbdev, int channel) · 1290 unmodified lines | ||
| 1291 | 1291 | return 0; |
| 1292 | 1292 | |
| 1293 | 1293 | dsconfig = 1000 * |
| 1294 | − ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); | |
| 1294 | + ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ); | |
| 1295 | 1295 | |
| 1296 | 1296 | len = sizeof(config); |
| 1297 | 1297 | ret = rndis_query_oid(usbdev, |
| @@ -3476,7 +3476,7 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) · 2178 unmodified lines | ||
| 3476 | 3476 | priv->band.n_channels = ARRAY_SIZE(rndis_channels); |
| 3477 | 3477 | priv->band.bitrates = priv->rates; |
| 3478 | 3478 | priv->band.n_bitrates = ARRAY_SIZE(rndis_rates); |
| 3479 | − wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | |
| 3479 | + wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; | |
| 3480 | 3480 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; |
| 3481 | 3481 | |
| 3482 | 3482 | memcpy(priv->cipher_suites, rndis_cipher_suites, |
| @@ -20,84 +20,84 @@ · 19 unmodified lines | ||
| 20 | 20 | #include "rsi_common.h" |
| 21 | 21 | |
| 22 | 22 | static const struct ieee80211_channel rsi_2ghz_channels[] = { |
| 23 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412, | |
| 23 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2412, | |
| 24 | 24 | .hw_value = 1 }, /* Channel 1 */ |
| 25 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, | |
| 25 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2417, | |
| 26 | 26 | .hw_value = 2 }, /* Channel 2 */ |
| 27 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, | |
| 27 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2422, | |
| 28 | 28 | .hw_value = 3 }, /* Channel 3 */ |
| 29 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, | |
| 29 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2427, | |
| 30 | 30 | .hw_value = 4 }, /* Channel 4 */ |
| 31 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, | |
| 31 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2432, | |
| 32 | 32 | .hw_value = 5 }, /* Channel 5 */ |
| 33 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, | |
| 33 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2437, | |
| 34 | 34 | .hw_value = 6 }, /* Channel 6 */ |
| 35 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, | |
| 35 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2442, | |
| 36 | 36 | .hw_value = 7 }, /* Channel 7 */ |
| 37 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, | |
| 37 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2447, | |
| 38 | 38 | .hw_value = 8 }, /* Channel 8 */ |
| 39 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, | |
| 39 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2452, | |
| 40 | 40 | .hw_value = 9 }, /* Channel 9 */ |
| 41 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, | |
| 41 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2457, | |
| 42 | 42 | .hw_value = 10 }, /* Channel 10 */ |
| 43 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, | |
| 43 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2462, | |
| 44 | 44 | .hw_value = 11 }, /* Channel 11 */ |
| 45 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, | |
| 45 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2467, | |
| 46 | 46 | .hw_value = 12 }, /* Channel 12 */ |
| 47 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, | |
| 47 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2472, | |
| 48 | 48 | .hw_value = 13 }, /* Channel 13 */ |
| 49 | − { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, | |
| 49 | + { .band = NL80211_BAND_2GHZ, .center_freq = 2484, | |
| 50 | 50 | .hw_value = 14 }, /* Channel 14 */ |
| 51 | 51 | }; |
| 52 | 52 | |
| 53 | 53 | static const struct ieee80211_channel rsi_5ghz_channels[] = { |
| 54 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5180, | |
| 54 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5180, | |
| 55 | 55 | .hw_value = 36, }, /* Channel 36 */ |
| 56 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5200, | |
| 56 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5200, | |
| 57 | 57 | .hw_value = 40, }, /* Channel 40 */ |
| 58 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5220, | |
| 58 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5220, | |
| 59 | 59 | .hw_value = 44, }, /* Channel 44 */ |
| 60 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5240, | |
| 60 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5240, | |
| 61 | 61 | .hw_value = 48, }, /* Channel 48 */ |
| 62 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5260, | |
| 62 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5260, | |
| 63 | 63 | .hw_value = 52, }, /* Channel 52 */ |
| 64 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5280, | |
| 64 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5280, | |
| 65 | 65 | .hw_value = 56, }, /* Channel 56 */ |
| 66 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5300, | |
| 66 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5300, | |
| 67 | 67 | .hw_value = 60, }, /* Channel 60 */ |
| 68 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5320, | |
| 68 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5320, | |
| 69 | 69 | .hw_value = 64, }, /* Channel 64 */ |
| 70 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5500, | |
| 70 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5500, | |
| 71 | 71 | .hw_value = 100, }, /* Channel 100 */ |
| 72 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5520, | |
| 72 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5520, | |
| 73 | 73 | .hw_value = 104, }, /* Channel 104 */ |
| 74 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5540, | |
| 74 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5540, | |
| 75 | 75 | .hw_value = 108, }, /* Channel 108 */ |
| 76 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5560, | |
| 76 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5560, | |
| 77 | 77 | .hw_value = 112, }, /* Channel 112 */ |
| 78 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5580, | |
| 78 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5580, | |
| 79 | 79 | .hw_value = 116, }, /* Channel 116 */ |
| 80 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5600, | |
| 80 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5600, | |
| 81 | 81 | .hw_value = 120, }, /* Channel 120 */ |
| 82 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5620, | |
| 82 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5620, | |
| 83 | 83 | .hw_value = 124, }, /* Channel 124 */ |
| 84 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5640, | |
| 84 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5640, | |
| 85 | 85 | .hw_value = 128, }, /* Channel 128 */ |
| 86 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5660, | |
| 86 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5660, | |
| 87 | 87 | .hw_value = 132, }, /* Channel 132 */ |
| 88 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5680, | |
| 88 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5680, | |
| 89 | 89 | .hw_value = 136, }, /* Channel 136 */ |
| 90 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5700, | |
| 90 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5700, | |
| 91 | 91 | .hw_value = 140, }, /* Channel 140 */ |
| 92 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5745, | |
| 92 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5745, | |
| 93 | 93 | .hw_value = 149, }, /* Channel 149 */ |
| 94 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5765, | |
| 94 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5765, | |
| 95 | 95 | .hw_value = 153, }, /* Channel 153 */ |
| 96 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5785, | |
| 96 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5785, | |
| 97 | 97 | .hw_value = 157, }, /* Channel 157 */ |
| 98 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5805, | |
| 98 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5805, | |
| 99 | 99 | .hw_value = 161, }, /* Channel 161 */ |
| 100 | − { .band = IEEE80211_BAND_5GHZ, .center_freq = 5825, | |
| 100 | + { .band = NL80211_BAND_5GHZ, .center_freq = 5825, | |
| 101 | 101 | .hw_value = 165, }, /* Channel 165 */ |
| 102 | 102 | }; |
| 103 | 103 | |
| @@ -150,12 +150,12 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band) · 46 unmodified lines | ||
| 150 | 150 | struct ieee80211_supported_band *sbands = &adapter->sbands[band]; |
| 151 | 151 | void *channels = NULL; |
| 152 | 152 | |
| 153 | − if (band == IEEE80211_BAND_2GHZ) { | |
| 153 | + if (band == NL80211_BAND_2GHZ) { | |
| 154 | 154 | channels = kmalloc(sizeof(rsi_2ghz_channels), GFP_KERNEL); |
| 155 | 155 | memcpy(channels, |
| 156 | 156 | rsi_2ghz_channels, |
| 157 | 157 | sizeof(rsi_2ghz_channels)); |
| 158 | − sbands->band = IEEE80211_BAND_2GHZ; | |
| 158 | + sbands->band = NL80211_BAND_2GHZ; | |
| 159 | 159 | sbands->n_channels = ARRAY_SIZE(rsi_2ghz_channels); |
| 160 | 160 | sbands->bitrates = rsi_rates; |
| 161 | 161 | 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 | ||
| 164 | 164 | memcpy(channels, |
| 165 | 165 | rsi_5ghz_channels, |
| 166 | 166 | sizeof(rsi_5ghz_channels)); |
| 167 | − sbands->band = IEEE80211_BAND_5GHZ; | |
| 167 | + sbands->band = NL80211_BAND_5GHZ; | |
| 168 | 168 | sbands->n_channels = ARRAY_SIZE(rsi_5ghz_channels); |
| 169 | 169 | sbands->bitrates = &rsi_rates[4]; |
| 170 | 170 | 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 | ||
| 775 | 775 | { |
| 776 | 776 | struct rsi_hw *adapter = hw->priv; |
| 777 | 777 | 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; | |
| 779 | 779 | |
| 780 | 780 | mutex_lock(&common->mutex); |
| 781 | 781 | common->fixedrate_mask[band] = 0; |
| @@ -999,8 +999,8 @@ static int rsi_mac80211_sta_remove(struct ieee80211_hw *hw, · 217 unmodified lines | ||
| 999 | 999 | |
| 1000 | 1000 | mutex_lock(&common->mutex); |
| 1001 | 1001 | /* 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; | |
| 1004 | 1004 | common->min_rate = 0xffff; |
| 1005 | 1005 | common->vif_info[0].is_ht = false; |
| 1006 | 1006 | common->vif_info[0].sgi = false; |
| @@ -1070,8 +1070,8 @@ int rsi_mac80211_attach(struct rsi_common *common) · 63 unmodified lines | ||
| 1070 | 1070 | hw->max_rate_tries = MAX_RETRIES; |
| 1071 | 1071 | |
| 1072 | 1072 | 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); | |
| 1075 | 1075 | hw->rate_control_algorithm = "AARF"; |
| 1076 | 1076 | |
| 1077 | 1077 | SET_IEEE80211_PERM_ADDR(hw, common->mac_addr); |
| @@ -1087,10 +1087,10 @@ int rsi_mac80211_attach(struct rsi_common *common) · 9 unmodified lines | ||
| 1087 | 1087 | |
| 1088 | 1088 | wiphy->available_antennas_rx = 1; |
| 1089 | 1089 | 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]; | |
| 1094 | 1094 | |
| 1095 | 1095 | status = ieee80211_register_hw(hw); |
| 1096 | 1096 | if (status) |
| @@ -210,7 +210,7 @@ static u16 mcs[] = {13, 26, 39, 52, 78, 104, 117, 130}; · 209 unmodified lines | ||
| 210 | 210 | */ |
| 211 | 211 | static void rsi_set_default_parameters(struct rsi_common *common) |
| 212 | 212 | { |
| 213 | − common->band = IEEE80211_BAND_2GHZ; | |
| 213 | + common->band = NL80211_BAND_2GHZ; | |
| 214 | 214 | common->channel_width = BW_20MHZ; |
| 215 | 215 | common->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; |
| 216 | 216 | common->channel = 1; |
| @@ -655,7 +655,7 @@ int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode) · 438 unmodified lines | ||
| 655 | 655 | vap_caps->rts_threshold = cpu_to_le16(common->rts_threshold); |
| 656 | 656 | vap_caps->default_mgmt_rate = cpu_to_le32(RSI_RATE_6); |
| 657 | 657 | |
| 658 | − if (common->band == IEEE80211_BAND_5GHZ) { | |
| 658 | + if (common->band == NL80211_BAND_5GHZ) { | |
| 659 | 659 | vap_caps->default_ctrl_rate = cpu_to_le32(RSI_RATE_6); |
| 660 | 660 | if (conf_is_ht40(&common->priv->hw->conf)) { |
| 661 | 661 | vap_caps->default_ctrl_rate |= |
| @@ -872,7 +872,7 @@ int rsi_band_check(struct rsi_common *common) · 210 unmodified lines | ||
| 872 | 872 | else |
| 873 | 873 | common->channel_width = BW_40MHZ; |
| 874 | 874 | |
| 875 | − if (common->band == IEEE80211_BAND_2GHZ) { | |
| 875 | + if (common->band == NL80211_BAND_2GHZ) { | |
| 876 | 876 | if (common->channel_width) |
| 877 | 877 | common->endpoint = EP_2GHZ_40MHZ; |
| 878 | 878 | else |
| @@ -1046,7 +1046,7 @@ static int rsi_send_auto_rate_request(struct rsi_common *common) · 167 unmodified lines | ||
| 1046 | 1046 | if (common->channel_width == BW_40MHZ) |
| 1047 | 1047 | auto_rate->desc_word[7] |= cpu_to_le16(1); |
| 1048 | 1048 | |
| 1049 | − if (band == IEEE80211_BAND_2GHZ) { | |
| 1049 | + if (band == NL80211_BAND_2GHZ) { | |
| 1050 | 1050 | min_rate = RSI_RATE_1; |
| 1051 | 1051 | rate_table_offset = 0; |
| 1052 | 1052 | } else { |
| @@ -184,7 +184,7 @@ int rsi_send_mgmt_pkt(struct rsi_common *common, · 183 unmodified lines | ||
| 184 | 184 | if (wh->addr1[0] & BIT(0)) |
| 185 | 185 | msg[3] |= cpu_to_le16(RSI_BROADCAST_PKT); |
| 186 | 186 | |
| 187 | − if (common->band == IEEE80211_BAND_2GHZ) | |
| 187 | + if (common->band == NL80211_BAND_2GHZ) | |
| 188 | 188 | msg[4] = cpu_to_le16(RSI_11B_MODE); |
| 189 | 189 | else |
| 190 | 190 | msg[4] = cpu_to_le16((RSI_RATE_6 & 0x0f) | RSI_11G_MODE); |
| @@ -211,7 +211,7 @@ struct rsi_hw { · 210 unmodified lines | ||
| 211 | 211 | struct ieee80211_hw *hw; |
| 212 | 212 | struct ieee80211_vif *vifs[RSI_MAX_VIFS]; |
| 213 | 213 | 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]; | |
| 215 | 215 | |
| 216 | 216 | struct device *device; |
| 217 | 217 | u8 sc_nvifs; |
| @@ -102,7 +102,7 @@ static struct ieee80211_rate cw1200_mcs_rates[] = { · 101 unmodified lines | ||
| 102 | 102 | |
| 103 | 103 | |
| 104 | 104 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 105 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 105 | + .band = NL80211_BAND_2GHZ, \ | |
| 106 | 106 | .center_freq = (_freq), \ |
| 107 | 107 | .hw_value = (_channel), \ |
| 108 | 108 | .flags = (_flags), \ |
| @@ -111,7 +111,7 @@ static struct ieee80211_rate cw1200_mcs_rates[] = { · 2 unmodified lines | ||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | #define CHAN5G(_channel, _flags) { \ |
| 114 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 114 | + .band = NL80211_BAND_5GHZ, \ | |
| 115 | 115 | .center_freq = 5000 + (5 * (_channel)), \ |
| 116 | 116 | .hw_value = (_channel), \ |
| 117 | 117 | .flags = (_flags), \ |
| @@ -311,12 +311,12 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, · 193 unmodified lines | ||
| 311 | 311 | |
| 312 | 312 | hw->sta_data_size = sizeof(struct cw1200_sta_priv); |
| 313 | 313 | |
| 314 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &cw1200_band_2ghz; | |
| 314 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = &cw1200_band_2ghz; | |
| 315 | 315 | if (have_5ghz) |
| 316 | − hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &cw1200_band_5ghz; | |
| 316 | + hw->wiphy->bands[NL80211_BAND_5GHZ] = &cw1200_band_5ghz; | |
| 317 | 317 | |
| 318 | 318 | /* 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++) { | |
| 320 | 320 | struct ieee80211_supported_band *sband = hw->wiphy->bands[band]; |
| 321 | 321 | if (!sband) |
| 322 | 322 | continue; |
| @@ -402,7 +402,7 @@ void cw1200_probe_work(struct work_struct *work) · 401 unmodified lines | ||
| 402 | 402 | } |
| 403 | 403 | wsm = (struct wsm_tx *)frame.skb->data; |
| 404 | 404 | 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) ? | |
| 406 | 406 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; |
| 407 | 407 | if (priv->join_status == CW1200_JOIN_STATUS_STA || |
| 408 | 408 | priv->join_status == CW1200_JOIN_STATUS_IBSS) { |
| @@ -1278,7 +1278,7 @@ static void cw1200_do_join(struct cw1200_common *priv) · 1277 unmodified lines | ||
| 1278 | 1278 | join.dtim_period = priv->join_dtim_period; |
| 1279 | 1279 | |
| 1280 | 1280 | 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) ? | |
| 1282 | 1282 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; |
| 1283 | 1283 | |
| 1284 | 1284 | memcpy(join.bssid, bssid, sizeof(join.bssid)); |
| @@ -1462,7 +1462,7 @@ int cw1200_enable_listening(struct cw1200_common *priv) · 177 unmodified lines | ||
| 1462 | 1462 | }; |
| 1463 | 1463 | |
| 1464 | 1464 | if (priv->channel) { |
| 1465 | − start.band = priv->channel->band == IEEE80211_BAND_5GHZ ? | |
| 1465 | + start.band = priv->channel->band == NL80211_BAND_5GHZ ? | |
| 1466 | 1466 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; |
| 1467 | 1467 | start.channel_number = priv->channel->hw_value; |
| 1468 | 1468 | } else { |
| @@ -2315,7 +2315,7 @@ static int cw1200_start_ap(struct cw1200_common *priv) · 846 unmodified lines | ||
| 2315 | 2315 | struct wsm_start start = { |
| 2316 | 2316 | .mode = priv->vif->p2p ? |
| 2317 | 2317 | 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) ? | |
| 2319 | 2319 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G, |
| 2320 | 2320 | .channel_number = priv->channel->hw_value, |
| 2321 | 2321 | .beacon_interval = conf->beacon_int, |
| @@ -1079,7 +1079,7 @@ void cw1200_rx_cb(struct cw1200_common *priv, · 1078 unmodified lines | ||
| 1079 | 1079 | |
| 1080 | 1080 | hdr->band = ((arg->channel_number & 0xff00) || |
| 1081 | 1081 | (arg->channel_number > 14)) ? |
| 1082 | − IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; | |
| 1082 | + NL80211_BAND_5GHZ : NL80211_BAND_2GHZ; | |
| 1083 | 1083 | hdr->freq = ieee80211_channel_to_frequency( |
| 1084 | 1084 | arg->channel_number, |
| 1085 | 1085 | hdr->band); |
| @@ -849,9 +849,9 @@ static int wsm_startup_indication(struct cw1200_common *priv, · 848 unmodified lines | ||
| 849 | 849 | |
| 850 | 850 | /* Disable unsupported frequency bands */ |
| 851 | 851 | 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; | |
| 853 | 853 | 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; | |
| 855 | 855 | |
| 856 | 856 | priv->firmware_ready = 1; |
| 857 | 857 | wake_up(&priv->wsm_startup_done); |
| @@ -1482,7 +1482,7 @@ int wl1251_init_ieee80211(struct wl1251 *wl) · 1481 unmodified lines | ||
| 1482 | 1482 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
| 1483 | 1483 | BIT(NL80211_IFTYPE_ADHOC); |
| 1484 | 1484 | 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; | |
| 1486 | 1486 | |
| 1487 | 1487 | wl->hw->queues = 4; |
| 1488 | 1488 | |
| @@ -53,7 +53,7 @@ static void wl1251_rx_status(struct wl1251 *wl, · 52 unmodified lines | ||
| 53 | 53 | |
| 54 | 54 | memset(status, 0, sizeof(struct ieee80211_rx_status)); |
| 55 | 55 | |
| 56 | − status->band = IEEE80211_BAND_2GHZ; | |
| 56 | + status->band = NL80211_BAND_2GHZ; | |
| 57 | 57 | status->mactime = desc->timestamp; |
| 58 | 58 | |
| 59 | 59 | /* |
| @@ -469,8 +469,8 @@ static const u8 wl12xx_rate_to_idx_5ghz[] = { · 468 unmodified lines | ||
| 469 | 469 | }; |
| 470 | 470 | |
| 471 | 471 | 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 | |
| 474 | 474 | }; |
| 475 | 475 | |
| 476 | 476 | enum wl12xx_hw_rates { |
| @@ -1827,8 +1827,8 @@ static int wl12xx_setup(struct wl1271 *wl) · 1350 unmodified lines | ||
| 1827 | 1827 | wl->fw_status_priv_len = 0; |
| 1828 | 1828 | wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); |
| 1829 | 1829 | 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); | |
| 1832 | 1832 | wl12xx_conf_init(wl); |
| 1833 | 1833 | |
| 1834 | 1834 | if (!fref_param) { |
| @@ -27,7 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | static int wl1271_get_scan_channels(struct wl1271 *wl, |
| 28 | 28 | struct cfg80211_scan_request *req, |
| 29 | 29 | struct basic_scan_channel_params *channels, |
| 30 | − enum ieee80211_band band, bool passive) | |
| 30 | + enum nl80211_band band, bool passive) | |
| 31 | 31 | { |
| 32 | 32 | struct conf_scan_settings *c = &wl->conf.scan; |
| 33 | 33 | int i, j; |
| @@ -92,7 +92,7 @@ static int wl1271_get_scan_channels(struct wl1271 *wl, · 58 unmodified lines | ||
| 92 | 92 | #define WL1271_NOTHING_TO_SCAN 1 |
| 93 | 93 | |
| 94 | 94 | static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 95 | − enum ieee80211_band band, | |
| 95 | + enum nl80211_band band, | |
| 96 | 96 | bool passive, u32 basic_rate) |
| 97 | 97 | { |
| 98 | 98 | 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 | ||
| 144 | 144 | cmd->params.tid_trigger = CONF_TX_AC_ANY_TID; |
| 145 | 145 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; |
| 146 | 146 | |
| 147 | − if (band == IEEE80211_BAND_2GHZ) | |
| 147 | + if (band == NL80211_BAND_2GHZ) | |
| 148 | 148 | cmd->params.band = WL1271_SCAN_BAND_2_4_GHZ; |
| 149 | 149 | else |
| 150 | 150 | cmd->params.band = WL1271_SCAN_BAND_5_GHZ; |
| @@ -218,7 +218,7 @@ out: · 67 unmodified lines | ||
| 218 | 218 | void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
| 219 | 219 | { |
| 220 | 220 | int ret = 0; |
| 221 | − enum ieee80211_band band; | |
| 221 | + enum nl80211_band band; | |
| 222 | 222 | u32 rate, mask; |
| 223 | 223 | |
| 224 | 224 | switch (wl->scan.state) { |
| @@ -226,7 +226,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 1 unmodified line | ||
| 226 | 226 | break; |
| 227 | 227 | |
| 228 | 228 | case WL1271_SCAN_STATE_2GHZ_ACTIVE: |
| 229 | − band = IEEE80211_BAND_2GHZ; | |
| 229 | + band = NL80211_BAND_2GHZ; | |
| 230 | 230 | mask = wlvif->bitrate_masks[band]; |
| 231 | 231 | if (wl->scan.req->no_cck) { |
| 232 | 232 | mask &= ~CONF_TX_CCK_RATES; |
| @@ -243,7 +243,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 10 unmodified lines | ||
| 243 | 243 | break; |
| 244 | 244 | |
| 245 | 245 | case WL1271_SCAN_STATE_2GHZ_PASSIVE: |
| 246 | − band = IEEE80211_BAND_2GHZ; | |
| 246 | + band = NL80211_BAND_2GHZ; | |
| 247 | 247 | mask = wlvif->bitrate_masks[band]; |
| 248 | 248 | if (wl->scan.req->no_cck) { |
| 249 | 249 | mask &= ~CONF_TX_CCK_RATES; |
| @@ -263,7 +263,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 13 unmodified lines | ||
| 263 | 263 | break; |
| 264 | 264 | |
| 265 | 265 | case WL1271_SCAN_STATE_5GHZ_ACTIVE: |
| 266 | − band = IEEE80211_BAND_5GHZ; | |
| 266 | + band = NL80211_BAND_5GHZ; | |
| 267 | 267 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); |
| 268 | 268 | ret = wl1271_scan_send(wl, wlvif, band, false, rate); |
| 269 | 269 | if (ret == WL1271_NOTHING_TO_SCAN) { |
| @@ -274,7 +274,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 4 unmodified lines | ||
| 274 | 274 | break; |
| 275 | 275 | |
| 276 | 276 | case WL1271_SCAN_STATE_5GHZ_PASSIVE: |
| 277 | − band = IEEE80211_BAND_5GHZ; | |
| 277 | + band = NL80211_BAND_5GHZ; | |
| 278 | 278 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); |
| 279 | 279 | ret = wl1271_scan_send(wl, wlvif, band, true, rate); |
| 280 | 280 | if (ret == WL1271_NOTHING_TO_SCAN) { |
| @@ -378,7 +378,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, · 97 unmodified lines | ||
| 378 | 378 | wl12xx_adjust_channels(cfg, cfg_channels); |
| 379 | 379 | |
| 380 | 380 | if (!force_passive && cfg->active[0]) { |
| 381 | − u8 band = IEEE80211_BAND_2GHZ; | |
| 381 | + u8 band = NL80211_BAND_2GHZ; | |
| 382 | 382 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 383 | 383 | wlvif->role_id, band, |
| 384 | 384 | req->ssids[0].ssid, |
| @@ -395,7 +395,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, · 10 unmodified lines | ||
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | if (!force_passive && cfg->active[1]) { |
| 398 | − u8 band = IEEE80211_BAND_5GHZ; | |
| 398 | + u8 band = NL80211_BAND_5GHZ; | |
| 399 | 399 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 400 | 400 | wlvif->role_id, band, |
| 401 | 401 | req->ssids[0].ssid, |
| @@ -48,10 +48,10 @@ int wl18xx_cmd_channel_switch(struct wl1271 *wl, · 47 unmodified lines | ||
| 48 | 48 | cmd->stop_tx = ch_switch->block_tx; |
| 49 | 49 | |
| 50 | 50 | switch (ch_switch->chandef.chan->band) { |
| 51 | − case IEEE80211_BAND_2GHZ: | |
| 51 | + case NL80211_BAND_2GHZ: | |
| 52 | 52 | cmd->band = WLCORE_BAND_2_4GHZ; |
| 53 | 53 | break; |
| 54 | − case IEEE80211_BAND_5GHZ: | |
| 54 | + case NL80211_BAND_5GHZ: | |
| 55 | 55 | cmd->band = WLCORE_BAND_5GHZ; |
| 56 | 56 | break; |
| 57 | 57 | default: |
| @@ -187,7 +187,7 @@ int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start) · 129 unmodified lines | ||
| 187 | 187 | |
| 188 | 188 | cmd->role_id = wlvif->role_id; |
| 189 | 189 | cmd->channel = wlvif->channel; |
| 190 | − if (wlvif->band == IEEE80211_BAND_5GHZ) | |
| 190 | + if (wlvif->band == NL80211_BAND_5GHZ) | |
| 191 | 191 | cmd->band = WLCORE_BAND_5GHZ; |
| 192 | 192 | cmd->bandwidth = wlcore_get_native_channel_type(wlvif->channel_type); |
| 193 | 193 | |
| @@ -64,13 +64,13 @@ static int wlcore_smart_config_sync_event(struct wl1271 *wl, u8 sync_channel, · 63 unmodified lines | ||
| 64 | 64 | u8 sync_band) |
| 65 | 65 | { |
| 66 | 66 | struct sk_buff *skb; |
| 67 | − enum ieee80211_band band; | |
| 67 | + enum nl80211_band band; | |
| 68 | 68 | int freq; |
| 69 | 69 | |
| 70 | 70 | if (sync_band == WLCORE_BAND_5GHZ) |
| 71 | − band = IEEE80211_BAND_5GHZ; | |
| 71 | + band = NL80211_BAND_5GHZ; | |
| 72 | 72 | else |
| 73 | − band = IEEE80211_BAND_2GHZ; | |
| 73 | + band = NL80211_BAND_2GHZ; | |
| 74 | 74 | |
| 75 | 75 | freq = ieee80211_channel_to_frequency(sync_channel, band); |
| 76 | 76 | |
| @@ -137,8 +137,8 @@ static const u8 wl18xx_rate_to_idx_5ghz[] = { · 136 unmodified lines | ||
| 137 | 137 | }; |
| 138 | 138 | |
| 139 | 139 | 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 | |
| 142 | 142 | }; |
| 143 | 143 | |
| 144 | 144 | enum wl18xx_hw_rates { |
| @@ -1302,12 +1302,12 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, · 1157 unmodified lines | ||
| 1302 | 1302 | wl1271_debug(DEBUG_ACX, "using wide channel rate mask"); |
| 1303 | 1303 | |
| 1304 | 1304 | /* 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)) | |
| 1306 | 1306 | return 0; |
| 1307 | 1307 | |
| 1308 | 1308 | return CONF_TX_RATE_USE_WIDE_CHAN; |
| 1309 | 1309 | } else if (wl18xx_is_mimo_supported(wl) && |
| 1310 | − wlvif->band == IEEE80211_BAND_2GHZ) { | |
| 1310 | + wlvif->band == NL80211_BAND_2GHZ) { | |
| 1311 | 1311 | wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); |
| 1312 | 1312 | /* |
| 1313 | 1313 | * 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 | ||
| 1996 | 1996 | * siso40. |
| 1997 | 1997 | */ |
| 1998 | 1998 | if (wl18xx_is_mimo_supported(wl)) |
| 1999 | − wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, | |
| 1999 | + wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ, | |
| 2000 | 2000 | &wl18xx_mimo_ht_cap_2ghz); |
| 2001 | 2001 | else |
| 2002 | − wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, | |
| 2002 | + wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ, | |
| 2003 | 2003 | &wl18xx_siso40_ht_cap_2ghz); |
| 2004 | 2004 | |
| 2005 | 2005 | /* 5Ghz is always wide */ |
| 2006 | − wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | |
| 2006 | + wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ, | |
| 2007 | 2007 | &wl18xx_siso40_ht_cap_5ghz); |
| 2008 | 2008 | } 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, | |
| 2010 | 2010 | &wl18xx_siso40_ht_cap_2ghz); |
| 2011 | − wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | |
| 2011 | + wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ, | |
| 2012 | 2012 | &wl18xx_siso40_ht_cap_5ghz); |
| 2013 | 2013 | } 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, | |
| 2015 | 2015 | &wl18xx_siso20_ht_cap); |
| 2016 | − wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | |
| 2016 | + wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ, | |
| 2017 | 2017 | &wl18xx_siso20_ht_cap); |
| 2018 | 2018 | } |
| 2019 | 2019 | |
| @@ -110,7 +110,7 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 109 unmodified lines | ||
| 110 | 110 | |
| 111 | 111 | /* TODO: per-band ies? */ |
| 112 | 112 | if (cmd->active[0]) { |
| 113 | − u8 band = IEEE80211_BAND_2GHZ; | |
| 113 | + u8 band = NL80211_BAND_2GHZ; | |
| 114 | 114 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 115 | 115 | cmd->role_id, band, |
| 116 | 116 | 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 | ||
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | if (cmd->active[1] || cmd->dfs) { |
| 130 | − u8 band = IEEE80211_BAND_5GHZ; | |
| 130 | + u8 band = NL80211_BAND_5GHZ; | |
| 131 | 131 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 132 | 132 | cmd->role_id, band, |
| 133 | 133 | req->ssids ? req->ssids[0].ssid : NULL, |
| @@ -253,7 +253,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, · 119 unmodified lines | ||
| 253 | 253 | cmd->terminate_on_report = 0; |
| 254 | 254 | |
| 255 | 255 | if (cmd->active[0]) { |
| 256 | − u8 band = IEEE80211_BAND_2GHZ; | |
| 256 | + u8 band = NL80211_BAND_2GHZ; | |
| 257 | 257 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 258 | 258 | cmd->role_id, band, |
| 259 | 259 | req->ssids ? req->ssids[0].ssid : NULL, |
| @@ -270,7 +270,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, · 10 unmodified lines | ||
| 270 | 270 | } |
| 271 | 271 | |
| 272 | 272 | if (cmd->active[1] || cmd->dfs) { |
| 273 | − u8 band = IEEE80211_BAND_5GHZ; | |
| 273 | + u8 band = NL80211_BAND_5GHZ; | |
| 274 | 274 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 275 | 275 | cmd->role_id, band, |
| 276 | 276 | req->ssids ? req->ssids[0].ssid : NULL, |
| @@ -43,7 +43,7 @@ void wl18xx_get_last_tx_rate(struct wl1271 *wl, struct ieee80211_vif *vif, · 42 unmodified lines | ||
| 43 | 43 | |
| 44 | 44 | if (fw_rate <= CONF_HW_RATE_INDEX_54MBPS) { |
| 45 | 45 | rate->idx = fw_rate; |
| 46 | − if (band == IEEE80211_BAND_5GHZ) | |
| 46 | + if (band == NL80211_BAND_5GHZ) | |
| 47 | 47 | rate->idx -= CONF_HW_RATE_INDEX_6MBPS; |
| 48 | 48 | rate->flags = 0; |
| 49 | 49 | } else { |
| @@ -423,7 +423,7 @@ EXPORT_SYMBOL_GPL(wlcore_get_native_channel_type); · 422 unmodified lines | ||
| 423 | 423 | |
| 424 | 424 | static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, |
| 425 | 425 | struct wl12xx_vif *wlvif, |
| 426 | − enum ieee80211_band band, | |
| 426 | + enum nl80211_band band, | |
| 427 | 427 | int channel) |
| 428 | 428 | { |
| 429 | 429 | struct wl12xx_cmd_role_start *cmd; |
| @@ -438,7 +438,7 @@ static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, · 8 unmodified lines | ||
| 438 | 438 | wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id); |
| 439 | 439 | |
| 440 | 440 | cmd->role_id = wlvif->dev_role_id; |
| 441 | − if (band == IEEE80211_BAND_5GHZ) | |
| 441 | + if (band == NL80211_BAND_5GHZ) | |
| 442 | 442 | cmd->band = WLCORE_BAND_5GHZ; |
| 443 | 443 | cmd->channel = channel; |
| 444 | 444 | |
| @@ -524,7 +524,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 79 unmodified lines | ||
| 524 | 524 | wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id); |
| 525 | 525 | |
| 526 | 526 | cmd->role_id = wlvif->role_id; |
| 527 | − if (wlvif->band == IEEE80211_BAND_5GHZ) | |
| 527 | + if (wlvif->band == NL80211_BAND_5GHZ) | |
| 528 | 528 | cmd->band = WLCORE_BAND_5GHZ; |
| 529 | 529 | cmd->channel = wlvif->channel; |
| 530 | 530 | 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 | ||
| 693 | 693 | cmd->ap.local_rates = cpu_to_le32(supported_rates); |
| 694 | 694 | |
| 695 | 695 | switch (wlvif->band) { |
| 696 | − case IEEE80211_BAND_2GHZ: | |
| 696 | + case NL80211_BAND_2GHZ: | |
| 697 | 697 | cmd->band = WLCORE_BAND_2_4GHZ; |
| 698 | 698 | break; |
| 699 | − case IEEE80211_BAND_5GHZ: | |
| 699 | + case NL80211_BAND_5GHZ: | |
| 700 | 700 | cmd->band = WLCORE_BAND_5GHZ; |
| 701 | 701 | break; |
| 702 | 702 | default: |
| @@ -773,7 +773,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif) · 70 unmodified lines | ||
| 773 | 773 | wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id); |
| 774 | 774 | |
| 775 | 775 | cmd->role_id = wlvif->role_id; |
| 776 | − if (wlvif->band == IEEE80211_BAND_5GHZ) | |
| 776 | + if (wlvif->band == NL80211_BAND_5GHZ) | |
| 777 | 777 | cmd->band = WLCORE_BAND_5GHZ; |
| 778 | 778 | cmd->channel = wlvif->channel; |
| 779 | 779 | 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 | ||
| 1164 | 1164 | } |
| 1165 | 1165 | |
| 1166 | 1166 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); |
| 1167 | − if (band == IEEE80211_BAND_2GHZ) | |
| 1167 | + if (band == NL80211_BAND_2GHZ) | |
| 1168 | 1168 | ret = wl1271_cmd_template_set(wl, role_id, |
| 1169 | 1169 | template_id_2_4, |
| 1170 | 1170 | 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 | ||
| 1195 | 1195 | wl1271_debug(DEBUG_SCAN, "set ap probe request template"); |
| 1196 | 1196 | |
| 1197 | 1197 | 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) | |
| 1199 | 1199 | ret = wl1271_cmd_template_set(wl, wlvif->role_id, |
| 1200 | 1200 | CMD_TEMPL_CFG_PROBE_REQ_2_4, |
| 1201 | 1201 | skb->data, skb->len, 0, rate); |
| @@ -1628,19 +1628,19 @@ out: · 426 unmodified lines | ||
| 1628 | 1628 | return ret; |
| 1629 | 1629 | } |
| 1630 | 1630 | |
| 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) | |
| 1632 | 1632 | { |
| 1633 | 1633 | /* |
| 1634 | 1634 | * map the given band/channel to the respective predefined |
| 1635 | 1635 | * bit expected by the fw |
| 1636 | 1636 | */ |
| 1637 | 1637 | switch (band) { |
| 1638 | − case IEEE80211_BAND_2GHZ: | |
| 1638 | + case NL80211_BAND_2GHZ: | |
| 1639 | 1639 | /* channels 1..14 are mapped to 0..13 */ |
| 1640 | 1640 | if (ch >= 1 && ch <= 14) |
| 1641 | 1641 | return ch - 1; |
| 1642 | 1642 | break; |
| 1643 | − case IEEE80211_BAND_5GHZ: | |
| 1643 | + case NL80211_BAND_5GHZ: | |
| 1644 | 1644 | switch (ch) { |
| 1645 | 1645 | case 8 ... 16: |
| 1646 | 1646 | /* 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 | ||
| 1670 | 1670 | } |
| 1671 | 1671 | |
| 1672 | 1672 | void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, |
| 1673 | − enum ieee80211_band band) | |
| 1673 | + enum nl80211_band band) | |
| 1674 | 1674 | { |
| 1675 | 1675 | int ch_bit_idx = 0; |
| 1676 | 1676 | |
| @@ -1699,7 +1699,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) · 22 unmodified lines | ||
| 1699 | 1699 | |
| 1700 | 1700 | memset(tmp_ch_bitmap, 0, sizeof(tmp_ch_bitmap)); |
| 1701 | 1701 | |
| 1702 | − for (b = IEEE80211_BAND_2GHZ; b <= IEEE80211_BAND_5GHZ; b++) { | |
| 1702 | + for (b = NL80211_BAND_2GHZ; b <= NL80211_BAND_5GHZ; b++) { | |
| 1703 | 1703 | band = wiphy->bands[b]; |
| 1704 | 1704 | for (i = 0; i < band->n_channels; i++) { |
| 1705 | 1705 | struct ieee80211_channel *channel = &band->channels[i]; |
| @@ -1851,7 +1851,7 @@ out: · 145 unmodified lines | ||
| 1851 | 1851 | } |
| 1852 | 1852 | |
| 1853 | 1853 | 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) | |
| 1855 | 1855 | { |
| 1856 | 1856 | struct wl12xx_cmd_roc *cmd; |
| 1857 | 1857 | int ret = 0; |
| @@ -1870,10 +1870,10 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 12 unmodified lines | ||
| 1870 | 1870 | cmd->role_id = role_id; |
| 1871 | 1871 | cmd->channel = channel; |
| 1872 | 1872 | switch (band) { |
| 1873 | − case IEEE80211_BAND_2GHZ: | |
| 1873 | + case NL80211_BAND_2GHZ: | |
| 1874 | 1874 | cmd->band = WLCORE_BAND_2_4GHZ; |
| 1875 | 1875 | break; |
| 1876 | − case IEEE80211_BAND_5GHZ: | |
| 1876 | + case NL80211_BAND_5GHZ: | |
| 1877 | 1877 | cmd->band = WLCORE_BAND_5GHZ; |
| 1878 | 1878 | break; |
| 1879 | 1879 | default: |
| @@ -1925,7 +1925,7 @@ out: · 45 unmodified lines | ||
| 1925 | 1925 | } |
| 1926 | 1926 | |
| 1927 | 1927 | 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) | |
| 1929 | 1929 | { |
| 1930 | 1930 | int ret = 0; |
| 1931 | 1931 | |
| @@ -1995,7 +1995,7 @@ out: · 63 unmodified lines | ||
| 1995 | 1995 | |
| 1996 | 1996 | /* start dev role and roc on its channel */ |
| 1997 | 1997 | 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) | |
| 1999 | 1999 | { |
| 2000 | 2000 | int ret; |
| 2001 | 2001 | |
| @@ -40,7 +40,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); · 39 unmodified lines | ||
| 40 | 40 | int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 41 | 41 | int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 42 | 42 | 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); | |
| 44 | 44 | int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 45 | 45 | int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); |
| 46 | 46 | 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 | ||
| 83 | 83 | int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 84 | 84 | u8 hlid); |
| 85 | 85 | 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); | |
| 87 | 87 | int wl12xx_croc(struct wl1271 *wl, u8 role_id); |
| 88 | 88 | int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 89 | 89 | struct ieee80211_sta *sta, u8 hlid); |
| 90 | 90 | int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 91 | 91 | u8 hlid); |
| 92 | 92 | void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, |
| 93 | − enum ieee80211_band band); | |
| 93 | + enum nl80211_band band); | |
| 94 | 94 | int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl); |
| 95 | 95 | int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 96 | 96 | u8 feature, u8 enable, u8 value); |
| @@ -1930,7 +1930,7 @@ static void wlcore_op_stop_locked(struct wl1271 *wl) · 1929 unmodified lines | ||
| 1930 | 1930 | if (test_and_clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags)) |
| 1931 | 1931 | wlcore_enable_interrupts(wl); |
| 1932 | 1932 | |
| 1933 | − wl->band = IEEE80211_BAND_2GHZ; | |
| 1933 | + wl->band = NL80211_BAND_2GHZ; | |
| 1934 | 1934 | |
| 1935 | 1935 | wl->rx_counter = 0; |
| 1936 | 1936 | 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 | ||
| 2240 | 2240 | wlvif->rate_set = CONF_TX_ENABLED_RATES; |
| 2241 | 2241 | } |
| 2242 | 2242 | |
| 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; | |
| 2245 | 2245 | wlvif->beacon_int = WL1271_DEFAULT_BEACON_INT; |
| 2246 | 2246 | |
| 2247 | 2247 | /* |
| @@ -2330,7 +2330,7 @@ power_off: · 82 unmodified lines | ||
| 2330 | 2330 | * 11a channels if not supported |
| 2331 | 2331 | */ |
| 2332 | 2332 | if (!wl->enable_11a) |
| 2333 | − wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels = 0; | |
| 2333 | + wiphy->bands[NL80211_BAND_5GHZ]->n_channels = 0; | |
| 2334 | 2334 | |
| 2335 | 2335 | wl1271_debug(DEBUG_MAC80211, "11a is %ssupported", |
| 2336 | 2336 | wl->enable_11a ? "" : "not "); |
| @@ -5871,7 +5871,7 @@ static const struct ieee80211_ops wl1271_ops = { · 3534 unmodified lines | ||
| 5871 | 5871 | }; |
| 5872 | 5872 | |
| 5873 | 5873 | |
| 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) | |
| 5875 | 5875 | { |
| 5876 | 5876 | u8 idx; |
| 5877 | 5877 | |
| @@ -6096,21 +6096,21 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) · 218 unmodified lines | ||
| 6096 | 6096 | * We keep local copies of the band structs because we need to |
| 6097 | 6097 | * modify them on a per-device basis. |
| 6098 | 6098 | */ |
| 6099 | − memcpy(&wl->bands[IEEE80211_BAND_2GHZ], &wl1271_band_2ghz, | |
| 6099 | + memcpy(&wl->bands[NL80211_BAND_2GHZ], &wl1271_band_2ghz, | |
| 6100 | 6100 | 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], | |
| 6103 | 6103 | sizeof(*wl->ht_cap)); |
| 6104 | − memcpy(&wl->bands[IEEE80211_BAND_5GHZ], &wl1271_band_5ghz, | |
| 6104 | + memcpy(&wl->bands[NL80211_BAND_5GHZ], &wl1271_band_5ghz, | |
| 6105 | 6105 | 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], | |
| 6108 | 6108 | sizeof(*wl->ht_cap)); |
| 6109 | 6109 | |
| 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]; | |
| 6114 | 6114 | |
| 6115 | 6115 | /* |
| 6116 | 6116 | * 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 | ||
| 6205 | 6205 | wl->channel = 0; |
| 6206 | 6206 | wl->rx_counter = 0; |
| 6207 | 6207 | wl->power_level = WL1271_DEFAULT_POWER_LEVEL; |
| 6208 | − wl->band = IEEE80211_BAND_2GHZ; | |
| 6208 | + wl->band = NL80211_BAND_2GHZ; | |
| 6209 | 6209 | wl->channel_type = NL80211_CHAN_NO_HT; |
| 6210 | 6210 | wl->flags = 0; |
| 6211 | 6211 | wl->sg_enabled = true; |
| @@ -202,7 +202,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 201 unmodified lines | ||
| 202 | 202 | * enable beacon early termination. |
| 203 | 203 | * Not relevant for 5GHz and for high rates. |
| 204 | 204 | */ |
| 205 | − if ((wlvif->band == IEEE80211_BAND_2GHZ) && | |
| 205 | + if ((wlvif->band == NL80211_BAND_2GHZ) && | |
| 206 | 206 | (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { |
| 207 | 207 | ret = wl1271_acx_bet_enable(wl, wlvif, true); |
| 208 | 208 | if (ret < 0) |
| @@ -213,7 +213,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 4 unmodified lines | ||
| 213 | 213 | wl1271_debug(DEBUG_PSM, "leaving psm"); |
| 214 | 214 | |
| 215 | 215 | /* disable beacon early termination */ |
| 216 | − if ((wlvif->band == IEEE80211_BAND_2GHZ) && | |
| 216 | + if ((wlvif->band == NL80211_BAND_2GHZ) && | |
| 217 | 217 | (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { |
| 218 | 218 | ret = wl1271_acx_bet_enable(wl, wlvif, false); |
| 219 | 219 | if (ret < 0) |
| @@ -64,9 +64,9 @@ static void wl1271_rx_status(struct wl1271 *wl, · 63 unmodified lines | ||
| 64 | 64 | memset(status, 0, sizeof(struct ieee80211_rx_status)); |
| 65 | 65 | |
| 66 | 66 | 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; | |
| 68 | 68 | else |
| 69 | − status->band = IEEE80211_BAND_5GHZ; | |
| 69 | + status->band = NL80211_BAND_5GHZ; | |
| 70 | 70 | |
| 71 | 71 | status->rate_idx = wlcore_rate_to_idx(wl, desc->rate, status->band); |
| 72 | 72 | |
| @@ -146,7 +146,7 @@ struct wl1271_rx_descriptor { · 145 unmodified lines | ||
| 146 | 146 | } __packed; |
| 147 | 147 | |
| 148 | 148 | 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); | |
| 150 | 150 | int wl1271_rx_filter_enable(struct wl1271 *wl, |
| 151 | 151 | int index, bool enable, |
| 152 | 152 | struct wl12xx_rx_filter *filter); |
| @@ -164,7 +164,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, · 163 unmodified lines | ||
| 164 | 164 | struct conf_sched_scan_settings *c = &wl->conf.sched_scan; |
| 165 | 165 | u32 delta_per_probe; |
| 166 | 166 | |
| 167 | − if (band == IEEE80211_BAND_5GHZ) | |
| 167 | + if (band == NL80211_BAND_5GHZ) | |
| 168 | 168 | delta_per_probe = c->dwell_time_delta_per_probe_5; |
| 169 | 169 | else |
| 170 | 170 | delta_per_probe = c->dwell_time_delta_per_probe; |
| @@ -215,7 +215,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, · 44 unmodified lines | ||
| 215 | 215 | channels[j].channel = req_channels[i]->hw_value; |
| 216 | 216 | |
| 217 | 217 | if (n_pactive_ch && |
| 218 | − (band == IEEE80211_BAND_2GHZ) && | |
| 218 | + (band == NL80211_BAND_2GHZ) && | |
| 219 | 219 | (channels[j].channel >= 12) && |
| 220 | 220 | (channels[j].channel <= 14) && |
| 221 | 221 | (flags & IEEE80211_CHAN_NO_IR) && |
| @@ -266,7 +266,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 44 unmodified lines | ||
| 266 | 266 | n_channels, |
| 267 | 267 | n_ssids, |
| 268 | 268 | cfg->channels_2, |
| 269 | − IEEE80211_BAND_2GHZ, | |
| 269 | + NL80211_BAND_2GHZ, | |
| 270 | 270 | false, true, 0, |
| 271 | 271 | MAX_CHANNELS_2GHZ, |
| 272 | 272 | &n_pactive_ch, |
| @@ -277,7 +277,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 4 unmodified lines | ||
| 277 | 277 | n_channels, |
| 278 | 278 | n_ssids, |
| 279 | 279 | cfg->channels_2, |
| 280 | − IEEE80211_BAND_2GHZ, | |
| 280 | + NL80211_BAND_2GHZ, | |
| 281 | 281 | false, false, |
| 282 | 282 | cfg->passive[0], |
| 283 | 283 | MAX_CHANNELS_2GHZ, |
| @@ -289,7 +289,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 5 unmodified lines | ||
| 289 | 289 | n_channels, |
| 290 | 290 | n_ssids, |
| 291 | 291 | cfg->channels_5, |
| 292 | − IEEE80211_BAND_5GHZ, | |
| 292 | + NL80211_BAND_5GHZ, | |
| 293 | 293 | false, true, 0, |
| 294 | 294 | wl->max_channels_5, |
| 295 | 295 | &n_pactive_ch, |
| @@ -300,7 +300,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 4 unmodified lines | ||
| 300 | 300 | n_channels, |
| 301 | 301 | n_ssids, |
| 302 | 302 | cfg->channels_5, |
| 303 | − IEEE80211_BAND_5GHZ, | |
| 303 | + NL80211_BAND_5GHZ, | |
| 304 | 304 | true, true, |
| 305 | 305 | cfg->passive[1], |
| 306 | 306 | wl->max_channels_5, |
| @@ -312,7 +312,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, · 5 unmodified lines | ||
| 312 | 312 | n_channels, |
| 313 | 313 | n_ssids, |
| 314 | 314 | cfg->channels_5, |
| 315 | − IEEE80211_BAND_5GHZ, | |
| 315 | + NL80211_BAND_5GHZ, | |
| 316 | 316 | false, false, |
| 317 | 317 | cfg->passive[1] + cfg->dfs, |
| 318 | 318 | wl->max_channels_5, |
| @@ -453,7 +453,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 452 unmodified lines | ||
| 453 | 453 | } |
| 454 | 454 | |
| 455 | 455 | u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, |
| 456 | − enum ieee80211_band rate_band) | |
| 456 | + enum nl80211_band rate_band) | |
| 457 | 457 | { |
| 458 | 458 | struct ieee80211_supported_band *band; |
| 459 | 459 | u32 enabled_rates = 0; |
| @@ -246,9 +246,9 @@ int wlcore_tx_complete(struct wl1271 *wl); · 245 unmodified lines | ||
| 246 | 246 | void wl12xx_tx_reset_wlvif(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 247 | 247 | void wl12xx_tx_reset(struct wl1271 *wl); |
| 248 | 248 | 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); | |
| 250 | 250 | u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, |
| 251 | − enum ieee80211_band rate_band); | |
| 251 | + enum nl80211_band rate_band); | |
| 252 | 252 | u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set); |
| 253 | 253 | u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 254 | 254 | struct sk_buff *skb, struct ieee80211_sta *sta); |
| @@ -342,7 +342,7 @@ struct wl1271 { · 341 unmodified lines | ||
| 342 | 342 | struct wl12xx_vif *sched_vif; |
| 343 | 343 | |
| 344 | 344 | /* The current band */ |
| 345 | − enum ieee80211_band band; | |
| 345 | + enum nl80211_band band; | |
| 346 | 346 | |
| 347 | 347 | struct completion *elp_compl; |
| 348 | 348 | struct delayed_work elp_work; |
| @@ -517,7 +517,7 @@ void wlcore_update_inconn_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif, · 168 unmodified lines | ||
| 517 | 517 | struct wl1271_station *wl_sta, bool in_conn); |
| 518 | 518 | |
| 519 | 519 | 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, | |
| 521 | 521 | struct ieee80211_sta_ht_cap *ht_cap) |
| 522 | 522 | { |
| 523 | 523 | memcpy(&wl->ht_cap[band], ht_cap, sizeof(*ht_cap)); |
| @@ -392,7 +392,7 @@ struct wl12xx_vif { · 391 unmodified lines | ||
| 392 | 392 | u8 ssid_len; |
| 393 | 393 | |
| 394 | 394 | /* The current band */ |
| 395 | − enum ieee80211_band band; | |
| 395 | + enum nl80211_band band; | |
| 396 | 396 | int channel; |
| 397 | 397 | enum nl80211_channel_type channel_type; |
| 398 | 398 | |
| @@ -1454,7 +1454,7 @@ static int wl3501_get_freq(struct net_device *dev, struct iw_request_info *info, · 1453 unmodified lines | ||
| 1454 | 1454 | struct wl3501_card *this = netdev_priv(dev); |
| 1455 | 1455 | |
| 1456 | 1456 | wrqu->freq.m = 100000 * |
| 1457 | − ieee80211_channel_to_frequency(this->chan, IEEE80211_BAND_2GHZ); | |
| 1457 | + ieee80211_channel_to_frequency(this->chan, NL80211_BAND_2GHZ); | |
| 1458 | 1458 | wrqu->freq.e = 1; |
| 1459 | 1459 | return 0; |
| 1460 | 1460 | } |
| @@ -1068,7 +1068,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length) · 1067 unmodified lines | ||
| 1068 | 1068 | } |
| 1069 | 1069 | |
| 1070 | 1070 | 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; | |
| 1072 | 1072 | stats.signal = zd_check_signal(hw, status->signal_strength); |
| 1073 | 1073 | |
| 1074 | 1074 | rate = zd_rx_rate(buffer, status); |
| @@ -1395,7 +1395,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) · 320 unmodified lines | ||
| 1395 | 1395 | mac->band.n_channels = ARRAY_SIZE(zd_channels); |
| 1396 | 1396 | mac->band.channels = mac->channels; |
| 1397 | 1397 | |
| 1398 | − hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &mac->band; | |
| 1398 | + hw->wiphy->bands[NL80211_BAND_2GHZ] = &mac->band; | |
| 1399 | 1399 | |
| 1400 | 1400 | ieee80211_hw_set(hw, MFP_CAPABLE); |
| 1401 | 1401 | ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); |
| @@ -2113,10 +2113,10 @@ static int on_action_public23a(struct rtw_adapter *padapter, · 2112 unmodified lines | ||
| 2113 | 2113 | |
| 2114 | 2114 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 2115 | 2115 | freq = ieee80211_channel_to_frequency(channel, |
| 2116 | − IEEE80211_BAND_2GHZ); | |
| 2116 | + NL80211_BAND_2GHZ); | |
| 2117 | 2117 | else |
| 2118 | 2118 | freq = ieee80211_channel_to_frequency(channel, |
| 2119 | − IEEE80211_BAND_5GHZ); | |
| 2119 | + NL80211_BAND_5GHZ); | |
| 2120 | 2120 | |
| 2121 | 2121 | if (cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pframe, |
| 2122 | 2122 | skb->len, 0)) |
| @@ -266,7 +266,7 @@ join_res: · 265 unmodified lines | ||
| 266 | 266 | |
| 267 | 267 | /* Represent channel details, subset of ieee80211_channel */ |
| 268 | 268 | struct rtw_ieee80211_channel { |
| 269 | − /* enum ieee80211_band band; */ | |
| 269 | + /* enum nl80211_band band; */ | |
| 270 | 270 | /* u16 center_freq; */ |
| 271 | 271 | u16 hw_value; |
| 272 | 272 | u32 flags; |
| @@ -39,7 +39,7 @@ static const u32 rtw_cipher_suites[] = { · 38 unmodified lines | ||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 42 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 42 | + .band = NL80211_BAND_2GHZ, \ | |
| 43 | 43 | .center_freq = (_freq), \ |
| 44 | 44 | .hw_value = (_channel), \ |
| 45 | 45 | .flags = (_flags), \ |
| @@ -48,7 +48,7 @@ static const u32 rtw_cipher_suites[] = { · 2 unmodified lines | ||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | #define CHAN5G(_channel, _flags) { \ |
| 51 | − .band = IEEE80211_BAND_5GHZ, \ | |
| 51 | + .band = NL80211_BAND_5GHZ, \ | |
| 52 | 52 | .center_freq = 5000 + (5 * (_channel)), \ |
| 53 | 53 | .hw_value = (_channel), \ |
| 54 | 54 | .flags = (_flags), \ |
| @@ -143,15 +143,15 @@ static void rtw_5g_rates_init(struct ieee80211_rate *rates) · 88 unmodified lines | ||
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | static struct ieee80211_supported_band * |
| 146 | −rtw_spt_band_alloc(enum ieee80211_band band) | |
| 146 | +rtw_spt_band_alloc(enum nl80211_band band) | |
| 147 | 147 | { |
| 148 | 148 | struct ieee80211_supported_band *spt_band = NULL; |
| 149 | 149 | int n_channels, n_bitrates; |
| 150 | 150 | |
| 151 | − if (band == IEEE80211_BAND_2GHZ) { | |
| 151 | + if (band == NL80211_BAND_2GHZ) { | |
| 152 | 152 | n_channels = RTW_2G_CHANNELS_NUM; |
| 153 | 153 | n_bitrates = RTW_G_RATES_NUM; |
| 154 | − } else if (band == IEEE80211_BAND_5GHZ) { | |
| 154 | + } else if (band == NL80211_BAND_5GHZ) { | |
| 155 | 155 | n_channels = RTW_5G_CHANNELS_NUM; |
| 156 | 156 | n_bitrates = RTW_A_RATES_NUM; |
| 157 | 157 | } else { |
| @@ -176,10 +176,10 @@ rtw_spt_band_alloc(enum ieee80211_band band) · 18 unmodified lines | ||
| 176 | 176 | spt_band->n_channels = n_channels; |
| 177 | 177 | spt_band->n_bitrates = n_bitrates; |
| 178 | 178 | |
| 179 | − if (band == IEEE80211_BAND_2GHZ) { | |
| 179 | + if (band == NL80211_BAND_2GHZ) { | |
| 180 | 180 | rtw_2g_channels_init(spt_band->channels); |
| 181 | 181 | rtw_2g_rates_init(spt_band->bitrates); |
| 182 | − } else if (band == IEEE80211_BAND_5GHZ) { | |
| 182 | + } else if (band == NL80211_BAND_5GHZ) { | |
| 183 | 183 | rtw_5g_channels_init(spt_band->channels); |
| 184 | 184 | rtw_5g_rates_init(spt_band->bitrates); |
| 185 | 185 | } |
| @@ -257,10 +257,10 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, · 71 unmodified lines | ||
| 257 | 257 | channel = pnetwork->network.DSConfig; |
| 258 | 258 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 259 | 259 | freq = ieee80211_channel_to_frequency(channel, |
| 260 | − IEEE80211_BAND_2GHZ); | |
| 260 | + NL80211_BAND_2GHZ); | |
| 261 | 261 | else |
| 262 | 262 | freq = ieee80211_channel_to_frequency(channel, |
| 263 | − IEEE80211_BAND_5GHZ); | |
| 263 | + NL80211_BAND_5GHZ); | |
| 264 | 264 | |
| 265 | 265 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| 266 | 266 | |
| @@ -322,11 +322,11 @@ void rtw_cfg80211_indicate_connect(struct rtw_adapter *padapter) · 55 unmodified lines | ||
| 322 | 322 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 323 | 323 | freq = |
| 324 | 324 | ieee80211_channel_to_frequency(channel, |
| 325 | − IEEE80211_BAND_2GHZ); | |
| 325 | + NL80211_BAND_2GHZ); | |
| 326 | 326 | else |
| 327 | 327 | freq = |
| 328 | 328 | ieee80211_channel_to_frequency(channel, |
| 329 | − IEEE80211_BAND_5GHZ); | |
| 329 | + NL80211_BAND_5GHZ); | |
| 330 | 330 | |
| 331 | 331 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| 332 | 332 | |
| @@ -2360,10 +2360,10 @@ void rtw_cfg80211_indicate_sta_assoc(struct rtw_adapter *padapter, · 2027 unmodified lines | ||
| 2360 | 2360 | channel = pmlmeext->cur_channel; |
| 2361 | 2361 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 2362 | 2362 | freq = ieee80211_channel_to_frequency(channel, |
| 2363 | − IEEE80211_BAND_2GHZ); | |
| 2363 | + NL80211_BAND_2GHZ); | |
| 2364 | 2364 | else |
| 2365 | 2365 | freq = ieee80211_channel_to_frequency(channel, |
| 2366 | − IEEE80211_BAND_5GHZ); | |
| 2366 | + NL80211_BAND_5GHZ); | |
| 2367 | 2367 | |
| 2368 | 2368 | cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pmgmt_frame, frame_len, |
| 2369 | 2369 | 0); |
| @@ -2392,10 +2392,10 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, · 22 unmodified lines | ||
| 2392 | 2392 | channel = pmlmeext->cur_channel; |
| 2393 | 2393 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 2394 | 2394 | freq = ieee80211_channel_to_frequency(channel, |
| 2395 | − IEEE80211_BAND_2GHZ); | |
| 2395 | + NL80211_BAND_2GHZ); | |
| 2396 | 2396 | else |
| 2397 | 2397 | freq = ieee80211_channel_to_frequency(channel, |
| 2398 | − IEEE80211_BAND_5GHZ); | |
| 2398 | + NL80211_BAND_5GHZ); | |
| 2399 | 2399 | |
| 2400 | 2400 | mgmt.frame_control = |
| 2401 | 2401 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH); |
| @@ -3109,7 +3109,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = { · 707 unmodified lines | ||
| 3109 | 3109 | }; |
| 3110 | 3110 | |
| 3111 | 3111 | 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) | |
| 3113 | 3113 | { |
| 3114 | 3114 | |
| 3115 | 3115 | #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 | ||
| 3133 | 3133 | ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; |
| 3134 | 3134 | |
| 3135 | 3135 | /* |
| 3136 | − *hw->wiphy->bands[IEEE80211_BAND_2GHZ] | |
| 3136 | + *hw->wiphy->bands[NL80211_BAND_2GHZ] | |
| 3137 | 3137 | *base on ant_num |
| 3138 | 3138 | *rx_mask: RX mask |
| 3139 | 3139 | *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 | ||
| 3173 | 3173 | |
| 3174 | 3174 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */ |
| 3175 | 3175 | { |
| 3176 | − bands = wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 3176 | + bands = wiphy->bands[NL80211_BAND_2GHZ]; | |
| 3177 | 3177 | if (bands) |
| 3178 | 3178 | rtw_cfg80211_init_ht_capab(&bands->ht_cap, |
| 3179 | − IEEE80211_BAND_2GHZ, | |
| 3179 | + NL80211_BAND_2GHZ, | |
| 3180 | 3180 | rf_type); |
| 3181 | 3181 | } |
| 3182 | 3182 | |
| 3183 | 3183 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */ |
| 3184 | 3184 | { |
| 3185 | − bands = wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 3185 | + bands = wiphy->bands[NL80211_BAND_5GHZ]; | |
| 3186 | 3186 | if (bands) |
| 3187 | 3187 | rtw_cfg80211_init_ht_capab(&bands->ht_cap, |
| 3188 | − IEEE80211_BAND_5GHZ, | |
| 3188 | + NL80211_BAND_5GHZ, | |
| 3189 | 3189 | rf_type); |
| 3190 | 3190 | } |
| 3191 | 3191 | } |
| @@ -3224,11 +3224,11 @@ static void rtw_cfg80211_preinit_wiphy(struct rtw_adapter *padapter, · 32 unmodified lines | ||
| 3224 | 3224 | wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites); |
| 3225 | 3225 | |
| 3226 | 3226 | /* 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); | |
| 3229 | 3229 | /* 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); | |
| 3232 | 3232 | |
| 3233 | 3233 | wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; |
| 3234 | 3234 | 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 | ||
| 3313 | 3313 | if (!wdev) |
| 3314 | 3314 | return; |
| 3315 | 3315 | |
| 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]); | |
| 3318 | 3318 | |
| 3319 | 3319 | wiphy_free(wdev->wiphy); |
| 3320 | 3320 | |
| @@ -144,7 +144,7 @@ void vnt_init_bands(struct vnt_private *priv) · 143 unmodified lines | ||
| 144 | 144 | ch[i].flags = IEEE80211_CHAN_NO_HT40; |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | − priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | |
| 147 | + priv->hw->wiphy->bands[NL80211_BAND_5GHZ] = | |
| 148 | 148 | &vnt_supported_5ghz_band; |
| 149 | 149 | /* fallthrough */ |
| 150 | 150 | case RF_RFMD2959: |
| @@ -159,7 +159,7 @@ void vnt_init_bands(struct vnt_private *priv) · 8 unmodified lines | ||
| 159 | 159 | ch[i].flags = IEEE80211_CHAN_NO_HT40; |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | − priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | |
| 162 | + priv->hw->wiphy->bands[NL80211_BAND_2GHZ] = | |
| 163 | 163 | &vnt_supported_2ghz_band; |
| 164 | 164 | break; |
| 165 | 165 | } |
| @@ -812,7 +812,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, · 811 unmodified lines | ||
| 812 | 812 | else if (fb_option & FIFOCTL_AUTO_FB_1) |
| 813 | 813 | tx_rate = fallback_rate1[tx_rate][retry]; |
| 814 | 814 | |
| 815 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 815 | + if (info->band == NL80211_BAND_5GHZ) | |
| 816 | 816 | idx = tx_rate - RATE_6M; |
| 817 | 817 | else |
| 818 | 818 | idx = tx_rate; |
| @@ -1290,7 +1290,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) · 471 unmodified lines | ||
| 1290 | 1290 | (conf->flags & IEEE80211_CONF_OFFCHANNEL)) { |
| 1291 | 1291 | set_channel(priv, conf->chandef.chan); |
| 1292 | 1292 | |
| 1293 | − if (conf->chandef.chan->band == IEEE80211_BAND_5GHZ) | |
| 1293 | + if (conf->chandef.chan->band == NL80211_BAND_5GHZ) | |
| 1294 | 1294 | bb_type = BB_TYPE_11A; |
| 1295 | 1295 | else |
| 1296 | 1296 | bb_type = BB_TYPE_11G; |
| @@ -1307,7 +1307,7 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx, · 1306 unmodified lines | ||
| 1307 | 1307 | } |
| 1308 | 1308 | |
| 1309 | 1309 | if (current_rate > RATE_11M) { |
| 1310 | − if (info->band == IEEE80211_BAND_5GHZ) { | |
| 1310 | + if (info->band == NL80211_BAND_5GHZ) { | |
| 1311 | 1311 | pkt_type = PK_TYPE_11A; |
| 1312 | 1312 | } else { |
| 1313 | 1313 | if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) |
| @@ -153,7 +153,7 @@ void vnt_init_bands(struct vnt_private *priv) · 152 unmodified lines | ||
| 153 | 153 | ch[i].flags = IEEE80211_CHAN_NO_HT40; |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | − priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | |
| 156 | + priv->hw->wiphy->bands[NL80211_BAND_5GHZ] = | |
| 157 | 157 | &vnt_supported_5ghz_band; |
| 158 | 158 | /* fallthrough */ |
| 159 | 159 | case RF_AL2230: |
| @@ -167,7 +167,7 @@ void vnt_init_bands(struct vnt_private *priv) · 7 unmodified lines | ||
| 167 | 167 | ch[i].flags = IEEE80211_CHAN_NO_HT40; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | − priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | |
| 170 | + priv->hw->wiphy->bands[NL80211_BAND_2GHZ] = | |
| 171 | 171 | &vnt_supported_2ghz_band; |
| 172 | 172 | break; |
| 173 | 173 | } |
| @@ -97,7 +97,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, u8 pkt_no, u8 tsr) · 96 unmodified lines | ||
| 97 | 97 | else if (context->fb_option == AUTO_FB_1) |
| 98 | 98 | tx_rate = fallback_rate1[tx_rate][retry]; |
| 99 | 99 | |
| 100 | − if (info->band == IEEE80211_BAND_5GHZ) | |
| 100 | + if (info->band == NL80211_BAND_5GHZ) | |
| 101 | 101 | idx = tx_rate - RATE_6M; |
| 102 | 102 | else |
| 103 | 103 | idx = tx_rate; |
| @@ -662,7 +662,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) · 661 unmodified lines | ||
| 662 | 662 | (conf->flags & IEEE80211_CONF_OFFCHANNEL)) { |
| 663 | 663 | vnt_set_channel(priv, conf->chandef.chan->hw_value); |
| 664 | 664 | |
| 665 | − if (conf->chandef.chan->band == IEEE80211_BAND_5GHZ) | |
| 665 | + if (conf->chandef.chan->band == NL80211_BAND_5GHZ) | |
| 666 | 666 | bb_type = BB_TYPE_11A; |
| 667 | 667 | else |
| 668 | 668 | bb_type = BB_TYPE_11G; |
| @@ -813,7 +813,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) · 812 unmodified lines | ||
| 813 | 813 | } |
| 814 | 814 | |
| 815 | 815 | if (current_rate > RATE_11M) { |
| 816 | − if (info->band == IEEE80211_BAND_5GHZ) { | |
| 816 | + if (info->band == NL80211_BAND_5GHZ) { | |
| 817 | 817 | pkt_type = PK_TYPE_11A; |
| 818 | 818 | } else { |
| 819 | 819 | if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) |
| @@ -102,7 +102,7 @@ static u8 op_ifcs; · 101 unmodified lines | ||
| 102 | 102 | u8 wilc_initialized = 1; |
| 103 | 103 | |
| 104 | 104 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 105 | − .band = IEEE80211_BAND_2GHZ, \ | |
| 105 | + .band = NL80211_BAND_2GHZ, \ | |
| 106 | 106 | .center_freq = (_freq), \ |
| 107 | 107 | .hw_value = (_channel), \ |
| 108 | 108 | .flags = (_flags), \ |
| @@ -241,7 +241,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan) · 132 unmodified lines | ||
| 241 | 241 | struct ieee80211_channel *channel; |
| 242 | 242 | |
| 243 | 243 | 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); | |
| 245 | 245 | channel = ieee80211_get_channel(wiphy, freq); |
| 246 | 246 | |
| 247 | 247 | rssi = get_rssi_avg(network_info); |
| @@ -409,7 +409,7 @@ static void CfgScanResult(enum scan_event scan_event, · 161 unmodified lines | ||
| 409 | 409 | return; |
| 410 | 410 | |
| 411 | 411 | 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); | |
| 413 | 413 | channel = ieee80211_get_channel(wiphy, s32Freq); |
| 414 | 414 | |
| 415 | 415 | if (!channel) |
| @@ -1451,7 +1451,7 @@ void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size) · 1035 unmodified lines | ||
| 1451 | 1451 | return; |
| 1452 | 1452 | } |
| 1453 | 1453 | } else { |
| 1454 | − s32Freq = ieee80211_channel_to_frequency(curr_channel, IEEE80211_BAND_2GHZ); | |
| 1454 | + s32Freq = ieee80211_channel_to_frequency(curr_channel, NL80211_BAND_2GHZ); | |
| 1455 | 1455 | |
| 1456 | 1456 | if (ieee80211_is_action(buff[FRAME_TYPE_ID])) { |
| 1457 | 1457 | 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 | ||
| 2246 | 2246 | WILC_WFI_band_2ghz.ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_8K; |
| 2247 | 2247 | WILC_WFI_band_2ghz.ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE; |
| 2248 | 2248 | |
| 2249 | − wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &WILC_WFI_band_2ghz; | |
| 2249 | + wdev->wiphy->bands[NL80211_BAND_2GHZ] = &WILC_WFI_band_2ghz; | |
| 2250 | 2250 | |
| 2251 | 2251 | return wdev; |
| 2252 | 2252 | |
| @@ -415,7 +415,7 @@ static int prism2_scan(struct wiphy *wiphy, · 414 unmodified lines | ||
| 415 | 415 | ie_len = ie_buf[1] + 2; |
| 416 | 416 | memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len); |
| 417 | 417 | freq = ieee80211_channel_to_frequency(msg2.dschannel.data, |
| 418 | − IEEE80211_BAND_2GHZ); | |
| 418 | + NL80211_BAND_2GHZ); | |
| 419 | 419 | bss = cfg80211_inform_bss(wiphy, |
| 420 | 420 | ieee80211_get_channel(wiphy, freq), |
| 421 | 421 | CFG80211_BSS_FTYPE_UNKNOWN, |
| @@ -758,9 +758,9 @@ static struct wiphy *wlan_create_wiphy(struct device *dev, wlandevice_t *wlandev · 336 unmodified lines | ||
| 758 | 758 | priv->band.n_channels = ARRAY_SIZE(prism2_channels); |
| 759 | 759 | priv->band.bitrates = priv->rates; |
| 760 | 760 | priv->band.n_bitrates = ARRAY_SIZE(prism2_rates); |
| 761 | − priv->band.band = IEEE80211_BAND_2GHZ; | |
| 761 | + priv->band.band = NL80211_BAND_2GHZ; | |
| 762 | 762 | priv->band.ht_cap.ht_supported = false; |
| 763 | − wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; | |
| 763 | + wiphy->bands[NL80211_BAND_2GHZ] = &priv->band; | |
| 764 | 764 | |
| 765 | 765 | set_wiphy_dev(wiphy, dev); |
| 766 | 766 | wiphy->privid = prism2_wiphy_privid; |
| @@ -67,26 +67,6 @@ struct wiphy; · 66 unmodified lines | ||
| 67 | 67 | * wireless hardware capability structures |
| 68 | 68 | */ |
| 69 | 69 | |
| 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 | − | |
| 90 | 70 | /** |
| 91 | 71 | * enum ieee80211_channel_flags - channel flags |
| 92 | 72 | * |
| @@ -167,7 +147,7 @@ enum ieee80211_channel_flags { · 74 unmodified lines | ||
| 167 | 147 | * @dfs_cac_ms: DFS CAC time in milliseconds, this is valid for DFS channels. |
| 168 | 148 | */ |
| 169 | 149 | struct ieee80211_channel { |
| 170 | − enum ieee80211_band band; | |
| 150 | + enum nl80211_band band; | |
| 171 | 151 | u16 center_freq; |
| 172 | 152 | u16 hw_value; |
| 173 | 153 | u32 flags; |
| @@ -324,7 +304,7 @@ struct ieee80211_sta_vht_cap { · 150 unmodified lines | ||
| 324 | 304 | struct ieee80211_supported_band { |
| 325 | 305 | struct ieee80211_channel *channels; |
| 326 | 306 | struct ieee80211_rate *bitrates; |
| 327 | − enum ieee80211_band band; | |
| 307 | + enum nl80211_band band; | |
| 328 | 308 | int n_channels; |
| 329 | 309 | int n_bitrates; |
| 330 | 310 | struct ieee80211_sta_ht_cap ht_cap; |
| @@ -1370,7 +1350,7 @@ struct mesh_setup { · 1039 unmodified lines | ||
| 1370 | 1350 | bool user_mpm; |
| 1371 | 1351 | u8 dtim_period; |
| 1372 | 1352 | u16 beacon_interval; |
| 1373 | − int mcast_rate[IEEE80211_NUM_BANDS]; | |
| 1353 | + int mcast_rate[NUM_NL80211_BANDS]; | |
| 1374 | 1354 | u32 basic_rates; |
| 1375 | 1355 | }; |
| 1376 | 1356 | |
| @@ -1468,7 +1448,7 @@ struct cfg80211_scan_request { · 91 unmodified lines | ||
| 1468 | 1448 | size_t ie_len; |
| 1469 | 1449 | u32 flags; |
| 1470 | 1450 | |
| 1471 | − u32 rates[IEEE80211_NUM_BANDS]; | |
| 1451 | + u32 rates[NUM_NL80211_BANDS]; | |
| 1472 | 1452 | |
| 1473 | 1453 | struct wireless_dev *wdev; |
| 1474 | 1454 | |
| @@ -1750,7 +1730,12 @@ enum cfg80211_assoc_req_flags { · 275 unmodified lines | ||
| 1750 | 1730 | * @ie_len: Length of ie buffer in octets |
| 1751 | 1731 | * @use_mfp: Use management frame protection (IEEE 802.11w) in this association |
| 1752 | 1732 | * @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. | |
| 1754 | 1739 | * @flags: See &enum cfg80211_assoc_req_flags |
| 1755 | 1740 | * @ht_capa: HT Capabilities over-rides. Values set in ht_capa_mask |
| 1756 | 1741 | * will be used in ht_capa. Un-supported values will be ignored. |
| @@ -1855,7 +1840,7 @@ struct cfg80211_ibss_params { · 98 unmodified lines | ||
| 1855 | 1840 | bool privacy; |
| 1856 | 1841 | bool control_port; |
| 1857 | 1842 | bool userspace_handles_dfs; |
| 1858 | − int mcast_rate[IEEE80211_NUM_BANDS]; | |
| 1843 | + int mcast_rate[NUM_NL80211_BANDS]; | |
| 1859 | 1844 | struct ieee80211_ht_cap ht_capa; |
| 1860 | 1845 | struct ieee80211_ht_cap ht_capa_mask; |
| 1861 | 1846 | }; |
| @@ -1867,7 +1852,7 @@ struct cfg80211_ibss_params { · 5 unmodified lines | ||
| 1867 | 1852 | * @delta: value of RSSI level adjustment. |
| 1868 | 1853 | */ |
| 1869 | 1854 | struct cfg80211_bss_select_adjust { |
| 1870 | − enum ieee80211_band band; | |
| 1855 | + enum nl80211_band band; | |
| 1871 | 1856 | s8 delta; |
| 1872 | 1857 | }; |
| 1873 | 1858 | |
| @@ -1882,7 +1867,7 @@ struct cfg80211_bss_select_adjust { · 8 unmodified lines | ||
| 1882 | 1867 | struct cfg80211_bss_selection { |
| 1883 | 1868 | enum nl80211_bss_select_attr behaviour; |
| 1884 | 1869 | union { |
| 1885 | − enum ieee80211_band band_pref; | |
| 1870 | + enum nl80211_band band_pref; | |
| 1886 | 1871 | struct cfg80211_bss_select_adjust adjust; |
| 1887 | 1872 | } param; |
| 1888 | 1873 | }; |
| @@ -1925,7 +1910,12 @@ struct cfg80211_bss_selection { · 36 unmodified lines | ||
| 1925 | 1910 | * @pbss: if set, connect to a PCP instead of AP. Valid for DMG |
| 1926 | 1911 | * networks. |
| 1927 | 1912 | * @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. | |
| 1929 | 1919 | */ |
| 1930 | 1920 | struct cfg80211_connect_params { |
| 1931 | 1921 | struct ieee80211_channel *channel; |
| @@ -1980,7 +1970,7 @@ struct cfg80211_bitrate_mask { · 48 unmodified lines | ||
| 1980 | 1970 | u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN]; |
| 1981 | 1971 | u16 vht_mcs[NL80211_VHT_NSS_MAX]; |
| 1982 | 1972 | enum nl80211_txrate_gi gi; |
| 1983 | − } control[IEEE80211_NUM_BANDS]; | |
| 1973 | + } control[NUM_NL80211_BANDS]; | |
| 1984 | 1974 | }; |
| 1985 | 1975 | /** |
| 1986 | 1976 | * struct cfg80211_pmksa - PMK Security Association |
| @@ -2377,7 +2367,17 @@ struct cfg80211_qos_map { · 390 unmodified lines | ||
| 2377 | 2367 | * @connect: Connect to the ESS with the specified parameters. When connected, |
| 2378 | 2368 | * call cfg80211_connect_result() with status code %WLAN_STATUS_SUCCESS. |
| 2379 | 2369 | * 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(). | |
| 2381 | 2381 | * (invoked with the wireless_dev mutex held) |
| 2382 | 2382 | * @disconnect: Disconnect from the BSS/ESS. |
| 2383 | 2383 | * (invoked with the wireless_dev mutex held) |
| @@ -2657,7 +2657,7 @@ struct cfg80211_ops { · 273 unmodified lines | ||
| 2657 | 2657 | int (*leave_ibss)(struct wiphy *wiphy, struct net_device *dev); |
| 2658 | 2658 | |
| 2659 | 2659 | int (*set_mcast_rate)(struct wiphy *wiphy, struct net_device *dev, |
| 2660 | − int rate[IEEE80211_NUM_BANDS]); | |
| 2660 | + int rate[NUM_NL80211_BANDS]); | |
| 2661 | 2661 | |
| 2662 | 2662 | int (*set_wiphy_params)(struct wiphy *wiphy, u32 changed); |
| 2663 | 2663 | |
| @@ -3303,7 +3303,7 @@ struct wiphy { · 639 unmodified lines | ||
| 3303 | 3303 | * help determine whether you own this wiphy or not. */ |
| 3304 | 3304 | const void *privid; |
| 3305 | 3305 | |
| 3306 | − struct ieee80211_supported_band *bands[IEEE80211_NUM_BANDS]; | |
| 3306 | + struct ieee80211_supported_band *bands[NUM_NL80211_BANDS]; | |
| 3307 | 3307 | |
| 3308 | 3308 | /* Lets us get back the wiphy on the callback */ |
| 3309 | 3309 | void (*reg_notifier)(struct wiphy *wiphy, |
| @@ -3638,7 +3638,7 @@ static inline void *wdev_priv(struct wireless_dev *wdev) · 328 unmodified lines | ||
| 3638 | 3638 | * @band: band, necessary due to channel number overlap |
| 3639 | 3639 | * Return: The corresponding frequency (in MHz), or 0 if the conversion failed. |
| 3640 | 3640 | */ |
| 3641 | −int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band); | |
| 3641 | +int ieee80211_channel_to_frequency(int chan, enum nl80211_band band); | |
| 3642 | 3642 | |
| 3643 | 3643 | /** |
| 3644 | 3644 | * 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 | ||
| 5069 | 5069 | * Returns %true if the conversion was successful, %false otherwise. |
| 5070 | 5070 | */ |
| 5071 | 5071 | bool ieee80211_operating_class_to_band(u8 operating_class, |
| 5072 | − enum ieee80211_band *band); | |
| 5072 | + enum nl80211_band *band); | |
| 5073 | 5073 | |
| 5074 | 5074 | /** |
| 5075 | 5075 | * ieee80211_chandef_to_operating_class - convert chandef to operation class |
| @@ -549,7 +549,7 @@ struct ieee80211_bss_conf { · 548 unmodified lines | ||
| 549 | 549 | u8 sync_dtim_count; |
| 550 | 550 | u32 basic_rates; |
| 551 | 551 | struct ieee80211_rate *beacon_rate; |
| 552 | − int mcast_rate[IEEE80211_NUM_BANDS]; | |
| 552 | + int mcast_rate[NUM_NL80211_BANDS]; | |
| 553 | 553 | u16 ht_operation_mode; |
| 554 | 554 | s32 cqm_rssi_thold; |
| 555 | 555 | u32 cqm_rssi_hyst; |
| @@ -938,8 +938,8 @@ struct ieee80211_tx_info { · 382 unmodified lines | ||
| 938 | 938 | * @common_ie_len: length of the common_ies |
| 939 | 939 | */ |
| 940 | 940 | 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]; | |
| 943 | 943 | const u8 *common_ies; |
| 944 | 944 | size_t common_ie_len; |
| 945 | 945 | }; |
| @@ -1754,7 +1754,7 @@ struct ieee80211_sta_rates { · 808 unmodified lines | ||
| 1754 | 1754 | * @txq: per-TID data TX queues (if driver uses the TXQ abstraction) |
| 1755 | 1755 | */ |
| 1756 | 1756 | struct ieee80211_sta { |
| 1757 | − u32 supp_rates[IEEE80211_NUM_BANDS]; | |
| 1757 | + u32 supp_rates[NUM_NL80211_BANDS]; | |
| 1758 | 1758 | u8 addr[ETH_ALEN]; |
| 1759 | 1759 | u16 aid; |
| 1760 | 1760 | struct ieee80211_sta_ht_cap ht_cap; |
| @@ -4404,7 +4404,7 @@ __le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, · 2643 unmodified lines | ||
| 4404 | 4404 | */ |
| 4405 | 4405 | __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, |
| 4406 | 4406 | struct ieee80211_vif *vif, |
| 4407 | − enum ieee80211_band band, | |
| 4407 | + enum nl80211_band band, | |
| 4408 | 4408 | size_t frame_len, |
| 4409 | 4409 | struct ieee80211_rate *rate); |
| 4410 | 4410 | |
| @@ -5357,7 +5357,7 @@ struct rate_control_ops { · 946 unmodified lines | ||
| 5357 | 5357 | }; |
| 5358 | 5358 | |
| 5359 | 5359 | static inline int rate_supported(struct ieee80211_sta *sta, |
| 5360 | − enum ieee80211_band band, | |
| 5360 | + enum nl80211_band band, | |
| 5361 | 5361 | int index) |
| 5362 | 5362 | { |
| 5363 | 5363 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); |
| @@ -429,7 +429,11 @@ · 428 unmodified lines | ||
| 429 | 429 | * @NL80211_CMD_ASSOCIATE: association request and notification; like |
| 430 | 430 | * NL80211_CMD_AUTHENTICATE but for Association and Reassociation |
| 431 | 431 | * (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). | |
| 433 | 437 | * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like |
| 434 | 438 | * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to |
| 435 | 439 | * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication |
| @@ -479,6 +483,9 @@ · 43 unmodified lines | ||
| 479 | 483 | * set of BSSID,frequency parameters is used (i.e., either the enforcing |
| 480 | 484 | * %NL80211_ATTR_MAC,%NL80211_ATTR_WIPHY_FREQ or the less strict |
| 481 | 485 | * %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. | |
| 482 | 489 | * Background scan period can optionally be |
| 483 | 490 | * specified in %NL80211_ATTR_BG_SCAN_PERIOD, |
| 484 | 491 | * if not specified default background scan configuration |
| @@ -1287,8 +1294,11 @@ enum nl80211_commands { · 802 unmodified lines | ||
| 1287 | 1294 | * @NL80211_ATTR_RESP_IE: (Re)association response information elements as |
| 1288 | 1295 | * sent by peer, for ROAM and successful CONNECT events. |
| 1289 | 1296 | * |
| 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. | |
| 1292 | 1302 | * |
| 1293 | 1303 | * @NL80211_ATTR_KEY: key information in a nested attribute with |
| 1294 | 1304 | * %NL80211_KEY_* sub-attributes |
| @@ -3643,11 +3653,15 @@ enum nl80211_txrate_gi { · 2348 unmodified lines | ||
| 3643 | 3653 | * @NL80211_BAND_2GHZ: 2.4 GHz ISM band |
| 3644 | 3654 | * @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz) |
| 3645 | 3655 | * @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 | |
| 3646 | 3658 | */ |
| 3647 | 3659 | enum nl80211_band { |
| 3648 | 3660 | NL80211_BAND_2GHZ, |
| 3649 | 3661 | NL80211_BAND_5GHZ, |
| 3650 | 3662 | NL80211_BAND_60GHZ, |
| 3663 | + | |
| 3664 | + NUM_NL80211_BANDS, | |
| 3651 | 3665 | }; |
| 3652 | 3666 | |
| 3653 | 3667 | /** |
| @@ -1049,7 +1049,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, · 1048 unmodified lines | ||
| 1049 | 1049 | int ret = 0; |
| 1050 | 1050 | struct ieee80211_supported_band *sband; |
| 1051 | 1051 | 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); | |
| 1053 | 1053 | u32 mask, set; |
| 1054 | 1054 | |
| 1055 | 1055 | sband = local->hw.wiphy->bands[band]; |
| @@ -1848,7 +1848,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy, · 792 unmodified lines | ||
| 1848 | 1848 | struct bss_parameters *params) |
| 1849 | 1849 | { |
| 1850 | 1850 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
| 1851 | − enum ieee80211_band band; | |
| 1851 | + enum nl80211_band band; | |
| 1852 | 1852 | u32 changed = 0; |
| 1853 | 1853 | |
| 1854 | 1854 | if (!sdata_dereference(sdata->u.ap.beacon, sdata)) |
| @@ -1867,7 +1867,7 @@ static int ieee80211_change_bss(struct wiphy *wiphy, · 12 unmodified lines | ||
| 1867 | 1867 | } |
| 1868 | 1868 | |
| 1869 | 1869 | if (!sdata->vif.bss_conf.use_short_slot && |
| 1870 | − band == IEEE80211_BAND_5GHZ) { | |
| 1870 | + band == NL80211_BAND_5GHZ) { | |
| 1871 | 1871 | sdata->vif.bss_conf.use_short_slot = true; |
| 1872 | 1872 | changed |= BSS_CHANGED_ERP_SLOT; |
| 1873 | 1873 | } |
| @@ -2097,12 +2097,12 @@ static int ieee80211_leave_ocb(struct wiphy *wiphy, struct net_device *dev) · 223 unmodified lines | ||
| 2097 | 2097 | } |
| 2098 | 2098 | |
| 2099 | 2099 | 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]) | |
| 2101 | 2101 | { |
| 2102 | 2102 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
| 2103 | 2103 | |
| 2104 | 2104 | memcpy(sdata->vif.bss_conf.mcast_rate, rate, |
| 2105 | − sizeof(int) * IEEE80211_NUM_BANDS); | |
| 2105 | + sizeof(int) * NUM_NL80211_BANDS); | |
| 2106 | 2106 | |
| 2107 | 2107 | return 0; |
| 2108 | 2108 | } |
| @@ -2507,7 +2507,7 @@ static int ieee80211_set_bitrate_mask(struct wiphy *wiphy, · 398 unmodified lines | ||
| 2507 | 2507 | return ret; |
| 2508 | 2508 | } |
| 2509 | 2509 | |
| 2510 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 2510 | + for (i = 0; i < NUM_NL80211_BANDS; i++) { | |
| 2511 | 2511 | struct ieee80211_supported_band *sband = wiphy->bands[i]; |
| 2512 | 2512 | int j; |
| 2513 | 2513 | |
| @@ -3135,7 +3135,7 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev, · 621 unmodified lines | ||
| 3135 | 3135 | struct ieee80211_tx_info *info; |
| 3136 | 3136 | struct sta_info *sta; |
| 3137 | 3137 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 3138 | − enum ieee80211_band band; | |
| 3138 | + enum nl80211_band band; | |
| 3139 | 3139 | int ret; |
| 3140 | 3140 | |
| 3141 | 3141 | /* the lock is needed to assign the cookie later */ |
| @@ -169,21 +169,21 @@ static ssize_t ieee80211_if_write_##name(struct file *file, \ · 168 unmodified lines | ||
| 169 | 169 | IEEE80211_IF_FILE_R(name) |
| 170 | 170 | |
| 171 | 171 | /* 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], | |
| 173 | 173 | 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], | |
| 175 | 175 | HEX); |
| 176 | 176 | 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); | |
| 178 | 178 | 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); | |
| 180 | 180 | |
| 181 | 181 | static ssize_t ieee80211_if_fmt_rc_rateidx_vht_mcs_mask_2ghz( |
| 182 | 182 | const struct ieee80211_sub_if_data *sdata, |
| 183 | 183 | char *buf, int buflen) |
| 184 | 184 | { |
| 185 | 185 | 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]; | |
| 187 | 187 | |
| 188 | 188 | for (i = 0; i < NL80211_VHT_NSS_MAX; i++) |
| 189 | 189 | 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 | ||
| 199 | 199 | char *buf, int buflen) |
| 200 | 200 | { |
| 201 | 201 | 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]; | |
| 203 | 203 | |
| 204 | 204 | for (i = 0; i < NL80211_VHT_NSS_MAX; i++) |
| 205 | 205 | len += scnprintf(buf + len, buflen - len, "%04x ", mask[i]); |
| @@ -126,7 +126,7 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata, · 125 unmodified lines | ||
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | − if (sband->band == IEEE80211_BAND_2GHZ) { | |
| 129 | + if (sband->band == NL80211_BAND_2GHZ) { | |
| 130 | 130 | *pos++ = WLAN_EID_DS_PARAMS; |
| 131 | 131 | *pos++ = 1; |
| 132 | 132 | *pos++ = ieee80211_frequency_to_channel( |
| @@ -348,11 +348,11 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, · 215 unmodified lines | ||
| 348 | 348 | * |
| 349 | 349 | * HT follows these specifications (IEEE 802.11-2012 20.3.18) |
| 350 | 350 | */ |
| 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; | |
| 352 | 352 | bss_change |= BSS_CHANGED_ERP_SLOT; |
| 353 | 353 | |
| 354 | 354 | /* 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) | |
| 356 | 356 | sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE; |
| 357 | 357 | else |
| 358 | 358 | 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 | ||
| 989 | 989 | struct ieee80211_channel *channel) |
| 990 | 990 | { |
| 991 | 991 | struct sta_info *sta; |
| 992 | − enum ieee80211_band band = rx_status->band; | |
| 992 | + enum nl80211_band band = rx_status->band; | |
| 993 | 993 | enum nl80211_bss_scan_width scan_width; |
| 994 | 994 | struct ieee80211_local *local = sdata->local; |
| 995 | 995 | 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 | ||
| 1109 | 1109 | struct ieee80211_channel *channel; |
| 1110 | 1110 | u64 beacon_timestamp, rx_timestamp; |
| 1111 | 1111 | u32 supp_rates = 0; |
| 1112 | − enum ieee80211_band band = rx_status->band; | |
| 1112 | + enum nl80211_band band = rx_status->band; | |
| 1113 | 1113 | |
| 1114 | 1114 | channel = ieee80211_get_channel(local->hw.wiphy, rx_status->freq); |
| 1115 | 1115 | if (!channel) |
| @@ -896,13 +896,13 @@ struct ieee80211_sub_if_data { · 895 unmodified lines | ||
| 896 | 896 | struct ieee80211_if_ap *bss; |
| 897 | 897 | |
| 898 | 898 | /* 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]; | |
| 900 | 900 | |
| 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]; | |
| 903 | 903 | |
| 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]; | |
| 906 | 906 | |
| 907 | 907 | union { |
| 908 | 908 | struct ieee80211_if_ap ap; |
| @@ -957,10 +957,10 @@ sdata_assert_lock(struct ieee80211_sub_if_data *sdata) · 48 unmodified lines | ||
| 957 | 957 | lockdep_assert_held(&sdata->wdev.mtx); |
| 958 | 958 | } |
| 959 | 959 | |
| 960 | −static inline enum ieee80211_band | |
| 960 | +static inline enum nl80211_band | |
| 961 | 961 | ieee80211_get_sdata_band(struct ieee80211_sub_if_data *sdata) |
| 962 | 962 | { |
| 963 | − enum ieee80211_band band = IEEE80211_BAND_2GHZ; | |
| 963 | + enum nl80211_band band = NL80211_BAND_2GHZ; | |
| 964 | 964 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 965 | 965 | |
| 966 | 966 | rcu_read_lock(); |
| @@ -1231,7 +1231,7 @@ struct ieee80211_local { · 264 unmodified lines | ||
| 1231 | 1231 | struct cfg80211_scan_request __rcu *scan_req; |
| 1232 | 1232 | struct ieee80211_scan_request *hw_scan_req; |
| 1233 | 1233 | struct cfg80211_chan_def scan_chandef; |
| 1234 | − enum ieee80211_band hw_scan_band; | |
| 1234 | + enum nl80211_band hw_scan_band; | |
| 1235 | 1235 | int scan_channel_idx; |
| 1236 | 1236 | int scan_ies_len; |
| 1237 | 1237 | int hw_scan_ies_bufsize; |
| @@ -1738,10 +1738,10 @@ void ieee80211_process_mu_groups(struct ieee80211_sub_if_data *sdata, · 500 unmodified lines | ||
| 1738 | 1738 | struct ieee80211_mgmt *mgmt); |
| 1739 | 1739 | u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, |
| 1740 | 1740 | struct sta_info *sta, u8 opmode, |
| 1741 | − enum ieee80211_band band); | |
| 1741 | + enum nl80211_band band); | |
| 1742 | 1742 | void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, |
| 1743 | 1743 | struct sta_info *sta, u8 opmode, |
| 1744 | − enum ieee80211_band band); | |
| 1744 | + enum nl80211_band band); | |
| 1745 | 1745 | void ieee80211_apply_vhtcap_overrides(struct ieee80211_sub_if_data *sdata, |
| 1746 | 1746 | struct ieee80211_sta_vht_cap *vht_cap); |
| 1747 | 1747 | 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 | ||
| 1769 | 1769 | */ |
| 1770 | 1770 | int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, |
| 1771 | 1771 | struct ieee802_11_elems *elems, |
| 1772 | − enum ieee80211_band current_band, | |
| 1772 | + enum nl80211_band current_band, | |
| 1773 | 1773 | u32 sta_flags, u8 *bssid, |
| 1774 | 1774 | struct ieee80211_csa_ie *csa_ie); |
| 1775 | 1775 | |
| @@ -1794,7 +1794,7 @@ static inline int __ieee80211_resume(struct ieee80211_hw *hw) · 18 unmodified lines | ||
| 1794 | 1794 | |
| 1795 | 1795 | /* utility functions/constants */ |
| 1796 | 1796 | 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, | |
| 1798 | 1798 | int rate, int erp, int short_preamble, |
| 1799 | 1799 | int shift); |
| 1800 | 1800 | 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 | ||
| 1804 | 1804 | |
| 1805 | 1805 | void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata, |
| 1806 | 1806 | struct sk_buff *skb, int tid, |
| 1807 | − enum ieee80211_band band); | |
| 1807 | + enum nl80211_band band); | |
| 1808 | 1808 | |
| 1809 | 1809 | static inline void |
| 1810 | 1810 | ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata, |
| 1811 | 1811 | struct sk_buff *skb, int tid, |
| 1812 | − enum ieee80211_band band) | |
| 1812 | + enum nl80211_band band) | |
| 1813 | 1813 | { |
| 1814 | 1814 | rcu_read_lock(); |
| 1815 | 1815 | __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 | ||
| 1964 | 1964 | |
| 1965 | 1965 | u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata, |
| 1966 | 1966 | struct ieee802_11_elems *elems, |
| 1967 | − enum ieee80211_band band, u32 *basic_rates); | |
| 1967 | + enum nl80211_band band, u32 *basic_rates); | |
| 1968 | 1968 | int __ieee80211_request_smps_mgd(struct ieee80211_sub_if_data *sdata, |
| 1969 | 1969 | enum ieee80211_smps_mode smps_mode); |
| 1970 | 1970 | 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 | ||
| 1987 | 1987 | const u8 *srates, int srates_len, u32 *rates); |
| 1988 | 1988 | int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, |
| 1989 | 1989 | struct sk_buff *skb, bool need_basic, |
| 1990 | − enum ieee80211_band band); | |
| 1990 | + enum nl80211_band band); | |
| 1991 | 1991 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, |
| 1992 | 1992 | struct sk_buff *skb, bool need_basic, |
| 1993 | − enum ieee80211_band band); | |
| 1993 | + enum nl80211_band band); | |
| 1994 | 1994 | u8 *ieee80211_add_wmm_info_ie(u8 *buf, u8 qosinfo); |
| 1995 | 1995 | |
| 1996 | 1996 | /* channel management */ |
| @@ -1800,7 +1800,7 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name, · 1799 unmodified lines | ||
| 1800 | 1800 | INIT_DELAYED_WORK(&sdata->dec_tailroom_needed_wk, |
| 1801 | 1801 | ieee80211_delayed_tailroom_dec); |
| 1802 | 1802 | |
| 1803 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 1803 | + for (i = 0; i < NUM_NL80211_BANDS; i++) { | |
| 1804 | 1804 | struct ieee80211_supported_band *sband; |
| 1805 | 1805 | sband = local->hw.wiphy->bands[i]; |
| 1806 | 1806 | sdata->rc_rateidx_mask[i] = |
| @@ -801,7 +801,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) · 800 unmodified lines | ||
| 801 | 801 | { |
| 802 | 802 | struct ieee80211_local *local = hw_to_local(hw); |
| 803 | 803 | int result, i; |
| 804 | − enum ieee80211_band band; | |
| 804 | + enum nl80211_band band; | |
| 805 | 805 | int channels, max_bitrates; |
| 806 | 806 | bool supp_ht, supp_vht; |
| 807 | 807 | netdev_features_t feature_whitelist; |
| @@ -874,7 +874,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) · 66 unmodified lines | ||
| 874 | 874 | max_bitrates = 0; |
| 875 | 875 | supp_ht = false; |
| 876 | 876 | supp_vht = false; |
| 877 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 877 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 878 | 878 | struct ieee80211_supported_band *sband; |
| 879 | 879 | |
| 880 | 880 | sband = local->hw.wiphy->bands[band]; |
| @@ -936,7 +936,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) · 55 unmodified lines | ||
| 936 | 936 | if (!local->int_scan_req) |
| 937 | 937 | return -ENOMEM; |
| 938 | 938 | |
| 939 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 939 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 940 | 940 | if (!local->hw.wiphy->bands[band]) |
| 941 | 941 | continue; |
| 942 | 942 | local->int_scan_req->rates[band] = (u32) -1; |
| @@ -415,7 +415,7 @@ int mesh_add_ht_cap_ie(struct ieee80211_sub_if_data *sdata, · 414 unmodified lines | ||
| 415 | 415 | struct sk_buff *skb) |
| 416 | 416 | { |
| 417 | 417 | 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); | |
| 419 | 419 | struct ieee80211_supported_band *sband; |
| 420 | 420 | u8 *pos; |
| 421 | 421 | |
| @@ -478,7 +478,7 @@ int mesh_add_vht_cap_ie(struct ieee80211_sub_if_data *sdata, · 56 unmodified lines | ||
| 478 | 478 | struct sk_buff *skb) |
| 479 | 479 | { |
| 480 | 480 | 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); | |
| 482 | 482 | struct ieee80211_supported_band *sband; |
| 483 | 483 | u8 *pos; |
| 484 | 484 | |
| @@ -680,7 +680,7 @@ ieee80211_mesh_build_beacon(struct ieee80211_if_mesh *ifmsh) · 195 unmodified lines | ||
| 680 | 680 | struct ieee80211_mgmt *mgmt; |
| 681 | 681 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 682 | 682 | struct mesh_csa_settings *csa; |
| 683 | − enum ieee80211_band band; | |
| 683 | + enum nl80211_band band; | |
| 684 | 684 | u8 *pos; |
| 685 | 685 | struct ieee80211_sub_if_data *sdata; |
| 686 | 686 | 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 | ||
| 930 | 930 | struct cfg80211_csa_settings params; |
| 931 | 931 | struct ieee80211_csa_ie csa_ie; |
| 932 | 932 | 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); | |
| 934 | 934 | int err; |
| 935 | 935 | u32 sta_flags; |
| 936 | 936 | |
| @@ -1084,7 +1084,7 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata, · 147 unmodified lines | ||
| 1084 | 1084 | struct ieee80211_channel *channel; |
| 1085 | 1085 | size_t baselen; |
| 1086 | 1086 | int freq; |
| 1087 | − enum ieee80211_band band = rx_status->band; | |
| 1087 | + enum nl80211_band band = rx_status->band; | |
| 1088 | 1088 | |
| 1089 | 1089 | /* ignore ProbeResp to foreign address */ |
| 1090 | 1090 | if (stype == IEEE80211_STYPE_PROBE_RESP && |
| @@ -93,18 +93,18 @@ static inline void mesh_plink_fsm_restart(struct sta_info *sta) · 92 unmodified lines | ||
| 93 | 93 | static u32 mesh_set_short_slot_time(struct ieee80211_sub_if_data *sdata) |
| 94 | 94 | { |
| 95 | 95 | 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); | |
| 97 | 97 | struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; |
| 98 | 98 | struct sta_info *sta; |
| 99 | 99 | u32 erp_rates = 0, changed = 0; |
| 100 | 100 | int i; |
| 101 | 101 | bool short_slot = false; |
| 102 | 102 | |
| 103 | − if (band == IEEE80211_BAND_5GHZ) { | |
| 103 | + if (band == NL80211_BAND_5GHZ) { | |
| 104 | 104 | /* (IEEE 802.11-2012 19.4.5) */ |
| 105 | 105 | short_slot = true; |
| 106 | 106 | goto out; |
| 107 | − } else if (band != IEEE80211_BAND_2GHZ) | |
| 107 | + } else if (band != NL80211_BAND_2GHZ) | |
| 108 | 108 | goto out; |
| 109 | 109 | |
| 110 | 110 | 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 | ||
| 247 | 247 | mgmt->u.action.u.self_prot.action_code = action; |
| 248 | 248 | |
| 249 | 249 | 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); | |
| 251 | 251 | |
| 252 | 252 | /* capability info */ |
| 253 | 253 | pos = skb_put(skb, 2); |
| @@ -385,7 +385,7 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata, · 131 unmodified lines | ||
| 385 | 385 | struct ieee802_11_elems *elems, bool insert) |
| 386 | 386 | { |
| 387 | 387 | 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); | |
| 389 | 389 | struct ieee80211_supported_band *sband; |
| 390 | 390 | u32 rates, basic_rates = 0, changed = 0; |
| 391 | 391 | enum ieee80211_sta_rx_bandwidth bw = sta->sta.bandwidth; |
| @@ -661,7 +661,7 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata) · 660 unmodified lines | ||
| 661 | 661 | |
| 662 | 662 | capab = WLAN_CAPABILITY_ESS; |
| 663 | 663 | |
| 664 | − if (sband->band == IEEE80211_BAND_2GHZ) { | |
| 664 | + if (sband->band == NL80211_BAND_2GHZ) { | |
| 665 | 665 | capab |= WLAN_CAPABILITY_SHORT_SLOT_TIME; |
| 666 | 666 | capab |= WLAN_CAPABILITY_SHORT_PREAMBLE; |
| 667 | 667 | } |
| @@ -1100,7 +1100,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, · 432 unmodified lines | ||
| 1100 | 1100 | struct cfg80211_bss *cbss = ifmgd->associated; |
| 1101 | 1101 | struct ieee80211_chanctx_conf *conf; |
| 1102 | 1102 | struct ieee80211_chanctx *chanctx; |
| 1103 | − enum ieee80211_band current_band; | |
| 1103 | + enum nl80211_band current_band; | |
| 1104 | 1104 | struct ieee80211_csa_ie csa_ie; |
| 1105 | 1105 | struct ieee80211_channel_switch ch_switch; |
| 1106 | 1106 | int res; |
| @@ -1257,11 +1257,11 @@ ieee80211_find_80211h_pwr_constr(struct ieee80211_sub_if_data *sdata, · 150 unmodified lines | ||
| 1257 | 1257 | default: |
| 1258 | 1258 | WARN_ON_ONCE(1); |
| 1259 | 1259 | /* fall through */ |
| 1260 | − case IEEE80211_BAND_2GHZ: | |
| 1261 | − case IEEE80211_BAND_60GHZ: | |
| 1260 | + case NL80211_BAND_2GHZ: | |
| 1261 | + case NL80211_BAND_60GHZ: | |
| 1262 | 1262 | chan_increment = 1; |
| 1263 | 1263 | break; |
| 1264 | − case IEEE80211_BAND_5GHZ: | |
| 1264 | + case NL80211_BAND_5GHZ: | |
| 1265 | 1265 | chan_increment = 4; |
| 1266 | 1266 | break; |
| 1267 | 1267 | } |
| @@ -1861,7 +1861,7 @@ static u32 ieee80211_handle_bss_capability(struct ieee80211_sub_if_data *sdata, · 593 unmodified lines | ||
| 1861 | 1861 | } |
| 1862 | 1862 | |
| 1863 | 1863 | 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) | |
| 1865 | 1865 | use_short_slot = true; |
| 1866 | 1866 | |
| 1867 | 1867 | 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 | ||
| 4375 | 4375 | sdata->vif.bss_conf.basic_rates = basic_rates; |
| 4376 | 4376 | |
| 4377 | 4377 | /* cf. IEEE 802.11 9.2.12 */ |
| 4378 | − if (cbss->channel->band == IEEE80211_BAND_2GHZ && | |
| 4378 | + if (cbss->channel->band == NL80211_BAND_2GHZ && | |
| 4379 | 4379 | have_higher_than_11mbit) |
| 4380 | 4380 | sdata->flags |= IEEE80211_SDATA_OPERATING_GMODE; |
| 4381 | 4381 | else |
| @@ -287,7 +287,7 @@ static void __rate_control_send_low(struct ieee80211_hw *hw, · 286 unmodified lines | ||
| 287 | 287 | u32 rate_flags = |
| 288 | 288 | ieee80211_chandef_rate_flags(&hw->conf.chandef); |
| 289 | 289 | |
| 290 | − if ((sband->band == IEEE80211_BAND_2GHZ) && | |
| 290 | + if ((sband->band == NL80211_BAND_2GHZ) && | |
| 291 | 291 | (info->flags & IEEE80211_TX_CTL_NO_CCK_RATE)) |
| 292 | 292 | rate_flags |= IEEE80211_RATE_ERP_G; |
| 293 | 293 | |
| @@ -436,7 +436,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta, · 435 unmodified lines | ||
| 436 | 436 | |
| 437 | 437 | |
| 438 | 438 | static void |
| 439 | −calc_rate_durations(enum ieee80211_band band, | |
| 439 | +calc_rate_durations(enum nl80211_band band, | |
| 440 | 440 | struct minstrel_rate *d, |
| 441 | 441 | struct ieee80211_rate *rate, |
| 442 | 442 | struct cfg80211_chan_def *chandef) |
| @@ -579,7 +579,7 @@ minstrel_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp) · 136 unmodified lines | ||
| 579 | 579 | if (!mi) |
| 580 | 580 | return NULL; |
| 581 | 581 | |
| 582 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 582 | + for (i = 0; i < NUM_NL80211_BANDS; i++) { | |
| 583 | 583 | sband = hw->wiphy->bands[i]; |
| 584 | 584 | if (sband && sband->n_bitrates > max_rates) |
| 585 | 585 | max_rates = sband->n_bitrates; |
| @@ -621,7 +621,7 @@ minstrel_init_cck_rates(struct minstrel_priv *mp) · 35 unmodified lines | ||
| 621 | 621 | u32 rate_flags = ieee80211_chandef_rate_flags(&mp->hw->conf.chandef); |
| 622 | 622 | int i, j; |
| 623 | 623 | |
| 624 | − sband = mp->hw->wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 624 | + sband = mp->hw->wiphy->bands[NL80211_BAND_2GHZ]; | |
| 625 | 625 | if (!sband) |
| 626 | 626 | return; |
| 627 | 627 | |
| @@ -1137,7 +1137,7 @@ minstrel_ht_update_cck(struct minstrel_priv *mp, struct minstrel_ht_sta *mi, · 1136 unmodified lines | ||
| 1137 | 1137 | { |
| 1138 | 1138 | int i; |
| 1139 | 1139 | |
| 1140 | − if (sband->band != IEEE80211_BAND_2GHZ) | |
| 1140 | + if (sband->band != NL80211_BAND_2GHZ) | |
| 1141 | 1141 | return; |
| 1142 | 1142 | |
| 1143 | 1143 | 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 | ||
| 1335 | 1335 | int max_rates = 0; |
| 1336 | 1336 | int i; |
| 1337 | 1337 | |
| 1338 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 1338 | + for (i = 0; i < NUM_NL80211_BANDS; i++) { | |
| 1339 | 1339 | sband = hw->wiphy->bands[i]; |
| 1340 | 1340 | if (sband && sband->n_bitrates > max_rates) |
| 1341 | 1341 | max_rates = sband->n_bitrates; |
| @@ -322,7 +322,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, · 321 unmodified lines | ||
| 322 | 322 | else if (status->flag & RX_FLAG_5MHZ) |
| 323 | 323 | channel_flags |= IEEE80211_CHAN_QUARTER; |
| 324 | 324 | |
| 325 | − if (status->band == IEEE80211_BAND_5GHZ) | |
| 325 | + if (status->band == NL80211_BAND_5GHZ) | |
| 326 | 326 | channel_flags |= IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ; |
| 327 | 327 | else if (status->flag & (RX_FLAG_HT | RX_FLAG_VHT)) |
| 328 | 328 | channel_flags |= IEEE80211_CHAN_DYN | IEEE80211_CHAN_2GHZ; |
| @@ -2823,7 +2823,7 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) · 2494 unmodified lines | ||
| 2823 | 2823 | |
| 2824 | 2824 | switch (mgmt->u.action.u.measurement.action_code) { |
| 2825 | 2825 | case WLAN_ACTION_SPCT_MSR_REQ: |
| 2826 | − if (status->band != IEEE80211_BAND_5GHZ) | |
| 2826 | + if (status->band != NL80211_BAND_5GHZ) | |
| 2827 | 2827 | break; |
| 2828 | 2828 | |
| 2829 | 2829 | 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 | ||
| 4043 | 4043 | |
| 4044 | 4044 | WARN_ON_ONCE(softirq_count() == 0); |
| 4045 | 4045 | |
| 4046 | − if (WARN_ON(status->band >= IEEE80211_NUM_BANDS)) | |
| 4046 | + if (WARN_ON(status->band >= NUM_NL80211_BANDS)) | |
| 4047 | 4047 | goto drop; |
| 4048 | 4048 | |
| 4049 | 4049 | sband = local->hw.wiphy->bands[status->band]; |
| @@ -272,7 +272,7 @@ static bool ieee80211_prep_hw_scan(struct ieee80211_local *local) · 271 unmodified lines | ||
| 272 | 272 | n_chans = req->n_channels; |
| 273 | 273 | } else { |
| 274 | 274 | do { |
| 275 | − if (local->hw_scan_band == IEEE80211_NUM_BANDS) | |
| 275 | + if (local->hw_scan_band == NUM_NL80211_BANDS) | |
| 276 | 276 | return false; |
| 277 | 277 | |
| 278 | 278 | n_chans = 0; |
| @@ -485,7 +485,7 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local, · 206 unmodified lines | ||
| 485 | 485 | int i; |
| 486 | 486 | struct ieee80211_sub_if_data *sdata; |
| 487 | 487 | 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; | |
| 489 | 489 | u32 tx_flags; |
| 490 | 490 | |
| 491 | 491 | 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 | ||
| 953 | 953 | { |
| 954 | 954 | struct ieee80211_local *local = sdata->local; |
| 955 | 955 | int ret = -EBUSY, i, n_ch = 0; |
| 956 | − enum ieee80211_band band; | |
| 956 | + enum nl80211_band band; | |
| 957 | 957 | |
| 958 | 958 | mutex_lock(&local->mtx); |
| 959 | 959 | |
| @@ -965,7 +965,7 @@ int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata, · 5 unmodified lines | ||
| 965 | 965 | if (!channels) { |
| 966 | 966 | int max_n; |
| 967 | 967 | |
| 968 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 968 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 969 | 969 | if (!local->hw.wiphy->bands[band]) |
| 970 | 970 | continue; |
| 971 | 971 | |
| @@ -1085,7 +1085,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, · 113 unmodified lines | ||
| 1085 | 1085 | struct ieee80211_scan_ies sched_scan_ies = {}; |
| 1086 | 1086 | struct cfg80211_chan_def chandef; |
| 1087 | 1087 | int ret, i, iebufsz, num_bands = 0; |
| 1088 | − u32 rate_masks[IEEE80211_NUM_BANDS] = {}; | |
| 1088 | + u32 rate_masks[NUM_NL80211_BANDS] = {}; | |
| 1089 | 1089 | u8 bands_used = 0; |
| 1090 | 1090 | u8 *ie; |
| 1091 | 1091 | size_t len; |
| @@ -1097,7 +1097,7 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, · 5 unmodified lines | ||
| 1097 | 1097 | if (!local->ops->sched_scan_start) |
| 1098 | 1098 | return -ENOTSUPP; |
| 1099 | 1099 | |
| 1100 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 1100 | + for (i = 0; i < NUM_NL80211_BANDS; i++) { | |
| 1101 | 1101 | if (local->hw.wiphy->bands[i]) { |
| 1102 | 1102 | bands_used |= BIT(i); |
| 1103 | 1103 | rate_masks[i] = (u32) -1; |
| @@ -23,11 +23,11 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, |
| 25 | 25 | struct ieee802_11_elems *elems, |
| 26 | − enum ieee80211_band current_band, | |
| 26 | + enum nl80211_band current_band, | |
| 27 | 27 | u32 sta_flags, u8 *bssid, |
| 28 | 28 | struct ieee80211_csa_ie *csa_ie) |
| 29 | 29 | { |
| 30 | − enum ieee80211_band new_band; | |
| 30 | + enum nl80211_band new_band; | |
| 31 | 31 | int new_freq; |
| 32 | 32 | u8 new_chan_no; |
| 33 | 33 | struct ieee80211_channel *new_chan; |
| @@ -47,7 +47,7 @@ static void ieee80211_tdls_add_ext_capab(struct ieee80211_sub_if_data *sdata, · 46 unmodified lines | ||
| 47 | 47 | NL80211_FEATURE_TDLS_CHANNEL_SWITCH; |
| 48 | 48 | bool wider_band = ieee80211_hw_check(&local->hw, TDLS_WIDER_BW) && |
| 49 | 49 | !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); | |
| 51 | 51 | struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; |
| 52 | 52 | bool vht = sband && sband->vht_cap.vht_supported; |
| 53 | 53 | 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 | ||
| 184 | 184 | if (status_code != 0) |
| 185 | 185 | return 0; |
| 186 | 186 | |
| 187 | − if (ieee80211_get_sdata_band(sdata) == IEEE80211_BAND_2GHZ) { | |
| 187 | + if (ieee80211_get_sdata_band(sdata) == NL80211_BAND_2GHZ) { | |
| 188 | 188 | return WLAN_CAPABILITY_SHORT_SLOT_TIME | |
| 189 | 189 | WLAN_CAPABILITY_SHORT_PREAMBLE; |
| 190 | 190 | } |
| @@ -357,7 +357,7 @@ ieee80211_tdls_add_setup_start_ies(struct ieee80211_sub_if_data *sdata, · 166 unmodified lines | ||
| 357 | 357 | u8 action_code, bool initiator, |
| 358 | 358 | const u8 *extra_ies, size_t extra_ies_len) |
| 359 | 359 | { |
| 360 | − enum ieee80211_band band = ieee80211_get_sdata_band(sdata); | |
| 360 | + enum nl80211_band band = ieee80211_get_sdata_band(sdata); | |
| 361 | 361 | struct ieee80211_local *local = sdata->local; |
| 362 | 362 | struct ieee80211_supported_band *sband; |
| 363 | 363 | 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 | ||
| 544 | 544 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
| 545 | 545 | size_t offset = 0, noffset; |
| 546 | 546 | 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); | |
| 548 | 548 | u8 *pos; |
| 549 | 549 | |
| 550 | 550 | mutex_lock(&local->sta_mtx); |
| @@ -611,7 +611,7 @@ ieee80211_tdls_add_setup_cfm_ies(struct ieee80211_sub_if_data *sdata, · 60 unmodified lines | ||
| 611 | 611 | ieee80211_tdls_add_link_ie(sdata, skb, peer, initiator); |
| 612 | 612 | |
| 613 | 613 | /* 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) { | |
| 615 | 615 | /* |
| 616 | 616 | * if both peers support WIDER_BW, we can expand the chandef to |
| 617 | 617 | * 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 | ||
| 1773 | 1773 | u8 target_channel, oper_class; |
| 1774 | 1774 | bool local_initiator; |
| 1775 | 1775 | struct sta_info *sta; |
| 1776 | − enum ieee80211_band band; | |
| 1776 | + enum nl80211_band band; | |
| 1777 | 1777 | struct ieee80211_tdls_data *tf = (void *)skb->data; |
| 1778 | 1778 | struct ieee80211_rx_status *rx_status = IEEE80211_SKB_RXCB(skb); |
| 1779 | 1779 | 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 | ||
| 1805 | 1805 | if ((oper_class == 112 || oper_class == 2 || oper_class == 3 || |
| 1806 | 1806 | oper_class == 4 || oper_class == 5 || oper_class == 6) && |
| 1807 | 1807 | target_channel < 14) |
| 1808 | − band = IEEE80211_BAND_5GHZ; | |
| 1808 | + band = NL80211_BAND_5GHZ; | |
| 1809 | 1809 | 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; | |
| 1812 | 1812 | |
| 1813 | 1813 | freq = ieee80211_channel_to_frequency(target_channel, band); |
| 1814 | 1814 | if (freq == 0) { |
| @@ -401,7 +401,7 @@ TRACE_EVENT(drv_bss_info_changed, · 400 unmodified lines | ||
| 401 | 401 | __field(u32, sync_device_ts) |
| 402 | 402 | __field(u8, sync_dtim_count) |
| 403 | 403 | __field(u32, basic_rates) |
| 404 | − __array(int, mcast_rate, IEEE80211_NUM_BANDS) | |
| 404 | + __array(int, mcast_rate, NUM_NL80211_BANDS) | |
| 405 | 405 | __field(u16, ht_operation_mode) |
| 406 | 406 | __field(s32, cqm_rssi_thold); |
| 407 | 407 | __field(s32, cqm_rssi_hyst); |
| @@ -1265,8 +1265,8 @@ TRACE_EVENT(drv_set_bitrate_mask, · 857 unmodified lines | ||
| 1265 | 1265 | TP_fast_assign( |
| 1266 | 1266 | LOCAL_ASSIGN; |
| 1267 | 1267 | 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; | |
| 1270 | 1270 | ), |
| 1271 | 1271 | |
| 1272 | 1272 | TP_printk( |
| @@ -150,7 +150,7 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, · 149 unmodified lines | ||
| 150 | 150 | rate = DIV_ROUND_UP(r->bitrate, 1 << shift); |
| 151 | 151 | |
| 152 | 152 | switch (sband->band) { |
| 153 | − case IEEE80211_BAND_2GHZ: { | |
| 153 | + case NL80211_BAND_2GHZ: { | |
| 154 | 154 | u32 flag; |
| 155 | 155 | if (tx->sdata->flags & IEEE80211_SDATA_OPERATING_GMODE) |
| 156 | 156 | flag = IEEE80211_RATE_MANDATORY_G; |
| @@ -160,13 +160,13 @@ static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, · 3 unmodified lines | ||
| 160 | 160 | mrate = r->bitrate; |
| 161 | 161 | break; |
| 162 | 162 | } |
| 163 | − case IEEE80211_BAND_5GHZ: | |
| 163 | + case NL80211_BAND_5GHZ: | |
| 164 | 164 | if (r->flags & IEEE80211_RATE_MANDATORY_A) |
| 165 | 165 | mrate = r->bitrate; |
| 166 | 166 | break; |
| 167 | − case IEEE80211_BAND_60GHZ: | |
| 167 | + case NL80211_BAND_60GHZ: | |
| 168 | 168 | /* TODO, for now fall through */ |
| 169 | − case IEEE80211_NUM_BANDS: | |
| 169 | + case NUM_NL80211_BANDS: | |
| 170 | 170 | WARN_ON(1); |
| 171 | 171 | break; |
| 172 | 172 | } |
| @@ -2138,7 +2138,7 @@ static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata, · 1965 unmodified lines | ||
| 2138 | 2138 | u16 info_id = 0; |
| 2139 | 2139 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 2140 | 2140 | struct ieee80211_sub_if_data *ap_sdata; |
| 2141 | − enum ieee80211_band band; | |
| 2141 | + enum nl80211_band band; | |
| 2142 | 2142 | int ret; |
| 2143 | 2143 | |
| 2144 | 2144 | if (IS_ERR(sta)) |
| @@ -3597,7 +3597,7 @@ __ieee80211_beacon_get(struct ieee80211_hw *hw, · 1452 unmodified lines | ||
| 3597 | 3597 | struct sk_buff *skb = NULL; |
| 3598 | 3598 | struct ieee80211_tx_info *info; |
| 3599 | 3599 | struct ieee80211_sub_if_data *sdata = NULL; |
| 3600 | − enum ieee80211_band band; | |
| 3600 | + enum nl80211_band band; | |
| 3601 | 3601 | struct ieee80211_tx_rate_control txrc; |
| 3602 | 3602 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 3603 | 3603 | int csa_off_base = 0; |
| @@ -4165,7 +4165,7 @@ EXPORT_SYMBOL(ieee80211_unreserve_tid); · 561 unmodified lines | ||
| 4165 | 4165 | |
| 4166 | 4166 | void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata, |
| 4167 | 4167 | struct sk_buff *skb, int tid, |
| 4168 | − enum ieee80211_band band) | |
| 4168 | + enum nl80211_band band) | |
| 4169 | 4169 | { |
| 4170 | 4170 | int ac = ieee802_1d_to_ac[tid & 7]; |
| 4171 | 4171 | |
| @@ -59,7 +59,7 @@ void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx) · 58 unmodified lines | ||
| 59 | 59 | } |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | −int ieee80211_frame_duration(enum ieee80211_band band, size_t len, | |
| 62 | +int ieee80211_frame_duration(enum nl80211_band band, size_t len, | |
| 63 | 63 | int rate, int erp, int short_preamble, |
| 64 | 64 | int shift) |
| 65 | 65 | { |
| @@ -77,7 +77,7 @@ int ieee80211_frame_duration(enum ieee80211_band band, size_t len, · 11 unmodified lines | ||
| 77 | 77 | * is assumed to be 0 otherwise. |
| 78 | 78 | */ |
| 79 | 79 | |
| 80 | − if (band == IEEE80211_BAND_5GHZ || erp) { | |
| 80 | + if (band == NL80211_BAND_5GHZ || erp) { | |
| 81 | 81 | /* |
| 82 | 82 | * OFDM: |
| 83 | 83 | * |
| @@ -129,7 +129,7 @@ int ieee80211_frame_duration(enum ieee80211_band band, size_t len, · 45 unmodified lines | ||
| 129 | 129 | /* Exported duration function for driver use */ |
| 130 | 130 | __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw, |
| 131 | 131 | struct ieee80211_vif *vif, |
| 132 | − enum ieee80211_band band, | |
| 132 | + enum nl80211_band band, | |
| 133 | 133 | size_t frame_len, |
| 134 | 134 | struct ieee80211_rate *rate) |
| 135 | 135 | { |
| @@ -1129,7 +1129,7 @@ void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, · 993 unmodified lines | ||
| 1129 | 1129 | rcu_read_lock(); |
| 1130 | 1130 | chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); |
| 1131 | 1131 | use_11b = (chanctx_conf && |
| 1132 | − chanctx_conf->def.chan->band == IEEE80211_BAND_2GHZ) && | |
| 1132 | + chanctx_conf->def.chan->band == NL80211_BAND_2GHZ) && | |
| 1133 | 1133 | !(sdata->flags & IEEE80211_SDATA_OPERATING_GMODE); |
| 1134 | 1134 | rcu_read_unlock(); |
| 1135 | 1135 | |
| @@ -1301,7 +1301,7 @@ void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata, · 165 unmodified lines | ||
| 1301 | 1301 | static int ieee80211_build_preq_ies_band(struct ieee80211_local *local, |
| 1302 | 1302 | u8 *buffer, size_t buffer_len, |
| 1303 | 1303 | const u8 *ie, size_t ie_len, |
| 1304 | − enum ieee80211_band band, | |
| 1304 | + enum nl80211_band band, | |
| 1305 | 1305 | u32 rate_mask, |
| 1306 | 1306 | struct cfg80211_chan_def *chandef, |
| 1307 | 1307 | size_t *offset) |
| @@ -1375,7 +1375,7 @@ static int ieee80211_build_preq_ies_band(struct ieee80211_local *local, · 67 unmodified lines | ||
| 1375 | 1375 | pos += ext_rates_len; |
| 1376 | 1376 | } |
| 1377 | 1377 | |
| 1378 | − if (chandef->chan && sband->band == IEEE80211_BAND_2GHZ) { | |
| 1378 | + if (chandef->chan && sband->band == NL80211_BAND_2GHZ) { | |
| 1379 | 1379 | if (end - pos < 3) |
| 1380 | 1380 | goto out_err; |
| 1381 | 1381 | *pos++ = WLAN_EID_DS_PARAMS; |
| @@ -1479,7 +1479,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer, · 97 unmodified lines | ||
| 1479 | 1479 | |
| 1480 | 1480 | memset(ie_desc, 0, sizeof(*ie_desc)); |
| 1481 | 1481 | |
| 1482 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 1482 | + for (i = 0; i < NUM_NL80211_BANDS; i++) { | |
| 1483 | 1483 | if (bands_used & BIT(i)) { |
| 1484 | 1484 | pos += ieee80211_build_preq_ies_band(local, |
| 1485 | 1485 | buffer + pos, |
| @@ -1522,7 +1522,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata, · 36 unmodified lines | ||
| 1522 | 1522 | struct sk_buff *skb; |
| 1523 | 1523 | struct ieee80211_mgmt *mgmt; |
| 1524 | 1524 | int ies_len; |
| 1525 | − u32 rate_masks[IEEE80211_NUM_BANDS] = {}; | |
| 1525 | + u32 rate_masks[NUM_NL80211_BANDS] = {}; | |
| 1526 | 1526 | struct ieee80211_scan_ies dummy_ie_desc; |
| 1527 | 1527 | |
| 1528 | 1528 | /* |
| @@ -1582,7 +1582,7 @@ void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, · 53 unmodified lines | ||
| 1582 | 1582 | |
| 1583 | 1583 | u32 ieee80211_sta_get_rates(struct ieee80211_sub_if_data *sdata, |
| 1584 | 1584 | struct ieee802_11_elems *elems, |
| 1585 | − enum ieee80211_band band, u32 *basic_rates) | |
| 1585 | + enum nl80211_band band, u32 *basic_rates) | |
| 1586 | 1586 | { |
| 1587 | 1587 | struct ieee80211_supported_band *sband; |
| 1588 | 1588 | size_t num_rates; |
| @@ -2520,7 +2520,7 @@ int ieee80211_parse_bitrates(struct cfg80211_chan_def *chandef, · 931 unmodified lines | ||
| 2520 | 2520 | |
| 2521 | 2521 | int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, |
| 2522 | 2522 | struct sk_buff *skb, bool need_basic, |
| 2523 | − enum ieee80211_band band) | |
| 2523 | + enum nl80211_band band) | |
| 2524 | 2524 | { |
| 2525 | 2525 | struct ieee80211_local *local = sdata->local; |
| 2526 | 2526 | struct ieee80211_supported_band *sband; |
| @@ -2565,7 +2565,7 @@ int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, · 38 unmodified lines | ||
| 2565 | 2565 | |
| 2566 | 2566 | int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, |
| 2567 | 2567 | struct sk_buff *skb, bool need_basic, |
| 2568 | − enum ieee80211_band band) | |
| 2568 | + enum nl80211_band band) | |
| 2569 | 2569 | { |
| 2570 | 2570 | struct ieee80211_local *local = sdata->local; |
| 2571 | 2571 | struct ieee80211_supported_band *sband; |
| @@ -2711,7 +2711,7 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, · 139 unmodified lines | ||
| 2711 | 2711 | |
| 2712 | 2712 | if (status->flag & RX_FLAG_MACTIME_PLCP_START) { |
| 2713 | 2713 | /* TODO: handle HT/VHT preambles */ |
| 2714 | − if (status->band == IEEE80211_BAND_5GHZ) { | |
| 2714 | + if (status->band == NL80211_BAND_5GHZ) { | |
| 2715 | 2715 | ts += 20 << shift; |
| 2716 | 2716 | mpdu_offset += 2; |
| 2717 | 2717 | } else if (status->flag & RX_FLAG_SHORTPRE) { |
| @@ -418,7 +418,7 @@ void ieee80211_sta_set_rx_nss(struct sta_info *sta) · 417 unmodified lines | ||
| 418 | 418 | |
| 419 | 419 | u32 __ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, |
| 420 | 420 | struct sta_info *sta, u8 opmode, |
| 421 | − enum ieee80211_band band) | |
| 421 | + enum nl80211_band band) | |
| 422 | 422 | { |
| 423 | 423 | struct ieee80211_local *local = sdata->local; |
| 424 | 424 | struct ieee80211_supported_band *sband; |
| @@ -504,7 +504,7 @@ EXPORT_SYMBOL_GPL(ieee80211_update_mu_groups); · 79 unmodified lines | ||
| 504 | 504 | |
| 505 | 505 | void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata, |
| 506 | 506 | struct sta_info *sta, u8 opmode, |
| 507 | − enum ieee80211_band band) | |
| 507 | + enum nl80211_band band) | |
| 508 | 508 | { |
| 509 | 509 | struct ieee80211_local *local = sdata->local; |
| 510 | 510 | struct ieee80211_supported_band *sband = local->hw.wiphy->bands[band]; |
| @@ -768,7 +768,7 @@ static bool cfg80211_ir_permissive_chan(struct wiphy *wiphy, · 767 unmodified lines | ||
| 768 | 768 | if (chan == other_chan) |
| 769 | 769 | return true; |
| 770 | 770 | |
| 771 | − if (chan->band != IEEE80211_BAND_5GHZ) | |
| 771 | + if (chan->band != NL80211_BAND_5GHZ) | |
| 772 | 772 | continue; |
| 773 | 773 | |
| 774 | 774 | r1 = cfg80211_get_unii(chan->center_freq); |
| @@ -557,7 +557,7 @@ int wiphy_register(struct wiphy *wiphy) · 556 unmodified lines | ||
| 557 | 557 | { |
| 558 | 558 | struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); |
| 559 | 559 | int res; |
| 560 | − enum ieee80211_band band; | |
| 560 | + enum nl80211_band band; | |
| 561 | 561 | struct ieee80211_supported_band *sband; |
| 562 | 562 | bool have_band = false; |
| 563 | 563 | int i; |
| @@ -647,7 +647,7 @@ int wiphy_register(struct wiphy *wiphy) · 83 unmodified lines | ||
| 647 | 647 | return res; |
| 648 | 648 | |
| 649 | 649 | /* sanity check supported bands/channels */ |
| 650 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 650 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 651 | 651 | sband = wiphy->bands[band]; |
| 652 | 652 | if (!sband) |
| 653 | 653 | continue; |
| @@ -659,7 +659,7 @@ int wiphy_register(struct wiphy *wiphy) · 5 unmodified lines | ||
| 659 | 659 | * on 60GHz band, there are no legacy rates, so |
| 660 | 660 | * n_bitrates is 0 |
| 661 | 661 | */ |
| 662 | − if (WARN_ON(band != IEEE80211_BAND_60GHZ && | |
| 662 | + if (WARN_ON(band != NL80211_BAND_60GHZ && | |
| 663 | 663 | !sband->n_bitrates)) |
| 664 | 664 | return -EINVAL; |
| 665 | 665 | |
| @@ -669,7 +669,7 @@ int wiphy_register(struct wiphy *wiphy) · 3 unmodified lines | ||
| 669 | 669 | * global structure for that. |
| 670 | 670 | */ |
| 671 | 671 | if (cfg80211_disable_40mhz_24ghz && |
| 672 | − band == IEEE80211_BAND_2GHZ && | |
| 672 | + band == NL80211_BAND_2GHZ && | |
| 673 | 673 | sband->ht_cap.ht_supported) { |
| 674 | 674 | sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
| 675 | 675 | sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40; |
| @@ -69,7 +69,7 @@ static ssize_t ht40allow_map_read(struct file *file, · 68 unmodified lines | ||
| 69 | 69 | struct wiphy *wiphy = file->private_data; |
| 70 | 70 | char *buf; |
| 71 | 71 | unsigned int offset = 0, buf_size = PAGE_SIZE, i, r; |
| 72 | − enum ieee80211_band band; | |
| 72 | + enum nl80211_band band; | |
| 73 | 73 | struct ieee80211_supported_band *sband; |
| 74 | 74 | |
| 75 | 75 | buf = kzalloc(buf_size, GFP_KERNEL); |
| @@ -78,7 +78,7 @@ static ssize_t ht40allow_map_read(struct file *file, · 2 unmodified lines | ||
| 78 | 78 | |
| 79 | 79 | rtnl_lock(); |
| 80 | 80 | |
| 81 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 81 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 82 | 82 | sband = wiphy->bands[band]; |
| 83 | 83 | if (!sband) |
| 84 | 84 | continue; |
| @@ -104,7 +104,7 @@ static int __cfg80211_join_ibss(struct cfg80211_registered_device *rdev, · 103 unmodified lines | ||
| 104 | 104 | struct ieee80211_supported_band *sband = |
| 105 | 105 | rdev->wiphy.bands[params->chandef.chan->band]; |
| 106 | 106 | int j; |
| 107 | − u32 flag = params->chandef.chan->band == IEEE80211_BAND_5GHZ ? | |
| 107 | + u32 flag = params->chandef.chan->band == NL80211_BAND_5GHZ ? | |
| 108 | 108 | IEEE80211_RATE_MANDATORY_A : |
| 109 | 109 | IEEE80211_RATE_MANDATORY_B; |
| 110 | 110 | |
| @@ -236,7 +236,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, · 125 unmodified lines | ||
| 236 | 236 | struct wireless_dev *wdev) |
| 237 | 237 | { |
| 238 | 238 | struct cfg80211_cached_keys *ck = NULL; |
| 239 | − enum ieee80211_band band; | |
| 239 | + enum nl80211_band band; | |
| 240 | 240 | int i, err; |
| 241 | 241 | |
| 242 | 242 | ASSERT_WDEV_LOCK(wdev); |
| @@ -248,7 +248,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, · 5 unmodified lines | ||
| 248 | 248 | if (!wdev->wext.ibss.chandef.chan) { |
| 249 | 249 | struct ieee80211_channel *new_chan = NULL; |
| 250 | 250 | |
| 251 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 251 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 252 | 252 | struct ieee80211_supported_band *sband; |
| 253 | 253 | struct ieee80211_channel *chan; |
| 254 | 254 | |
| @@ -128,9 +128,9 @@ int __cfg80211_join_mesh(struct cfg80211_registered_device *rdev, · 127 unmodified lines | ||
| 128 | 128 | |
| 129 | 129 | if (!setup->chandef.chan) { |
| 130 | 130 | /* if we don't have that either, use the first usable channel */ |
| 131 | − enum ieee80211_band band; | |
| 131 | + enum nl80211_band band; | |
| 132 | 132 | |
| 133 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 133 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 134 | 134 | struct ieee80211_supported_band *sband; |
| 135 | 135 | struct ieee80211_channel *chan; |
| 136 | 136 | int i; |
| @@ -726,7 +726,7 @@ void cfg80211_dfs_channels_update_work(struct work_struct *work) · 725 unmodified lines | ||
| 726 | 726 | wiphy = &rdev->wiphy; |
| 727 | 727 | |
| 728 | 728 | rtnl_lock(); |
| 729 | − for (bandid = 0; bandid < IEEE80211_NUM_BANDS; bandid++) { | |
| 729 | + for (bandid = 0; bandid < NUM_NL80211_BANDS; bandid++) { | |
| 730 | 730 | sband = wiphy->bands[bandid]; |
| 731 | 731 | if (!sband) |
| 732 | 732 | continue; |
| @@ -1277,7 +1277,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · 1276 unmodified lines | ||
| 1277 | 1277 | struct nlattr *nl_bands, *nl_band; |
| 1278 | 1278 | struct nlattr *nl_freqs, *nl_freq; |
| 1279 | 1279 | struct nlattr *nl_cmds; |
| 1280 | − enum ieee80211_band band; | |
| 1280 | + enum nl80211_band band; | |
| 1281 | 1281 | struct ieee80211_channel *chan; |
| 1282 | 1282 | int i; |
| 1283 | 1283 | const struct ieee80211_txrx_stypes *mgmt_stypes = |
| @@ -1410,7 +1410,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · 126 unmodified lines | ||
| 1410 | 1410 | goto nla_put_failure; |
| 1411 | 1411 | |
| 1412 | 1412 | for (band = state->band_start; |
| 1413 | − band < IEEE80211_NUM_BANDS; band++) { | |
| 1413 | + band < NUM_NL80211_BANDS; band++) { | |
| 1414 | 1414 | struct ieee80211_supported_band *sband; |
| 1415 | 1415 | |
| 1416 | 1416 | sband = rdev->wiphy.bands[band]; |
| @@ -1472,7 +1472,7 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *rdev, · 55 unmodified lines | ||
| 1472 | 1472 | } |
| 1473 | 1473 | nla_nest_end(msg, nl_bands); |
| 1474 | 1474 | |
| 1475 | − if (band < IEEE80211_NUM_BANDS) | |
| 1475 | + if (band < NUM_NL80211_BANDS) | |
| 1476 | 1476 | state->band_start = band + 1; |
| 1477 | 1477 | else |
| 1478 | 1478 | state->band_start = 0; |
| @@ -3493,7 +3493,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) · 2014 unmodified lines | ||
| 3493 | 3493 | } |
| 3494 | 3494 | |
| 3495 | 3495 | 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]) | |
| 3497 | 3497 | return -EOPNOTSUPP; |
| 3498 | 3498 | |
| 3499 | 3499 | wdev_lock(wdev); |
| @@ -5821,9 +5821,9 @@ static int validate_scan_freqs(struct nlattr *freqs) · 2321 unmodified lines | ||
| 5821 | 5821 | return n_channels; |
| 5822 | 5822 | } |
| 5823 | 5823 | |
| 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) | |
| 5825 | 5825 | { |
| 5826 | − return b < IEEE80211_NUM_BANDS && wiphy->bands[b]; | |
| 5826 | + return b < NUM_NL80211_BANDS && wiphy->bands[b]; | |
| 5827 | 5827 | } |
| 5828 | 5828 | |
| 5829 | 5829 | 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 | ||
| 6018 | 6018 | i++; |
| 6019 | 6019 | } |
| 6020 | 6020 | } else { |
| 6021 | − enum ieee80211_band band; | |
| 6021 | + enum nl80211_band band; | |
| 6022 | 6022 | |
| 6023 | 6023 | /* all channels */ |
| 6024 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 6024 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 6025 | 6025 | int j; |
| 6026 | 6026 | if (!wiphy->bands[band]) |
| 6027 | 6027 | continue; |
| @@ -6066,7 +6066,7 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) · 38 unmodified lines | ||
| 6066 | 6066 | request->ie_len); |
| 6067 | 6067 | } |
| 6068 | 6068 | |
| 6069 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) | |
| 6069 | + for (i = 0; i < NUM_NL80211_BANDS; i++) | |
| 6070 | 6070 | if (wiphy->bands[i]) |
| 6071 | 6071 | request->rates[i] = |
| 6072 | 6072 | (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 | ||
| 6075 | 6075 | nla_for_each_nested(attr, |
| 6076 | 6076 | info->attrs[NL80211_ATTR_SCAN_SUPP_RATES], |
| 6077 | 6077 | tmp) { |
| 6078 | − enum ieee80211_band band = nla_type(attr); | |
| 6078 | + enum nl80211_band band = nla_type(attr); | |
| 6079 | 6079 | |
| 6080 | − if (band < 0 || band >= IEEE80211_NUM_BANDS) { | |
| 6080 | + if (band < 0 || band >= NUM_NL80211_BANDS) { | |
| 6081 | 6081 | err = -EINVAL; |
| 6082 | 6082 | goto out_free; |
| 6083 | 6083 | } |
| @@ -6265,7 +6265,7 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, · 181 unmodified lines | ||
| 6265 | 6265 | struct cfg80211_sched_scan_request *request; |
| 6266 | 6266 | struct nlattr *attr; |
| 6267 | 6267 | 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; | |
| 6269 | 6269 | size_t ie_len; |
| 6270 | 6270 | struct nlattr *tb[NL80211_SCHED_SCAN_MATCH_ATTR_MAX + 1]; |
| 6271 | 6271 | 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 | ||
| 6430 | 6430 | } |
| 6431 | 6431 | } else { |
| 6432 | 6432 | /* all channels */ |
| 6433 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 6433 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 6434 | 6434 | int j; |
| 6435 | 6435 | if (!wiphy->bands[band]) |
| 6436 | 6436 | continue; |
| @@ -7538,14 +7538,14 @@ static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info) · 1101 unmodified lines | ||
| 7538 | 7538 | |
| 7539 | 7539 | static bool |
| 7540 | 7540 | nl80211_parse_mcast_rate(struct cfg80211_registered_device *rdev, |
| 7541 | − int mcast_rate[IEEE80211_NUM_BANDS], | |
| 7541 | + int mcast_rate[NUM_NL80211_BANDS], | |
| 7542 | 7542 | int rateval) |
| 7543 | 7543 | { |
| 7544 | 7544 | struct wiphy *wiphy = &rdev->wiphy; |
| 7545 | 7545 | bool found = false; |
| 7546 | 7546 | int band, i; |
| 7547 | 7547 | |
| 7548 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 7548 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 7549 | 7549 | struct ieee80211_supported_band *sband; |
| 7550 | 7550 | |
| 7551 | 7551 | 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 | ||
| 7725 | 7725 | { |
| 7726 | 7726 | struct cfg80211_registered_device *rdev = info->user_ptr[0]; |
| 7727 | 7727 | struct net_device *dev = info->user_ptr[1]; |
| 7728 | − int mcast_rate[IEEE80211_NUM_BANDS]; | |
| 7728 | + int mcast_rate[NUM_NL80211_BANDS]; | |
| 7729 | 7729 | u32 nla_rate; |
| 7730 | 7730 | int err; |
| 7731 | 7731 | |
| @@ -8130,7 +8130,7 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) · 398 unmodified lines | ||
| 8130 | 8130 | } |
| 8131 | 8131 | |
| 8132 | 8132 | 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]) { | |
| 8134 | 8134 | kzfree(connkeys); |
| 8135 | 8135 | return -EOPNOTSUPP; |
| 8136 | 8136 | } |
| @@ -8550,7 +8550,7 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, · 413 unmodified lines | ||
| 8550 | 8550 | |
| 8551 | 8551 | memset(&mask, 0, sizeof(mask)); |
| 8552 | 8552 | /* Default to all rates enabled */ |
| 8553 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) { | |
| 8553 | + for (i = 0; i < NUM_NL80211_BANDS; i++) { | |
| 8554 | 8554 | sband = rdev->wiphy.bands[i]; |
| 8555 | 8555 | |
| 8556 | 8556 | if (!sband) |
| @@ -8574,14 +8574,14 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb, · 17 unmodified lines | ||
| 8574 | 8574 | |
| 8575 | 8575 | /* |
| 8576 | 8576 | * 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. | |
| 8578 | 8578 | */ |
| 8579 | 8579 | BUILD_BUG_ON(NL80211_MAX_SUPP_HT_RATES > IEEE80211_HT_MCS_MASK_LEN * 8); |
| 8580 | 8580 | 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); | |
| 8582 | 8582 | int err; |
| 8583 | 8583 | |
| 8584 | − if (band < 0 || band >= IEEE80211_NUM_BANDS) | |
| 8584 | + if (band < 0 || band >= NUM_NL80211_BANDS) | |
| 8585 | 8585 | return -EINVAL; |
| 8586 | 8586 | sband = rdev->wiphy.bands[band]; |
| 8587 | 8587 | if (sband == NULL) |
| @@ -10746,7 +10746,7 @@ static int nl80211_tdls_channel_switch(struct sk_buff *skb, · 2158 unmodified lines | ||
| 10746 | 10746 | * section 10.22.6.2.1. Disallow 5/10Mhz channels as well for now, the |
| 10747 | 10747 | * specification is not defined for them. |
| 10748 | 10748 | */ |
| 10749 | − if (chandef.chan->band == IEEE80211_BAND_2GHZ && | |
| 10749 | + if (chandef.chan->band == NL80211_BAND_2GHZ && | |
| 10750 | 10750 | chandef.width != NL80211_CHAN_WIDTH_20_NOHT && |
| 10751 | 10751 | chandef.width != NL80211_CHAN_WIDTH_20) |
| 10752 | 10752 | return -EINVAL; |
| @@ -1048,7 +1048,7 @@ rdev_start_radar_detection(struct cfg80211_registered_device *rdev, · 1047 unmodified lines | ||
| 1048 | 1048 | static inline int |
| 1049 | 1049 | rdev_set_mcast_rate(struct cfg80211_registered_device *rdev, |
| 1050 | 1050 | struct net_device *dev, |
| 1051 | − int mcast_rate[IEEE80211_NUM_BANDS]) | |
| 1051 | + int mcast_rate[NUM_NL80211_BANDS]) | |
| 1052 | 1052 | { |
| 1053 | 1053 | int ret = -ENOTSUPP; |
| 1054 | 1054 | |
| @@ -1546,12 +1546,12 @@ static void reg_process_ht_flags_band(struct wiphy *wiphy, · 1545 unmodified lines | ||
| 1546 | 1546 | |
| 1547 | 1547 | static void reg_process_ht_flags(struct wiphy *wiphy) |
| 1548 | 1548 | { |
| 1549 | − enum ieee80211_band band; | |
| 1549 | + enum nl80211_band band; | |
| 1550 | 1550 | |
| 1551 | 1551 | if (!wiphy) |
| 1552 | 1552 | return; |
| 1553 | 1553 | |
| 1554 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) | |
| 1554 | + for (band = 0; band < NUM_NL80211_BANDS; band++) | |
| 1555 | 1555 | reg_process_ht_flags_band(wiphy, wiphy->bands[band]); |
| 1556 | 1556 | } |
| 1557 | 1557 | |
| @@ -1673,7 +1673,7 @@ static void reg_check_channels(void) · 115 unmodified lines | ||
| 1673 | 1673 | static void wiphy_update_regulatory(struct wiphy *wiphy, |
| 1674 | 1674 | enum nl80211_reg_initiator initiator) |
| 1675 | 1675 | { |
| 1676 | − enum ieee80211_band band; | |
| 1676 | + enum nl80211_band band; | |
| 1677 | 1677 | struct regulatory_request *lr = get_last_request(); |
| 1678 | 1678 | |
| 1679 | 1679 | if (ignore_reg_update(wiphy, initiator)) { |
| @@ -1690,7 +1690,7 @@ static void wiphy_update_regulatory(struct wiphy *wiphy, · 10 unmodified lines | ||
| 1690 | 1690 | |
| 1691 | 1691 | lr->dfs_region = get_cfg80211_regdom()->dfs_region; |
| 1692 | 1692 | |
| 1693 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) | |
| 1693 | + for (band = 0; band < NUM_NL80211_BANDS; band++) | |
| 1694 | 1694 | handle_band(wiphy, initiator, wiphy->bands[band]); |
| 1695 | 1695 | |
| 1696 | 1696 | reg_process_beacons(wiphy); |
| @@ -1786,14 +1786,14 @@ static void handle_band_custom(struct wiphy *wiphy, · 89 unmodified lines | ||
| 1786 | 1786 | void wiphy_apply_custom_regulatory(struct wiphy *wiphy, |
| 1787 | 1787 | const struct ieee80211_regdomain *regd) |
| 1788 | 1788 | { |
| 1789 | − enum ieee80211_band band; | |
| 1789 | + enum nl80211_band band; | |
| 1790 | 1790 | unsigned int bands_set = 0; |
| 1791 | 1791 | |
| 1792 | 1792 | WARN(!(wiphy->regulatory_flags & REGULATORY_CUSTOM_REG), |
| 1793 | 1793 | "wiphy should have REGULATORY_CUSTOM_REG\n"); |
| 1794 | 1794 | wiphy->regulatory_flags |= REGULATORY_CUSTOM_REG; |
| 1795 | 1795 | |
| 1796 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 1796 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 1797 | 1797 | if (!wiphy->bands[band]) |
| 1798 | 1798 | continue; |
| 1799 | 1799 | handle_band_custom(wiphy, wiphy->bands[band], regd); |
| @@ -2228,7 +2228,7 @@ static void reg_process_self_managed_hints(void) · 428 unmodified lines | ||
| 2228 | 2228 | struct wiphy *wiphy; |
| 2229 | 2229 | const struct ieee80211_regdomain *tmp; |
| 2230 | 2230 | const struct ieee80211_regdomain *regd; |
| 2231 | − enum ieee80211_band band; | |
| 2231 | + enum nl80211_band band; | |
| 2232 | 2232 | struct regulatory_request request = {}; |
| 2233 | 2233 | |
| 2234 | 2234 | list_for_each_entry(rdev, &cfg80211_rdev_list, list) { |
| @@ -2246,7 +2246,7 @@ static void reg_process_self_managed_hints(void) · 11 unmodified lines | ||
| 2246 | 2246 | rcu_assign_pointer(wiphy->regd, regd); |
| 2247 | 2247 | rcu_free_regdom(tmp); |
| 2248 | 2248 | |
| 2249 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) | |
| 2249 | + for (band = 0; band < NUM_NL80211_BANDS; band++) | |
| 2250 | 2250 | handle_band_custom(wiphy, wiphy->bands[band], regd); |
| 2251 | 2251 | |
| 2252 | 2252 | reg_process_ht_flags(wiphy); |
| @@ -2404,7 +2404,7 @@ int regulatory_hint(struct wiphy *wiphy, const char *alpha2) · 151 unmodified lines | ||
| 2404 | 2404 | } |
| 2405 | 2405 | EXPORT_SYMBOL(regulatory_hint); |
| 2406 | 2406 | |
| 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, | |
| 2408 | 2408 | const u8 *country_ie, u8 country_ie_len) |
| 2409 | 2409 | { |
| 2410 | 2410 | char alpha2[2]; |
| @@ -2504,11 +2504,11 @@ static void restore_alpha2(char *alpha2, bool reset_user) · 93 unmodified lines | ||
| 2504 | 2504 | static void restore_custom_reg_settings(struct wiphy *wiphy) |
| 2505 | 2505 | { |
| 2506 | 2506 | struct ieee80211_supported_band *sband; |
| 2507 | − enum ieee80211_band band; | |
| 2507 | + enum nl80211_band band; | |
| 2508 | 2508 | struct ieee80211_channel *chan; |
| 2509 | 2509 | int i; |
| 2510 | 2510 | |
| 2511 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 2511 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 2512 | 2512 | sband = wiphy->bands[band]; |
| 2513 | 2513 | if (!sband) |
| 2514 | 2514 | continue; |
| @@ -2623,9 +2623,9 @@ void regulatory_hint_disconnect(void) · 108 unmodified lines | ||
| 2623 | 2623 | |
| 2624 | 2624 | static bool freq_is_chan_12_13_14(u16 freq) |
| 2625 | 2625 | { |
| 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)) | |
| 2629 | 2629 | return true; |
| 2630 | 2630 | return false; |
| 2631 | 2631 | } |
| @@ -2650,7 +2650,7 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy, · 18 unmodified lines | ||
| 2650 | 2650 | |
| 2651 | 2651 | if (beacon_chan->beacon_found || |
| 2652 | 2652 | beacon_chan->flags & IEEE80211_CHAN_RADAR || |
| 2653 | − (beacon_chan->band == IEEE80211_BAND_2GHZ && | |
| 2653 | + (beacon_chan->band == NL80211_BAND_2GHZ && | |
| 2654 | 2654 | !freq_is_chan_12_13_14(beacon_chan->center_freq))) |
| 2655 | 2655 | return 0; |
| 2656 | 2656 | |
| @@ -104,7 +104,7 @@ int regulatory_hint_found_beacon(struct wiphy *wiphy, · 103 unmodified lines | ||
| 104 | 104 | * information for a band the BSS is not present in it will be ignored. |
| 105 | 105 | */ |
| 106 | 106 | void regulatory_hint_country_ie(struct wiphy *wiphy, |
| 107 | − enum ieee80211_band band, | |
| 107 | + enum nl80211_band band, | |
| 108 | 108 | const u8 *country_ie, |
| 109 | 109 | u8 country_ie_len); |
| 110 | 110 | |
| @@ -531,7 +531,7 @@ static int cmp_bss(struct cfg80211_bss *a, · 530 unmodified lines | ||
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | static bool cfg80211_bss_type_match(u16 capability, |
| 534 | − enum ieee80211_band band, | |
| 534 | + enum nl80211_band band, | |
| 535 | 535 | enum ieee80211_bss_type bss_type) |
| 536 | 536 | { |
| 537 | 537 | bool ret = true; |
| @@ -540,7 +540,7 @@ static bool cfg80211_bss_type_match(u16 capability, · 2 unmodified lines | ||
| 540 | 540 | if (bss_type == IEEE80211_BSS_TYPE_ANY) |
| 541 | 541 | return ret; |
| 542 | 542 | |
| 543 | − if (band == IEEE80211_BAND_60GHZ) { | |
| 543 | + if (band == NL80211_BAND_60GHZ) { | |
| 544 | 544 | mask = WLAN_CAPABILITY_DMG_TYPE_MASK; |
| 545 | 545 | switch (bss_type) { |
| 546 | 546 | case IEEE80211_BSS_TYPE_ESS: |
| @@ -1006,7 +1006,7 @@ cfg80211_inform_bss_data(struct wiphy *wiphy, · 459 unmodified lines | ||
| 1006 | 1006 | if (!res) |
| 1007 | 1007 | return NULL; |
| 1008 | 1008 | |
| 1009 | − if (channel->band == IEEE80211_BAND_60GHZ) { | |
| 1009 | + if (channel->band == NL80211_BAND_60GHZ) { | |
| 1010 | 1010 | bss_type = res->pub.capability & WLAN_CAPABILITY_DMG_TYPE_MASK; |
| 1011 | 1011 | if (bss_type == WLAN_CAPABILITY_DMG_TYPE_AP || |
| 1012 | 1012 | bss_type == WLAN_CAPABILITY_DMG_TYPE_PBSS) |
| @@ -1089,7 +1089,7 @@ cfg80211_inform_bss_frame_data(struct wiphy *wiphy, · 76 unmodified lines | ||
| 1089 | 1089 | if (!res) |
| 1090 | 1090 | return NULL; |
| 1091 | 1091 | |
| 1092 | − if (channel->band == IEEE80211_BAND_60GHZ) { | |
| 1092 | + if (channel->band == NL80211_BAND_60GHZ) { | |
| 1093 | 1093 | bss_type = res->pub.capability & WLAN_CAPABILITY_DMG_TYPE_MASK; |
| 1094 | 1094 | if (bss_type == WLAN_CAPABILITY_DMG_TYPE_AP || |
| 1095 | 1095 | bss_type == WLAN_CAPABILITY_DMG_TYPE_PBSS) |
| @@ -1185,7 +1185,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, · 89 unmodified lines | ||
| 1185 | 1185 | struct iw_scan_req *wreq = NULL; |
| 1186 | 1186 | struct cfg80211_scan_request *creq = NULL; |
| 1187 | 1187 | int i, err, n_channels = 0; |
| 1188 | − enum ieee80211_band band; | |
| 1188 | + enum nl80211_band band; | |
| 1189 | 1189 | |
| 1190 | 1190 | if (!netif_running(dev)) |
| 1191 | 1191 | return -ENETDOWN; |
| @@ -1229,7 +1229,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, · 37 unmodified lines | ||
| 1229 | 1229 | |
| 1230 | 1230 | /* translate "Scan on frequencies" request */ |
| 1231 | 1231 | i = 0; |
| 1232 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 1232 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 1233 | 1233 | int j; |
| 1234 | 1234 | |
| 1235 | 1235 | if (!wiphy->bands[band]) |
| @@ -1289,7 +1289,7 @@ int cfg80211_wext_siwscan(struct net_device *dev, · 53 unmodified lines | ||
| 1289 | 1289 | creq->n_ssids = 0; |
| 1290 | 1290 | } |
| 1291 | 1291 | |
| 1292 | − for (i = 0; i < IEEE80211_NUM_BANDS; i++) | |
| 1292 | + for (i = 0; i < NUM_NL80211_BANDS; i++) | |
| 1293 | 1293 | if (wiphy->bands[i]) |
| 1294 | 1294 | creq->rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1; |
| 1295 | 1295 | |
| @@ -81,7 +81,7 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) · 80 unmodified lines | ||
| 81 | 81 | return -ENOMEM; |
| 82 | 82 | |
| 83 | 83 | 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; | |
| 85 | 85 | struct ieee80211_supported_band *sband = |
| 86 | 86 | wdev->wiphy->bands[band]; |
| 87 | 87 | |
| @@ -93,11 +93,11 @@ static int cfg80211_conn_scan(struct wireless_dev *wdev) · 5 unmodified lines | ||
| 93 | 93 | request->rates[band] = (1 << sband->n_bitrates) - 1; |
| 94 | 94 | } else { |
| 95 | 95 | int i = 0, j; |
| 96 | − enum ieee80211_band band; | |
| 96 | + enum nl80211_band band; | |
| 97 | 97 | struct ieee80211_supported_band *bands; |
| 98 | 98 | struct ieee80211_channel *channel; |
| 99 | 99 | |
| 100 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 100 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 101 | 101 | bands = wdev->wiphy->bands[band]; |
| 102 | 102 | if (!bands) |
| 103 | 103 | continue; |
| @@ -110,7 +110,7 @@ · 109 unmodified lines | ||
| 110 | 110 | conf->dot11MeshHWMPconfirmationInterval; \ |
| 111 | 111 | } while (0) |
| 112 | 112 | |
| 113 | −#define CHAN_ENTRY __field(enum ieee80211_band, band) \ | |
| 113 | +#define CHAN_ENTRY __field(enum nl80211_band, band) \ | |
| 114 | 114 | __field(u16, center_freq) |
| 115 | 115 | #define CHAN_ASSIGN(chan) \ |
| 116 | 116 | do { \ |
| @@ -125,7 +125,7 @@ · 8 unmodified lines | ||
| 125 | 125 | #define CHAN_PR_FMT "band: %d, freq: %u" |
| 126 | 126 | #define CHAN_PR_ARG __entry->band, __entry->center_freq |
| 127 | 127 | |
| 128 | −#define CHAN_DEF_ENTRY __field(enum ieee80211_band, band) \ | |
| 128 | +#define CHAN_DEF_ENTRY __field(enum nl80211_band, band) \ | |
| 129 | 129 | __field(u32, control_freq) \ |
| 130 | 130 | __field(u32, width) \ |
| 131 | 131 | __field(u32, center_freq1) \ |
| @@ -2647,7 +2647,7 @@ TRACE_EVENT(cfg80211_scan_done, · 2515 unmodified lines | ||
| 2647 | 2647 | TP_STRUCT__entry( |
| 2648 | 2648 | __field(u32, n_channels) |
| 2649 | 2649 | __dynamic_array(u8, ie, request ? request->ie_len : 0) |
| 2650 | − __array(u32, rates, IEEE80211_NUM_BANDS) | |
| 2650 | + __array(u32, rates, NUM_NL80211_BANDS) | |
| 2651 | 2651 | __field(u32, wdev_id) |
| 2652 | 2652 | MAC_ENTRY(wiphy_mac) |
| 2653 | 2653 | __field(bool, no_cck) |
| @@ -2658,7 +2658,7 @@ TRACE_EVENT(cfg80211_scan_done, · 4 unmodified lines | ||
| 2658 | 2658 | memcpy(__get_dynamic_array(ie), request->ie, |
| 2659 | 2659 | request->ie_len); |
| 2660 | 2660 | memcpy(__entry->rates, request->rates, |
| 2661 | − IEEE80211_NUM_BANDS); | |
| 2661 | + NUM_NL80211_BANDS); | |
| 2662 | 2662 | __entry->wdev_id = request->wdev ? |
| 2663 | 2663 | request->wdev->identifier : 0; |
| 2664 | 2664 | if (request->wiphy) |
| @@ -2883,25 +2883,25 @@ TRACE_EVENT(rdev_start_radar_detection, · 218 unmodified lines | ||
| 2883 | 2883 | |
| 2884 | 2884 | TRACE_EVENT(rdev_set_mcast_rate, |
| 2885 | 2885 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 2886 | − int mcast_rate[IEEE80211_NUM_BANDS]), | |
| 2886 | + int mcast_rate[NUM_NL80211_BANDS]), | |
| 2887 | 2887 | TP_ARGS(wiphy, netdev, mcast_rate), |
| 2888 | 2888 | TP_STRUCT__entry( |
| 2889 | 2889 | WIPHY_ENTRY |
| 2890 | 2890 | NETDEV_ENTRY |
| 2891 | − __array(int, mcast_rate, IEEE80211_NUM_BANDS) | |
| 2891 | + __array(int, mcast_rate, NUM_NL80211_BANDS) | |
| 2892 | 2892 | ), |
| 2893 | 2893 | TP_fast_assign( |
| 2894 | 2894 | WIPHY_ASSIGN; |
| 2895 | 2895 | NETDEV_ASSIGN; |
| 2896 | 2896 | memcpy(__entry->mcast_rate, mcast_rate, |
| 2897 | − sizeof(int) * IEEE80211_NUM_BANDS); | |
| 2897 | + sizeof(int) * NUM_NL80211_BANDS); | |
| 2898 | 2898 | ), |
| 2899 | 2899 | TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " |
| 2900 | 2900 | "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]", |
| 2901 | 2901 | 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]) | |
| 2905 | 2905 | ); |
| 2906 | 2906 | |
| 2907 | 2907 | TRACE_EVENT(rdev_set_coalesce, |
| @@ -47,7 +47,7 @@ u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband, · 46 unmodified lines | ||
| 47 | 47 | if (WARN_ON(!sband)) |
| 48 | 48 | return 1; |
| 49 | 49 | |
| 50 | − if (sband->band == IEEE80211_BAND_2GHZ) { | |
| 50 | + if (sband->band == NL80211_BAND_2GHZ) { | |
| 51 | 51 | if (scan_width == NL80211_BSS_CHAN_WIDTH_5 || |
| 52 | 52 | scan_width == NL80211_BSS_CHAN_WIDTH_10) |
| 53 | 53 | mandatory_flag = IEEE80211_RATE_MANDATORY_G; |
| @@ -65,26 +65,26 @@ u32 ieee80211_mandatory_rates(struct ieee80211_supported_band *sband, · 11 unmodified lines | ||
| 65 | 65 | } |
| 66 | 66 | EXPORT_SYMBOL(ieee80211_mandatory_rates); |
| 67 | 67 | |
| 68 | −int ieee80211_channel_to_frequency(int chan, enum ieee80211_band band) | |
| 68 | +int ieee80211_channel_to_frequency(int chan, enum nl80211_band band) | |
| 69 | 69 | { |
| 70 | 70 | /* see 802.11 17.3.8.3.2 and Annex J |
| 71 | 71 | * there are overlapping channel numbers in 5GHz and 2GHz bands */ |
| 72 | 72 | if (chan <= 0) |
| 73 | 73 | return 0; /* not supported */ |
| 74 | 74 | switch (band) { |
| 75 | − case IEEE80211_BAND_2GHZ: | |
| 75 | + case NL80211_BAND_2GHZ: | |
| 76 | 76 | if (chan == 14) |
| 77 | 77 | return 2484; |
| 78 | 78 | else if (chan < 14) |
| 79 | 79 | return 2407 + chan * 5; |
| 80 | 80 | break; |
| 81 | − case IEEE80211_BAND_5GHZ: | |
| 81 | + case NL80211_BAND_5GHZ: | |
| 82 | 82 | if (chan >= 182 && chan <= 196) |
| 83 | 83 | return 4000 + chan * 5; |
| 84 | 84 | else |
| 85 | 85 | return 5000 + chan * 5; |
| 86 | 86 | break; |
| 87 | − case IEEE80211_BAND_60GHZ: | |
| 87 | + case NL80211_BAND_60GHZ: | |
| 88 | 88 | if (chan < 5) |
| 89 | 89 | return 56160 + chan * 2160; |
| 90 | 90 | break; |
| @@ -116,11 +116,11 @@ EXPORT_SYMBOL(ieee80211_frequency_to_channel); · 25 unmodified lines | ||
| 116 | 116 | struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, |
| 117 | 117 | int freq) |
| 118 | 118 | { |
| 119 | − enum ieee80211_band band; | |
| 119 | + enum nl80211_band band; | |
| 120 | 120 | struct ieee80211_supported_band *sband; |
| 121 | 121 | int i; |
| 122 | 122 | |
| 123 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 123 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 124 | 124 | sband = wiphy->bands[band]; |
| 125 | 125 | |
| 126 | 126 | if (!sband) |
| @@ -137,12 +137,12 @@ struct ieee80211_channel *__ieee80211_get_channel(struct wiphy *wiphy, · 10 unmodified lines | ||
| 137 | 137 | EXPORT_SYMBOL(__ieee80211_get_channel); |
| 138 | 138 | |
| 139 | 139 | static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, |
| 140 | − enum ieee80211_band band) | |
| 140 | + enum nl80211_band band) | |
| 141 | 141 | { |
| 142 | 142 | int i, want; |
| 143 | 143 | |
| 144 | 144 | switch (band) { |
| 145 | − case IEEE80211_BAND_5GHZ: | |
| 145 | + case NL80211_BAND_5GHZ: | |
| 146 | 146 | want = 3; |
| 147 | 147 | for (i = 0; i < sband->n_bitrates; i++) { |
| 148 | 148 | if (sband->bitrates[i].bitrate == 60 || |
| @@ -155,7 +155,7 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, · 6 unmodified lines | ||
| 155 | 155 | } |
| 156 | 156 | WARN_ON(want); |
| 157 | 157 | break; |
| 158 | − case IEEE80211_BAND_2GHZ: | |
| 158 | + case NL80211_BAND_2GHZ: | |
| 159 | 159 | want = 7; |
| 160 | 160 | for (i = 0; i < sband->n_bitrates; i++) { |
| 161 | 161 | if (sband->bitrates[i].bitrate == 10) { |
| @@ -185,12 +185,12 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, · 23 unmodified lines | ||
| 185 | 185 | } |
| 186 | 186 | WARN_ON(want != 0 && want != 3 && want != 6); |
| 187 | 187 | break; |
| 188 | − case IEEE80211_BAND_60GHZ: | |
| 188 | + case NL80211_BAND_60GHZ: | |
| 189 | 189 | /* check for mandatory HT MCS 1..4 */ |
| 190 | 190 | WARN_ON(!sband->ht_cap.ht_supported); |
| 191 | 191 | WARN_ON((sband->ht_cap.mcs.rx_mask[0] & 0x1e) != 0x1e); |
| 192 | 192 | break; |
| 193 | − case IEEE80211_NUM_BANDS: | |
| 193 | + case NUM_NL80211_BANDS: | |
| 194 | 194 | WARN_ON(1); |
| 195 | 195 | break; |
| 196 | 196 | } |
| @@ -198,9 +198,9 @@ static void set_mandatory_flags_band(struct ieee80211_supported_band *sband, · 1 unmodified line | ||
| 198 | 198 | |
| 199 | 199 | void ieee80211_set_bitrate_flags(struct wiphy *wiphy) |
| 200 | 200 | { |
| 201 | − enum ieee80211_band band; | |
| 201 | + enum nl80211_band band; | |
| 202 | 202 | |
| 203 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) | |
| 203 | + for (band = 0; band < NUM_NL80211_BANDS; band++) | |
| 204 | 204 | if (wiphy->bands[band]) |
| 205 | 205 | set_mandatory_flags_band(wiphy->bands[band], band); |
| 206 | 206 | } |
| @@ -1399,22 +1399,22 @@ size_t ieee80211_ie_split_ric(const u8 *ies, size_t ielen, · 1192 unmodified lines | ||
| 1399 | 1399 | EXPORT_SYMBOL(ieee80211_ie_split_ric); |
| 1400 | 1400 | |
| 1401 | 1401 | bool ieee80211_operating_class_to_band(u8 operating_class, |
| 1402 | − enum ieee80211_band *band) | |
| 1402 | + enum nl80211_band *band) | |
| 1403 | 1403 | { |
| 1404 | 1404 | switch (operating_class) { |
| 1405 | 1405 | case 112: |
| 1406 | 1406 | case 115 ... 127: |
| 1407 | 1407 | case 128 ... 130: |
| 1408 | − *band = IEEE80211_BAND_5GHZ; | |
| 1408 | + *band = NL80211_BAND_5GHZ; | |
| 1409 | 1409 | return true; |
| 1410 | 1410 | case 81: |
| 1411 | 1411 | case 82: |
| 1412 | 1412 | case 83: |
| 1413 | 1413 | case 84: |
| 1414 | − *band = IEEE80211_BAND_2GHZ; | |
| 1414 | + *band = NL80211_BAND_2GHZ; | |
| 1415 | 1415 | return true; |
| 1416 | 1416 | case 180: |
| 1417 | − *band = IEEE80211_BAND_60GHZ; | |
| 1417 | + *band = NL80211_BAND_60GHZ; | |
| 1418 | 1418 | return true; |
| 1419 | 1419 | } |
| 1420 | 1420 | |
| @@ -1726,10 +1726,10 @@ int ieee80211_get_ratemask(struct ieee80211_supported_band *sband, · 305 unmodified lines | ||
| 1726 | 1726 | |
| 1727 | 1727 | unsigned int ieee80211_get_num_supported_channels(struct wiphy *wiphy) |
| 1728 | 1728 | { |
| 1729 | − enum ieee80211_band band; | |
| 1729 | + enum nl80211_band band; | |
| 1730 | 1730 | unsigned int n_channels = 0; |
| 1731 | 1731 | |
| 1732 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) | |
| 1732 | + for (band = 0; band < NUM_NL80211_BANDS; band++) | |
| 1733 | 1733 | if (wiphy->bands[band]) |
| 1734 | 1734 | n_channels += wiphy->bands[band]->n_channels; |
| 1735 | 1735 | |
| @@ -32,13 +32,13 @@ int cfg80211_wext_giwname(struct net_device *dev, · 31 unmodified lines | ||
| 32 | 32 | if (!wdev) |
| 33 | 33 | return -EOPNOTSUPP; |
| 34 | 34 | |
| 35 | − sband = wdev->wiphy->bands[IEEE80211_BAND_5GHZ]; | |
| 35 | + sband = wdev->wiphy->bands[NL80211_BAND_5GHZ]; | |
| 36 | 36 | if (sband) { |
| 37 | 37 | is_a = true; |
| 38 | 38 | is_ht |= sband->ht_cap.ht_supported; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | − sband = wdev->wiphy->bands[IEEE80211_BAND_2GHZ]; | |
| 41 | + sband = wdev->wiphy->bands[NL80211_BAND_2GHZ]; | |
| 42 | 42 | if (sband) { |
| 43 | 43 | int i; |
| 44 | 44 | /* Check for mandatory rates */ |
| @@ -143,7 +143,7 @@ int cfg80211_wext_giwrange(struct net_device *dev, · 98 unmodified lines | ||
| 143 | 143 | { |
| 144 | 144 | struct wireless_dev *wdev = dev->ieee80211_ptr; |
| 145 | 145 | struct iw_range *range = (struct iw_range *) extra; |
| 146 | − enum ieee80211_band band; | |
| 146 | + enum nl80211_band band; | |
| 147 | 147 | int i, c = 0; |
| 148 | 148 | |
| 149 | 149 | if (!wdev) |
| @@ -215,7 +215,7 @@ int cfg80211_wext_giwrange(struct net_device *dev, · 65 unmodified lines | ||
| 215 | 215 | } |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | − for (band = 0; band < IEEE80211_NUM_BANDS; band ++) { | |
| 218 | + for (band = 0; band < NUM_NL80211_BANDS; band ++) { | |
| 219 | 219 | struct ieee80211_supported_band *sband; |
| 220 | 220 | |
| 221 | 221 | sband = wdev->wiphy->bands[band]; |
| @@ -265,11 +265,11 @@ int cfg80211_wext_freq(struct iw_freq *freq) · 43 unmodified lines | ||
| 265 | 265 | * -EINVAL for impossible things. |
| 266 | 266 | */ |
| 267 | 267 | if (freq->e == 0) { |
| 268 | − enum ieee80211_band band = IEEE80211_BAND_2GHZ; | |
| 268 | + enum nl80211_band band = NL80211_BAND_2GHZ; | |
| 269 | 269 | if (freq->m < 0) |
| 270 | 270 | return 0; |
| 271 | 271 | if (freq->m > 14) |
| 272 | − band = IEEE80211_BAND_5GHZ; | |
| 272 | + band = NL80211_BAND_5GHZ; | |
| 273 | 273 | return ieee80211_channel_to_frequency(freq->m, band); |
| 274 | 274 | } else { |
| 275 | 275 | int i, div = 1000000; |
| @@ -1245,7 +1245,7 @@ static int cfg80211_wext_siwrate(struct net_device *dev, · 969 unmodified lines | ||
| 1245 | 1245 | maxrate = rate->value / 100000; |
| 1246 | 1246 | } |
| 1247 | 1247 | |
| 1248 | − for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | |
| 1248 | + for (band = 0; band < NUM_NL80211_BANDS; band++) { | |
| 1249 | 1249 | sband = wdev->wiphy->bands[band]; |
| 1250 | 1250 | if (sband == NULL) |
| 1251 | 1251 | continue; |