diff options
Diffstat (limited to 'drivers')
191 files changed, 1193 insertions, 1193 deletions
diff --git a/drivers/net/wireless/admtek/adm8211.c b/drivers/net/wireless/admtek/adm8211.c index 15f057ed41ad..70ecd82d674d 100644 --- a/drivers/net/wireless/admtek/adm8211.c +++ b/drivers/net/wireless/admtek/adm8211.c | |||
| @@ -440,7 +440,7 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev) | |||
| 440 | rx_status.rate_idx = rate; | 440 | rx_status.rate_idx = rate; |
| 441 | 441 | ||
| 442 | rx_status.freq = adm8211_channels[priv->channel - 1].center_freq; | 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 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); | 445 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); |
| 446 | ieee80211_rx_irqsafe(dev, skb); | 446 | ieee80211_rx_irqsafe(dev, skb); |
| @@ -1894,7 +1894,7 @@ static int adm8211_probe(struct pci_dev *pdev, | |||
| 1894 | 1894 | ||
| 1895 | priv->channel = 1; | 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 | err = ieee80211_register_hw(dev); | 1899 | err = ieee80211_register_hw(dev); |
| 1900 | if (err) { | 1900 | if (err) { |
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c index 3b343c63aa52..8aded24bcdf4 100644 --- a/drivers/net/wireless/ath/ar5523/ar5523.c +++ b/drivers/net/wireless/ath/ar5523/ar5523.c | |||
| @@ -1471,12 +1471,12 @@ static int ar5523_init_modes(struct ar5523 *ar) | |||
| 1471 | memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels)); | 1471 | memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels)); |
| 1472 | memcpy(ar->rates, ar5523_rates, sizeof(ar5523_rates)); | 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 | ar->band.channels = ar->channels; | 1475 | ar->band.channels = ar->channels; |
| 1476 | ar->band.n_channels = ARRAY_SIZE(ar5523_channels); | 1476 | ar->band.n_channels = ARRAY_SIZE(ar5523_channels); |
| 1477 | ar->band.bitrates = ar->rates; | 1477 | ar->band.bitrates = ar->rates; |
| 1478 | ar->band.n_bitrates = ARRAY_SIZE(ar5523_rates); | 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 | return 0; | 1480 | return 0; |
| 1481 | } | 1481 | } |
| 1482 | 1482 | ||
diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h index 65ef483ebf50..da7a7c8dafb2 100644 --- a/drivers/net/wireless/ath/ath.h +++ b/drivers/net/wireless/ath/ath.h | |||
| @@ -185,7 +185,7 @@ struct ath_common { | |||
| 185 | bool bt_ant_diversity; | 185 | bool bt_ant_diversity; |
| 186 | 186 | ||
| 187 | int last_rssi; | 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 | static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common) | 191 | static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common) |
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index d85b99164212..362bbed8f0e9 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h | |||
| @@ -765,7 +765,7 @@ struct ath10k { | |||
| 765 | } scan; | 765 | } scan; |
| 766 | 766 | ||
| 767 | struct { | 767 | struct { |
| 768 | struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; | 768 | struct ieee80211_supported_band sbands[NUM_NL80211_BANDS]; |
| 769 | } mac; | 769 | } mac; |
| 770 | 770 | ||
| 771 | /* should never be NULL; needed for regular htt rx */ | 771 | /* should never be NULL; needed for regular htt rx */ |
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 9390897a00c6..079fef5b7ef2 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c | |||
| @@ -2182,9 +2182,9 @@ static void ath10k_htt_rx_tx_mode_switch_ind(struct ath10k *ar, | |||
| 2182 | ath10k_mac_tx_push_pending(ar); | 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 | switch (phy_mode) { | 2189 | switch (phy_mode) { |
| 2190 | case MODE_11A: | 2190 | case MODE_11A: |
| @@ -2193,7 +2193,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) | |||
| 2193 | case MODE_11AC_VHT20: | 2193 | case MODE_11AC_VHT20: |
| 2194 | case MODE_11AC_VHT40: | 2194 | case MODE_11AC_VHT40: |
| 2195 | case MODE_11AC_VHT80: | 2195 | case MODE_11AC_VHT80: |
| 2196 | band = IEEE80211_BAND_5GHZ; | 2196 | band = NL80211_BAND_5GHZ; |
| 2197 | break; | 2197 | break; |
| 2198 | case MODE_11G: | 2198 | case MODE_11G: |
| 2199 | case MODE_11B: | 2199 | case MODE_11B: |
| @@ -2204,7 +2204,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) | |||
| 2204 | case MODE_11AC_VHT40_2G: | 2204 | case MODE_11AC_VHT40_2G: |
| 2205 | case MODE_11AC_VHT80_2G: | 2205 | case MODE_11AC_VHT80_2G: |
| 2206 | default: | 2206 | default: |
| 2207 | band = IEEE80211_BAND_2GHZ; | 2207 | band = NL80211_BAND_2GHZ; |
| 2208 | } | 2208 | } |
| 2209 | 2209 | ||
| 2210 | return band; | 2210 | return band; |
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index b0e613bc10a5..6ace10bc96f5 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
| @@ -482,7 +482,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) | |||
| 482 | enum wmi_phy_mode phymode = MODE_UNKNOWN; | 482 | enum wmi_phy_mode phymode = MODE_UNKNOWN; |
| 483 | 483 | ||
| 484 | switch (chandef->chan->band) { | 484 | switch (chandef->chan->band) { |
| 485 | case IEEE80211_BAND_2GHZ: | 485 | case NL80211_BAND_2GHZ: |
| 486 | switch (chandef->width) { | 486 | switch (chandef->width) { |
| 487 | case NL80211_CHAN_WIDTH_20_NOHT: | 487 | case NL80211_CHAN_WIDTH_20_NOHT: |
| 488 | if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM) | 488 | if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM) |
| @@ -505,7 +505,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) | |||
| 505 | break; | 505 | break; |
| 506 | } | 506 | } |
| 507 | break; | 507 | break; |
| 508 | case IEEE80211_BAND_5GHZ: | 508 | case NL80211_BAND_5GHZ: |
| 509 | switch (chandef->width) { | 509 | switch (chandef->width) { |
| 510 | case NL80211_CHAN_WIDTH_20_NOHT: | 510 | case NL80211_CHAN_WIDTH_20_NOHT: |
| 511 | phymode = MODE_11A; | 511 | phymode = MODE_11A; |
| @@ -2055,7 +2055,7 @@ static void ath10k_peer_assoc_h_rates(struct ath10k *ar, | |||
| 2055 | struct cfg80211_chan_def def; | 2055 | struct cfg80211_chan_def def; |
| 2056 | const struct ieee80211_supported_band *sband; | 2056 | const struct ieee80211_supported_band *sband; |
| 2057 | const struct ieee80211_rate *rates; | 2057 | const struct ieee80211_rate *rates; |
| 2058 | enum ieee80211_band band; | 2058 | enum nl80211_band band; |
| 2059 | u32 ratemask; | 2059 | u32 ratemask; |
| 2060 | u8 rate; | 2060 | u8 rate; |
| 2061 | int i; | 2061 | int i; |
| @@ -2115,7 +2115,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, | |||
| 2115 | const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; | 2115 | const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; |
| 2116 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); | 2116 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 2117 | struct cfg80211_chan_def def; | 2117 | struct cfg80211_chan_def def; |
| 2118 | enum ieee80211_band band; | 2118 | enum nl80211_band band; |
| 2119 | const u8 *ht_mcs_mask; | 2119 | const u8 *ht_mcs_mask; |
| 2120 | const u16 *vht_mcs_mask; | 2120 | const u16 *vht_mcs_mask; |
| 2121 | int i, n; | 2121 | int i, n; |
| @@ -2339,7 +2339,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, | |||
| 2339 | const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; | 2339 | const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; |
| 2340 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); | 2340 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 2341 | struct cfg80211_chan_def def; | 2341 | struct cfg80211_chan_def def; |
| 2342 | enum ieee80211_band band; | 2342 | enum nl80211_band band; |
| 2343 | const u16 *vht_mcs_mask; | 2343 | const u16 *vht_mcs_mask; |
| 2344 | u8 ampdu_factor; | 2344 | u8 ampdu_factor; |
| 2345 | 2345 | ||
| @@ -2357,7 +2357,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, | |||
| 2357 | 2357 | ||
| 2358 | arg->peer_flags |= ar->wmi.peer_flags->vht; | 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 | arg->peer_flags |= ar->wmi.peer_flags->vht_2g; | 2361 | arg->peer_flags |= ar->wmi.peer_flags->vht_2g; |
| 2362 | 2362 | ||
| 2363 | arg->peer_vht_caps = vht_cap->cap; | 2363 | arg->peer_vht_caps = vht_cap->cap; |
| @@ -2426,7 +2426,7 @@ static void ath10k_peer_assoc_h_qos(struct ath10k *ar, | |||
| 2426 | 2426 | ||
| 2427 | static bool ath10k_mac_sta_has_ofdm_only(struct ieee80211_sta *sta) | 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 | ATH10K_MAC_FIRST_OFDM_RATE_IDX; | 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, | |||
| 2437 | { | 2437 | { |
| 2438 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); | 2438 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 2439 | struct cfg80211_chan_def def; | 2439 | struct cfg80211_chan_def def; |
| 2440 | enum ieee80211_band band; | 2440 | enum nl80211_band band; |
| 2441 | const u8 *ht_mcs_mask; | 2441 | const u8 *ht_mcs_mask; |
| 2442 | const u16 *vht_mcs_mask; | 2442 | const u16 *vht_mcs_mask; |
| 2443 | enum wmi_phy_mode phymode = MODE_UNKNOWN; | 2443 | enum wmi_phy_mode phymode = MODE_UNKNOWN; |
| @@ -2450,7 +2450,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, | |||
| 2450 | vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs; | 2450 | vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs; |
| 2451 | 2451 | ||
| 2452 | switch (band) { | 2452 | switch (band) { |
| 2453 | case IEEE80211_BAND_2GHZ: | 2453 | case NL80211_BAND_2GHZ: |
| 2454 | if (sta->vht_cap.vht_supported && | 2454 | if (sta->vht_cap.vht_supported && |
| 2455 | !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) { | 2455 | !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) { |
| 2456 | if (sta->bandwidth == IEEE80211_STA_RX_BW_40) | 2456 | if (sta->bandwidth == IEEE80211_STA_RX_BW_40) |
| @@ -2470,7 +2470,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, | |||
| 2470 | } | 2470 | } |
| 2471 | 2471 | ||
| 2472 | break; | 2472 | break; |
| 2473 | case IEEE80211_BAND_5GHZ: | 2473 | case NL80211_BAND_5GHZ: |
| 2474 | /* | 2474 | /* |
| 2475 | * Check VHT first. | 2475 | * Check VHT first. |
| 2476 | */ | 2476 | */ |
| @@ -2848,7 +2848,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) | |||
| 2848 | { | 2848 | { |
| 2849 | struct ieee80211_hw *hw = ar->hw; | 2849 | struct ieee80211_hw *hw = ar->hw; |
| 2850 | struct ieee80211_supported_band **bands; | 2850 | struct ieee80211_supported_band **bands; |
| 2851 | enum ieee80211_band band; | 2851 | enum nl80211_band band; |
| 2852 | struct ieee80211_channel *channel; | 2852 | struct ieee80211_channel *channel; |
| 2853 | struct wmi_scan_chan_list_arg arg = {0}; | 2853 | struct wmi_scan_chan_list_arg arg = {0}; |
| 2854 | struct wmi_channel_arg *ch; | 2854 | struct wmi_channel_arg *ch; |
| @@ -2860,7 +2860,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) | |||
| 2860 | lockdep_assert_held(&ar->conf_mutex); | 2860 | lockdep_assert_held(&ar->conf_mutex); |
| 2861 | 2861 | ||
| 2862 | bands = hw->wiphy->bands; | 2862 | bands = hw->wiphy->bands; |
| 2863 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | 2863 | for (band = 0; band < NUM_NL80211_BANDS; band++) { |
| 2864 | if (!bands[band]) | 2864 | if (!bands[band]) |
| 2865 | continue; | 2865 | continue; |
| 2866 | 2866 | ||
| @@ -2879,7 +2879,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) | |||
| 2879 | return -ENOMEM; | 2879 | return -ENOMEM; |
| 2880 | 2880 | ||
| 2881 | ch = arg.channels; | 2881 | ch = arg.channels; |
| 2882 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | 2882 | for (band = 0; band < NUM_NL80211_BANDS; band++) { |
| 2883 | if (!bands[band]) | 2883 | if (!bands[band]) |
| 2884 | continue; | 2884 | continue; |
| 2885 | 2885 | ||
| @@ -2917,7 +2917,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) | |||
| 2917 | /* FIXME: why use only legacy modes, why not any | 2917 | /* FIXME: why use only legacy modes, why not any |
| 2918 | * HT/VHT modes? Would that even make any | 2918 | * HT/VHT modes? Would that even make any |
| 2919 | * difference? */ | 2919 | * difference? */ |
| 2920 | if (channel->band == IEEE80211_BAND_2GHZ) | 2920 | if (channel->band == NL80211_BAND_2GHZ) |
| 2921 | ch->mode = MODE_11G; | 2921 | ch->mode = MODE_11G; |
| 2922 | else | 2922 | else |
| 2923 | ch->mode = MODE_11A; | 2923 | ch->mode = MODE_11A; |
| @@ -4254,14 +4254,14 @@ static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar) | |||
| 4254 | vht_cap = ath10k_create_vht_cap(ar); | 4254 | vht_cap = ath10k_create_vht_cap(ar); |
| 4255 | 4255 | ||
| 4256 | if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { | 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 | band->ht_cap = ht_cap; | 4258 | band->ht_cap = ht_cap; |
| 4259 | 4259 | ||
| 4260 | /* Enable the VHT support at 2.4 GHz */ | 4260 | /* Enable the VHT support at 2.4 GHz */ |
| 4261 | band->vht_cap = vht_cap; | 4261 | band->vht_cap = vht_cap; |
| 4262 | } | 4262 | } |
| 4263 | if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { | 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 | band->ht_cap = ht_cap; | 4265 | band->ht_cap = ht_cap; |
| 4266 | band->vht_cap = vht_cap; | 4266 | band->vht_cap = vht_cap; |
| 4267 | } | 4267 | } |
| @@ -5595,7 +5595,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) | |||
| 5595 | struct ath10k_sta *arsta; | 5595 | struct ath10k_sta *arsta; |
| 5596 | struct ieee80211_sta *sta; | 5596 | struct ieee80211_sta *sta; |
| 5597 | struct cfg80211_chan_def def; | 5597 | struct cfg80211_chan_def def; |
| 5598 | enum ieee80211_band band; | 5598 | enum nl80211_band band; |
| 5599 | const u8 *ht_mcs_mask; | 5599 | const u8 *ht_mcs_mask; |
| 5600 | const u16 *vht_mcs_mask; | 5600 | const u16 *vht_mcs_mask; |
| 5601 | u32 changed, bw, nss, smps; | 5601 | u32 changed, bw, nss, smps; |
| @@ -6394,14 +6394,14 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, | |||
| 6394 | 6394 | ||
| 6395 | mutex_lock(&ar->conf_mutex); | 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 | if (sband && idx >= sband->n_channels) { | 6398 | if (sband && idx >= sband->n_channels) { |
| 6399 | idx -= sband->n_channels; | 6399 | idx -= sband->n_channels; |
| 6400 | sband = NULL; | 6400 | sband = NULL; |
| 6401 | } | 6401 | } |
| 6402 | 6402 | ||
| 6403 | if (!sband) | 6403 | if (!sband) |
| 6404 | sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ]; | 6404 | sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; |
| 6405 | 6405 | ||
| 6406 | if (!sband || idx >= sband->n_channels) { | 6406 | if (!sband || idx >= sband->n_channels) { |
| 6407 | ret = -ENOENT; | 6407 | ret = -ENOENT; |
| @@ -6424,7 +6424,7 @@ exit: | |||
| 6424 | 6424 | ||
| 6425 | static bool | 6425 | static bool |
| 6426 | ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, | 6426 | ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, |
| 6427 | enum ieee80211_band band, | 6427 | enum nl80211_band band, |
| 6428 | const struct cfg80211_bitrate_mask *mask) | 6428 | const struct cfg80211_bitrate_mask *mask) |
| 6429 | { | 6429 | { |
| 6430 | int num_rates = 0; | 6430 | int num_rates = 0; |
| @@ -6443,7 +6443,7 @@ ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, | |||
| 6443 | 6443 | ||
| 6444 | static bool | 6444 | static bool |
| 6445 | ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, | 6445 | ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, |
| 6446 | enum ieee80211_band band, | 6446 | enum nl80211_band band, |
| 6447 | const struct cfg80211_bitrate_mask *mask, | 6447 | const struct cfg80211_bitrate_mask *mask, |
| 6448 | int *nss) | 6448 | int *nss) |
| 6449 | { | 6449 | { |
| @@ -6492,7 +6492,7 @@ ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, | |||
| 6492 | 6492 | ||
| 6493 | static int | 6493 | static int |
| 6494 | ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar, | 6494 | ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar, |
| 6495 | enum ieee80211_band band, | 6495 | enum nl80211_band band, |
| 6496 | const struct cfg80211_bitrate_mask *mask, | 6496 | const struct cfg80211_bitrate_mask *mask, |
| 6497 | u8 *rate, u8 *nss) | 6497 | u8 *rate, u8 *nss) |
| 6498 | { | 6498 | { |
| @@ -6593,7 +6593,7 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif, | |||
| 6593 | 6593 | ||
| 6594 | static bool | 6594 | static bool |
| 6595 | ath10k_mac_can_set_bitrate_mask(struct ath10k *ar, | 6595 | ath10k_mac_can_set_bitrate_mask(struct ath10k *ar, |
| 6596 | enum ieee80211_band band, | 6596 | enum nl80211_band band, |
| 6597 | const struct cfg80211_bitrate_mask *mask) | 6597 | const struct cfg80211_bitrate_mask *mask) |
| 6598 | { | 6598 | { |
| 6599 | int i; | 6599 | int i; |
| @@ -6645,7 +6645,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, | |||
| 6645 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); | 6645 | struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); |
| 6646 | struct cfg80211_chan_def def; | 6646 | struct cfg80211_chan_def def; |
| 6647 | struct ath10k *ar = arvif->ar; | 6647 | struct ath10k *ar = arvif->ar; |
| 6648 | enum ieee80211_band band; | 6648 | enum nl80211_band band; |
| 6649 | const u8 *ht_mcs_mask; | 6649 | const u8 *ht_mcs_mask; |
| 6650 | const u16 *vht_mcs_mask; | 6650 | const u16 *vht_mcs_mask; |
| 6651 | u8 rate; | 6651 | u8 rate; |
| @@ -7275,7 +7275,7 @@ static const struct ieee80211_ops ath10k_ops = { | |||
| 7275 | }; | 7275 | }; |
| 7276 | 7276 | ||
| 7277 | #define CHAN2G(_channel, _freq, _flags) { \ | 7277 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 7278 | .band = IEEE80211_BAND_2GHZ, \ | 7278 | .band = NL80211_BAND_2GHZ, \ |
| 7279 | .hw_value = (_channel), \ | 7279 | .hw_value = (_channel), \ |
| 7280 | .center_freq = (_freq), \ | 7280 | .center_freq = (_freq), \ |
| 7281 | .flags = (_flags), \ | 7281 | .flags = (_flags), \ |
| @@ -7284,7 +7284,7 @@ static const struct ieee80211_ops ath10k_ops = { | |||
| 7284 | } | 7284 | } |
| 7285 | 7285 | ||
| 7286 | #define CHAN5G(_channel, _freq, _flags) { \ | 7286 | #define CHAN5G(_channel, _freq, _flags) { \ |
| 7287 | .band = IEEE80211_BAND_5GHZ, \ | 7287 | .band = NL80211_BAND_5GHZ, \ |
| 7288 | .hw_value = (_channel), \ | 7288 | .hw_value = (_channel), \ |
| 7289 | .center_freq = (_freq), \ | 7289 | .center_freq = (_freq), \ |
| 7290 | .flags = (_flags), \ | 7290 | .flags = (_flags), \ |
| @@ -7604,13 +7604,13 @@ int ath10k_mac_register(struct ath10k *ar) | |||
| 7604 | goto err_free; | 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 | band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels); | 7608 | band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels); |
| 7609 | band->channels = channels; | 7609 | band->channels = channels; |
| 7610 | band->n_bitrates = ath10k_g_rates_size; | 7610 | band->n_bitrates = ath10k_g_rates_size; |
| 7611 | band->bitrates = ath10k_g_rates; | 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 | if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { | 7616 | if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { |
| @@ -7622,12 +7622,12 @@ int ath10k_mac_register(struct ath10k *ar) | |||
| 7622 | goto err_free; | 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 | band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels); | 7626 | band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels); |
| 7627 | band->channels = channels; | 7627 | band->channels = channels; |
| 7628 | band->n_bitrates = ath10k_a_rates_size; | 7628 | band->n_bitrates = ath10k_a_rates_size; |
| 7629 | band->bitrates = ath10k_a_rates; | 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 | ath10k_mac_setup_ht_vht_cap(ar); | 7633 | ath10k_mac_setup_ht_vht_cap(ar); |
| @@ -7815,8 +7815,8 @@ err_dfs_detector_exit: | |||
| 7815 | ar->dfs_detector->exit(ar->dfs_detector); | 7815 | ar->dfs_detector->exit(ar->dfs_detector); |
| 7816 | 7816 | ||
| 7817 | err_free: | 7817 | err_free: |
| 7818 | kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels); | 7818 | kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); |
| 7819 | kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels); | 7819 | kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels); |
| 7820 | 7820 | ||
| 7821 | SET_IEEE80211_DEV(ar->hw, NULL); | 7821 | SET_IEEE80211_DEV(ar->hw, NULL); |
| 7822 | return ret; | 7822 | return ret; |
| @@ -7829,8 +7829,8 @@ void ath10k_mac_unregister(struct ath10k *ar) | |||
| 7829 | if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) | 7829 | if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) |
| 7830 | ar->dfs_detector->exit(ar->dfs_detector); | 7830 | ar->dfs_detector->exit(ar->dfs_detector); |
| 7831 | 7831 | ||
| 7832 | kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels); | 7832 | kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels); |
| 7833 | kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels); | 7833 | kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels); |
| 7834 | 7834 | ||
| 7835 | SET_IEEE80211_DEV(ar->hw, NULL); | 7835 | SET_IEEE80211_DEV(ar->hw, NULL); |
| 7836 | } | 7836 | } |
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index f7ec65f263a0..4c75c74be5e7 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c | |||
| @@ -2281,9 +2281,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) | |||
| 2281 | * of mgmt rx. | 2281 | * of mgmt rx. |
| 2282 | */ | 2282 | */ |
| 2283 | if (channel >= 1 && channel <= 14) { | 2283 | if (channel >= 1 && channel <= 14) { |
| 2284 | status->band = IEEE80211_BAND_2GHZ; | 2284 | status->band = NL80211_BAND_2GHZ; |
| 2285 | } else if (channel >= 36 && channel <= 165) { | 2285 | } else if (channel >= 36 && channel <= 165) { |
| 2286 | status->band = IEEE80211_BAND_5GHZ; | 2286 | status->band = NL80211_BAND_5GHZ; |
| 2287 | } else { | 2287 | } else { |
| 2288 | /* Shouldn't happen unless list of advertised channels to | 2288 | /* Shouldn't happen unless list of advertised channels to |
| 2289 | * mac80211 has been changed. | 2289 | * mac80211 has been changed. |
| @@ -2293,7 +2293,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) | |||
| 2293 | return 0; | 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 | ath10k_dbg(ar, ATH10K_DBG_MGMT, "wmi mgmt rx 11b (CCK) on 5GHz\n"); | 2297 | ath10k_dbg(ar, ATH10K_DBG_MGMT, "wmi mgmt rx 11b (CCK) on 5GHz\n"); |
| 2298 | 2298 | ||
| 2299 | sband = &ar->mac.sbands[status->band]; | 2299 | sband = &ar->mac.sbands[status->band]; |
| @@ -2352,7 +2352,7 @@ static int freq_to_idx(struct ath10k *ar, int freq) | |||
| 2352 | struct ieee80211_supported_band *sband; | 2352 | struct ieee80211_supported_band *sband; |
| 2353 | int band, ch, idx = 0; | 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 | sband = ar->hw->wiphy->bands[band]; | 2356 | sband = ar->hw->wiphy->bands[band]; |
| 2357 | if (!sband) | 2357 | if (!sband) |
| 2358 | continue; | 2358 | continue; |
diff --git a/drivers/net/wireless/ath/ath5k/ani.c b/drivers/net/wireless/ath/ath5k/ani.c index 38be2702c0e2..0624333f5430 100644 --- a/drivers/net/wireless/ath/ath5k/ani.c +++ b/drivers/net/wireless/ath/ath5k/ani.c | |||
| @@ -279,7 +279,7 @@ ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as, | |||
| 279 | if (as->firstep_level < ATH5K_ANI_MAX_FIRSTEP_LVL) | 279 | if (as->firstep_level < ATH5K_ANI_MAX_FIRSTEP_LVL) |
| 280 | ath5k_ani_set_firstep_level(ah, as->firstep_level + 1); | 280 | ath5k_ani_set_firstep_level(ah, as->firstep_level + 1); |
| 281 | return; | 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 | /* beacon RSSI is low. in B/G mode turn of OFDM weak signal | 283 | /* beacon RSSI is low. in B/G mode turn of OFDM weak signal |
| 284 | * detect and zero firstep level to maximize CCK sensitivity */ | 284 | * detect and zero firstep level to maximize CCK sensitivity */ |
| 285 | ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI, | 285 | ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI, |
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index ba12f7f4061d..67fedb61fcc0 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
| @@ -1265,10 +1265,10 @@ struct ath5k_hw { | |||
| 1265 | void __iomem *iobase; /* address of the device */ | 1265 | void __iomem *iobase; /* address of the device */ |
| 1266 | struct mutex lock; /* dev-level lock */ | 1266 | struct mutex lock; /* dev-level lock */ |
| 1267 | struct ieee80211_hw *hw; /* IEEE 802.11 common */ | 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 | struct ieee80211_channel channels[ATH_CHAN_MAX]; | 1269 | struct ieee80211_channel channels[ATH_CHAN_MAX]; |
| 1270 | struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; | 1270 | struct ieee80211_rate rates[NUM_NL80211_BANDS][AR5K_MAX_RATES]; |
| 1271 | s8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; | 1271 | s8 rate_idx[NUM_NL80211_BANDS][AR5K_MAX_RATES]; |
| 1272 | enum nl80211_iftype opmode; | 1272 | enum nl80211_iftype opmode; |
| 1273 | 1273 | ||
| 1274 | #ifdef CONFIG_ATH5K_DEBUG | 1274 | #ifdef CONFIG_ATH5K_DEBUG |
| @@ -1532,7 +1532,7 @@ int ath5k_eeprom_mode_from_channel(struct ath5k_hw *ah, | |||
| 1532 | 1532 | ||
| 1533 | /* Protocol Control Unit Functions */ | 1533 | /* Protocol Control Unit Functions */ |
| 1534 | /* Helpers */ | 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 | int len, struct ieee80211_rate *rate, bool shortpre); | 1536 | int len, struct ieee80211_rate *rate, bool shortpre); |
| 1537 | unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah); | 1537 | unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah); |
| 1538 | unsigned int ath5k_hw_get_default_sifs(struct ath5k_hw *ah); | 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); | |||
| 1611 | 1611 | ||
| 1612 | /* PHY functions */ | 1612 | /* PHY functions */ |
| 1613 | /* Misc PHY functions */ | 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 | int ath5k_hw_phy_disable(struct ath5k_hw *ah); | 1615 | int ath5k_hw_phy_disable(struct ath5k_hw *ah); |
| 1616 | /* Gain_F optimization */ | 1616 | /* Gain_F optimization */ |
| 1617 | enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah); | 1617 | enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah); |
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index 66b6366158b9..233054bd6b52 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c | |||
| @@ -152,7 +152,7 @@ int ath5k_hw_init(struct ath5k_hw *ah) | |||
| 152 | ah->ah_phy_revision = ath5k_hw_reg_read(ah, AR5K_PHY_CHIP_ID) & | 152 | ah->ah_phy_revision = ath5k_hw_reg_read(ah, AR5K_PHY_CHIP_ID) & |
| 153 | 0xffffffff; | 153 | 0xffffffff; |
| 154 | ah->ah_radio_5ghz_revision = ath5k_hw_radio_revision(ah, | 154 | ah->ah_radio_5ghz_revision = ath5k_hw_radio_revision(ah, |
| 155 | IEEE80211_BAND_5GHZ); | 155 | NL80211_BAND_5GHZ); |
| 156 | 156 | ||
| 157 | /* Try to identify radio chip based on its srev */ | 157 | /* Try to identify radio chip based on its srev */ |
| 158 | switch (ah->ah_radio_5ghz_revision & 0xf0) { | 158 | switch (ah->ah_radio_5ghz_revision & 0xf0) { |
| @@ -160,14 +160,14 @@ int ath5k_hw_init(struct ath5k_hw *ah) | |||
| 160 | ah->ah_radio = AR5K_RF5111; | 160 | ah->ah_radio = AR5K_RF5111; |
| 161 | ah->ah_single_chip = false; | 161 | ah->ah_single_chip = false; |
| 162 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, | 162 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, |
| 163 | IEEE80211_BAND_2GHZ); | 163 | NL80211_BAND_2GHZ); |
| 164 | break; | 164 | break; |
| 165 | case AR5K_SREV_RAD_5112: | 165 | case AR5K_SREV_RAD_5112: |
| 166 | case AR5K_SREV_RAD_2112: | 166 | case AR5K_SREV_RAD_2112: |
| 167 | ah->ah_radio = AR5K_RF5112; | 167 | ah->ah_radio = AR5K_RF5112; |
| 168 | ah->ah_single_chip = false; | 168 | ah->ah_single_chip = false; |
| 169 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, | 169 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, |
| 170 | IEEE80211_BAND_2GHZ); | 170 | NL80211_BAND_2GHZ); |
| 171 | break; | 171 | break; |
| 172 | case AR5K_SREV_RAD_2413: | 172 | case AR5K_SREV_RAD_2413: |
| 173 | ah->ah_radio = AR5K_RF2413; | 173 | ah->ah_radio = AR5K_RF2413; |
| @@ -204,7 +204,7 @@ int ath5k_hw_init(struct ath5k_hw *ah) | |||
| 204 | ah->ah_radio = AR5K_RF5111; | 204 | ah->ah_radio = AR5K_RF5111; |
| 205 | ah->ah_single_chip = false; | 205 | ah->ah_single_chip = false; |
| 206 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, | 206 | ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah, |
| 207 | IEEE80211_BAND_2GHZ); | 207 | NL80211_BAND_2GHZ); |
| 208 | } else if (ah->ah_mac_version == (AR5K_SREV_AR2425 >> 4) || | 208 | } else if (ah->ah_mac_version == (AR5K_SREV_AR2425 >> 4) || |
| 209 | ah->ah_mac_version == (AR5K_SREV_AR2417 >> 4) || | 209 | ah->ah_mac_version == (AR5K_SREV_AR2417 >> 4) || |
| 210 | ah->ah_phy_revision == AR5K_SREV_PHY_2425) { | 210 | ah->ah_phy_revision == AR5K_SREV_PHY_2425) { |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index 3d946d8b2db2..d98fd421c7ec 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
| @@ -268,15 +268,15 @@ static void ath5k_reg_notifier(struct wiphy *wiphy, | |||
| 268 | * Returns true for the channel numbers used. | 268 | * Returns true for the channel numbers used. |
| 269 | */ | 269 | */ |
| 270 | #ifdef CONFIG_ATH5K_TEST_CHANNELS | 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 | return true; | 273 | return true; |
| 274 | } | 274 | } |
| 275 | 275 | ||
| 276 | #else | 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 | return true; | 280 | return true; |
| 281 | 281 | ||
| 282 | return /* UNII 1,2 */ | 282 | return /* UNII 1,2 */ |
| @@ -297,18 +297,18 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels, | |||
| 297 | unsigned int mode, unsigned int max) | 297 | unsigned int mode, unsigned int max) |
| 298 | { | 298 | { |
| 299 | unsigned int count, size, freq, ch; | 299 | unsigned int count, size, freq, ch; |
| 300 | enum ieee80211_band band; | 300 | enum nl80211_band band; |
| 301 | 301 | ||
| 302 | switch (mode) { | 302 | switch (mode) { |
| 303 | case AR5K_MODE_11A: | 303 | case AR5K_MODE_11A: |
| 304 | /* 1..220, but 2GHz frequencies are filtered by check_channel */ | 304 | /* 1..220, but 2GHz frequencies are filtered by check_channel */ |
| 305 | size = 220; | 305 | size = 220; |
| 306 | band = IEEE80211_BAND_5GHZ; | 306 | band = NL80211_BAND_5GHZ; |
| 307 | break; | 307 | break; |
| 308 | case AR5K_MODE_11B: | 308 | case AR5K_MODE_11B: |
| 309 | case AR5K_MODE_11G: | 309 | case AR5K_MODE_11G: |
| 310 | size = 26; | 310 | size = 26; |
| 311 | band = IEEE80211_BAND_2GHZ; | 311 | band = NL80211_BAND_2GHZ; |
| 312 | break; | 312 | break; |
| 313 | default: | 313 | default: |
| 314 | ATH5K_WARN(ah, "bad mode, not copying channels\n"); | 314 | ATH5K_WARN(ah, "bad mode, not copying channels\n"); |
| @@ -363,13 +363,13 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
| 363 | int max_c, count_c = 0; | 363 | int max_c, count_c = 0; |
| 364 | int i; | 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 | max_c = ARRAY_SIZE(ah->channels); | 367 | max_c = ARRAY_SIZE(ah->channels); |
| 368 | 368 | ||
| 369 | /* 2GHz band */ | 369 | /* 2GHz band */ |
| 370 | sband = &ah->sbands[IEEE80211_BAND_2GHZ]; | 370 | sband = &ah->sbands[NL80211_BAND_2GHZ]; |
| 371 | sband->band = IEEE80211_BAND_2GHZ; | 371 | sband->band = NL80211_BAND_2GHZ; |
| 372 | sband->bitrates = &ah->rates[IEEE80211_BAND_2GHZ][0]; | 372 | sband->bitrates = &ah->rates[NL80211_BAND_2GHZ][0]; |
| 373 | 373 | ||
| 374 | if (test_bit(AR5K_MODE_11G, ah->ah_capabilities.cap_mode)) { | 374 | if (test_bit(AR5K_MODE_11G, ah->ah_capabilities.cap_mode)) { |
| 375 | /* G mode */ | 375 | /* G mode */ |
| @@ -381,7 +381,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
| 381 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, | 381 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, |
| 382 | AR5K_MODE_11G, max_c); | 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 | count_c = sband->n_channels; | 385 | count_c = sband->n_channels; |
| 386 | max_c -= count_c; | 386 | max_c -= count_c; |
| 387 | } else if (test_bit(AR5K_MODE_11B, ah->ah_capabilities.cap_mode)) { | 387 | } else if (test_bit(AR5K_MODE_11B, ah->ah_capabilities.cap_mode)) { |
| @@ -407,7 +407,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
| 407 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, | 407 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, |
| 408 | AR5K_MODE_11B, max_c); | 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 | count_c = sband->n_channels; | 411 | count_c = sband->n_channels; |
| 412 | max_c -= count_c; | 412 | max_c -= count_c; |
| 413 | } | 413 | } |
| @@ -415,9 +415,9 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
| 415 | 415 | ||
| 416 | /* 5GHz band, A mode */ | 416 | /* 5GHz band, A mode */ |
| 417 | if (test_bit(AR5K_MODE_11A, ah->ah_capabilities.cap_mode)) { | 417 | if (test_bit(AR5K_MODE_11A, ah->ah_capabilities.cap_mode)) { |
| 418 | sband = &ah->sbands[IEEE80211_BAND_5GHZ]; | 418 | sband = &ah->sbands[NL80211_BAND_5GHZ]; |
| 419 | sband->band = IEEE80211_BAND_5GHZ; | 419 | sband->band = NL80211_BAND_5GHZ; |
| 420 | sband->bitrates = &ah->rates[IEEE80211_BAND_5GHZ][0]; | 420 | sband->bitrates = &ah->rates[NL80211_BAND_5GHZ][0]; |
| 421 | 421 | ||
| 422 | memcpy(sband->bitrates, &ath5k_rates[4], | 422 | memcpy(sband->bitrates, &ath5k_rates[4], |
| 423 | sizeof(struct ieee80211_rate) * 8); | 423 | sizeof(struct ieee80211_rate) * 8); |
| @@ -427,7 +427,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
| 427 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, | 427 | sband->n_channels = ath5k_setup_channels(ah, sband->channels, |
| 428 | AR5K_MODE_11A, max_c); | 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 | ath5k_setup_rate_idx(ah, sband); | 432 | ath5k_setup_rate_idx(ah, sband); |
| 433 | 433 | ||
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index 654a1e33f827..929d7ccc031c 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c | |||
| @@ -1043,14 +1043,14 @@ ath5k_debug_dump_bands(struct ath5k_hw *ah) | |||
| 1043 | 1043 | ||
| 1044 | BUG_ON(!ah->sbands); | 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 | struct ieee80211_supported_band *band = &ah->sbands[b]; | 1047 | struct ieee80211_supported_band *band = &ah->sbands[b]; |
| 1048 | char bname[6]; | 1048 | char bname[6]; |
| 1049 | switch (band->band) { | 1049 | switch (band->band) { |
| 1050 | case IEEE80211_BAND_2GHZ: | 1050 | case NL80211_BAND_2GHZ: |
| 1051 | strcpy(bname, "2 GHz"); | 1051 | strcpy(bname, "2 GHz"); |
| 1052 | break; | 1052 | break; |
| 1053 | case IEEE80211_BAND_5GHZ: | 1053 | case NL80211_BAND_5GHZ: |
| 1054 | strcpy(bname, "5 GHz"); | 1054 | strcpy(bname, "5 GHz"); |
| 1055 | break; | 1055 | break; |
| 1056 | default: | 1056 | default: |
diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c index bf29da5e90da..fc47b70988b1 100644 --- a/drivers/net/wireless/ath/ath5k/pcu.c +++ b/drivers/net/wireless/ath/ath5k/pcu.c | |||
| @@ -110,7 +110,7 @@ static const unsigned int ack_rates_high[] = | |||
| 110 | * bwmodes. | 110 | * bwmodes. |
| 111 | */ | 111 | */ |
| 112 | int | 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 | int len, struct ieee80211_rate *rate, bool shortpre) | 114 | int len, struct ieee80211_rate *rate, bool shortpre) |
| 115 | { | 115 | { |
| 116 | int sifs, preamble, plcp_bits, sym_time; | 116 | int sifs, preamble, plcp_bits, sym_time; |
| @@ -221,7 +221,7 @@ ath5k_hw_get_default_sifs(struct ath5k_hw *ah) | |||
| 221 | case AR5K_BWMODE_DEFAULT: | 221 | case AR5K_BWMODE_DEFAULT: |
| 222 | sifs = AR5K_INIT_SIFS_DEFAULT_BG; | 222 | sifs = AR5K_INIT_SIFS_DEFAULT_BG; |
| 223 | default: | 223 | default: |
| 224 | if (channel->band == IEEE80211_BAND_5GHZ) | 224 | if (channel->band == NL80211_BAND_5GHZ) |
| 225 | sifs = AR5K_INIT_SIFS_DEFAULT_A; | 225 | sifs = AR5K_INIT_SIFS_DEFAULT_A; |
| 226 | break; | 226 | break; |
| 227 | } | 227 | } |
| @@ -279,7 +279,7 @@ ath5k_hw_write_rate_duration(struct ath5k_hw *ah) | |||
| 279 | struct ieee80211_rate *rate; | 279 | struct ieee80211_rate *rate; |
| 280 | unsigned int i; | 280 | unsigned int i; |
| 281 | /* 802.11g covers both OFDM and CCK */ | 281 | /* 802.11g covers both OFDM and CCK */ |
| 282 | u8 band = IEEE80211_BAND_2GHZ; | 282 | u8 band = NL80211_BAND_2GHZ; |
| 283 | 283 | ||
| 284 | /* Write rate duration table */ | 284 | /* Write rate duration table */ |
| 285 | for (i = 0; i < ah->sbands[band].n_bitrates; i++) { | 285 | for (i = 0; i < ah->sbands[band].n_bitrates; i++) { |
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 98ee85456321..641b13a279e1 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
| @@ -75,13 +75,13 @@ | |||
| 75 | /** | 75 | /** |
| 76 | * ath5k_hw_radio_revision() - Get the PHY Chip revision | 76 | * ath5k_hw_radio_revision() - Get the PHY Chip revision |
| 77 | * @ah: The &struct ath5k_hw | 77 | * @ah: The &struct ath5k_hw |
| 78 | * @band: One of enum ieee80211_band | 78 | * @band: One of enum nl80211_band |
| 79 | * | 79 | * |
| 80 | * Returns the revision number of a 2GHz, 5GHz or single chip | 80 | * Returns the revision number of a 2GHz, 5GHz or single chip |
| 81 | * radio. | 81 | * radio. |
| 82 | */ | 82 | */ |
| 83 | u16 | 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 | unsigned int i; | 86 | unsigned int i; |
| 87 | u32 srev; | 87 | u32 srev; |
| @@ -91,10 +91,10 @@ ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band) | |||
| 91 | * Set the radio chip access register | 91 | * Set the radio chip access register |
| 92 | */ | 92 | */ |
| 93 | switch (band) { | 93 | switch (band) { |
| 94 | case IEEE80211_BAND_2GHZ: | 94 | case NL80211_BAND_2GHZ: |
| 95 | ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_2GHZ, AR5K_PHY(0)); | 95 | ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_2GHZ, AR5K_PHY(0)); |
| 96 | break; | 96 | break; |
| 97 | case IEEE80211_BAND_5GHZ: | 97 | case NL80211_BAND_5GHZ: |
| 98 | ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_5GHZ, AR5K_PHY(0)); | 98 | ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_5GHZ, AR5K_PHY(0)); |
| 99 | break; | 99 | break; |
| 100 | default: | 100 | default: |
| @@ -138,11 +138,11 @@ ath5k_channel_ok(struct ath5k_hw *ah, struct ieee80211_channel *channel) | |||
| 138 | u16 freq = channel->center_freq; | 138 | u16 freq = channel->center_freq; |
| 139 | 139 | ||
| 140 | /* Check if the channel is in our supported range */ | 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 | if ((freq >= ah->ah_capabilities.cap_range.range_2ghz_min) && | 142 | if ((freq >= ah->ah_capabilities.cap_range.range_2ghz_min) && |
| 143 | (freq <= ah->ah_capabilities.cap_range.range_2ghz_max)) | 143 | (freq <= ah->ah_capabilities.cap_range.range_2ghz_max)) |
| 144 | return true; | 144 | return true; |
| 145 | } else if (channel->band == IEEE80211_BAND_5GHZ) | 145 | } else if (channel->band == NL80211_BAND_5GHZ) |
| 146 | if ((freq >= ah->ah_capabilities.cap_range.range_5ghz_min) && | 146 | if ((freq >= ah->ah_capabilities.cap_range.range_5ghz_min) && |
| 147 | (freq <= ah->ah_capabilities.cap_range.range_5ghz_max)) | 147 | (freq <= ah->ah_capabilities.cap_range.range_5ghz_max)) |
| 148 | return true; | 148 | return true; |
| @@ -743,7 +743,7 @@ done: | |||
| 743 | /** | 743 | /** |
| 744 | * ath5k_hw_rfgain_init() - Write initial RF gain settings to hw | 744 | * ath5k_hw_rfgain_init() - Write initial RF gain settings to hw |
| 745 | * @ah: The &struct ath5k_hw | 745 | * @ah: The &struct ath5k_hw |
| 746 | * @band: One of enum ieee80211_band | 746 | * @band: One of enum nl80211_band |
| 747 | * | 747 | * |
| 748 | * Write initial RF gain table to set the RF sensitivity. | 748 | * Write initial RF gain table to set the RF sensitivity. |
| 749 | * | 749 | * |
| @@ -751,7 +751,7 @@ done: | |||
| 751 | * with Gain_F calibration | 751 | * with Gain_F calibration |
| 752 | */ | 752 | */ |
| 753 | static int | 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 | const struct ath5k_ini_rfgain *ath5k_rfg; | 756 | const struct ath5k_ini_rfgain *ath5k_rfg; |
| 757 | unsigned int i, size, index; | 757 | unsigned int i, size, index; |
| @@ -786,7 +786,7 @@ ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum ieee80211_band band) | |||
| 786 | return -EINVAL; | 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 | for (i = 0; i < size; i++) { | 791 | for (i = 0; i < size; i++) { |
| 792 | AR5K_REG_WAIT(i); | 792 | AR5K_REG_WAIT(i); |
| @@ -917,7 +917,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, | |||
| 917 | } | 917 | } |
| 918 | 918 | ||
| 919 | /* Set Output and Driver bias current (OB/DB) */ | 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 | if (channel->hw_value == AR5K_MODE_11B) | 922 | if (channel->hw_value == AR5K_MODE_11B) |
| 923 | ee_mode = AR5K_EEPROM_MODE_11B; | 923 | ee_mode = AR5K_EEPROM_MODE_11B; |
| @@ -944,7 +944,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, | |||
| 944 | AR5K_RF_DB_2GHZ, true); | 944 | AR5K_RF_DB_2GHZ, true); |
| 945 | 945 | ||
| 946 | /* RF5111 always needs OB/DB for 5GHz, even if we use 2GHz */ | 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 | (ah->ah_radio == AR5K_RF5111)) { | 948 | (ah->ah_radio == AR5K_RF5111)) { |
| 949 | 949 | ||
| 950 | /* For 11a, Turbo and XR we need to choose | 950 | /* For 11a, Turbo and XR we need to choose |
| @@ -1145,7 +1145,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah, | |||
| 1145 | } | 1145 | } |
| 1146 | 1146 | ||
| 1147 | if (ah->ah_radio == AR5K_RF5413 && | 1147 | if (ah->ah_radio == AR5K_RF5413 && |
| 1148 | channel->band == IEEE80211_BAND_2GHZ) { | 1148 | channel->band == NL80211_BAND_2GHZ) { |
| 1149 | 1149 | ||
| 1150 | ath5k_hw_rfb_op(ah, rf_regs, 1, AR5K_RF_DERBY_CHAN_SEL_MODE, | 1150 | ath5k_hw_rfb_op(ah, rf_regs, 1, AR5K_RF_DERBY_CHAN_SEL_MODE, |
| 1151 | true); | 1151 | true); |
| @@ -1270,7 +1270,7 @@ ath5k_hw_rf5111_channel(struct ath5k_hw *ah, | |||
| 1270 | */ | 1270 | */ |
| 1271 | data0 = data1 = 0; | 1271 | data0 = data1 = 0; |
| 1272 | 1272 | ||
| 1273 | if (channel->band == IEEE80211_BAND_2GHZ) { | 1273 | if (channel->band == NL80211_BAND_2GHZ) { |
| 1274 | /* Map 2GHz channel to 5GHz Atheros channel ID */ | 1274 | /* Map 2GHz channel to 5GHz Atheros channel ID */ |
| 1275 | ret = ath5k_hw_rf5111_chan2athchan( | 1275 | ret = ath5k_hw_rf5111_chan2athchan( |
| 1276 | ieee80211_frequency_to_channel(channel->center_freq), | 1276 | ieee80211_frequency_to_channel(channel->center_freq), |
| @@ -1919,7 +1919,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah, | |||
| 1919 | /* Convert current frequency to fbin value (the same way channels | 1919 | /* Convert current frequency to fbin value (the same way channels |
| 1920 | * are stored on EEPROM, check out ath5k_eeprom_bin2freq) and scale | 1920 | * are stored on EEPROM, check out ath5k_eeprom_bin2freq) and scale |
| 1921 | * up by 2 so we can compare it later */ | 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 | chan_fbin = (channel->center_freq - 2300) * 10; | 1923 | chan_fbin = (channel->center_freq - 2300) * 10; |
| 1924 | freq_band = AR5K_EEPROM_BAND_2GHZ; | 1924 | freq_band = AR5K_EEPROM_BAND_2GHZ; |
| 1925 | } else { | 1925 | } else { |
| @@ -1983,7 +1983,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah, | |||
| 1983 | symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 4; | 1983 | symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 4; |
| 1984 | break; | 1984 | break; |
| 1985 | default: | 1985 | default: |
| 1986 | if (channel->band == IEEE80211_BAND_5GHZ) { | 1986 | if (channel->band == NL80211_BAND_5GHZ) { |
| 1987 | /* Both sample_freq and chip_freq are 40MHz */ | 1987 | /* Both sample_freq and chip_freq are 40MHz */ |
| 1988 | spur_delta_phase = (spur_offset << 17) / 25; | 1988 | spur_delta_phase = (spur_offset << 17) / 25; |
| 1989 | spur_freq_sigma_delta = | 1989 | spur_freq_sigma_delta = |
diff --git a/drivers/net/wireless/ath/ath5k/qcu.c b/drivers/net/wireless/ath/ath5k/qcu.c index ddaad712c59a..beda11ce34a7 100644 --- a/drivers/net/wireless/ath/ath5k/qcu.c +++ b/drivers/net/wireless/ath/ath5k/qcu.c | |||
| @@ -559,7 +559,7 @@ ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue) | |||
| 559 | int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time) | 559 | int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time) |
| 560 | { | 560 | { |
| 561 | struct ieee80211_channel *channel = ah->ah_current_channel; | 561 | struct ieee80211_channel *channel = ah->ah_current_channel; |
| 562 | enum ieee80211_band band; | 562 | enum nl80211_band band; |
| 563 | struct ieee80211_supported_band *sband; | 563 | struct ieee80211_supported_band *sband; |
| 564 | struct ieee80211_rate *rate; | 564 | struct ieee80211_rate *rate; |
| 565 | u32 ack_tx_time, eifs, eifs_clock, sifs, sifs_clock; | 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) | |||
| 596 | * | 596 | * |
| 597 | * Also we have different lowest rate for 802.11a | 597 | * Also we have different lowest rate for 802.11a |
| 598 | */ | 598 | */ |
| 599 | if (channel->band == IEEE80211_BAND_5GHZ) | 599 | if (channel->band == NL80211_BAND_5GHZ) |
| 600 | band = IEEE80211_BAND_5GHZ; | 600 | band = NL80211_BAND_5GHZ; |
| 601 | else | 601 | else |
| 602 | band = IEEE80211_BAND_2GHZ; | 602 | band = NL80211_BAND_2GHZ; |
| 603 | 603 | ||
| 604 | switch (ah->ah_bwmode) { | 604 | switch (ah->ah_bwmode) { |
| 605 | case AR5K_BWMODE_5MHZ: | 605 | case AR5K_BWMODE_5MHZ: |
diff --git a/drivers/net/wireless/ath/ath5k/reset.c b/drivers/net/wireless/ath/ath5k/reset.c index 4b1c87fa15ac..56d7925a0c2c 100644 --- a/drivers/net/wireless/ath/ath5k/reset.c +++ b/drivers/net/wireless/ath/ath5k/reset.c | |||
| @@ -752,7 +752,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel) | |||
| 752 | clock = AR5K_PHY_PLL_RF5111; /*Zero*/ | 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 | mode |= AR5K_PHY_MODE_FREQ_2GHZ; | 756 | mode |= AR5K_PHY_MODE_FREQ_2GHZ; |
| 757 | clock |= AR5K_PHY_PLL_44MHZ; | 757 | clock |= AR5K_PHY_PLL_44MHZ; |
| 758 | 758 | ||
| @@ -771,7 +771,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel) | |||
| 771 | else | 771 | else |
| 772 | mode |= AR5K_PHY_MODE_MOD_DYN; | 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 | mode |= (AR5K_PHY_MODE_FREQ_5GHZ | | 775 | mode |= (AR5K_PHY_MODE_FREQ_5GHZ | |
| 776 | AR5K_PHY_MODE_MOD_OFDM); | 776 | AR5K_PHY_MODE_MOD_OFDM); |
| 777 | 777 | ||
| @@ -906,7 +906,7 @@ ath5k_hw_tweak_initval_settings(struct ath5k_hw *ah, | |||
| 906 | u32 data; | 906 | u32 data; |
| 907 | ath5k_hw_reg_write(ah, AR5K_PHY_CCKTXCTL_WORLD, | 907 | ath5k_hw_reg_write(ah, AR5K_PHY_CCKTXCTL_WORLD, |
| 908 | AR5K_PHY_CCKTXCTL); | 908 | AR5K_PHY_CCKTXCTL); |
| 909 | if (channel->band == IEEE80211_BAND_5GHZ) | 909 | if (channel->band == NL80211_BAND_5GHZ) |
| 910 | data = 0xffb81020; | 910 | data = 0xffb81020; |
| 911 | else | 911 | else |
| 912 | data = 0xffb80d20; | 912 | data = 0xffb80d20; |
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 7f3f94fbf157..4e11ba06f089 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | #define CHAN2G(_channel, _freq, _flags) { \ | 36 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 37 | .band = IEEE80211_BAND_2GHZ, \ | 37 | .band = NL80211_BAND_2GHZ, \ |
| 38 | .hw_value = (_channel), \ | 38 | .hw_value = (_channel), \ |
| 39 | .center_freq = (_freq), \ | 39 | .center_freq = (_freq), \ |
| 40 | .flags = (_flags), \ | 40 | .flags = (_flags), \ |
| @@ -43,7 +43,7 @@ | |||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | #define CHAN5G(_channel, _flags) { \ | 45 | #define CHAN5G(_channel, _flags) { \ |
| 46 | .band = IEEE80211_BAND_5GHZ, \ | 46 | .band = NL80211_BAND_5GHZ, \ |
| 47 | .hw_value = (_channel), \ | 47 | .hw_value = (_channel), \ |
| 48 | .center_freq = 5000 + (5 * (_channel)), \ | 48 | .center_freq = 5000 + (5 * (_channel)), \ |
| 49 | .flags = (_flags), \ | 49 | .flags = (_flags), \ |
| @@ -2583,7 +2583,7 @@ void ath6kl_check_wow_status(struct ath6kl *ar) | |||
| 2583 | } | 2583 | } |
| 2584 | #endif | 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 | bool ht_enable) | 2587 | bool ht_enable) |
| 2588 | { | 2588 | { |
| 2589 | struct ath6kl_htcap *htcap = &vif->htcap[band]; | 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, | |||
| 2594 | if (ht_enable) { | 2594 | if (ht_enable) { |
| 2595 | /* Set default ht capabilities */ | 2595 | /* Set default ht capabilities */ |
| 2596 | htcap->ht_enable = true; | 2596 | htcap->ht_enable = true; |
| 2597 | htcap->cap_info = (band == IEEE80211_BAND_2GHZ) ? | 2597 | htcap->cap_info = (band == NL80211_BAND_2GHZ) ? |
| 2598 | ath6kl_g_htcap : ath6kl_a_htcap; | 2598 | ath6kl_g_htcap : ath6kl_a_htcap; |
| 2599 | htcap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K; | 2599 | htcap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K; |
| 2600 | } else /* Disable ht */ | 2600 | } else /* Disable ht */ |
| @@ -2609,7 +2609,7 @@ static int ath6kl_restore_htcap(struct ath6kl_vif *vif) | |||
| 2609 | struct wiphy *wiphy = vif->ar->wiphy; | 2609 | struct wiphy *wiphy = vif->ar->wiphy; |
| 2610 | int band, ret = 0; | 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 | if (!wiphy->bands[band]) | 2613 | if (!wiphy->bands[band]) |
| 2614 | continue; | 2614 | continue; |
| 2615 | 2615 | ||
| @@ -3530,7 +3530,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy, | |||
| 3530 | struct regulatory_request *request) | 3530 | struct regulatory_request *request) |
| 3531 | { | 3531 | { |
| 3532 | struct ath6kl *ar = wiphy_priv(wiphy); | 3532 | struct ath6kl *ar = wiphy_priv(wiphy); |
| 3533 | u32 rates[IEEE80211_NUM_BANDS]; | 3533 | u32 rates[NUM_NL80211_BANDS]; |
| 3534 | int ret, i; | 3534 | int ret, i; |
| 3535 | 3535 | ||
| 3536 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, | 3536 | ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, |
| @@ -3555,7 +3555,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy, | |||
| 3555 | * changed. | 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 | if (wiphy->bands[i]) | 3559 | if (wiphy->bands[i]) |
| 3560 | rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1; | 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, | |||
| 3791 | vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL; | 3791 | vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL; |
| 3792 | vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME; | 3792 | vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME; |
| 3793 | vif->bg_scan_period = 0; | 3793 | vif->bg_scan_period = 0; |
| 3794 | vif->htcap[IEEE80211_BAND_2GHZ].ht_enable = true; | 3794 | vif->htcap[NL80211_BAND_2GHZ].ht_enable = true; |
| 3795 | vif->htcap[IEEE80211_BAND_5GHZ].ht_enable = true; | 3795 | vif->htcap[NL80211_BAND_5GHZ].ht_enable = true; |
| 3796 | 3796 | ||
| 3797 | memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN); | 3797 | memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN); |
| 3798 | if (fw_vif_idx != 0) { | 3798 | if (fw_vif_idx != 0) { |
| @@ -3943,9 +3943,9 @@ int ath6kl_cfg80211_init(struct ath6kl *ar) | |||
| 3943 | wiphy->available_antennas_rx = ar->hw.rx_ant; | 3943 | wiphy->available_antennas_rx = ar->hw.rx_ant; |
| 3944 | 3944 | ||
| 3945 | if (band_2gig) | 3945 | if (band_2gig) |
| 3946 | wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz; | 3946 | wiphy->bands[NL80211_BAND_2GHZ] = &ath6kl_band_2ghz; |
| 3947 | if (band_5gig) | 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 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; | 3950 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; |
| 3951 | 3951 | ||
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 5f3acfe6015e..713a571a27ce 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
| @@ -623,7 +623,7 @@ struct ath6kl_vif { | |||
| 623 | struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1]; | 623 | struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1]; |
| 624 | struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1]; | 624 | struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1]; |
| 625 | struct aggr_info *aggr_cntxt; | 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 | struct timer_list disconnect_timer; | 628 | struct timer_list disconnect_timer; |
| 629 | struct timer_list sched_scan_timer; | 629 | struct timer_list sched_scan_timer; |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c index 0b3e9c0293e0..631c3a0c572b 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.c +++ b/drivers/net/wireless/ath/ath6kl/wmi.c | |||
| @@ -2048,7 +2048,7 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx, | |||
| 2048 | sc->no_cck = cpu_to_le32(no_cck); | 2048 | sc->no_cck = cpu_to_le32(no_cck); |
| 2049 | sc->num_ch = num_chan; | 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 | sband = ar->wiphy->bands[band]; | 2052 | sband = ar->wiphy->bands[band]; |
| 2053 | 2053 | ||
| 2054 | if (!sband) | 2054 | if (!sband) |
| @@ -2770,10 +2770,10 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, | |||
| 2770 | memset(&ratemask, 0, sizeof(ratemask)); | 2770 | memset(&ratemask, 0, sizeof(ratemask)); |
| 2771 | 2771 | ||
| 2772 | /* only check 2.4 and 5 GHz bands, skip the rest */ | 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 | /* copy legacy rate mask */ | 2774 | /* copy legacy rate mask */ |
| 2775 | ratemask[band] = mask->control[band].legacy; | 2775 | ratemask[band] = mask->control[band].legacy; |
| 2776 | if (band == IEEE80211_BAND_5GHZ) | 2776 | if (band == NL80211_BAND_5GHZ) |
| 2777 | ratemask[band] = | 2777 | ratemask[band] = |
| 2778 | mask->control[band].legacy << 4; | 2778 | mask->control[band].legacy << 4; |
| 2779 | 2779 | ||
| @@ -2799,9 +2799,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx, | |||
| 2799 | if (mode == WMI_RATES_MODE_11A || | 2799 | if (mode == WMI_RATES_MODE_11A || |
| 2800 | mode == WMI_RATES_MODE_11A_HT20 || | 2800 | mode == WMI_RATES_MODE_11A_HT20 || |
| 2801 | mode == WMI_RATES_MODE_11A_HT40) | 2801 | mode == WMI_RATES_MODE_11A_HT40) |
| 2802 | band = IEEE80211_BAND_5GHZ; | 2802 | band = NL80211_BAND_5GHZ; |
| 2803 | else | 2803 | else |
| 2804 | band = IEEE80211_BAND_2GHZ; | 2804 | band = NL80211_BAND_2GHZ; |
| 2805 | cmd->ratemask[mode] = cpu_to_le64(ratemask[band]); | 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, | |||
| 2822 | memset(&ratemask, 0, sizeof(ratemask)); | 2822 | memset(&ratemask, 0, sizeof(ratemask)); |
| 2823 | 2823 | ||
| 2824 | /* only check 2.4 and 5 GHz bands, skip the rest */ | 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 | /* copy legacy rate mask */ | 2826 | /* copy legacy rate mask */ |
| 2827 | ratemask[band] = mask->control[band].legacy; | 2827 | ratemask[band] = mask->control[band].legacy; |
| 2828 | if (band == IEEE80211_BAND_5GHZ) | 2828 | if (band == NL80211_BAND_5GHZ) |
| 2829 | ratemask[band] = | 2829 | ratemask[band] = |
| 2830 | mask->control[band].legacy << 4; | 2830 | mask->control[band].legacy << 4; |
| 2831 | 2831 | ||
| @@ -2849,9 +2849,9 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx, | |||
| 2849 | if (mode == WMI_RATES_MODE_11A || | 2849 | if (mode == WMI_RATES_MODE_11A || |
| 2850 | mode == WMI_RATES_MODE_11A_HT20 || | 2850 | mode == WMI_RATES_MODE_11A_HT20 || |
| 2851 | mode == WMI_RATES_MODE_11A_HT40) | 2851 | mode == WMI_RATES_MODE_11A_HT40) |
| 2852 | band = IEEE80211_BAND_5GHZ; | 2852 | band = NL80211_BAND_5GHZ; |
| 2853 | else | 2853 | else |
| 2854 | band = IEEE80211_BAND_2GHZ; | 2854 | band = NL80211_BAND_2GHZ; |
| 2855 | cmd->ratemask[mode] = cpu_to_le32(ratemask[band]); | 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, | |||
| 3174 | } | 3174 | } |
| 3175 | 3175 | ||
| 3176 | int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, | 3176 | int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, |
| 3177 | enum ieee80211_band band, | 3177 | enum nl80211_band band, |
| 3178 | struct ath6kl_htcap *htcap) | 3178 | struct ath6kl_htcap *htcap) |
| 3179 | { | 3179 | { |
| 3180 | struct sk_buff *skb; | 3180 | struct sk_buff *skb; |
| @@ -3187,7 +3187,7 @@ int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, | |||
| 3187 | cmd = (struct wmi_set_htcap_cmd *) skb->data; | 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 | * this will be changed in firmware. If at all there is any change in | 3191 | * this will be changed in firmware. If at all there is any change in |
| 3192 | * band value, the host needs to be fixed. | 3192 | * band value, the host needs to be fixed. |
| 3193 | */ | 3193 | */ |
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h index 05d25a94c781..3af464a73b58 100644 --- a/drivers/net/wireless/ath/ath6kl/wmi.h +++ b/drivers/net/wireless/ath/ath6kl/wmi.h | |||
| @@ -2628,7 +2628,7 @@ int ath6kl_wmi_set_wmm_txop(struct wmi *wmi, u8 if_idx, enum wmi_txop_cfg cfg); | |||
| 2628 | int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx, | 2628 | int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx, |
| 2629 | u8 keep_alive_intvl); | 2629 | u8 keep_alive_intvl); |
| 2630 | int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, | 2630 | int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx, |
| 2631 | enum ieee80211_band band, | 2631 | enum nl80211_band band, |
| 2632 | struct ath6kl_htcap *htcap); | 2632 | struct ath6kl_htcap *htcap); |
| 2633 | int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len); | 2633 | int ath6kl_wmi_test_cmd(struct wmi *wmi, void *buf, size_t len); |
| 2634 | 2634 | ||
diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c index 37f6d66d1671..0f71146b781d 100644 --- a/drivers/net/wireless/ath/ath9k/calib.c +++ b/drivers/net/wireless/ath/ath9k/calib.c | |||
| @@ -145,14 +145,14 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah, | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | static bool ath9k_hw_get_nf_thresh(struct ath_hw *ah, | 147 | static bool ath9k_hw_get_nf_thresh(struct ath_hw *ah, |
| 148 | enum ieee80211_band band, | 148 | enum nl80211_band band, |
| 149 | int16_t *nft) | 149 | int16_t *nft) |
| 150 | { | 150 | { |
| 151 | switch (band) { | 151 | switch (band) { |
| 152 | case IEEE80211_BAND_5GHZ: | 152 | case NL80211_BAND_5GHZ: |
| 153 | *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_5); | 153 | *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_5); |
| 154 | break; | 154 | break; |
| 155 | case IEEE80211_BAND_2GHZ: | 155 | case NL80211_BAND_2GHZ: |
| 156 | *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_2); | 156 | *nft = (int8_t)ah->eep_ops->get_eeprom(ah, EEP_NFTHRESH_2); |
| 157 | break; | 157 | break; |
| 158 | default: | 158 | default: |
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c index 319cb5f25f58..e56bafcf5864 100644 --- a/drivers/net/wireless/ath/ath9k/channel.c +++ b/drivers/net/wireless/ath/ath9k/channel.c | |||
| @@ -107,9 +107,9 @@ void ath_chanctx_init(struct ath_softc *sc) | |||
| 107 | struct ieee80211_channel *chan; | 107 | struct ieee80211_channel *chan; |
| 108 | int i, j; | 108 | int i, j; |
| 109 | 109 | ||
| 110 | sband = &common->sbands[IEEE80211_BAND_2GHZ]; | 110 | sband = &common->sbands[NL80211_BAND_2GHZ]; |
| 111 | if (!sband->n_channels) | 111 | if (!sband->n_channels) |
| 112 | sband = &common->sbands[IEEE80211_BAND_5GHZ]; | 112 | sband = &common->sbands[NL80211_BAND_5GHZ]; |
| 113 | 113 | ||
| 114 | chan = &sband->channels[0]; | 114 | chan = &sband->channels[0]; |
| 115 | for (i = 0; i < ATH9K_NUM_CHANCTX; i++) { | 115 | for (i = 0; i < ATH9K_NUM_CHANCTX; i++) { |
| @@ -1333,9 +1333,9 @@ void ath9k_offchannel_init(struct ath_softc *sc) | |||
| 1333 | struct ieee80211_channel *chan; | 1333 | struct ieee80211_channel *chan; |
| 1334 | int i; | 1334 | int i; |
| 1335 | 1335 | ||
| 1336 | sband = &common->sbands[IEEE80211_BAND_2GHZ]; | 1336 | sband = &common->sbands[NL80211_BAND_2GHZ]; |
| 1337 | if (!sband->n_channels) | 1337 | if (!sband->n_channels) |
| 1338 | sband = &common->sbands[IEEE80211_BAND_5GHZ]; | 1338 | sband = &common->sbands[NL80211_BAND_5GHZ]; |
| 1339 | 1339 | ||
| 1340 | chan = &sband->channels[0]; | 1340 | chan = &sband->channels[0]; |
| 1341 | 1341 | ||
diff --git a/drivers/net/wireless/ath/ath9k/common-init.c b/drivers/net/wireless/ath/ath9k/common-init.c index a006c1499728..8b4f7fdabf58 100644 --- a/drivers/net/wireless/ath/ath9k/common-init.c +++ b/drivers/net/wireless/ath/ath9k/common-init.c | |||
| @@ -19,14 +19,14 @@ | |||
| 19 | #include "common.h" | 19 | #include "common.h" |
| 20 | 20 | ||
| 21 | #define CHAN2G(_freq, _idx) { \ | 21 | #define CHAN2G(_freq, _idx) { \ |
| 22 | .band = IEEE80211_BAND_2GHZ, \ | 22 | .band = NL80211_BAND_2GHZ, \ |
| 23 | .center_freq = (_freq), \ | 23 | .center_freq = (_freq), \ |
| 24 | .hw_value = (_idx), \ | 24 | .hw_value = (_idx), \ |
| 25 | .max_power = 20, \ | 25 | .max_power = 20, \ |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | #define CHAN5G(_freq, _idx) { \ | 28 | #define CHAN5G(_freq, _idx) { \ |
| 29 | .band = IEEE80211_BAND_5GHZ, \ | 29 | .band = NL80211_BAND_5GHZ, \ |
| 30 | .center_freq = (_freq), \ | 30 | .center_freq = (_freq), \ |
| 31 | .hw_value = (_idx), \ | 31 | .hw_value = (_idx), \ |
| 32 | .max_power = 20, \ | 32 | .max_power = 20, \ |
| @@ -139,12 +139,12 @@ int ath9k_cmn_init_channels_rates(struct ath_common *common) | |||
| 139 | 139 | ||
| 140 | memcpy(channels, ath9k_2ghz_chantable, | 140 | memcpy(channels, ath9k_2ghz_chantable, |
| 141 | sizeof(ath9k_2ghz_chantable)); | 141 | sizeof(ath9k_2ghz_chantable)); |
| 142 | common->sbands[IEEE80211_BAND_2GHZ].channels = channels; | 142 | common->sbands[NL80211_BAND_2GHZ].channels = channels; |
| 143 | common->sbands[IEEE80211_BAND_2GHZ].band = IEEE80211_BAND_2GHZ; | 143 | common->sbands[NL80211_BAND_2GHZ].band = NL80211_BAND_2GHZ; |
| 144 | common->sbands[IEEE80211_BAND_2GHZ].n_channels = | 144 | common->sbands[NL80211_BAND_2GHZ].n_channels = |
| 145 | ARRAY_SIZE(ath9k_2ghz_chantable); | 145 | ARRAY_SIZE(ath9k_2ghz_chantable); |
| 146 | common->sbands[IEEE80211_BAND_2GHZ].bitrates = ath9k_legacy_rates; | 146 | common->sbands[NL80211_BAND_2GHZ].bitrates = ath9k_legacy_rates; |
| 147 | common->sbands[IEEE80211_BAND_2GHZ].n_bitrates = | 147 | common->sbands[NL80211_BAND_2GHZ].n_bitrates = |
| 148 | ARRAY_SIZE(ath9k_legacy_rates); | 148 | ARRAY_SIZE(ath9k_legacy_rates); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| @@ -156,13 +156,13 @@ int ath9k_cmn_init_channels_rates(struct ath_common *common) | |||
| 156 | 156 | ||
| 157 | memcpy(channels, ath9k_5ghz_chantable, | 157 | memcpy(channels, ath9k_5ghz_chantable, |
| 158 | sizeof(ath9k_5ghz_chantable)); | 158 | sizeof(ath9k_5ghz_chantable)); |
| 159 | common->sbands[IEEE80211_BAND_5GHZ].channels = channels; | 159 | common->sbands[NL80211_BAND_5GHZ].channels = channels; |
| 160 | common->sbands[IEEE80211_BAND_5GHZ].band = IEEE80211_BAND_5GHZ; | 160 | common->sbands[NL80211_BAND_5GHZ].band = NL80211_BAND_5GHZ; |
| 161 | common->sbands[IEEE80211_BAND_5GHZ].n_channels = | 161 | common->sbands[NL80211_BAND_5GHZ].n_channels = |
| 162 | ARRAY_SIZE(ath9k_5ghz_chantable); | 162 | ARRAY_SIZE(ath9k_5ghz_chantable); |
| 163 | common->sbands[IEEE80211_BAND_5GHZ].bitrates = | 163 | common->sbands[NL80211_BAND_5GHZ].bitrates = |
| 164 | ath9k_legacy_rates + 4; | 164 | ath9k_legacy_rates + 4; |
| 165 | common->sbands[IEEE80211_BAND_5GHZ].n_bitrates = | 165 | common->sbands[NL80211_BAND_5GHZ].n_bitrates = |
| 166 | ARRAY_SIZE(ath9k_legacy_rates) - 4; | 166 | ARRAY_SIZE(ath9k_legacy_rates) - 4; |
| 167 | } | 167 | } |
| 168 | return 0; | 168 | return 0; |
| @@ -236,9 +236,9 @@ void ath9k_cmn_reload_chainmask(struct ath_hw *ah) | |||
| 236 | 236 | ||
| 237 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) | 237 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
| 238 | ath9k_cmn_setup_ht_cap(ah, | 238 | ath9k_cmn_setup_ht_cap(ah, |
| 239 | &common->sbands[IEEE80211_BAND_2GHZ].ht_cap); | 239 | &common->sbands[NL80211_BAND_2GHZ].ht_cap); |
| 240 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) | 240 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
| 241 | ath9k_cmn_setup_ht_cap(ah, | 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 | EXPORT_SYMBOL(ath9k_cmn_reload_chainmask); | 244 | EXPORT_SYMBOL(ath9k_cmn_reload_chainmask); |
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c index e8c699446470..b80e08b13b74 100644 --- a/drivers/net/wireless/ath/ath9k/common.c +++ b/drivers/net/wireless/ath/ath9k/common.c | |||
| @@ -173,7 +173,7 @@ int ath9k_cmn_process_rate(struct ath_common *common, | |||
| 173 | struct ieee80211_rx_status *rxs) | 173 | struct ieee80211_rx_status *rxs) |
| 174 | { | 174 | { |
| 175 | struct ieee80211_supported_band *sband; | 175 | struct ieee80211_supported_band *sband; |
| 176 | enum ieee80211_band band; | 176 | enum nl80211_band band; |
| 177 | unsigned int i = 0; | 177 | unsigned int i = 0; |
| 178 | struct ath_hw *ah = common->ah; | 178 | struct ath_hw *ah = common->ah; |
| 179 | 179 | ||
| @@ -305,7 +305,7 @@ static void ath9k_cmn_update_ichannel(struct ath9k_channel *ichan, | |||
| 305 | ichan->channel = chan->center_freq; | 305 | ichan->channel = chan->center_freq; |
| 306 | ichan->chan = chan; | 306 | ichan->chan = chan; |
| 307 | 307 | ||
| 308 | if (chan->band == IEEE80211_BAND_5GHZ) | 308 | if (chan->band == NL80211_BAND_5GHZ) |
| 309 | flags |= CHANNEL_5GHZ; | 309 | flags |= CHANNEL_5GHZ; |
| 310 | 310 | ||
| 311 | switch (chandef->width) { | 311 | switch (chandef->width) { |
diff --git a/drivers/net/wireless/ath/ath9k/debug_sta.c b/drivers/net/wireless/ath/ath9k/debug_sta.c index c2ca57a2ed09..b66cfa91364f 100644 --- a/drivers/net/wireless/ath/ath9k/debug_sta.c +++ b/drivers/net/wireless/ath/ath9k/debug_sta.c | |||
| @@ -139,7 +139,7 @@ void ath_debug_rate_stats(struct ath_softc *sc, | |||
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | if (IS_OFDM_RATE(rs->rs_rate)) { | 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 | rstats->ofdm_stats[rxs->rate_idx - 4].ofdm_cnt++; | 143 | rstats->ofdm_stats[rxs->rate_idx - 4].ofdm_cnt++; |
| 144 | else | 144 | else |
| 145 | rstats->ofdm_stats[rxs->rate_idx].ofdm_cnt++; | 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, | |||
| 173 | struct ath_hw *ah = sc->sc_ah; | 173 | struct ath_hw *ah = sc->sc_ah; |
| 174 | struct ath_rx_rate_stats *rstats; | 174 | struct ath_rx_rate_stats *rstats; |
| 175 | struct ieee80211_sta *sta = an->sta; | 175 | struct ieee80211_sta *sta = an->sta; |
| 176 | enum ieee80211_band band; | 176 | enum nl80211_band band; |
| 177 | u32 len = 0, size = 4096; | 177 | u32 len = 0, size = 4096; |
| 178 | char *buf; | 178 | char *buf; |
| 179 | size_t retval; | 179 | size_t retval; |
| @@ -206,7 +206,7 @@ static ssize_t read_file_node_recv(struct file *file, char __user *user_buf, | |||
| 206 | len += scnprintf(buf + len, size - len, "\n"); | 206 | len += scnprintf(buf + len, size - len, "\n"); |
| 207 | 207 | ||
| 208 | legacy: | 208 | legacy: |
| 209 | if (band == IEEE80211_BAND_2GHZ) { | 209 | if (band == NL80211_BAND_2GHZ) { |
| 210 | PRINT_CCK_RATE("CCK-1M/LP", 0, false); | 210 | PRINT_CCK_RATE("CCK-1M/LP", 0, false); |
| 211 | PRINT_CCK_RATE("CCK-2M/LP", 1, false); | 211 | PRINT_CCK_RATE("CCK-2M/LP", 1, false); |
| 212 | PRINT_CCK_RATE("CCK-5.5M/LP", 2, false); | 212 | PRINT_CCK_RATE("CCK-5.5M/LP", 2, false); |
diff --git a/drivers/net/wireless/ath/ath9k/dynack.c b/drivers/net/wireless/ath/ath9k/dynack.c index 22b3cc4c27cd..d2ff0fc0484c 100644 --- a/drivers/net/wireless/ath/ath9k/dynack.c +++ b/drivers/net/wireless/ath/ath9k/dynack.c | |||
| @@ -212,7 +212,7 @@ void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb, | |||
| 212 | struct ieee80211_tx_rate *rates = info->status.rates; | 212 | struct ieee80211_tx_rate *rates = info->status.rates; |
| 213 | 213 | ||
| 214 | rate = &common->sbands[info->band].bitrates[rates[ridx].idx]; | 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 | !(rate->flags & IEEE80211_RATE_ERP_G)) | 216 | !(rate->flags & IEEE80211_RATE_ERP_G)) |
| 217 | phy = WLAN_RC_PHY_CCK; | 217 | phy = WLAN_RC_PHY_CCK; |
| 218 | else | 218 | else |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c index c2249ad54085..c148c6c504f7 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c | |||
| @@ -765,11 +765,11 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv, | |||
| 765 | sizeof(struct htc_frame_hdr) + 4; | 765 | sizeof(struct htc_frame_hdr) + 4; |
| 766 | 766 | ||
| 767 | if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) | 767 | if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
| 768 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 768 | hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 769 | &common->sbands[IEEE80211_BAND_2GHZ]; | 769 | &common->sbands[NL80211_BAND_2GHZ]; |
| 770 | if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) | 770 | if (priv->ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
| 771 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 771 | hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 772 | &common->sbands[IEEE80211_BAND_5GHZ]; | 772 | &common->sbands[NL80211_BAND_5GHZ]; |
| 773 | 773 | ||
| 774 | ath9k_cmn_reload_chainmask(ah); | 774 | ath9k_cmn_reload_chainmask(ah); |
| 775 | 775 | ||
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index 639294a9e34d..8a8d7853da15 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c | |||
| @@ -1770,8 +1770,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, | |||
| 1770 | memset(&tmask, 0, sizeof(struct ath9k_htc_target_rate_mask)); | 1770 | memset(&tmask, 0, sizeof(struct ath9k_htc_target_rate_mask)); |
| 1771 | 1771 | ||
| 1772 | tmask.vif_index = avp->index; | 1772 | tmask.vif_index = avp->index; |
| 1773 | tmask.band = IEEE80211_BAND_2GHZ; | 1773 | tmask.band = NL80211_BAND_2GHZ; |
| 1774 | tmask.mask = cpu_to_be32(mask->control[IEEE80211_BAND_2GHZ].legacy); | 1774 | tmask.mask = cpu_to_be32(mask->control[NL80211_BAND_2GHZ].legacy); |
| 1775 | 1775 | ||
| 1776 | WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask); | 1776 | WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask); |
| 1777 | if (ret) { | 1777 | if (ret) { |
| @@ -1781,8 +1781,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, | |||
| 1781 | goto out; | 1781 | goto out; |
| 1782 | } | 1782 | } |
| 1783 | 1783 | ||
| 1784 | tmask.band = IEEE80211_BAND_5GHZ; | 1784 | tmask.band = NL80211_BAND_5GHZ; |
| 1785 | tmask.mask = cpu_to_be32(mask->control[IEEE80211_BAND_5GHZ].legacy); | 1785 | tmask.mask = cpu_to_be32(mask->control[NL80211_BAND_5GHZ].legacy); |
| 1786 | 1786 | ||
| 1787 | WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask); | 1787 | WMI_CMD_BUF(WMI_BITRATE_MASK_CMDID, &tmask); |
| 1788 | if (ret) { | 1788 | if (ret) { |
| @@ -1793,8 +1793,8 @@ static int ath9k_htc_set_bitrate_mask(struct ieee80211_hw *hw, | |||
| 1793 | } | 1793 | } |
| 1794 | 1794 | ||
| 1795 | ath_dbg(common, CONFIG, "Set bitrate masks: 0x%x, 0x%x\n", | 1795 | ath_dbg(common, CONFIG, "Set bitrate masks: 0x%x, 0x%x\n", |
| 1796 | mask->control[IEEE80211_BAND_2GHZ].legacy, | 1796 | mask->control[NL80211_BAND_2GHZ].legacy, |
| 1797 | mask->control[IEEE80211_BAND_5GHZ].legacy); | 1797 | mask->control[NL80211_BAND_5GHZ].legacy); |
| 1798 | out: | 1798 | out: |
| 1799 | return ret; | 1799 | return ret; |
| 1800 | } | 1800 | } |
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c index cc9648f844ae..f333ef1e3e7b 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | |||
| @@ -494,7 +494,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv, | |||
| 494 | if (txs->ts_flags & ATH9K_HTC_TXSTAT_SGI) | 494 | if (txs->ts_flags & ATH9K_HTC_TXSTAT_SGI) |
| 495 | rate->flags |= IEEE80211_TX_RC_SHORT_GI; | 495 | rate->flags |= IEEE80211_TX_RC_SHORT_GI; |
| 496 | } else { | 496 | } else { |
| 497 | if (cur_conf->chandef.chan->band == IEEE80211_BAND_5GHZ) | 497 | if (cur_conf->chandef.chan->band == NL80211_BAND_5GHZ) |
| 498 | rate->idx += 4; /* No CCK rates */ | 498 | rate->idx += 4; /* No CCK rates */ |
| 499 | } | 499 | } |
| 500 | 500 | ||
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 77ace8d72d54..4bf1e244b49b 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
| @@ -705,9 +705,9 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc) | |||
| 705 | struct ath9k_channel *curchan = ah->curchan; | 705 | struct ath9k_channel *curchan = ah->curchan; |
| 706 | 706 | ||
| 707 | if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) | 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 | if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) | 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 | ah->curchan = curchan; | 712 | ah->curchan = curchan; |
| 713 | } | 713 | } |
| @@ -879,11 +879,11 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
| 879 | sc->ant_tx = hw->wiphy->available_antennas_tx; | 879 | sc->ant_tx = hw->wiphy->available_antennas_tx; |
| 880 | 880 | ||
| 881 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) | 881 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
| 882 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 882 | hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 883 | &common->sbands[IEEE80211_BAND_2GHZ]; | 883 | &common->sbands[NL80211_BAND_2GHZ]; |
| 884 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) | 884 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) |
| 885 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 885 | hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 886 | &common->sbands[IEEE80211_BAND_5GHZ]; | 886 | &common->sbands[NL80211_BAND_5GHZ]; |
| 887 | 887 | ||
| 888 | #ifdef CONFIG_ATH9K_CHANNEL_CONTEXT | 888 | #ifdef CONFIG_ATH9K_CHANNEL_CONTEXT |
| 889 | ath9k_set_mcc_capab(sc, hw); | 889 | ath9k_set_mcc_capab(sc, hw); |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 50ec4c9a9da7..8b6398850657 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -1933,14 +1933,14 @@ static int ath9k_get_survey(struct ieee80211_hw *hw, int idx, | |||
| 1933 | if (idx == 0) | 1933 | if (idx == 0) |
| 1934 | ath_update_survey_stats(sc); | 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 | if (sband && idx >= sband->n_channels) { | 1937 | if (sband && idx >= sband->n_channels) { |
| 1938 | idx -= sband->n_channels; | 1938 | idx -= sband->n_channels; |
| 1939 | sband = NULL; | 1939 | sband = NULL; |
| 1940 | } | 1940 | } |
| 1941 | 1941 | ||
| 1942 | if (!sband) | 1942 | if (!sband) |
| 1943 | sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ]; | 1943 | sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; |
| 1944 | 1944 | ||
| 1945 | if (!sband || idx >= sband->n_channels) { | 1945 | if (!sband || idx >= sband->n_channels) { |
| 1946 | spin_unlock_bh(&common->cc_lock); | 1946 | spin_unlock_bh(&common->cc_lock); |
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index fe795fc5288c..8ddd604bd00c 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
| @@ -1112,7 +1112,7 @@ static u8 ath_get_rate_txpower(struct ath_softc *sc, struct ath_buf *bf, | |||
| 1112 | bool is_2ghz; | 1112 | bool is_2ghz; |
| 1113 | struct modal_eep_header *pmodal; | 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 | pmodal = &eep->modalHeader[is_2ghz]; | 1116 | pmodal = &eep->modalHeader[is_2ghz]; |
| 1117 | power_ht40delta = pmodal->ht40PowerIncForPdadc; | 1117 | power_ht40delta = pmodal->ht40PowerIncForPdadc; |
| 1118 | } else { | 1118 | } else { |
| @@ -1236,7 +1236,7 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
| 1236 | 1236 | ||
| 1237 | /* legacy rates */ | 1237 | /* legacy rates */ |
| 1238 | rate = &common->sbands[tx_info->band].bitrates[rates[i].idx]; | 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 | !(rate->flags & IEEE80211_RATE_ERP_G)) | 1240 | !(rate->flags & IEEE80211_RATE_ERP_G)) |
| 1241 | phy = WLAN_RC_PHY_CCK; | 1241 | phy = WLAN_RC_PHY_CCK; |
| 1242 | else | 1242 | else |
diff --git a/drivers/net/wireless/ath/carl9170/mac.c b/drivers/net/wireless/ath/carl9170/mac.c index a2f005703c04..7d4a72dc98db 100644 --- a/drivers/net/wireless/ath/carl9170/mac.c +++ b/drivers/net/wireless/ath/carl9170/mac.c | |||
| @@ -48,7 +48,7 @@ int carl9170_set_dyn_sifs_ack(struct ar9170 *ar) | |||
| 48 | if (conf_is_ht40(&ar->hw->conf)) | 48 | if (conf_is_ht40(&ar->hw->conf)) |
| 49 | val = 0x010a; | 49 | val = 0x010a; |
| 50 | else { | 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 | val = 0x105; | 52 | val = 0x105; |
| 53 | else | 53 | else |
| 54 | val = 0x104; | 54 | val = 0x104; |
| @@ -66,7 +66,7 @@ int carl9170_set_rts_cts_rate(struct ar9170 *ar) | |||
| 66 | rts_rate = 0x1da; | 66 | rts_rate = 0x1da; |
| 67 | cts_rate = 0x10a; | 67 | cts_rate = 0x10a; |
| 68 | } else { | 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 | /* 11 mbit CCK */ | 70 | /* 11 mbit CCK */ |
| 71 | rts_rate = 033; | 71 | rts_rate = 033; |
| 72 | cts_rate = 003; | 72 | cts_rate = 003; |
| @@ -93,7 +93,7 @@ int carl9170_set_slot_time(struct ar9170 *ar) | |||
| 93 | return 0; | 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 | vif->bss_conf.use_short_slot) | 97 | vif->bss_conf.use_short_slot) |
| 98 | slottime = 9; | 98 | slottime = 9; |
| 99 | 99 | ||
| @@ -120,7 +120,7 @@ int carl9170_set_mac_rates(struct ar9170 *ar) | |||
| 120 | basic |= (vif->bss_conf.basic_rates & 0xff0) << 4; | 120 | basic |= (vif->bss_conf.basic_rates & 0xff0) << 4; |
| 121 | rcu_read_unlock(); | 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 | mandatory = 0xff00; /* OFDM 6/9/12/18/24/36/48/54 */ | 124 | mandatory = 0xff00; /* OFDM 6/9/12/18/24/36/48/54 */ |
| 125 | else | 125 | else |
| 126 | mandatory = 0xff0f; /* OFDM (6/9../54) + CCK (1/2/5.5/11) */ | 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) | |||
| 512 | chains = AR9170_TX_PHY_TXCHAIN_1; | 512 | chains = AR9170_TX_PHY_TXCHAIN_1; |
| 513 | 513 | ||
| 514 | switch (channel->band) { | 514 | switch (channel->band) { |
| 515 | case IEEE80211_BAND_2GHZ: | 515 | case NL80211_BAND_2GHZ: |
| 516 | power = ar->power_2G_ofdm[0] & 0x3f; | 516 | power = ar->power_2G_ofdm[0] & 0x3f; |
| 517 | break; | 517 | break; |
| 518 | case IEEE80211_BAND_5GHZ: | 518 | case NL80211_BAND_5GHZ: |
| 519 | power = ar->power_5G_leg[0] & 0x3f; | 519 | power = ar->power_5G_leg[0] & 0x3f; |
| 520 | break; | 520 | break; |
| 521 | default: | 521 | default: |
diff --git a/drivers/net/wireless/ath/carl9170/main.c b/drivers/net/wireless/ath/carl9170/main.c index 4d1527a2e292..ffb22a04beeb 100644 --- a/drivers/net/wireless/ath/carl9170/main.c +++ b/drivers/net/wireless/ath/carl9170/main.c | |||
| @@ -1666,7 +1666,7 @@ static int carl9170_op_get_survey(struct ieee80211_hw *hw, int idx, | |||
| 1666 | return err; | 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 | band = ar->hw->wiphy->bands[b]; | 1670 | band = ar->hw->wiphy->bands[b]; |
| 1671 | 1671 | ||
| 1672 | if (!band) | 1672 | if (!band) |
| @@ -1941,13 +1941,13 @@ static int carl9170_parse_eeprom(struct ar9170 *ar) | |||
| 1941 | } | 1941 | } |
| 1942 | 1942 | ||
| 1943 | if (ar->eeprom.operating_flags & AR9170_OPFLAG_2GHZ) { | 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 | &carl9170_band_2GHz; | 1945 | &carl9170_band_2GHz; |
| 1946 | chans += carl9170_band_2GHz.n_channels; | 1946 | chans += carl9170_band_2GHz.n_channels; |
| 1947 | bands++; | 1947 | bands++; |
| 1948 | } | 1948 | } |
| 1949 | if (ar->eeprom.operating_flags & AR9170_OPFLAG_5GHZ) { | 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 | &carl9170_band_5GHz; | 1951 | &carl9170_band_5GHz; |
| 1952 | chans += carl9170_band_5GHz.n_channels; | 1952 | chans += carl9170_band_5GHz.n_channels; |
| 1953 | bands++; | 1953 | bands++; |
diff --git a/drivers/net/wireless/ath/carl9170/phy.c b/drivers/net/wireless/ath/carl9170/phy.c index dca6df13fd5b..34d9fd77046e 100644 --- a/drivers/net/wireless/ath/carl9170/phy.c +++ b/drivers/net/wireless/ath/carl9170/phy.c | |||
| @@ -540,11 +540,11 @@ static int carl9170_init_phy_from_eeprom(struct ar9170 *ar, | |||
| 540 | return carl9170_regwrite_result(); | 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 | int i, err; | 545 | int i, err; |
| 546 | u32 val; | 546 | u32 val; |
| 547 | bool is_2ghz = band == IEEE80211_BAND_2GHZ; | 547 | bool is_2ghz = band == NL80211_BAND_2GHZ; |
| 548 | bool is_40mhz = conf_is_ht40(&ar->hw->conf); | 548 | bool is_40mhz = conf_is_ht40(&ar->hw->conf); |
| 549 | 549 | ||
| 550 | carl9170_regwrite_begin(ar); | 550 | carl9170_regwrite_begin(ar); |
| @@ -1125,13 +1125,13 @@ static int carl9170_set_freq_cal_data(struct ar9170 *ar, | |||
| 1125 | u8 f, tmp; | 1125 | u8 f, tmp; |
| 1126 | 1126 | ||
| 1127 | switch (channel->band) { | 1127 | switch (channel->band) { |
| 1128 | case IEEE80211_BAND_2GHZ: | 1128 | case NL80211_BAND_2GHZ: |
| 1129 | f = channel->center_freq - 2300; | 1129 | f = channel->center_freq - 2300; |
| 1130 | cal_freq_pier = ar->eeprom.cal_freq_pier_2G; | 1130 | cal_freq_pier = ar->eeprom.cal_freq_pier_2G; |
| 1131 | i = AR5416_NUM_2G_CAL_PIERS - 1; | 1131 | i = AR5416_NUM_2G_CAL_PIERS - 1; |
| 1132 | break; | 1132 | break; |
| 1133 | 1133 | ||
| 1134 | case IEEE80211_BAND_5GHZ: | 1134 | case NL80211_BAND_5GHZ: |
| 1135 | f = (channel->center_freq - 4800) / 5; | 1135 | f = (channel->center_freq - 4800) / 5; |
| 1136 | cal_freq_pier = ar->eeprom.cal_freq_pier_5G; | 1136 | cal_freq_pier = ar->eeprom.cal_freq_pier_5G; |
| 1137 | i = AR5416_NUM_5G_CAL_PIERS - 1; | 1137 | i = AR5416_NUM_5G_CAL_PIERS - 1; |
| @@ -1158,12 +1158,12 @@ static int carl9170_set_freq_cal_data(struct ar9170 *ar, | |||
| 1158 | int j; | 1158 | int j; |
| 1159 | 1159 | ||
| 1160 | switch (channel->band) { | 1160 | switch (channel->band) { |
| 1161 | case IEEE80211_BAND_2GHZ: | 1161 | case NL80211_BAND_2GHZ: |
| 1162 | cal_pier_data = &ar->eeprom. | 1162 | cal_pier_data = &ar->eeprom. |
| 1163 | cal_pier_data_2G[chain][idx]; | 1163 | cal_pier_data_2G[chain][idx]; |
| 1164 | break; | 1164 | break; |
| 1165 | 1165 | ||
| 1166 | case IEEE80211_BAND_5GHZ: | 1166 | case NL80211_BAND_5GHZ: |
| 1167 | cal_pier_data = &ar->eeprom. | 1167 | cal_pier_data = &ar->eeprom. |
| 1168 | cal_pier_data_5G[chain][idx]; | 1168 | cal_pier_data_5G[chain][idx]; |
| 1169 | break; | 1169 | break; |
| @@ -1340,7 +1340,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw) | |||
| 1340 | /* skip CTL and heavy clip for CTL_MKK and CTL_ETSI */ | 1340 | /* skip CTL and heavy clip for CTL_MKK and CTL_ETSI */ |
| 1341 | return; | 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 | modes = mode_list_2ghz; | 1344 | modes = mode_list_2ghz; |
| 1345 | nr_modes = ARRAY_SIZE(mode_list_2ghz); | 1345 | nr_modes = ARRAY_SIZE(mode_list_2ghz); |
| 1346 | } else { | 1346 | } else { |
| @@ -1607,7 +1607,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, | |||
| 1607 | return err; | 1607 | return err; |
| 1608 | 1608 | ||
| 1609 | err = carl9170_init_rf_banks_0_7(ar, | 1609 | err = carl9170_init_rf_banks_0_7(ar, |
| 1610 | channel->band == IEEE80211_BAND_5GHZ); | 1610 | channel->band == NL80211_BAND_5GHZ); |
| 1611 | if (err) | 1611 | if (err) |
| 1612 | return err; | 1612 | return err; |
| 1613 | 1613 | ||
| @@ -1621,7 +1621,7 @@ int carl9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, | |||
| 1621 | return err; | 1621 | return err; |
| 1622 | 1622 | ||
| 1623 | err = carl9170_init_rf_bank4_pwr(ar, | 1623 | err = carl9170_init_rf_bank4_pwr(ar, |
| 1624 | channel->band == IEEE80211_BAND_5GHZ, | 1624 | channel->band == NL80211_BAND_5GHZ, |
| 1625 | channel->center_freq, bw); | 1625 | channel->center_freq, bw); |
| 1626 | if (err) | 1626 | if (err) |
| 1627 | return err; | 1627 | return err; |
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c index d66533cbc38a..0c34c8729dc6 100644 --- a/drivers/net/wireless/ath/carl9170/rx.c +++ b/drivers/net/wireless/ath/carl9170/rx.c | |||
| @@ -417,7 +417,7 @@ static int carl9170_rx_mac_status(struct ar9170 *ar, | |||
| 417 | 417 | ||
| 418 | return -EINVAL; | 418 | return -EINVAL; |
| 419 | } | 419 | } |
| 420 | if (status->band == IEEE80211_BAND_2GHZ) | 420 | if (status->band == NL80211_BAND_2GHZ) |
| 421 | status->rate_idx += 4; | 421 | status->rate_idx += 4; |
| 422 | break; | 422 | break; |
| 423 | 423 | ||
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c index ae86a600d920..2bf04c9edc98 100644 --- a/drivers/net/wireless/ath/carl9170/tx.c +++ b/drivers/net/wireless/ath/carl9170/tx.c | |||
| @@ -720,12 +720,12 @@ static void carl9170_tx_rate_tpc_chains(struct ar9170 *ar, | |||
| 720 | /* +1 dBm for HT40 */ | 720 | /* +1 dBm for HT40 */ |
| 721 | *tpc += 2; | 721 | *tpc += 2; |
| 722 | 722 | ||
| 723 | if (info->band == IEEE80211_BAND_2GHZ) | 723 | if (info->band == NL80211_BAND_2GHZ) |
| 724 | txpower = ar->power_2G_ht40; | 724 | txpower = ar->power_2G_ht40; |
| 725 | else | 725 | else |
| 726 | txpower = ar->power_5G_ht40; | 726 | txpower = ar->power_5G_ht40; |
| 727 | } else { | 727 | } else { |
| 728 | if (info->band == IEEE80211_BAND_2GHZ) | 728 | if (info->band == NL80211_BAND_2GHZ) |
| 729 | txpower = ar->power_2G_ht20; | 729 | txpower = ar->power_2G_ht20; |
| 730 | else | 730 | else |
| 731 | txpower = ar->power_5G_ht20; | 731 | txpower = ar->power_5G_ht20; |
| @@ -734,7 +734,7 @@ static void carl9170_tx_rate_tpc_chains(struct ar9170 *ar, | |||
| 734 | *phyrate = txrate->idx; | 734 | *phyrate = txrate->idx; |
| 735 | *tpc += txpower[idx & 7]; | 735 | *tpc += txpower[idx & 7]; |
| 736 | } else { | 736 | } else { |
| 737 | if (info->band == IEEE80211_BAND_2GHZ) { | 737 | if (info->band == NL80211_BAND_2GHZ) { |
| 738 | if (idx < 4) | 738 | if (idx < 4) |
| 739 | txpower = ar->power_2G_cck; | 739 | txpower = ar->power_2G_cck; |
| 740 | else | 740 | else |
| @@ -797,7 +797,7 @@ static __le32 carl9170_tx_physet(struct ar9170 *ar, | |||
| 797 | * tmp |= cpu_to_le32(AR9170_TX_PHY_GREENFIELD); | 797 | * tmp |= cpu_to_le32(AR9170_TX_PHY_GREENFIELD); |
| 798 | */ | 798 | */ |
| 799 | } else { | 799 | } else { |
| 800 | if (info->band == IEEE80211_BAND_2GHZ) { | 800 | if (info->band == NL80211_BAND_2GHZ) { |
| 801 | if (txrate->idx <= AR9170_TX_PHY_RATE_CCK_11M) | 801 | if (txrate->idx <= AR9170_TX_PHY_RATE_CCK_11M) |
| 802 | tmp |= cpu_to_le32(AR9170_TX_PHY_MOD_CCK); | 802 | tmp |= cpu_to_le32(AR9170_TX_PHY_MOD_CCK); |
| 803 | else | 803 | else |
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c index 06ea6cc9e30a..7e15ed9ed31f 100644 --- a/drivers/net/wireless/ath/regd.c +++ b/drivers/net/wireless/ath/regd.c | |||
| @@ -336,12 +336,12 @@ ath_reg_apply_beaconing_flags(struct wiphy *wiphy, | |||
| 336 | struct ath_regulatory *reg, | 336 | struct ath_regulatory *reg, |
| 337 | enum nl80211_reg_initiator initiator) | 337 | enum nl80211_reg_initiator initiator) |
| 338 | { | 338 | { |
| 339 | enum ieee80211_band band; | 339 | enum nl80211_band band; |
| 340 | struct ieee80211_supported_band *sband; | 340 | struct ieee80211_supported_band *sband; |
| 341 | struct ieee80211_channel *ch; | 341 | struct ieee80211_channel *ch; |
| 342 | unsigned int i; | 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 | if (!wiphy->bands[band]) | 345 | if (!wiphy->bands[band]) |
| 346 | continue; | 346 | continue; |
| 347 | sband = wiphy->bands[band]; | 347 | sband = wiphy->bands[band]; |
| @@ -374,7 +374,7 @@ ath_reg_apply_ir_flags(struct wiphy *wiphy, | |||
| 374 | { | 374 | { |
| 375 | struct ieee80211_supported_band *sband; | 375 | struct ieee80211_supported_band *sband; |
| 376 | 376 | ||
| 377 | sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | 377 | sband = wiphy->bands[NL80211_BAND_2GHZ]; |
| 378 | if (!sband) | 378 | if (!sband) |
| 379 | return; | 379 | return; |
| 380 | 380 | ||
| @@ -402,10 +402,10 @@ static void ath_reg_apply_radar_flags(struct wiphy *wiphy) | |||
| 402 | struct ieee80211_channel *ch; | 402 | struct ieee80211_channel *ch; |
| 403 | unsigned int i; | 403 | unsigned int i; |
| 404 | 404 | ||
| 405 | if (!wiphy->bands[IEEE80211_BAND_5GHZ]) | 405 | if (!wiphy->bands[NL80211_BAND_5GHZ]) |
| 406 | return; | 406 | return; |
| 407 | 407 | ||
| 408 | sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | 408 | sband = wiphy->bands[NL80211_BAND_5GHZ]; |
| 409 | 409 | ||
| 410 | for (i = 0; i < sband->n_channels; i++) { | 410 | for (i = 0; i < sband->n_channels; i++) { |
| 411 | ch = &sband->channels[i]; | 411 | ch = &sband->channels[i]; |
| @@ -772,7 +772,7 @@ ath_regd_init(struct ath_regulatory *reg, | |||
| 772 | EXPORT_SYMBOL(ath_regd_init); | 772 | EXPORT_SYMBOL(ath_regd_init); |
| 773 | 773 | ||
| 774 | u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, | 774 | u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, |
| 775 | enum ieee80211_band band) | 775 | enum nl80211_band band) |
| 776 | { | 776 | { |
| 777 | if (!reg->regpair || | 777 | if (!reg->regpair || |
| 778 | (reg->country_code == CTRY_DEFAULT && | 778 | (reg->country_code == CTRY_DEFAULT && |
| @@ -794,9 +794,9 @@ u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, | |||
| 794 | } | 794 | } |
| 795 | 795 | ||
| 796 | switch (band) { | 796 | switch (band) { |
| 797 | case IEEE80211_BAND_2GHZ: | 797 | case NL80211_BAND_2GHZ: |
| 798 | return reg->regpair->reg_2ghz_ctl; | 798 | return reg->regpair->reg_2ghz_ctl; |
| 799 | case IEEE80211_BAND_5GHZ: | 799 | case NL80211_BAND_5GHZ: |
| 800 | return reg->regpair->reg_5ghz_ctl; | 800 | return reg->regpair->reg_5ghz_ctl; |
| 801 | default: | 801 | default: |
| 802 | return NO_CTL; | 802 | return NO_CTL; |
diff --git a/drivers/net/wireless/ath/regd.h b/drivers/net/wireless/ath/regd.h index 37f53bd8fcb1..565d3075f06e 100644 --- a/drivers/net/wireless/ath/regd.h +++ b/drivers/net/wireless/ath/regd.h | |||
| @@ -255,7 +255,7 @@ int ath_regd_init(struct ath_regulatory *reg, struct wiphy *wiphy, | |||
| 255 | void (*reg_notifier)(struct wiphy *wiphy, | 255 | void (*reg_notifier)(struct wiphy *wiphy, |
| 256 | struct regulatory_request *request)); | 256 | struct regulatory_request *request)); |
| 257 | u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, | 257 | u32 ath_regd_get_band_ctl(struct ath_regulatory *reg, |
| 258 | enum ieee80211_band band); | 258 | enum nl80211_band band); |
| 259 | void ath_reg_notifier_apply(struct wiphy *wiphy, | 259 | void ath_reg_notifier_apply(struct wiphy *wiphy, |
| 260 | struct regulatory_request *request, | 260 | struct regulatory_request *request, |
| 261 | struct ath_regulatory *reg); | 261 | struct ath_regulatory *reg); |
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c index a27279c2c695..9a1db3bbec4e 100644 --- a/drivers/net/wireless/ath/wcn36xx/main.c +++ b/drivers/net/wireless/ath/wcn36xx/main.c | |||
| @@ -26,14 +26,14 @@ module_param_named(debug_mask, wcn36xx_dbg_mask, uint, 0644); | |||
| 26 | MODULE_PARM_DESC(debug_mask, "Debugging mask"); | 26 | MODULE_PARM_DESC(debug_mask, "Debugging mask"); |
| 27 | 27 | ||
| 28 | #define CHAN2G(_freq, _idx) { \ | 28 | #define CHAN2G(_freq, _idx) { \ |
| 29 | .band = IEEE80211_BAND_2GHZ, \ | 29 | .band = NL80211_BAND_2GHZ, \ |
| 30 | .center_freq = (_freq), \ | 30 | .center_freq = (_freq), \ |
| 31 | .hw_value = (_idx), \ | 31 | .hw_value = (_idx), \ |
| 32 | .max_power = 25, \ | 32 | .max_power = 25, \ |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | #define CHAN5G(_freq, _idx) { \ | 35 | #define CHAN5G(_freq, _idx) { \ |
| 36 | .band = IEEE80211_BAND_5GHZ, \ | 36 | .band = NL80211_BAND_5GHZ, \ |
| 37 | .center_freq = (_freq), \ | 37 | .center_freq = (_freq), \ |
| 38 | .hw_value = (_idx), \ | 38 | .hw_value = (_idx), \ |
| 39 | .max_power = 25, \ | 39 | .max_power = 25, \ |
| @@ -516,7 +516,7 @@ static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw, | |||
| 516 | } | 516 | } |
| 517 | 517 | ||
| 518 | static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, | 518 | static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, |
| 519 | enum ieee80211_band band) | 519 | enum nl80211_band band) |
| 520 | { | 520 | { |
| 521 | int i, size; | 521 | int i, size; |
| 522 | u16 *rates_table; | 522 | u16 *rates_table; |
| @@ -529,7 +529,7 @@ static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta, | |||
| 529 | 529 | ||
| 530 | size = ARRAY_SIZE(sta_priv->supported_rates.dsss_rates); | 530 | size = ARRAY_SIZE(sta_priv->supported_rates.dsss_rates); |
| 531 | rates_table = sta_priv->supported_rates.dsss_rates; | 531 | rates_table = sta_priv->supported_rates.dsss_rates; |
| 532 | if (band == IEEE80211_BAND_2GHZ) { | 532 | if (band == NL80211_BAND_2GHZ) { |
| 533 | for (i = 0; i < size; i++) { | 533 | for (i = 0; i < size; i++) { |
| 534 | if (rates & 0x01) { | 534 | if (rates & 0x01) { |
| 535 | rates_table[i] = wcn_2ghz_rates[i].hw_value; | 535 | rates_table[i] = wcn_2ghz_rates[i].hw_value; |
| @@ -958,8 +958,8 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) | |||
| 958 | BIT(NL80211_IFTYPE_ADHOC) | | 958 | BIT(NL80211_IFTYPE_ADHOC) | |
| 959 | BIT(NL80211_IFTYPE_MESH_POINT); | 959 | BIT(NL80211_IFTYPE_MESH_POINT); |
| 960 | 960 | ||
| 961 | wcn->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &wcn_band_2ghz; | 961 | wcn->hw->wiphy->bands[NL80211_BAND_2GHZ] = &wcn_band_2ghz; |
| 962 | wcn->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &wcn_band_5ghz; | 962 | wcn->hw->wiphy->bands[NL80211_BAND_5GHZ] = &wcn_band_5ghz; |
| 963 | 963 | ||
| 964 | wcn->hw->wiphy->cipher_suites = cipher_suites; | 964 | wcn->hw->wiphy->cipher_suites = cipher_suites; |
| 965 | wcn->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); | 965 | wcn->hw->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites); |
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 74f56a81ad9a..96992a2c4b42 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c | |||
| @@ -104,11 +104,11 @@ static void wcn36xx_smd_set_bss_nw_type(struct wcn36xx *wcn, | |||
| 104 | struct ieee80211_sta *sta, | 104 | struct ieee80211_sta *sta, |
| 105 | struct wcn36xx_hal_config_bss_params *bss_params) | 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 | bss_params->nw_type = WCN36XX_HAL_11A_NW_TYPE; | 108 | bss_params->nw_type = WCN36XX_HAL_11A_NW_TYPE; |
| 109 | else if (sta && sta->ht_cap.ht_supported) | 109 | else if (sta && sta->ht_cap.ht_supported) |
| 110 | bss_params->nw_type = WCN36XX_HAL_11N_NW_TYPE; | 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 | bss_params->nw_type = WCN36XX_HAL_11G_NW_TYPE; | 112 | bss_params->nw_type = WCN36XX_HAL_11G_NW_TYPE; |
| 113 | else | 113 | else |
| 114 | bss_params->nw_type = WCN36XX_HAL_11B_NW_TYPE; | 114 | bss_params->nw_type = WCN36XX_HAL_11B_NW_TYPE; |
diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c index 99c21aac68bd..6c47a7336c38 100644 --- a/drivers/net/wireless/ath/wcn36xx/txrx.c +++ b/drivers/net/wireless/ath/wcn36xx/txrx.c | |||
| @@ -225,7 +225,7 @@ static void wcn36xx_set_tx_mgmt(struct wcn36xx_tx_bd *bd, | |||
| 225 | 225 | ||
| 226 | /* default rate for unicast */ | 226 | /* default rate for unicast */ |
| 227 | if (ieee80211_is_mgmt(hdr->frame_control)) | 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 | WCN36XX_BD_RATE_CTRL : | 229 | WCN36XX_BD_RATE_CTRL : |
| 230 | WCN36XX_BD_RATE_MGMT; | 230 | WCN36XX_BD_RATE_MGMT; |
| 231 | else if (ieee80211_is_ctl(hdr->frame_control)) | 231 | else if (ieee80211_is_ctl(hdr->frame_control)) |
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c index 12cae3c005fb..0fb3a7941d84 100644 --- a/drivers/net/wireless/ath/wil6210/cfg80211.c +++ b/drivers/net/wireless/ath/wil6210/cfg80211.c | |||
| @@ -21,7 +21,7 @@ | |||
| 21 | #define WIL_MAX_ROC_DURATION_MS 5000 | 21 | #define WIL_MAX_ROC_DURATION_MS 5000 |
| 22 | 22 | ||
| 23 | #define CHAN60G(_channel, _flags) { \ | 23 | #define CHAN60G(_channel, _flags) { \ |
| 24 | .band = IEEE80211_BAND_60GHZ, \ | 24 | .band = NL80211_BAND_60GHZ, \ |
| 25 | .center_freq = 56160 + (2160 * (_channel)), \ | 25 | .center_freq = 56160 + (2160 * (_channel)), \ |
| 26 | .hw_value = (_channel), \ | 26 | .hw_value = (_channel), \ |
| 27 | .flags = (_flags), \ | 27 | .flags = (_flags), \ |
| @@ -1411,7 +1411,7 @@ static void wil_wiphy_init(struct wiphy *wiphy) | |||
| 1411 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | | 1411 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 | |
| 1412 | NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P; | 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 | /* TODO: figure this out */ | 1416 | /* TODO: figure this out */ |
| 1417 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; | 1417 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; |
diff --git a/drivers/net/wireless/ath/wil6210/netdev.c b/drivers/net/wireless/ath/wil6210/netdev.c index 3bc0e2634db0..098409753d5b 100644 --- a/drivers/net/wireless/ath/wil6210/netdev.c +++ b/drivers/net/wireless/ath/wil6210/netdev.c | |||
| @@ -157,7 +157,7 @@ void *wil_if_alloc(struct device *dev) | |||
| 157 | 157 | ||
| 158 | wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */ | 158 | wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */ |
| 159 | /* default monitor channel */ | 159 | /* default monitor channel */ |
| 160 | ch = wdev->wiphy->bands[IEEE80211_BAND_60GHZ]->channels; | 160 | ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels; |
| 161 | cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT); | 161 | cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT); |
| 162 | 162 | ||
| 163 | ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup); | 163 | ndev = alloc_netdev(0, "wlan%d", NET_NAME_UNKNOWN, wil_dev_setup); |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 3cc4462aec1a..6ca28c3eff0a 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
| @@ -333,7 +333,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len) | |||
| 333 | } | 333 | } |
| 334 | 334 | ||
| 335 | ch_no = data->info.channel + 1; | 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 | channel = ieee80211_get_channel(wiphy, freq); | 337 | channel = ieee80211_get_channel(wiphy, freq); |
| 338 | signal = data->info.sqi; | 338 | signal = data->info.sqi; |
| 339 | d_status = le16_to_cpu(data->info.status); | 339 | d_status = le16_to_cpu(data->info.status); |
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c index 1efb1d66e0b7..7c108047fb46 100644 --- a/drivers/net/wireless/atmel/at76c50x-usb.c +++ b/drivers/net/wireless/atmel/at76c50x-usb.c | |||
| @@ -1547,7 +1547,7 @@ static inline int at76_guess_freq(struct at76_priv *priv) | |||
| 1547 | channel = el[2]; | 1547 | channel = el[2]; |
| 1548 | 1548 | ||
| 1549 | exit: | 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 | static void at76_rx_tasklet(unsigned long param) | 1553 | static void at76_rx_tasklet(unsigned long param) |
| @@ -1590,7 +1590,7 @@ static void at76_rx_tasklet(unsigned long param) | |||
| 1590 | rx_status.signal = buf->rssi; | 1590 | rx_status.signal = buf->rssi; |
| 1591 | rx_status.flag |= RX_FLAG_DECRYPTED; | 1591 | rx_status.flag |= RX_FLAG_DECRYPTED; |
| 1592 | rx_status.flag |= RX_FLAG_IV_STRIPPED; | 1592 | rx_status.flag |= RX_FLAG_IV_STRIPPED; |
| 1593 | rx_status.band = IEEE80211_BAND_2GHZ; | 1593 | rx_status.band = NL80211_BAND_2GHZ; |
| 1594 | rx_status.freq = at76_guess_freq(priv); | 1594 | rx_status.freq = at76_guess_freq(priv); |
| 1595 | 1595 | ||
| 1596 | at76_dbg(DBG_MAC80211, "calling ieee80211_rx_irqsafe(): %d/%d", | 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, | |||
| 2359 | priv->hw->wiphy->max_scan_ssids = 1; | 2359 | priv->hw->wiphy->max_scan_ssids = 1; |
| 2360 | priv->hw->wiphy->max_scan_ie_len = 0; | 2360 | priv->hw->wiphy->max_scan_ie_len = 0; |
| 2361 | priv->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | 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 | ieee80211_hw_set(priv->hw, RX_INCLUDES_FCS); | 2363 | ieee80211_hw_set(priv->hw, RX_INCLUDES_FCS); |
| 2364 | ieee80211_hw_set(priv->hw, SIGNAL_UNSPEC); | 2364 | ieee80211_hw_set(priv->hw, SIGNAL_UNSPEC); |
| 2365 | priv->hw->max_signal = 100; | 2365 | priv->hw->max_signal = 100; |
diff --git a/drivers/net/wireless/atmel/atmel.c b/drivers/net/wireless/atmel/atmel.c index 6a1f03c271c1..8f8f37f3a00c 100644 --- a/drivers/net/wireless/atmel/atmel.c +++ b/drivers/net/wireless/atmel/atmel.c | |||
| @@ -2434,7 +2434,7 @@ static int atmel_get_range(struct net_device *dev, | |||
| 2434 | 2434 | ||
| 2435 | /* Values in MHz -> * 10^5 * 10 */ | 2435 | /* Values in MHz -> * 10^5 * 10 */ |
| 2436 | range->freq[k].m = 100000 * | 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 | range->freq[k++].e = 1; | 2438 | range->freq[k++].e = 1; |
| 2439 | } | 2439 | } |
| 2440 | range->num_frequency = k; | 2440 | range->num_frequency = k; |
diff --git a/drivers/net/wireless/broadcom/b43/b43.h b/drivers/net/wireless/broadcom/b43/b43.h index 036552439816..d7d42f0b80c3 100644 --- a/drivers/net/wireless/broadcom/b43/b43.h +++ b/drivers/net/wireless/broadcom/b43/b43.h | |||
| @@ -992,9 +992,9 @@ static inline int b43_is_mode(struct b43_wl *wl, int type) | |||
| 992 | 992 | ||
| 993 | /** | 993 | /** |
| 994 | * b43_current_band - Returns the currently used band. | 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 | return wl->hw->conf.chandef.chan->band; | 999 | return wl->hw->conf.chandef.chan->band; |
| 1000 | } | 1000 | } |
diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c index b0603e796ad8..4ee5c5853f9f 100644 --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c | |||
| @@ -187,7 +187,7 @@ static struct ieee80211_rate __b43_ratetable[] = { | |||
| 187 | #define b43_g_ratetable_size 12 | 187 | #define b43_g_ratetable_size 12 |
| 188 | 188 | ||
| 189 | #define CHAN2G(_channel, _freq, _flags) { \ | 189 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 190 | .band = IEEE80211_BAND_2GHZ, \ | 190 | .band = NL80211_BAND_2GHZ, \ |
| 191 | .center_freq = (_freq), \ | 191 | .center_freq = (_freq), \ |
| 192 | .hw_value = (_channel), \ | 192 | .hw_value = (_channel), \ |
| 193 | .flags = (_flags), \ | 193 | .flags = (_flags), \ |
| @@ -216,7 +216,7 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { | |||
| 216 | #undef CHAN2G | 216 | #undef CHAN2G |
| 217 | 217 | ||
| 218 | #define CHAN4G(_channel, _flags) { \ | 218 | #define CHAN4G(_channel, _flags) { \ |
| 219 | .band = IEEE80211_BAND_5GHZ, \ | 219 | .band = NL80211_BAND_5GHZ, \ |
| 220 | .center_freq = 4000 + (5 * (_channel)), \ | 220 | .center_freq = 4000 + (5 * (_channel)), \ |
| 221 | .hw_value = (_channel), \ | 221 | .hw_value = (_channel), \ |
| 222 | .flags = (_flags), \ | 222 | .flags = (_flags), \ |
| @@ -224,7 +224,7 @@ static struct ieee80211_channel b43_2ghz_chantable[] = { | |||
| 224 | .max_power = 30, \ | 224 | .max_power = 30, \ |
| 225 | } | 225 | } |
| 226 | #define CHAN5G(_channel, _flags) { \ | 226 | #define CHAN5G(_channel, _flags) { \ |
| 227 | .band = IEEE80211_BAND_5GHZ, \ | 227 | .band = NL80211_BAND_5GHZ, \ |
| 228 | .center_freq = 5000 + (5 * (_channel)), \ | 228 | .center_freq = 5000 + (5 * (_channel)), \ |
| 229 | .hw_value = (_channel), \ | 229 | .hw_value = (_channel), \ |
| 230 | .flags = (_flags), \ | 230 | .flags = (_flags), \ |
| @@ -323,7 +323,7 @@ static struct ieee80211_channel b43_5ghz_aphy_chantable[] = { | |||
| 323 | #undef CHAN5G | 323 | #undef CHAN5G |
| 324 | 324 | ||
| 325 | static struct ieee80211_supported_band b43_band_5GHz_nphy = { | 325 | static struct ieee80211_supported_band b43_band_5GHz_nphy = { |
| 326 | .band = IEEE80211_BAND_5GHZ, | 326 | .band = NL80211_BAND_5GHZ, |
| 327 | .channels = b43_5ghz_nphy_chantable, | 327 | .channels = b43_5ghz_nphy_chantable, |
| 328 | .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable), | 328 | .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable), |
| 329 | .bitrates = b43_a_ratetable, | 329 | .bitrates = b43_a_ratetable, |
| @@ -331,7 +331,7 @@ static struct ieee80211_supported_band b43_band_5GHz_nphy = { | |||
| 331 | }; | 331 | }; |
| 332 | 332 | ||
| 333 | static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = { | 333 | static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = { |
| 334 | .band = IEEE80211_BAND_5GHZ, | 334 | .band = NL80211_BAND_5GHZ, |
| 335 | .channels = b43_5ghz_nphy_chantable_limited, | 335 | .channels = b43_5ghz_nphy_chantable_limited, |
| 336 | .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable_limited), | 336 | .n_channels = ARRAY_SIZE(b43_5ghz_nphy_chantable_limited), |
| 337 | .bitrates = b43_a_ratetable, | 337 | .bitrates = b43_a_ratetable, |
| @@ -339,7 +339,7 @@ static struct ieee80211_supported_band b43_band_5GHz_nphy_limited = { | |||
| 339 | }; | 339 | }; |
| 340 | 340 | ||
| 341 | static struct ieee80211_supported_band b43_band_5GHz_aphy = { | 341 | static struct ieee80211_supported_band b43_band_5GHz_aphy = { |
| 342 | .band = IEEE80211_BAND_5GHZ, | 342 | .band = NL80211_BAND_5GHZ, |
| 343 | .channels = b43_5ghz_aphy_chantable, | 343 | .channels = b43_5ghz_aphy_chantable, |
| 344 | .n_channels = ARRAY_SIZE(b43_5ghz_aphy_chantable), | 344 | .n_channels = ARRAY_SIZE(b43_5ghz_aphy_chantable), |
| 345 | .bitrates = b43_a_ratetable, | 345 | .bitrates = b43_a_ratetable, |
| @@ -347,7 +347,7 @@ static struct ieee80211_supported_band b43_band_5GHz_aphy = { | |||
| 347 | }; | 347 | }; |
| 348 | 348 | ||
| 349 | static struct ieee80211_supported_band b43_band_2GHz = { | 349 | static struct ieee80211_supported_band b43_band_2GHz = { |
| 350 | .band = IEEE80211_BAND_2GHZ, | 350 | .band = NL80211_BAND_2GHZ, |
| 351 | .channels = b43_2ghz_chantable, | 351 | .channels = b43_2ghz_chantable, |
| 352 | .n_channels = ARRAY_SIZE(b43_2ghz_chantable), | 352 | .n_channels = ARRAY_SIZE(b43_2ghz_chantable), |
| 353 | .bitrates = b43_g_ratetable, | 353 | .bitrates = b43_g_ratetable, |
| @@ -355,7 +355,7 @@ static struct ieee80211_supported_band b43_band_2GHz = { | |||
| 355 | }; | 355 | }; |
| 356 | 356 | ||
| 357 | static struct ieee80211_supported_band b43_band_2ghz_limited = { | 357 | static struct ieee80211_supported_band b43_band_2ghz_limited = { |
| 358 | .band = IEEE80211_BAND_2GHZ, | 358 | .band = NL80211_BAND_2GHZ, |
| 359 | .channels = b43_2ghz_chantable, | 359 | .channels = b43_2ghz_chantable, |
| 360 | .n_channels = b43_2ghz_chantable_limited_size, | 360 | .n_channels = b43_2ghz_chantable_limited_size, |
| 361 | .bitrates = b43_g_ratetable, | 361 | .bitrates = b43_g_ratetable, |
| @@ -717,7 +717,7 @@ static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time) | |||
| 717 | { | 717 | { |
| 718 | /* slot_time is in usec. */ | 718 | /* slot_time is in usec. */ |
| 719 | /* This test used to exit for all but a G PHY. */ | 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 | return; | 721 | return; |
| 722 | b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time); | 722 | b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time); |
| 723 | /* Shared memory location 0x0010 is the slot time and should be | 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, | |||
| 3880 | mutex_unlock(&wl->mutex); | 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 | switch (band) { | 3885 | switch (band) { |
| 3886 | case IEEE80211_BAND_5GHZ: | 3886 | case NL80211_BAND_5GHZ: |
| 3887 | return "5"; | 3887 | return "5"; |
| 3888 | case IEEE80211_BAND_2GHZ: | 3888 | case NL80211_BAND_2GHZ: |
| 3889 | return "2.4"; | 3889 | return "2.4"; |
| 3890 | default: | 3890 | default: |
| 3891 | break; | 3891 | break; |
| @@ -3903,10 +3903,10 @@ static int b43_switch_band(struct b43_wldev *dev, | |||
| 3903 | u32 tmp; | 3903 | u32 tmp; |
| 3904 | 3904 | ||
| 3905 | switch (chan->band) { | 3905 | switch (chan->band) { |
| 3906 | case IEEE80211_BAND_5GHZ: | 3906 | case NL80211_BAND_5GHZ: |
| 3907 | gmode = false; | 3907 | gmode = false; |
| 3908 | break; | 3908 | break; |
| 3909 | case IEEE80211_BAND_2GHZ: | 3909 | case NL80211_BAND_2GHZ: |
| 3910 | gmode = true; | 3910 | gmode = true; |
| 3911 | break; | 3911 | break; |
| 3912 | default: | 3912 | default: |
| @@ -5294,16 +5294,16 @@ static int b43_setup_bands(struct b43_wldev *dev, | |||
| 5294 | phy->radio_rev == 9; | 5294 | phy->radio_rev == 9; |
| 5295 | 5295 | ||
| 5296 | if (have_2ghz_phy) | 5296 | if (have_2ghz_phy) |
| 5297 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = limited_2g ? | 5297 | hw->wiphy->bands[NL80211_BAND_2GHZ] = limited_2g ? |
| 5298 | &b43_band_2ghz_limited : &b43_band_2GHz; | 5298 | &b43_band_2ghz_limited : &b43_band_2GHz; |
| 5299 | if (dev->phy.type == B43_PHYTYPE_N) { | 5299 | if (dev->phy.type == B43_PHYTYPE_N) { |
| 5300 | if (have_5ghz_phy) | 5300 | if (have_5ghz_phy) |
| 5301 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = limited_5g ? | 5301 | hw->wiphy->bands[NL80211_BAND_5GHZ] = limited_5g ? |
| 5302 | &b43_band_5GHz_nphy_limited : | 5302 | &b43_band_5GHz_nphy_limited : |
| 5303 | &b43_band_5GHz_nphy; | 5303 | &b43_band_5GHz_nphy; |
| 5304 | } else { | 5304 | } else { |
| 5305 | if (have_5ghz_phy) | 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 | dev->phy.supports_2ghz = have_2ghz_phy; | 5309 | dev->phy.supports_2ghz = have_2ghz_phy; |
diff --git a/drivers/net/wireless/broadcom/b43/phy_ac.c b/drivers/net/wireless/broadcom/b43/phy_ac.c index e75633d67938..52f8abad8831 100644 --- a/drivers/net/wireless/broadcom/b43/phy_ac.c +++ b/drivers/net/wireless/broadcom/b43/phy_ac.c | |||
| @@ -61,7 +61,7 @@ static void b43_phy_ac_op_radio_write(struct b43_wldev *dev, u16 reg, | |||
| 61 | 61 | ||
| 62 | static unsigned int b43_phy_ac_op_get_default_chan(struct b43_wldev *dev) | 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 | return 11; | 65 | return 11; |
| 66 | return 36; | 66 | return 36; |
| 67 | } | 67 | } |
diff --git a/drivers/net/wireless/broadcom/b43/phy_common.c b/drivers/net/wireless/broadcom/b43/phy_common.c index ec2b9c577b90..85f2ca989565 100644 --- a/drivers/net/wireless/broadcom/b43/phy_common.c +++ b/drivers/net/wireless/broadcom/b43/phy_common.c | |||
| @@ -436,7 +436,7 @@ int b43_switch_channel(struct b43_wldev *dev, unsigned int new_channel) | |||
| 436 | * firmware from sending ghost packets. | 436 | * firmware from sending ghost packets. |
| 437 | */ | 437 | */ |
| 438 | channelcookie = new_channel; | 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 | channelcookie |= B43_SHM_SH_CHAN_5GHZ; | 440 | channelcookie |= B43_SHM_SH_CHAN_5GHZ; |
| 441 | /* FIXME: set 40Mhz flag if required */ | 441 | /* FIXME: set 40Mhz flag if required */ |
| 442 | if (0) | 442 | if (0) |
diff --git a/drivers/net/wireless/broadcom/b43/phy_ht.c b/drivers/net/wireless/broadcom/b43/phy_ht.c index bd68945965d6..718c90e81696 100644 --- a/drivers/net/wireless/broadcom/b43/phy_ht.c +++ b/drivers/net/wireless/broadcom/b43/phy_ht.c | |||
| @@ -568,7 +568,7 @@ static void b43_phy_ht_tx_power_ctl(struct b43_wldev *dev, bool enable) | |||
| 568 | } else { | 568 | } else { |
| 569 | b43_phy_set(dev, B43_PHY_HT_TXPCTL_CMD_C1, en_bits); | 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 | for (i = 0; i < 3; i++) | 572 | for (i = 0; i < 3; i++) |
| 573 | b43_phy_write(dev, cmd_regs[i], 0x32); | 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) | |||
| 643 | u16 freq = dev->phy.chandef->chan->center_freq; | 643 | u16 freq = dev->phy.chandef->chan->center_freq; |
| 644 | int i, c; | 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 | for (c = 0; c < 3; c++) { | 647 | for (c = 0; c < 3; c++) { |
| 648 | target[c] = sprom->core_pwr_info[c].maxpwr_2g; | 648 | target[c] = sprom->core_pwr_info[c].maxpwr_2g; |
| 649 | a1[c] = sprom->core_pwr_info[c].pa_2g[0]; | 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, | |||
| 777 | const struct b43_phy_ht_channeltab_e_phy *e, | 777 | const struct b43_phy_ht_channeltab_e_phy *e, |
| 778 | struct ieee80211_channel *new_channel) | 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 | /* Switch to 2 GHz for a moment to access B-PHY regs */ | 781 | /* Switch to 2 GHz for a moment to access B-PHY regs */ |
| 782 | b43_phy_mask(dev, B43_PHY_HT_BANDCTL, ~B43_PHY_HT_BANDCTL_5GHZ); | 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, | |||
| 805 | } else { | 805 | } else { |
| 806 | b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_OFDM_EN, | 806 | b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_OFDM_EN, |
| 807 | B43_PHY_HT_CLASS_CTL_OFDM_EN); | 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 | b43_phy_mask(dev, B43_PHY_HT_TEST, ~0x840); | 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) | |||
| 916 | if (0) /* TODO: condition */ | 916 | if (0) /* TODO: condition */ |
| 917 | ; /* TODO: PHY op on reg 0x217 */ | 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 | b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_CCK_EN, 0); | 920 | b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_CCK_EN, 0); |
| 921 | else | 921 | else |
| 922 | b43_phy_ht_classifier(dev, B43_PHY_HT_CLASS_CTL_CCK_EN, | 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) | |||
| 1005 | b43_phy_ht_classifier(dev, 0, 0); | 1005 | b43_phy_ht_classifier(dev, 0, 0); |
| 1006 | b43_phy_ht_read_clip_detection(dev, clip_state); | 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 | b43_phy_ht_bphy_init(dev); | 1009 | b43_phy_ht_bphy_init(dev); |
| 1010 | 1010 | ||
| 1011 | b43_httab_write_bulk(dev, B43_HTTAB32(0x1a, 0xc0), | 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, | |||
| 1077 | enum nl80211_channel_type channel_type = | 1077 | enum nl80211_channel_type channel_type = |
| 1078 | cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef); | 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 | if ((new_channel < 1) || (new_channel > 14)) | 1081 | if ((new_channel < 1) || (new_channel > 14)) |
| 1082 | return -EINVAL; | 1082 | return -EINVAL; |
| 1083 | } else { | 1083 | } else { |
| @@ -1089,7 +1089,7 @@ static int b43_phy_ht_op_switch_channel(struct b43_wldev *dev, | |||
| 1089 | 1089 | ||
| 1090 | static unsigned int b43_phy_ht_op_get_default_chan(struct b43_wldev *dev) | 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 | return 11; | 1093 | return 11; |
| 1094 | return 36; | 1094 | return 36; |
| 1095 | } | 1095 | } |
diff --git a/drivers/net/wireless/broadcom/b43/phy_lcn.c b/drivers/net/wireless/broadcom/b43/phy_lcn.c index 97461ccf3e1e..63bd29f070f7 100644 --- a/drivers/net/wireless/broadcom/b43/phy_lcn.c +++ b/drivers/net/wireless/broadcom/b43/phy_lcn.c | |||
| @@ -108,7 +108,7 @@ static void b43_radio_2064_channel_setup(struct b43_wldev *dev) | |||
| 108 | /* wlc_radio_2064_init */ | 108 | /* wlc_radio_2064_init */ |
| 109 | static void b43_radio_2064_init(struct b43_wldev *dev) | 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 | b43_radio_write(dev, 0x09c, 0x0020); | 112 | b43_radio_write(dev, 0x09c, 0x0020); |
| 113 | b43_radio_write(dev, 0x105, 0x0008); | 113 | b43_radio_write(dev, 0x105, 0x0008); |
| 114 | } else { | 114 | } else { |
| @@ -535,7 +535,7 @@ static void b43_phy_lcn_tx_pwr_ctl_init(struct b43_wldev *dev) | |||
| 535 | b43_mac_suspend(dev); | 535 | b43_mac_suspend(dev); |
| 536 | 536 | ||
| 537 | if (!dev->phy.lcn->hw_pwr_ctl_capable) { | 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 | tx_gains.gm_gain = 4; | 539 | tx_gains.gm_gain = 4; |
| 540 | tx_gains.pga_gain = 12; | 540 | tx_gains.pga_gain = 12; |
| 541 | tx_gains.pad_gain = 12; | 541 | tx_gains.pad_gain = 12; |
| @@ -720,7 +720,7 @@ static int b43_phy_lcn_op_init(struct b43_wldev *dev) | |||
| 720 | else | 720 | else |
| 721 | B43_WARN_ON(1); | 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 | b43_phy_lcn_tx_pwr_ctl_init(dev); | 724 | b43_phy_lcn_tx_pwr_ctl_init(dev); |
| 725 | 725 | ||
| 726 | b43_switch_channel(dev, dev->phy.channel); | 726 | b43_switch_channel(dev, dev->phy.channel); |
| @@ -779,7 +779,7 @@ static int b43_phy_lcn_op_switch_channel(struct b43_wldev *dev, | |||
| 779 | enum nl80211_channel_type channel_type = | 779 | enum nl80211_channel_type channel_type = |
| 780 | cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef); | 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 | if ((new_channel < 1) || (new_channel > 14)) | 783 | if ((new_channel < 1) || (new_channel > 14)) |
| 784 | return -EINVAL; | 784 | return -EINVAL; |
| 785 | } else { | 785 | } else { |
| @@ -791,7 +791,7 @@ static int b43_phy_lcn_op_switch_channel(struct b43_wldev *dev, | |||
| 791 | 791 | ||
| 792 | static unsigned int b43_phy_lcn_op_get_default_chan(struct b43_wldev *dev) | 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 | return 1; | 795 | return 1; |
| 796 | return 36; | 796 | return 36; |
| 797 | } | 797 | } |
diff --git a/drivers/net/wireless/broadcom/b43/phy_lp.c b/drivers/net/wireless/broadcom/b43/phy_lp.c index 058a9f232050..6922cbb99a04 100644 --- a/drivers/net/wireless/broadcom/b43/phy_lp.c +++ b/drivers/net/wireless/broadcom/b43/phy_lp.c | |||
| @@ -46,7 +46,7 @@ static inline u16 channel2freq_lp(u8 channel) | |||
| 46 | 46 | ||
| 47 | static unsigned int b43_lpphy_op_get_default_chan(struct b43_wldev *dev) | 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 | return 1; | 50 | return 1; |
| 51 | return 36; | 51 | return 36; |
| 52 | } | 52 | } |
| @@ -91,7 +91,7 @@ static void lpphy_read_band_sprom(struct b43_wldev *dev) | |||
| 91 | u32 ofdmpo; | 91 | u32 ofdmpo; |
| 92 | int i; | 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 | lpphy->tx_isolation_med_band = sprom->tri2g; | 95 | lpphy->tx_isolation_med_band = sprom->tri2g; |
| 96 | lpphy->bx_arch = sprom->bxa2g; | 96 | lpphy->bx_arch = sprom->bxa2g; |
| 97 | lpphy->rx_pwr_offset = sprom->rxpo2g; | 97 | lpphy->rx_pwr_offset = sprom->rxpo2g; |
| @@ -174,7 +174,7 @@ static void lpphy_adjust_gain_table(struct b43_wldev *dev, u32 freq) | |||
| 174 | 174 | ||
| 175 | B43_WARN_ON(dev->phy.rev >= 2); | 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 | isolation = lpphy->tx_isolation_med_band; | 178 | isolation = lpphy->tx_isolation_med_band; |
| 179 | else if (freq <= 5320) | 179 | else if (freq <= 5320) |
| 180 | isolation = lpphy->tx_isolation_low_band; | 180 | isolation = lpphy->tx_isolation_low_band; |
| @@ -238,7 +238,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) | |||
| 238 | b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB, | 238 | b43_phy_maskset(dev, B43_LPPHY_INPUT_PWRDB, |
| 239 | 0xFF00, lpphy->rx_pwr_offset); | 239 | 0xFF00, lpphy->rx_pwr_offset); |
| 240 | if ((sprom->boardflags_lo & B43_BFL_FEM) && | 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 | (sprom->boardflags_hi & B43_BFH_PAREF))) { | 242 | (sprom->boardflags_hi & B43_BFH_PAREF))) { |
| 243 | ssb_pmu_set_ldo_voltage(&bus->chipco, LDO_PAREF, 0x28); | 243 | ssb_pmu_set_ldo_voltage(&bus->chipco, LDO_PAREF, 0x28); |
| 244 | ssb_pmu_set_ldo_paref(&bus->chipco, true); | 244 | ssb_pmu_set_ldo_paref(&bus->chipco, true); |
| @@ -280,7 +280,7 @@ static void lpphy_baseband_rev0_1_init(struct b43_wldev *dev) | |||
| 280 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_7, 0xC0FF, 0x0900); | 280 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_7, 0xC0FF, 0x0900); |
| 281 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xFFC0, 0x000A); | 281 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xFFC0, 0x000A); |
| 282 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_8, 0xC0FF, 0x0B00); | 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 | (dev->dev->board_type == SSB_BOARD_BU4312) || | 284 | (dev->dev->board_type == SSB_BOARD_BU4312) || |
| 285 | (dev->phy.rev == 0 && (sprom->boardflags_lo & B43_BFL_FEM))) { | 285 | (dev->phy.rev == 0 && (sprom->boardflags_lo & B43_BFL_FEM))) { |
| 286 | b43_phy_maskset(dev, B43_LPPHY_TR_LOOKUP_1, 0xFFC0, 0x0001); | 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) | |||
| 326 | //FIXME the Broadcom driver caches & delays this HF write! | 326 | //FIXME the Broadcom driver caches & delays this HF write! |
| 327 | b43_hf_write(dev, b43_hf_read(dev) | B43_HF_PR45960W); | 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 | b43_phy_set(dev, B43_LPPHY_LP_PHY_CTL, 0x8000); | 330 | b43_phy_set(dev, B43_LPPHY_LP_PHY_CTL, 0x8000); |
| 331 | b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0040); | 331 | b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x0040); |
| 332 | b43_phy_maskset(dev, B43_LPPHY_MINPWR_LEVEL, 0x00FF, 0xA400); | 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) | |||
| 466 | b43_lptab_write(dev, B43_LPTAB16(0x08, 0x12), 0x40); | 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 | b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x40); | 470 | b43_phy_set(dev, B43_LPPHY_CRSGAIN_CTL, 0x40); |
| 471 | b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xF0FF, 0xB00); | 471 | b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xF0FF, 0xB00); |
| 472 | b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x6); | 472 | b43_phy_maskset(dev, B43_LPPHY_SYNCPEAKCNT, 0xFFF8, 0x6); |
| @@ -547,7 +547,7 @@ static void lpphy_2062_init(struct b43_wldev *dev) | |||
| 547 | b43_radio_write(dev, B2062_S_BG_CTL1, | 547 | b43_radio_write(dev, B2062_S_BG_CTL1, |
| 548 | (b43_radio_read(dev, B2062_N_COMM2) >> 1) | 0x80); | 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 | b43_radio_set(dev, B2062_N_TSSI_CTL0, 0x1); | 551 | b43_radio_set(dev, B2062_N_TSSI_CTL0, 0x1); |
| 552 | else | 552 | else |
| 553 | b43_radio_mask(dev, B2062_N_TSSI_CTL0, ~0x1); | 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) | |||
| 746 | lpphy->crs_sys_disable = false; | 746 | lpphy->crs_sys_disable = false; |
| 747 | 747 | ||
| 748 | if (!lpphy->crs_usr_disable && !lpphy->crs_sys_disable) { | 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 | b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, | 750 | b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, |
| 751 | 0xFF1F, 0x60); | 751 | 0xFF1F, 0x60); |
| 752 | else | 752 | else |
| @@ -807,7 +807,7 @@ static void lpphy_disable_rx_gain_override(struct b43_wldev *dev) | |||
| 807 | b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF); | 807 | b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF); |
| 808 | if (dev->phy.rev >= 2) { | 808 | if (dev->phy.rev >= 2) { |
| 809 | b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF); | 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 | b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF); | 811 | b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF); |
| 812 | b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7); | 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) | |||
| 823 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40); | 823 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40); |
| 824 | if (dev->phy.rev >= 2) { | 824 | if (dev->phy.rev >= 2) { |
| 825 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100); | 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 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400); | 827 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400); |
| 828 | b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8); | 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) | |||
| 951 | 0xFBFF, ext_lna << 10); | 951 | 0xFBFF, ext_lna << 10); |
| 952 | b43_phy_write(dev, B43_LPPHY_RX_GAIN_CTL_OVERRIDE_VAL, low_gain); | 952 | b43_phy_write(dev, B43_LPPHY_RX_GAIN_CTL_OVERRIDE_VAL, low_gain); |
| 953 | b43_phy_maskset(dev, B43_LPPHY_AFE_DDFS, 0xFFF0, high_gain); | 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 | tmp = (gain >> 2) & 0x3; | 955 | tmp = (gain >> 2) & 0x3; |
| 956 | b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, | 956 | b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, |
| 957 | 0xE7FF, tmp<<11); | 957 | 0xE7FF, tmp<<11); |
| @@ -1344,7 +1344,7 @@ static void lpphy_calibrate_rc(struct b43_wldev *dev) | |||
| 1344 | if (dev->phy.rev >= 2) { | 1344 | if (dev->phy.rev >= 2) { |
| 1345 | lpphy_rev2plus_rc_calib(dev); | 1345 | lpphy_rev2plus_rc_calib(dev); |
| 1346 | } else if (!lpphy->rc_cap) { | 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 | lpphy_rev0_1_rc_calib(dev); | 1348 | lpphy_rev0_1_rc_calib(dev); |
| 1349 | } else { | 1349 | } else { |
| 1350 | lpphy_set_rc_cap(dev); | 1350 | lpphy_set_rc_cap(dev); |
| @@ -1548,7 +1548,7 @@ static void lpphy_tx_pctl_init_sw(struct b43_wldev *dev) | |||
| 1548 | { | 1548 | { |
| 1549 | struct lpphy_tx_gains gains; | 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 | gains.gm = 4; | 1552 | gains.gm = 4; |
| 1553 | gains.pad = 12; | 1553 | gains.pad = 12; |
| 1554 | gains.pga = 12; | 1554 | gains.pga = 12; |
| @@ -1902,7 +1902,7 @@ static int lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx, | |||
| 1902 | 1902 | ||
| 1903 | lpphy_set_trsw_over(dev, tx, rx); | 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 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8); | 1906 | b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8); |
| 1907 | b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, | 1907 | b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, |
| 1908 | 0xFFF7, pa << 3); | 1908 | 0xFFF7, pa << 3); |
diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c index 9f0bcf3b8414..a5557d70689f 100644 --- a/drivers/net/wireless/broadcom/b43/phy_n.c +++ b/drivers/net/wireless/broadcom/b43/phy_n.c | |||
| @@ -105,9 +105,9 @@ enum n_rail_type { | |||
| 105 | 105 | ||
| 106 | static inline bool b43_nphy_ipa(struct b43_wldev *dev) | 106 | static inline bool b43_nphy_ipa(struct b43_wldev *dev) |
| 107 | { | 107 | { |
| 108 | enum ieee80211_band band = b43_current_band(dev->wl); | 108 | enum nl80211_band band = b43_current_band(dev->wl); |
| 109 | return ((dev->phy.n->ipa2g_on && band == IEEE80211_BAND_2GHZ) || | 109 | return ((dev->phy.n->ipa2g_on && band == NL80211_BAND_2GHZ) || |
| 110 | (dev->phy.n->ipa5g_on && band == IEEE80211_BAND_5GHZ)); | 110 | (dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ)); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RxCoreGetState */ | 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, | |||
| 357 | break; | 357 | break; |
| 358 | case N_INTC_OVERRIDE_PA: | 358 | case N_INTC_OVERRIDE_PA: |
| 359 | tmp = 0x0030; | 359 | tmp = 0x0030; |
| 360 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | 360 | if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) |
| 361 | val = value << 5; | 361 | val = value << 5; |
| 362 | else | 362 | else |
| 363 | val = value << 4; | 363 | val = value << 4; |
| @@ -365,7 +365,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, | |||
| 365 | b43_phy_set(dev, reg, 0x1000); | 365 | b43_phy_set(dev, reg, 0x1000); |
| 366 | break; | 366 | break; |
| 367 | case N_INTC_OVERRIDE_EXT_LNA_PU: | 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 | tmp = 0x0001; | 369 | tmp = 0x0001; |
| 370 | tmp2 = 0x0004; | 370 | tmp2 = 0x0004; |
| 371 | val = value; | 371 | val = value; |
| @@ -378,7 +378,7 @@ static void b43_nphy_rf_ctl_intc_override_rev7(struct b43_wldev *dev, | |||
| 378 | b43_phy_mask(dev, reg, ~tmp2); | 378 | b43_phy_mask(dev, reg, ~tmp2); |
| 379 | break; | 379 | break; |
| 380 | case N_INTC_OVERRIDE_EXT_LNA_GAIN: | 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 | tmp = 0x0002; | 382 | tmp = 0x0002; |
| 383 | tmp2 = 0x0008; | 383 | tmp2 = 0x0008; |
| 384 | val = value << 1; | 384 | val = value << 1; |
| @@ -465,7 +465,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, | |||
| 465 | } | 465 | } |
| 466 | break; | 466 | break; |
| 467 | case N_INTC_OVERRIDE_PA: | 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 | tmp = 0x0020; | 469 | tmp = 0x0020; |
| 470 | val = value << 5; | 470 | val = value << 5; |
| 471 | } else { | 471 | } else { |
| @@ -475,7 +475,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, | |||
| 475 | b43_phy_maskset(dev, reg, ~tmp, val); | 475 | b43_phy_maskset(dev, reg, ~tmp, val); |
| 476 | break; | 476 | break; |
| 477 | case N_INTC_OVERRIDE_EXT_LNA_PU: | 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 | tmp = 0x0001; | 479 | tmp = 0x0001; |
| 480 | val = value; | 480 | val = value; |
| 481 | } else { | 481 | } else { |
| @@ -485,7 +485,7 @@ static void b43_nphy_rf_ctl_intc_override(struct b43_wldev *dev, | |||
| 485 | b43_phy_maskset(dev, reg, ~tmp, val); | 485 | b43_phy_maskset(dev, reg, ~tmp, val); |
| 486 | break; | 486 | break; |
| 487 | case N_INTC_OVERRIDE_EXT_LNA_GAIN: | 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 | tmp = 0x0002; | 489 | tmp = 0x0002; |
| 490 | val = value << 1; | 490 | val = value << 1; |
| 491 | } else { | 491 | } else { |
| @@ -600,7 +600,7 @@ static void b43_nphy_adjust_lna_gain_table(struct b43_wldev *dev) | |||
| 600 | b43_nphy_stay_in_carrier_search(dev, 1); | 600 | b43_nphy_stay_in_carrier_search(dev, 1); |
| 601 | 601 | ||
| 602 | if (nphy->gain_boost) { | 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 | gain[0] = 6; | 604 | gain[0] = 6; |
| 605 | gain[1] = 6; | 605 | gain[1] = 6; |
| 606 | } else { | 606 | } else { |
| @@ -736,7 +736,7 @@ static void b43_radio_2057_setup(struct b43_wldev *dev, | |||
| 736 | switch (phy->radio_rev) { | 736 | switch (phy->radio_rev) { |
| 737 | case 0 ... 4: | 737 | case 0 ... 4: |
| 738 | case 6: | 738 | case 6: |
| 739 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | 739 | if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { |
| 740 | b43_radio_write(dev, R2057_RFPLL_LOOPFILTER_R1, 0x3f); | 740 | b43_radio_write(dev, R2057_RFPLL_LOOPFILTER_R1, 0x3f); |
| 741 | b43_radio_write(dev, R2057_CP_KPD_IDAC, 0x3f); | 741 | b43_radio_write(dev, R2057_CP_KPD_IDAC, 0x3f); |
| 742 | b43_radio_write(dev, R2057_RFPLL_LOOPFILTER_C1, 0x8); | 742 | b43_radio_write(dev, R2057_RFPLL_LOOPFILTER_C1, 0x8); |
| @@ -751,7 +751,7 @@ static void b43_radio_2057_setup(struct b43_wldev *dev, | |||
| 751 | case 9: /* e.g. PHY rev 16 */ | 751 | case 9: /* e.g. PHY rev 16 */ |
| 752 | b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x20); | 752 | b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x20); |
| 753 | b43_radio_write(dev, R2057_VCOBUF_IDACS, 0x18); | 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 | b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x38); | 755 | b43_radio_write(dev, R2057_LOGEN_PTAT_RESETS, 0x38); |
| 756 | b43_radio_write(dev, R2057_VCOBUF_IDACS, 0x0f); | 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, | |||
| 775 | break; | 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 | u16 txmix2g_tune_boost_pu = 0; | 779 | u16 txmix2g_tune_boost_pu = 0; |
| 780 | u16 pad2g_tune_pus = 0; | 780 | u16 pad2g_tune_pus = 0; |
| 781 | 781 | ||
| @@ -1135,7 +1135,7 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, | |||
| 1135 | { | 1135 | { |
| 1136 | struct b43_phy *phy = &dev->phy; | 1136 | struct b43_phy *phy = &dev->phy; |
| 1137 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 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 | u16 offset; | 1139 | u16 offset; |
| 1140 | u8 i; | 1140 | u8 i; |
| 1141 | u16 bias, cbias; | 1141 | u16 bias, cbias; |
| @@ -1152,10 +1152,10 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, | |||
| 1152 | dev->dev->chip_pkg == BCMA_PKG_ID_BCM43224_FAB_SMIC); | 1152 | dev->dev->chip_pkg == BCMA_PKG_ID_BCM43224_FAB_SMIC); |
| 1153 | 1153 | ||
| 1154 | b43_chantab_radio_2056_upload(dev, e); | 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 | if (sprom->boardflags2_lo & B43_BFL2_GPLL_WAR && | 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 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F); | 1159 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F); |
| 1160 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F); | 1160 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F); |
| 1161 | if (dev->dev->chip_id == BCMA_CHIP_ID_BCM4716 || | 1161 | if (dev->dev->chip_id == BCMA_CHIP_ID_BCM4716 || |
| @@ -1168,21 +1168,21 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, | |||
| 1168 | } | 1168 | } |
| 1169 | } | 1169 | } |
| 1170 | if (sprom->boardflags2_hi & B43_BFH2_GPLL_WAR2 && | 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 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1f); | 1172 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1f); |
| 1173 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1f); | 1173 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1f); |
| 1174 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x0b); | 1174 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x0b); |
| 1175 | b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x20); | 1175 | b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x20); |
| 1176 | } | 1176 | } |
| 1177 | if (sprom->boardflags2_lo & B43_BFL2_APLL_WAR && | 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 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F); | 1179 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER1, 0x1F); |
| 1180 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F); | 1180 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER2, 0x1F); |
| 1181 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x05); | 1181 | b43_radio_write(dev, B2056_SYN_PLL_LOOPFILTER4, 0x05); |
| 1182 | b43_radio_write(dev, B2056_SYN_PLL_CP2, 0x0C); | 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 | for (i = 0; i < 2; i++) { | 1186 | for (i = 0; i < 2; i++) { |
| 1187 | offset = i ? B2056_TX1 : B2056_TX0; | 1187 | offset = i ? B2056_TX1 : B2056_TX0; |
| 1188 | if (dev->phy.rev >= 5) { | 1188 | if (dev->phy.rev >= 5) { |
| @@ -1244,7 +1244,7 @@ static void b43_radio_2056_setup(struct b43_wldev *dev, | |||
| 1244 | } | 1244 | } |
| 1245 | b43_radio_write(dev, offset | B2056_TX_PA_SPARE1, 0xee); | 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 | u16 freq = phy->chandef->chan->center_freq; | 1248 | u16 freq = phy->chandef->chan->center_freq; |
| 1249 | if (freq < 5100) { | 1249 | if (freq < 5100) { |
| 1250 | paa_boost = 0xA; | 1250 | paa_boost = 0xA; |
| @@ -1501,7 +1501,7 @@ static void b43_radio_init2055(struct b43_wldev *dev) | |||
| 1501 | /* Follow wl, not specs. Do not force uploading all regs */ | 1501 | /* Follow wl, not specs. Do not force uploading all regs */ |
| 1502 | b2055_upload_inittab(dev, 0, 0); | 1502 | b2055_upload_inittab(dev, 0, 0); |
| 1503 | } else { | 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 | b2055_upload_inittab(dev, ghz5, 0); | 1505 | b2055_upload_inittab(dev, ghz5, 0); |
| 1506 | } | 1506 | } |
| 1507 | b43_radio_init2055_post(dev); | 1507 | b43_radio_init2055_post(dev); |
| @@ -1785,7 +1785,7 @@ static void b43_nphy_rev3_rssi_select(struct b43_wldev *dev, u8 code, | |||
| 1785 | b43_phy_maskset(dev, reg, 0xFFC3, 0); | 1785 | b43_phy_maskset(dev, reg, 0xFFC3, 0); |
| 1786 | 1786 | ||
| 1787 | if (rssi_type == N_RSSI_W1) | 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 | else if (rssi_type == N_RSSI_W2) | 1789 | else if (rssi_type == N_RSSI_W2) |
| 1790 | val = 16; | 1790 | val = 16; |
| 1791 | else | 1791 | else |
| @@ -1813,12 +1813,12 @@ static void b43_nphy_rev3_rssi_select(struct b43_wldev *dev, u8 code, | |||
| 1813 | 1813 | ||
| 1814 | if (rssi_type != N_RSSI_IQ && | 1814 | if (rssi_type != N_RSSI_IQ && |
| 1815 | rssi_type != N_RSSI_TBD) { | 1815 | rssi_type != N_RSSI_TBD) { |
| 1816 | enum ieee80211_band band = | 1816 | enum nl80211_band band = |
| 1817 | b43_current_band(dev->wl); | 1817 | b43_current_band(dev->wl); |
| 1818 | 1818 | ||
| 1819 | if (dev->phy.rev < 7) { | 1819 | if (dev->phy.rev < 7) { |
| 1820 | if (b43_nphy_ipa(dev)) | 1820 | if (b43_nphy_ipa(dev)) |
| 1821 | val = (band == IEEE80211_BAND_5GHZ) ? 0xC : 0xE; | 1821 | val = (band == NL80211_BAND_5GHZ) ? 0xC : 0xE; |
| 1822 | else | 1822 | else |
| 1823 | val = 0x11; | 1823 | val = 0x11; |
| 1824 | reg = (i == 0) ? B2056_TX0 : B2056_TX1; | 1824 | reg = (i == 0) ? B2056_TX0 : B2056_TX1; |
| @@ -2120,7 +2120,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) | |||
| 2120 | 1, 0, false); | 2120 | 1, 0, false); |
| 2121 | b43_nphy_rf_ctl_override_rev7(dev, 0x80, 1, 0, false, 0); | 2121 | b43_nphy_rf_ctl_override_rev7(dev, 0x80, 1, 0, false, 0); |
| 2122 | b43_nphy_rf_ctl_override_rev7(dev, 0x40, 1, 0, false, 0); | 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 | b43_nphy_rf_ctl_override_rev7(dev, 0x20, 0, 0, false, | 2124 | b43_nphy_rf_ctl_override_rev7(dev, 0x20, 0, 0, false, |
| 2125 | 0); | 2125 | 0); |
| 2126 | b43_nphy_rf_ctl_override_rev7(dev, 0x10, 1, 0, false, | 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) | |||
| 2136 | b43_nphy_rf_ctl_override(dev, 0x2, 1, 0, false); | 2136 | b43_nphy_rf_ctl_override(dev, 0x2, 1, 0, false); |
| 2137 | b43_nphy_rf_ctl_override(dev, 0x80, 1, 0, false); | 2137 | b43_nphy_rf_ctl_override(dev, 0x80, 1, 0, false); |
| 2138 | b43_nphy_rf_ctl_override(dev, 0x40, 1, 0, false); | 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 | b43_nphy_rf_ctl_override(dev, 0x20, 0, 0, false); | 2140 | b43_nphy_rf_ctl_override(dev, 0x20, 0, 0, false); |
| 2141 | b43_nphy_rf_ctl_override(dev, 0x10, 1, 0, false); | 2141 | b43_nphy_rf_ctl_override(dev, 0x10, 1, 0, false); |
| 2142 | } else { | 2142 | } else { |
| @@ -2257,7 +2257,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) | |||
| 2257 | b43_phy_write(dev, regs_to_store[i], saved_regs_phy[i]); | 2257 | b43_phy_write(dev, regs_to_store[i], saved_regs_phy[i]); |
| 2258 | 2258 | ||
| 2259 | /* Store for future configuration */ | 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 | rssical_radio_regs = nphy->rssical_cache.rssical_radio_regs_2G; | 2261 | rssical_radio_regs = nphy->rssical_cache.rssical_radio_regs_2G; |
| 2262 | rssical_phy_regs = nphy->rssical_cache.rssical_phy_regs_2G; | 2262 | rssical_phy_regs = nphy->rssical_cache.rssical_phy_regs_2G; |
| 2263 | } else { | 2263 | } else { |
| @@ -2289,7 +2289,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev) | |||
| 2289 | rssical_phy_regs[11] = b43_phy_read(dev, B43_NPHY_RSSIMC_1Q_RSSI_Y); | 2289 | rssical_phy_regs[11] = b43_phy_read(dev, B43_NPHY_RSSIMC_1Q_RSSI_Y); |
| 2290 | 2290 | ||
| 2291 | /* Remember for which channel we store configuration */ | 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 | nphy->rssical_chanspec_2G.center_freq = phy->chandef->chan->center_freq; | 2293 | nphy->rssical_chanspec_2G.center_freq = phy->chandef->chan->center_freq; |
| 2294 | else | 2294 | else |
| 2295 | nphy->rssical_chanspec_5G.center_freq = phy->chandef->chan->center_freq; | 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) | |||
| 2336 | b43_nphy_read_clip_detection(dev, clip_state); | 2336 | b43_nphy_read_clip_detection(dev, clip_state); |
| 2337 | b43_nphy_write_clip_detection(dev, clip_off); | 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 | override = 0x140; | 2340 | override = 0x140; |
| 2341 | else | 2341 | else |
| 2342 | override = 0x110; | 2342 | override = 0x110; |
| @@ -2629,7 +2629,7 @@ static void b43_nphy_gain_ctl_workarounds_rev1_2(struct b43_wldev *dev) | |||
| 2629 | b43_phy_write(dev, B43_NPHY_CCK_SHIFTB_REF, 0x809C); | 2629 | b43_phy_write(dev, B43_NPHY_CCK_SHIFTB_REF, 0x809C); |
| 2630 | 2630 | ||
| 2631 | if (nphy->gain_boost) { | 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 | b43_is_40mhz(dev)) | 2633 | b43_is_40mhz(dev)) |
| 2634 | code = 4; | 2634 | code = 4; |
| 2635 | else | 2635 | else |
| @@ -2688,7 +2688,7 @@ static void b43_nphy_gain_ctl_workarounds_rev1_2(struct b43_wldev *dev) | |||
| 2688 | ~B43_NPHY_OVER_DGAIN_CCKDGECV & 0xFFFF, | 2688 | ~B43_NPHY_OVER_DGAIN_CCKDGECV & 0xFFFF, |
| 2689 | 0x5A << B43_NPHY_OVER_DGAIN_CCKDGECV_SHIFT); | 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 | b43_phy_maskset(dev, B43_PHY_N(0xC5D), 0xFF80, 4); | 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) | |||
| 2803 | scap_val = b43_radio_read(dev, R2057_RCCAL_SCAP_VAL); | 2803 | scap_val = b43_radio_read(dev, R2057_RCCAL_SCAP_VAL); |
| 2804 | 2804 | ||
| 2805 | if (b43_nphy_ipa(dev)) { | 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 | switch (phy->radio_rev) { | 2808 | switch (phy->radio_rev) { |
| 2809 | case 5: | 2809 | case 5: |
| @@ -2831,7 +2831,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) | |||
| 2831 | bcap_val_11b[core] = bcap_val; | 2831 | bcap_val_11b[core] = bcap_val; |
| 2832 | lpf_ofdm_20mhz[core] = 4; | 2832 | lpf_ofdm_20mhz[core] = 4; |
| 2833 | lpf_11b[core] = 1; | 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 | scap_val_11n_20[core] = 0xc; | 2835 | scap_val_11n_20[core] = 0xc; |
| 2836 | bcap_val_11n_20[core] = 0xc; | 2836 | bcap_val_11n_20[core] = 0xc; |
| 2837 | scap_val_11n_40[core] = 0xa; | 2837 | scap_val_11n_40[core] = 0xa; |
| @@ -2982,7 +2982,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) | |||
| 2982 | conv = 0x7f; | 2982 | conv = 0x7f; |
| 2983 | filt = 0xee; | 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 | for (core = 0; core < 2; core++) { | 2986 | for (core = 0; core < 2; core++) { |
| 2987 | if (core == 0) { | 2987 | if (core == 0) { |
| 2988 | b43_radio_write(dev, 0x5F, bias); | 2988 | b43_radio_write(dev, 0x5F, bias); |
| @@ -2998,7 +2998,7 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev) | |||
| 2998 | } | 2998 | } |
| 2999 | 2999 | ||
| 3000 | if (b43_nphy_ipa(dev)) { | 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 | if (phy->radio_rev == 3 || phy->radio_rev == 4 || | 3002 | if (phy->radio_rev == 3 || phy->radio_rev == 4 || |
| 3003 | phy->radio_rev == 6) { | 3003 | phy->radio_rev == 6) { |
| 3004 | for (core = 0; core < 2; core++) { | 3004 | for (core = 0; core < 2; core++) { |
| @@ -3221,7 +3221,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) | |||
| 3221 | ARRAY_SIZE(rx2tx_events)); | 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 | 0x2 : 0x9C40; | 3225 | 0x2 : 0x9C40; |
| 3226 | b43_phy_write(dev, B43_NPHY_ENDROP_TLEN, tmp16); | 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) | |||
| 3240 | b43_ntab_write(dev, B43_NTAB16(8, 0), 2); | 3240 | b43_ntab_write(dev, B43_NTAB16(8, 0), 2); |
| 3241 | b43_ntab_write(dev, B43_NTAB16(8, 16), 2); | 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 | pdet_range = sprom->fem.ghz2.pdet_range; | 3244 | pdet_range = sprom->fem.ghz2.pdet_range; |
| 3245 | else | 3245 | else |
| 3246 | pdet_range = sprom->fem.ghz5.pdet_range; | 3246 | pdet_range = sprom->fem.ghz5.pdet_range; |
| @@ -3249,7 +3249,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) | |||
| 3249 | switch (pdet_range) { | 3249 | switch (pdet_range) { |
| 3250 | case 3: | 3250 | case 3: |
| 3251 | if (!(dev->phy.rev >= 4 && | 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 | break; | 3253 | break; |
| 3254 | /* FALL THROUGH */ | 3254 | /* FALL THROUGH */ |
| 3255 | case 0: | 3255 | case 0: |
| @@ -3261,7 +3261,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) | |||
| 3261 | break; | 3261 | break; |
| 3262 | case 2: | 3262 | case 2: |
| 3263 | if (dev->phy.rev >= 6) { | 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 | vmid[3] = 0x94; | 3265 | vmid[3] = 0x94; |
| 3266 | else | 3266 | else |
| 3267 | vmid[3] = 0x8e; | 3267 | vmid[3] = 0x8e; |
| @@ -3277,7 +3277,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) | |||
| 3277 | break; | 3277 | break; |
| 3278 | case 4: | 3278 | case 4: |
| 3279 | case 5: | 3279 | case 5: |
| 3280 | if (b43_current_band(dev->wl) != IEEE80211_BAND_2GHZ) { | 3280 | if (b43_current_band(dev->wl) != NL80211_BAND_2GHZ) { |
| 3281 | if (pdet_range == 4) { | 3281 | if (pdet_range == 4) { |
| 3282 | vmid[3] = 0x8e; | 3282 | vmid[3] = 0x8e; |
| 3283 | tmp16 = 0x96; | 3283 | tmp16 = 0x96; |
| @@ -3322,9 +3322,9 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) | |||
| 3322 | /* N PHY WAR TX Chain Update with hw_phytxchain as argument */ | 3322 | /* N PHY WAR TX Chain Update with hw_phytxchain as argument */ |
| 3323 | 3323 | ||
| 3324 | if ((sprom->boardflags2_lo & B43_BFL2_APLL_WAR && | 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 | (sprom->boardflags2_lo & B43_BFL2_GPLL_WAR && | 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 | tmp32 = 0x00088888; | 3328 | tmp32 = 0x00088888; |
| 3329 | else | 3329 | else |
| 3330 | tmp32 = 0x88888888; | 3330 | tmp32 = 0x88888888; |
| @@ -3333,7 +3333,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev) | |||
| 3333 | b43_ntab_write(dev, B43_NTAB32(30, 3), tmp32); | 3333 | b43_ntab_write(dev, B43_NTAB32(30, 3), tmp32); |
| 3334 | 3334 | ||
| 3335 | if (dev->phy.rev == 4 && | 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 | b43_radio_write(dev, B2056_TX0 | B2056_TX_GMBB_IDAC, | 3337 | b43_radio_write(dev, B2056_TX0 | B2056_TX_GMBB_IDAC, |
| 3338 | 0x70); | 3338 | 0x70); |
| 3339 | b43_radio_write(dev, B2056_TX1 | B2056_TX_GMBB_IDAC, | 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) | |||
| 3376 | delays1[5] = 0x14; | 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 | nphy->band5g_pwrgain) { | 3380 | nphy->band5g_pwrgain) { |
| 3381 | b43_radio_mask(dev, B2055_C1_TX_RF_SPARE, ~0x8); | 3381 | b43_radio_mask(dev, B2055_C1_TX_RF_SPARE, ~0x8); |
| 3382 | b43_radio_mask(dev, B2055_C2_TX_RF_SPARE, ~0x8); | 3382 | b43_radio_mask(dev, B2055_C2_TX_RF_SPARE, ~0x8); |
| @@ -3451,7 +3451,7 @@ static void b43_nphy_workarounds(struct b43_wldev *dev) | |||
| 3451 | struct b43_phy *phy = &dev->phy; | 3451 | struct b43_phy *phy = &dev->phy; |
| 3452 | struct b43_phy_n *nphy = phy->n; | 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 | b43_nphy_classifier(dev, 1, 0); | 3455 | b43_nphy_classifier(dev, 1, 0); |
| 3456 | else | 3456 | else |
| 3457 | b43_nphy_classifier(dev, 1, 1); | 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, | |||
| 3586 | gain = (target.pad[core]) | (target.pga[core] << 4) | | 3586 | gain = (target.pad[core]) | (target.pga[core] << 4) | |
| 3587 | (target.txgm[core] << 8); | 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 | 1 : 0; | 3590 | 1 : 0; |
| 3591 | for (i = 0; i < 9; i++) | 3591 | for (i = 0; i < 9; i++) |
| 3592 | if (tbl_iqcal_gainparams[indx][i][0] == gain) | 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) | |||
| 3614 | struct b43_phy_n *nphy = dev->phy.n; | 3614 | struct b43_phy_n *nphy = dev->phy.n; |
| 3615 | u8 i; | 3615 | u8 i; |
| 3616 | u16 bmask, val, tmp; | 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 | if (nphy->hang_avoid) | 3619 | if (nphy->hang_avoid) |
| 3620 | b43_nphy_stay_in_carrier_search(dev, 1); | 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) | |||
| 3679 | } | 3679 | } |
| 3680 | b43_phy_maskset(dev, B43_NPHY_TXPCTL_CMD, ~(bmask), val); | 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 | if (phy->rev >= 19) { | 3683 | if (phy->rev >= 19) { |
| 3684 | /* TODO */ | 3684 | /* TODO */ |
| 3685 | } else if (phy->rev >= 7) { | 3685 | } else if (phy->rev >= 7) { |
| @@ -3770,7 +3770,7 @@ static void b43_nphy_tx_power_fix(struct b43_wldev *dev) | |||
| 3770 | txpi[0] = 72; | 3770 | txpi[0] = 72; |
| 3771 | txpi[1] = 72; | 3771 | txpi[1] = 72; |
| 3772 | } else { | 3772 | } else { |
| 3773 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | 3773 | if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { |
| 3774 | txpi[0] = sprom->txpid2g[0]; | 3774 | txpi[0] = sprom->txpid2g[0]; |
| 3775 | txpi[1] = sprom->txpid2g[1]; | 3775 | txpi[1] = sprom->txpid2g[1]; |
| 3776 | } else if (freq >= 4900 && freq < 5100) { | 3776 | } else if (freq >= 4900 && freq < 5100) { |
| @@ -3868,7 +3868,7 @@ static void b43_nphy_ipa_internal_tssi_setup(struct b43_wldev *dev) | |||
| 3868 | } else if (phy->rev >= 7) { | 3868 | } else if (phy->rev >= 7) { |
| 3869 | for (core = 0; core < 2; core++) { | 3869 | for (core = 0; core < 2; core++) { |
| 3870 | r = core ? 0x190 : 0x170; | 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 | b43_radio_write(dev, r + 0x5, 0x5); | 3872 | b43_radio_write(dev, r + 0x5, 0x5); |
| 3873 | b43_radio_write(dev, r + 0x9, 0xE); | 3873 | b43_radio_write(dev, r + 0x9, 0xE); |
| 3874 | if (phy->rev != 5) | 3874 | if (phy->rev != 5) |
| @@ -3892,7 +3892,7 @@ static void b43_nphy_ipa_internal_tssi_setup(struct b43_wldev *dev) | |||
| 3892 | b43_radio_write(dev, r + 0xC, 0); | 3892 | b43_radio_write(dev, r + 0xC, 0); |
| 3893 | } | 3893 | } |
| 3894 | } else { | 3894 | } else { |
| 3895 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) | 3895 | if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) |
| 3896 | b43_radio_write(dev, B2056_SYN_RESERVED_ADDR31, 0x128); | 3896 | b43_radio_write(dev, B2056_SYN_RESERVED_ADDR31, 0x128); |
| 3897 | else | 3897 | else |
| 3898 | b43_radio_write(dev, B2056_SYN_RESERVED_ADDR31, 0x80); | 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) | |||
| 3909 | b43_radio_write(dev, r | B2056_TX_TSSI_MISC1, 8); | 3909 | b43_radio_write(dev, r | B2056_TX_TSSI_MISC1, 8); |
| 3910 | b43_radio_write(dev, r | B2056_TX_TSSI_MISC2, 0); | 3910 | b43_radio_write(dev, r | B2056_TX_TSSI_MISC2, 0); |
| 3911 | b43_radio_write(dev, r | B2056_TX_TSSI_MISC3, 0); | 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 | b43_radio_write(dev, r | B2056_TX_TX_SSI_MASTER, | 3913 | b43_radio_write(dev, r | B2056_TX_TX_SSI_MASTER, |
| 3914 | 0x5); | 3914 | 0x5); |
| 3915 | if (phy->rev != 5) | 3915 | if (phy->rev != 5) |
| @@ -4098,7 +4098,7 @@ static void b43_nphy_tx_power_ctl_setup(struct b43_wldev *dev) | |||
| 4098 | b0[0] = b0[1] = 5612; | 4098 | b0[0] = b0[1] = 5612; |
| 4099 | b1[0] = b1[1] = -1393; | 4099 | b1[0] = b1[1] = -1393; |
| 4100 | } else { | 4100 | } else { |
| 4101 | if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) { | 4101 | if (b43_current_band(dev->wl) == NL80211_BAND_2GHZ) { |
| 4102 | for (c = 0; c < 2; c++) { | 4102 | for (c = 0; c < 2; c++) { |
| 4103 | idle[c] = nphy->pwr_ctl_info[c].idle_tssi_2g; | 4103 | idle[c] = nphy->pwr_ctl_info[c].idle_tssi_2g; |
| 4104 | target[c] = sprom->core_pwr_info[c].maxpwr_2g; | 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) | |||
| 4153 | for (c = 0; c < 2; c++) { | 4153 | for (c = 0; c < 2; c++) { |
| 4154 | r = c ? 0x190 : 0x170; | 4154 | r = c ? 0x190 : 0x170; |
| 4155 | if (b43_nphy_ipa(dev)) | 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 | } else { | 4158 | } else { |
| 4159 | if (b43_nphy_ipa(dev)) { | 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 | b43_radio_write(dev, | 4161 | b43_radio_write(dev, |
| 4162 | B2056_TX0 | B2056_TX_TX_SSI_MUX, tmp); | 4162 | B2056_TX0 | B2056_TX_TX_SSI_MUX, tmp); |
| 4163 | b43_radio_write(dev, | 4163 | b43_radio_write(dev, |
| @@ -4267,13 +4267,13 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) | |||
| 4267 | } else if (phy->rev >= 7) { | 4267 | } else if (phy->rev >= 7) { |
| 4268 | pga_gain = (table[i] >> 24) & 0xf; | 4268 | pga_gain = (table[i] >> 24) & 0xf; |
| 4269 | pad_gain = (table[i] >> 19) & 0x1f; | 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 | rfpwr_offset = rf_pwr_offset_table[pad_gain]; | 4271 | rfpwr_offset = rf_pwr_offset_table[pad_gain]; |
| 4272 | else | 4272 | else |
| 4273 | rfpwr_offset = rf_pwr_offset_table[pga_gain]; | 4273 | rfpwr_offset = rf_pwr_offset_table[pga_gain]; |
| 4274 | } else { | 4274 | } else { |
| 4275 | pga_gain = (table[i] >> 24) & 0xF; | 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 | rfpwr_offset = b43_ntab_papd_pga_gain_delta_ipa_2g[pga_gain]; | 4277 | rfpwr_offset = b43_ntab_papd_pga_gain_delta_ipa_2g[pga_gain]; |
| 4278 | else | 4278 | else |
| 4279 | rfpwr_offset = 0; /* FIXME */ | 4279 | rfpwr_offset = 0; /* FIXME */ |
| @@ -4288,7 +4288,7 @@ static void b43_nphy_tx_gain_table_upload(struct b43_wldev *dev) | |||
| 4288 | static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable) | 4288 | static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable) |
| 4289 | { | 4289 | { |
| 4290 | struct b43_phy_n *nphy = dev->phy.n; | 4290 | struct b43_phy_n *nphy = dev->phy.n; |
| 4291 | enum ieee80211_band band; | 4291 | enum nl80211_band band; |
| 4292 | u16 tmp; | 4292 | u16 tmp; |
| 4293 | 4293 | ||
| 4294 | if (!enable) { | 4294 | if (!enable) { |
| @@ -4300,12 +4300,12 @@ static void b43_nphy_pa_override(struct b43_wldev *dev, bool enable) | |||
| 4300 | if (dev->phy.rev >= 7) { | 4300 | if (dev->phy.rev >= 7) { |
| 4301 | tmp = 0x1480; | 4301 | tmp = 0x1480; |
| 4302 | } else if (dev->phy.rev >= 3) { | 4302 | } else if (dev->phy.rev >= 3) { |
| 4303 | if (band == IEEE80211_BAND_5GHZ) | 4303 | if (band == NL80211_BAND_5GHZ) |
| 4304 | tmp = 0x600; | 4304 | tmp = 0x600; |
| 4305 | else | 4305 | else |
| 4306 | tmp = 0x480; | 4306 | tmp = 0x480; |
| 4307 | } else { | 4307 | } else { |
| 4308 | if (band == IEEE80211_BAND_5GHZ) | 4308 | if (band == NL80211_BAND_5GHZ) |
| 4309 | tmp = 0x180; | 4309 | tmp = 0x180; |
| 4310 | else | 4310 | else |
| 4311 | tmp = 0x120; | 4311 | tmp = 0x120; |
| @@ -4734,7 +4734,7 @@ static void b43_nphy_restore_rssi_cal(struct b43_wldev *dev) | |||
| 4734 | u16 *rssical_radio_regs = NULL; | 4734 | u16 *rssical_radio_regs = NULL; |
| 4735 | u16 *rssical_phy_regs = NULL; | 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 | if (!nphy->rssical_chanspec_2G.center_freq) | 4738 | if (!nphy->rssical_chanspec_2G.center_freq) |
| 4739 | return; | 4739 | return; |
| 4740 | rssical_radio_regs = nphy->rssical_cache.rssical_radio_regs_2G; | 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) | |||
| 4804 | save[off + 7] = b43_radio_read(dev, r + R2057_TX0_TSSIG); | 4804 | save[off + 7] = b43_radio_read(dev, r + R2057_TX0_TSSIG); |
| 4805 | save[off + 8] = b43_radio_read(dev, r + R2057_TX0_TSSI_MISC1); | 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 | b43_radio_write(dev, r + R2057_TX0_TX_SSI_MASTER, 0xA); | 4808 | b43_radio_write(dev, r + R2057_TX0_TX_SSI_MASTER, 0xA); |
| 4809 | b43_radio_write(dev, r + R2057_TX0_IQCAL_VCM_HG, 0x43); | 4809 | b43_radio_write(dev, r + R2057_TX0_IQCAL_VCM_HG, 0x43); |
| 4810 | b43_radio_write(dev, r + R2057_TX0_IQCAL_IDAC, 0x55); | 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) | |||
| 4864 | save[offset + 9] = b43_radio_read(dev, B2055_XOMISC); | 4864 | save[offset + 9] = b43_radio_read(dev, B2055_XOMISC); |
| 4865 | save[offset + 10] = b43_radio_read(dev, B2055_PLL_LFC1); | 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 | b43_radio_write(dev, tmp | B2055_CAL_RVARCTL, 0x0A); | 4868 | b43_radio_write(dev, tmp | B2055_CAL_RVARCTL, 0x0A); |
| 4869 | b43_radio_write(dev, tmp | B2055_CAL_LPOCTL, 0x40); | 4869 | b43_radio_write(dev, tmp | B2055_CAL_LPOCTL, 0x40); |
| 4870 | b43_radio_write(dev, tmp | B2055_CAL_TS, 0x55); | 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) | |||
| 5005 | b43_nphy_pa_set_tx_dig_filter(dev, 0x186, | 5005 | b43_nphy_pa_set_tx_dig_filter(dev, 0x186, |
| 5006 | tbl_tx_filter_coef_rev4[3]); | 5006 | tbl_tx_filter_coef_rev4[3]); |
| 5007 | } else { | 5007 | } else { |
| 5008 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | 5008 | if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) |
| 5009 | b43_nphy_pa_set_tx_dig_filter(dev, 0x186, | 5009 | b43_nphy_pa_set_tx_dig_filter(dev, 0x186, |
| 5010 | tbl_tx_filter_coef_rev4[5]); | 5010 | tbl_tx_filter_coef_rev4[5]); |
| 5011 | if (dev->phy.channel == 14) | 5011 | if (dev->phy.channel == 14) |
| @@ -5185,7 +5185,7 @@ static void b43_nphy_tx_cal_phy_setup(struct b43_wldev *dev) | |||
| 5185 | false, 0); | 5185 | false, 0); |
| 5186 | } else if (phy->rev == 7) { | 5186 | } else if (phy->rev == 7) { |
| 5187 | b43_radio_maskset(dev, R2057_OVR_REG0, 1 << 4, 1 << 4); | 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 | b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE0, ~1, 0); | 5189 | b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE0, ~1, 0); |
| 5190 | b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE1, ~1, 0); | 5190 | b43_radio_maskset(dev, R2057_PAD2G_TUNE_PUS_CORE1, ~1, 0); |
| 5191 | } else { | 5191 | } else { |
| @@ -5210,7 +5210,7 @@ static void b43_nphy_tx_cal_phy_setup(struct b43_wldev *dev) | |||
| 5210 | b43_ntab_write(dev, B43_NTAB16(8, 18), tmp); | 5210 | b43_ntab_write(dev, B43_NTAB16(8, 18), tmp); |
| 5211 | regs[5] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC1); | 5211 | regs[5] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC1); |
| 5212 | regs[6] = b43_phy_read(dev, B43_NPHY_RFCTL_INTC2); | 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 | tmp = 0x0180; | 5214 | tmp = 0x0180; |
| 5215 | else | 5215 | else |
| 5216 | tmp = 0x0120; | 5216 | tmp = 0x0120; |
| @@ -5233,7 +5233,7 @@ static void b43_nphy_save_cal(struct b43_wldev *dev) | |||
| 5233 | if (nphy->hang_avoid) | 5233 | if (nphy->hang_avoid) |
| 5234 | b43_nphy_stay_in_carrier_search(dev, 1); | 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 | rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G; | 5237 | rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G; |
| 5238 | txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G; | 5238 | txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G; |
| 5239 | iqcal_chanspec = &nphy->iqcal_chanspec_2G; | 5239 | iqcal_chanspec = &nphy->iqcal_chanspec_2G; |
| @@ -5304,7 +5304,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev) | |||
| 5304 | u16 *txcal_radio_regs = NULL; | 5304 | u16 *txcal_radio_regs = NULL; |
| 5305 | struct b43_phy_n_iq_comp *rxcal_coeffs = NULL; | 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 | if (!nphy->iqcal_chanspec_2G.center_freq) | 5308 | if (!nphy->iqcal_chanspec_2G.center_freq) |
| 5309 | return; | 5309 | return; |
| 5310 | table = nphy->cal_cache.txcal_coeffs_2G; | 5310 | table = nphy->cal_cache.txcal_coeffs_2G; |
| @@ -5332,7 +5332,7 @@ static void b43_nphy_restore_cal(struct b43_wldev *dev) | |||
| 5332 | if (dev->phy.rev < 2) | 5332 | if (dev->phy.rev < 2) |
| 5333 | b43_nphy_tx_iq_workaround(dev); | 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 | txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G; | 5336 | txcal_radio_regs = nphy->cal_cache.txcal_radio_regs_2G; |
| 5337 | rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G; | 5337 | rxcal_coeffs = &nphy->cal_cache.rxcal_coeffs_2G; |
| 5338 | } else { | 5338 | } else { |
| @@ -5422,7 +5422,7 @@ static int b43_nphy_cal_tx_iq_lo(struct b43_wldev *dev, | |||
| 5422 | 5422 | ||
| 5423 | phy6or5x = dev->phy.rev >= 6 || | 5423 | phy6or5x = dev->phy.rev >= 6 || |
| 5424 | (dev->phy.rev == 5 && nphy->ipa2g_on && | 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 | if (phy6or5x) { | 5426 | if (phy6or5x) { |
| 5427 | if (b43_is_40mhz(dev)) { | 5427 | if (b43_is_40mhz(dev)) { |
| 5428 | b43_ntab_write_bulk(dev, B43_NTAB16(15, 0), 18, | 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, | |||
| 5657 | u16 tmp[6]; | 5657 | u16 tmp[6]; |
| 5658 | u16 uninitialized_var(cur_hpf1), uninitialized_var(cur_hpf2), cur_lna; | 5658 | u16 uninitialized_var(cur_hpf1), uninitialized_var(cur_hpf2), cur_lna; |
| 5659 | u32 real, imag; | 5659 | u32 real, imag; |
| 5660 | enum ieee80211_band band; | 5660 | enum nl80211_band band; |
| 5661 | 5661 | ||
| 5662 | u8 use; | 5662 | u8 use; |
| 5663 | u16 cur_hpf; | 5663 | u16 cur_hpf; |
| @@ -5712,18 +5712,18 @@ static int b43_nphy_rev2_cal_rx_iq(struct b43_wldev *dev, | |||
| 5712 | band = b43_current_band(dev->wl); | 5712 | band = b43_current_band(dev->wl); |
| 5713 | 5713 | ||
| 5714 | if (nphy->rxcalparams & 0xFF000000) { | 5714 | if (nphy->rxcalparams & 0xFF000000) { |
| 5715 | if (band == IEEE80211_BAND_5GHZ) | 5715 | if (band == NL80211_BAND_5GHZ) |
| 5716 | b43_phy_write(dev, rfctl[0], 0x140); | 5716 | b43_phy_write(dev, rfctl[0], 0x140); |
| 5717 | else | 5717 | else |
| 5718 | b43_phy_write(dev, rfctl[0], 0x110); | 5718 | b43_phy_write(dev, rfctl[0], 0x110); |
| 5719 | } else { | 5719 | } else { |
| 5720 | if (band == IEEE80211_BAND_5GHZ) | 5720 | if (band == NL80211_BAND_5GHZ) |
| 5721 | b43_phy_write(dev, rfctl[0], 0x180); | 5721 | b43_phy_write(dev, rfctl[0], 0x180); |
| 5722 | else | 5722 | else |
| 5723 | b43_phy_write(dev, rfctl[0], 0x120); | 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 | b43_phy_write(dev, rfctl[1], 0x148); | 5727 | b43_phy_write(dev, rfctl[1], 0x148); |
| 5728 | else | 5728 | else |
| 5729 | b43_phy_write(dev, rfctl[1], 0x114); | 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, | |||
| 5919 | #if 0 | 5919 | #if 0 |
| 5920 | /* Some extra gains */ | 5920 | /* Some extra gains */ |
| 5921 | hw_gain = 6; /* N-PHY specific */ | 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 | hw_gain += sprom->antenna_gain.a0; | 5923 | hw_gain += sprom->antenna_gain.a0; |
| 5924 | else | 5924 | else |
| 5925 | hw_gain += sprom->antenna_gain.a1; | 5925 | hw_gain += sprom->antenna_gain.a1; |
| @@ -6043,7 +6043,7 @@ static int b43_phy_initn(struct b43_wldev *dev) | |||
| 6043 | u8 tx_pwr_state; | 6043 | u8 tx_pwr_state; |
| 6044 | struct nphy_txgains target; | 6044 | struct nphy_txgains target; |
| 6045 | u16 tmp; | 6045 | u16 tmp; |
| 6046 | enum ieee80211_band tmp2; | 6046 | enum nl80211_band tmp2; |
| 6047 | bool do_rssi_cal; | 6047 | bool do_rssi_cal; |
| 6048 | 6048 | ||
| 6049 | u16 clip[2]; | 6049 | u16 clip[2]; |
| @@ -6051,7 +6051,7 @@ static int b43_phy_initn(struct b43_wldev *dev) | |||
| 6051 | 6051 | ||
| 6052 | if ((dev->phy.rev >= 3) && | 6052 | if ((dev->phy.rev >= 3) && |
| 6053 | (sprom->boardflags_lo & B43_BFL_EXTLNA) && | 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 | switch (dev->dev->bus_type) { | 6055 | switch (dev->dev->bus_type) { |
| 6056 | #ifdef CONFIG_B43_BCMA | 6056 | #ifdef CONFIG_B43_BCMA |
| 6057 | case B43_BUS_BCMA: | 6057 | case B43_BUS_BCMA: |
| @@ -6170,7 +6170,7 @@ static int b43_phy_initn(struct b43_wldev *dev) | |||
| 6170 | 6170 | ||
| 6171 | b43_nphy_classifier(dev, 0, 0); | 6171 | b43_nphy_classifier(dev, 0, 0); |
| 6172 | b43_nphy_read_clip_detection(dev, clip); | 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 | b43_nphy_bphy_init(dev); | 6174 | b43_nphy_bphy_init(dev); |
| 6175 | 6175 | ||
| 6176 | tx_pwr_state = nphy->txpwrctrl; | 6176 | tx_pwr_state = nphy->txpwrctrl; |
| @@ -6187,7 +6187,7 @@ static int b43_phy_initn(struct b43_wldev *dev) | |||
| 6187 | 6187 | ||
| 6188 | do_rssi_cal = false; | 6188 | do_rssi_cal = false; |
| 6189 | if (phy->rev >= 3) { | 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 | do_rssi_cal = !nphy->rssical_chanspec_2G.center_freq; | 6191 | do_rssi_cal = !nphy->rssical_chanspec_2G.center_freq; |
| 6192 | else | 6192 | else |
| 6193 | do_rssi_cal = !nphy->rssical_chanspec_5G.center_freq; | 6193 | do_rssi_cal = !nphy->rssical_chanspec_5G.center_freq; |
| @@ -6201,7 +6201,7 @@ static int b43_phy_initn(struct b43_wldev *dev) | |||
| 6201 | } | 6201 | } |
| 6202 | 6202 | ||
| 6203 | if (!((nphy->measure_hold & 0x6) != 0)) { | 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 | do_cal = !nphy->iqcal_chanspec_2G.center_freq; | 6205 | do_cal = !nphy->iqcal_chanspec_2G.center_freq; |
| 6206 | else | 6206 | else |
| 6207 | do_cal = !nphy->iqcal_chanspec_5G.center_freq; | 6207 | do_cal = !nphy->iqcal_chanspec_5G.center_freq; |
| @@ -6291,7 +6291,7 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev, | |||
| 6291 | int ch = new_channel->hw_value; | 6291 | int ch = new_channel->hw_value; |
| 6292 | u16 tmp16; | 6292 | u16 tmp16; |
| 6293 | 6293 | ||
| 6294 | if (new_channel->band == IEEE80211_BAND_5GHZ) { | 6294 | if (new_channel->band == NL80211_BAND_5GHZ) { |
| 6295 | /* Switch to 2 GHz for a moment to access B43_PHY_B_BBCFG */ | 6295 | /* Switch to 2 GHz for a moment to access B43_PHY_B_BBCFG */ |
| 6296 | b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); | 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, | |||
| 6302 | B43_PHY_B_BBCFG_RSTCCA | B43_PHY_B_BBCFG_RSTRX); | 6302 | B43_PHY_B_BBCFG_RSTCCA | B43_PHY_B_BBCFG_RSTRX); |
| 6303 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16); | 6303 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16); |
| 6304 | b43_phy_set(dev, B43_NPHY_BANDCTL, B43_NPHY_BANDCTL_5GHZ); | 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 | b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); | 6306 | b43_phy_mask(dev, B43_NPHY_BANDCTL, ~B43_NPHY_BANDCTL_5GHZ); |
| 6307 | tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); | 6307 | tmp16 = b43_read16(dev, B43_MMIO_PSM_PHY_HDR); |
| 6308 | b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4); | 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, | |||
| 6319 | b43_phy_set(dev, B43_PHY_B_TEST, 0x0800); | 6319 | b43_phy_set(dev, B43_PHY_B_TEST, 0x0800); |
| 6320 | } else { | 6320 | } else { |
| 6321 | b43_nphy_classifier(dev, 2, 2); | 6321 | b43_nphy_classifier(dev, 2, 2); |
| 6322 | if (new_channel->band == IEEE80211_BAND_2GHZ) | 6322 | if (new_channel->band == NL80211_BAND_2GHZ) |
| 6323 | b43_phy_mask(dev, B43_PHY_B_TEST, ~0x840); | 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, | |||
| 6449 | &(tabent_r7->phy_regs) : &(tabent_r7_2g->phy_regs); | 6449 | &(tabent_r7->phy_regs) : &(tabent_r7_2g->phy_regs); |
| 6450 | 6450 | ||
| 6451 | if (phy->radio_rev <= 4 || phy->radio_rev == 6) { | 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 | b43_radio_maskset(dev, R2057_TIA_CONFIG_CORE0, ~2, tmp); | 6453 | b43_radio_maskset(dev, R2057_TIA_CONFIG_CORE0, ~2, tmp); |
| 6454 | b43_radio_maskset(dev, R2057_TIA_CONFIG_CORE1, ~2, tmp); | 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, | |||
| 6457 | b43_radio_2057_setup(dev, tabent_r7, tabent_r7_2g); | 6457 | b43_radio_2057_setup(dev, tabent_r7, tabent_r7_2g); |
| 6458 | b43_nphy_channel_setup(dev, phy_regs, channel); | 6458 | b43_nphy_channel_setup(dev, phy_regs, channel); |
| 6459 | } else if (phy->rev >= 3) { | 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 | b43_radio_maskset(dev, 0x08, 0xFFFB, tmp); | 6461 | b43_radio_maskset(dev, 0x08, 0xFFFB, tmp); |
| 6462 | b43_radio_2056_setup(dev, tabent_r3); | 6462 | b43_radio_2056_setup(dev, tabent_r3); |
| 6463 | b43_nphy_channel_setup(dev, &(tabent_r3->phy_regs), channel); | 6463 | b43_nphy_channel_setup(dev, &(tabent_r3->phy_regs), channel); |
| 6464 | } else { | 6464 | } else { |
| 6465 | tmp = (channel->band == IEEE80211_BAND_5GHZ) ? 0x0020 : 0x0050; | 6465 | tmp = (channel->band == NL80211_BAND_5GHZ) ? 0x0020 : 0x0050; |
| 6466 | b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp); | 6466 | b43_radio_maskset(dev, B2055_MASTER1, 0xFF8F, tmp); |
| 6467 | b43_radio_2055_setup(dev, tabent_r2); | 6467 | b43_radio_2055_setup(dev, tabent_r2); |
| 6468 | b43_nphy_channel_setup(dev, &(tabent_r2->phy_regs), channel); | 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, | |||
| 6692 | enum nl80211_channel_type channel_type = | 6692 | enum nl80211_channel_type channel_type = |
| 6693 | cfg80211_get_chandef_type(&dev->wl->hw->conf.chandef); | 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 | if ((new_channel < 1) || (new_channel > 14)) | 6696 | if ((new_channel < 1) || (new_channel > 14)) |
| 6697 | return -EINVAL; | 6697 | return -EINVAL; |
| 6698 | } else { | 6698 | } else { |
| @@ -6705,7 +6705,7 @@ static int b43_nphy_op_switch_channel(struct b43_wldev *dev, | |||
| 6705 | 6705 | ||
| 6706 | static unsigned int b43_nphy_op_get_default_chan(struct b43_wldev *dev) | 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 | return 1; | 6709 | return 1; |
| 6710 | return 36; | 6710 | return 36; |
| 6711 | } | 6711 | } |
diff --git a/drivers/net/wireless/broadcom/b43/tables_lpphy.c b/drivers/net/wireless/broadcom/b43/tables_lpphy.c index cff187c5616d..ce01e1645df7 100644 --- a/drivers/net/wireless/broadcom/b43/tables_lpphy.c +++ b/drivers/net/wireless/broadcom/b43/tables_lpphy.c | |||
| @@ -560,7 +560,7 @@ void b2062_upload_init_table(struct b43_wldev *dev) | |||
| 560 | 560 | ||
| 561 | for (i = 0; i < ARRAY_SIZE(b2062_init_tab); i++) { | 561 | for (i = 0; i < ARRAY_SIZE(b2062_init_tab); i++) { |
| 562 | e = &b2062_init_tab[i]; | 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 | if (!(e->flags & B206X_FLAG_G)) | 564 | if (!(e->flags & B206X_FLAG_G)) |
| 565 | continue; | 565 | continue; |
| 566 | b43_radio_write(dev, e->offset, e->value_g); | 566 | b43_radio_write(dev, e->offset, e->value_g); |
| @@ -579,7 +579,7 @@ void b2063_upload_init_table(struct b43_wldev *dev) | |||
| 579 | 579 | ||
| 580 | for (i = 0; i < ARRAY_SIZE(b2063_init_tab); i++) { | 580 | for (i = 0; i < ARRAY_SIZE(b2063_init_tab); i++) { |
| 581 | e = &b2063_init_tab[i]; | 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 | if (!(e->flags & B206X_FLAG_G)) | 583 | if (!(e->flags & B206X_FLAG_G)) |
| 584 | continue; | 584 | continue; |
| 585 | b43_radio_write(dev, e->offset, e->value_g); | 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, | |||
| 2379 | tmp |= data.pga << 8; | 2379 | tmp |= data.pga << 8; |
| 2380 | tmp |= data.gm; | 2380 | tmp |= data.gm; |
| 2381 | if (dev->phy.rev >= 3) { | 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 | tmp |= 0x10 << 24; | 2383 | tmp |= 0x10 << 24; |
| 2384 | else | 2384 | else |
| 2385 | tmp |= 0x70 << 24; | 2385 | tmp |= 0x70 << 24; |
| 2386 | } else { | 2386 | } else { |
| 2387 | if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) | 2387 | if (b43_current_band(dev->wl) == NL80211_BAND_5GHZ) |
| 2388 | tmp |= 0x14 << 24; | 2388 | tmp |= 0x14 << 24; |
| 2389 | else | 2389 | else |
| 2390 | tmp |= 0x7F << 24; | 2390 | tmp |= 0x7F << 24; |
| @@ -2423,7 +2423,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) | |||
| 2423 | (sprom->boardflags_lo & B43_BFL_HGPA)) | 2423 | (sprom->boardflags_lo & B43_BFL_HGPA)) |
| 2424 | lpphy_write_gain_table_bulk(dev, 0, 128, | 2424 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2425 | lpphy_rev0_nopa_tx_gain_table); | 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 | lpphy_write_gain_table_bulk(dev, 0, 128, | 2427 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2428 | lpphy_rev0_2ghz_tx_gain_table); | 2428 | lpphy_rev0_2ghz_tx_gain_table); |
| 2429 | else | 2429 | else |
| @@ -2435,7 +2435,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) | |||
| 2435 | (sprom->boardflags_lo & B43_BFL_HGPA)) | 2435 | (sprom->boardflags_lo & B43_BFL_HGPA)) |
| 2436 | lpphy_write_gain_table_bulk(dev, 0, 128, | 2436 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2437 | lpphy_rev1_nopa_tx_gain_table); | 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 | lpphy_write_gain_table_bulk(dev, 0, 128, | 2439 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2440 | lpphy_rev1_2ghz_tx_gain_table); | 2440 | lpphy_rev1_2ghz_tx_gain_table); |
| 2441 | else | 2441 | else |
| @@ -2446,7 +2446,7 @@ void lpphy_init_tx_gain_table(struct b43_wldev *dev) | |||
| 2446 | if (sprom->boardflags_hi & B43_BFH_NOPA) | 2446 | if (sprom->boardflags_hi & B43_BFH_NOPA) |
| 2447 | lpphy_write_gain_table_bulk(dev, 0, 128, | 2447 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2448 | lpphy_rev2_nopa_tx_gain_table); | 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 | lpphy_write_gain_table_bulk(dev, 0, 128, | 2450 | lpphy_write_gain_table_bulk(dev, 0, 128, |
| 2451 | lpphy_rev2_2ghz_tx_gain_table); | 2451 | lpphy_rev2_2ghz_tx_gain_table); |
| 2452 | else | 2452 | else |
diff --git a/drivers/net/wireless/broadcom/b43/tables_nphy.c b/drivers/net/wireless/broadcom/b43/tables_nphy.c index b2f0d245bcf3..44e0957a70cc 100644 --- a/drivers/net/wireless/broadcom/b43/tables_nphy.c +++ b/drivers/net/wireless/broadcom/b43/tables_nphy.c | |||
| @@ -3502,7 +3502,7 @@ static void b43_nphy_tables_init_rev7_volatile(struct b43_wldev *dev) | |||
| 3502 | { 0x2, 0x18, 0x2 }, /* Core 1 */ | 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 | antswlut = sprom->fem.ghz5.antswlut; | 3506 | antswlut = sprom->fem.ghz5.antswlut; |
| 3507 | else | 3507 | else |
| 3508 | antswlut = sprom->fem.ghz2.antswlut; | 3508 | antswlut = sprom->fem.ghz2.antswlut; |
| @@ -3566,7 +3566,7 @@ static void b43_nphy_tables_init_rev3(struct b43_wldev *dev) | |||
| 3566 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 3566 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
| 3567 | u8 antswlut; | 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 | antswlut = sprom->fem.ghz5.antswlut; | 3570 | antswlut = sprom->fem.ghz5.antswlut; |
| 3571 | else | 3571 | else |
| 3572 | antswlut = sprom->fem.ghz2.antswlut; | 3572 | antswlut = sprom->fem.ghz2.antswlut; |
| @@ -3651,7 +3651,7 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev) | |||
| 3651 | { | 3651 | { |
| 3652 | struct b43_phy *phy = &dev->phy; | 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 | switch (phy->rev) { | 3655 | switch (phy->rev) { |
| 3656 | case 17: | 3656 | case 17: |
| 3657 | if (phy->radio_rev == 14) | 3657 | if (phy->radio_rev == 14) |
| @@ -3698,17 +3698,17 @@ static const u32 *b43_nphy_get_ipa_gain_table(struct b43_wldev *dev) | |||
| 3698 | const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev) | 3698 | const u32 *b43_nphy_get_tx_gain_table(struct b43_wldev *dev) |
| 3699 | { | 3699 | { |
| 3700 | struct b43_phy *phy = &dev->phy; | 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 | struct ssb_sprom *sprom = dev->dev->bus_sprom; | 3702 | struct ssb_sprom *sprom = dev->dev->bus_sprom; |
| 3703 | 3703 | ||
| 3704 | if (dev->phy.rev < 3) | 3704 | if (dev->phy.rev < 3) |
| 3705 | return b43_ntab_tx_gain_rev0_1_2; | 3705 | return b43_ntab_tx_gain_rev0_1_2; |
| 3706 | 3706 | ||
| 3707 | /* rev 3+ */ | 3707 | /* rev 3+ */ |
| 3708 | if ((dev->phy.n->ipa2g_on && band == IEEE80211_BAND_2GHZ) || | 3708 | if ((dev->phy.n->ipa2g_on && band == NL80211_BAND_2GHZ) || |
| 3709 | (dev->phy.n->ipa5g_on && band == IEEE80211_BAND_5GHZ)) { | 3709 | (dev->phy.n->ipa5g_on && band == NL80211_BAND_5GHZ)) { |
| 3710 | return b43_nphy_get_ipa_gain_table(dev); | 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 | switch (phy->rev) { | 3712 | switch (phy->rev) { |
| 3713 | case 6: | 3713 | case 6: |
| 3714 | case 5: | 3714 | case 5: |
| @@ -3746,7 +3746,7 @@ const s16 *b43_ntab_get_rf_pwr_offset_table(struct b43_wldev *dev) | |||
| 3746 | { | 3746 | { |
| 3747 | struct b43_phy *phy = &dev->phy; | 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 | switch (phy->rev) { | 3750 | switch (phy->rev) { |
| 3751 | case 17: | 3751 | case 17: |
| 3752 | if (phy->radio_rev == 14) | 3752 | if (phy->radio_rev == 14) |
diff --git a/drivers/net/wireless/broadcom/b43/tables_phy_lcn.c b/drivers/net/wireless/broadcom/b43/tables_phy_lcn.c index e347b8d80ea4..704ef1bcb5b1 100644 --- a/drivers/net/wireless/broadcom/b43/tables_phy_lcn.c +++ b/drivers/net/wireless/broadcom/b43/tables_phy_lcn.c | |||
| @@ -701,7 +701,7 @@ void b43_phy_lcn_tables_init(struct b43_wldev *dev) | |||
| 701 | 701 | ||
| 702 | b43_phy_lcn_upload_static_tables(dev); | 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 | if (sprom->boardflags_lo & B43_BFL_FEM) | 705 | if (sprom->boardflags_lo & B43_BFL_FEM) |
| 706 | b43_phy_lcn_load_tx_gain_tab(dev, | 706 | b43_phy_lcn_load_tx_gain_tab(dev, |
| 707 | b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0); | 707 | b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0); |
diff --git a/drivers/net/wireless/broadcom/b43/xmit.c b/drivers/net/wireless/broadcom/b43/xmit.c index 426dc13c44cd..f6201264de49 100644 --- a/drivers/net/wireless/broadcom/b43/xmit.c +++ b/drivers/net/wireless/broadcom/b43/xmit.c | |||
| @@ -803,7 +803,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) | |||
| 803 | chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT; | 803 | chanid = (chanstat & B43_RX_CHAN_ID) >> B43_RX_CHAN_ID_SHIFT; |
| 804 | switch (chanstat & B43_RX_CHAN_PHYTYPE) { | 804 | switch (chanstat & B43_RX_CHAN_PHYTYPE) { |
| 805 | case B43_PHYTYPE_A: | 805 | case B43_PHYTYPE_A: |
| 806 | status.band = IEEE80211_BAND_5GHZ; | 806 | status.band = NL80211_BAND_5GHZ; |
| 807 | B43_WARN_ON(1); | 807 | B43_WARN_ON(1); |
| 808 | /* FIXME: We don't really know which value the "chanid" contains. | 808 | /* FIXME: We don't really know which value the "chanid" contains. |
| 809 | * So the following assignment might be wrong. */ | 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) | |||
| 811 | ieee80211_channel_to_frequency(chanid, status.band); | 811 | ieee80211_channel_to_frequency(chanid, status.band); |
| 812 | break; | 812 | break; |
| 813 | case B43_PHYTYPE_G: | 813 | case B43_PHYTYPE_G: |
| 814 | status.band = IEEE80211_BAND_2GHZ; | 814 | status.band = NL80211_BAND_2GHZ; |
| 815 | /* Somewhere between 478.104 and 508.1084 firmware for G-PHY | 815 | /* Somewhere between 478.104 and 508.1084 firmware for G-PHY |
| 816 | * has been modified to be compatible with N-PHY and others. | 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) | |||
| 826 | /* chanid is the SHM channel cookie. Which is the plain | 826 | /* chanid is the SHM channel cookie. Which is the plain |
| 827 | * channel number in b43. */ | 827 | * channel number in b43. */ |
| 828 | if (chanstat & B43_RX_CHAN_5GHZ) | 828 | if (chanstat & B43_RX_CHAN_5GHZ) |
| 829 | status.band = IEEE80211_BAND_5GHZ; | 829 | status.band = NL80211_BAND_5GHZ; |
| 830 | else | 830 | else |
| 831 | status.band = IEEE80211_BAND_2GHZ; | 831 | status.band = NL80211_BAND_2GHZ; |
| 832 | status.freq = | 832 | status.freq = |
| 833 | ieee80211_channel_to_frequency(chanid, status.band); | 833 | ieee80211_channel_to_frequency(chanid, status.band); |
| 834 | break; | 834 | break; |
diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c index afc1fb3e38df..83770d2ea057 100644 --- a/drivers/net/wireless/broadcom/b43legacy/main.c +++ b/drivers/net/wireless/broadcom/b43legacy/main.c | |||
| @@ -1056,7 +1056,7 @@ static void b43legacy_write_probe_resp_plcp(struct b43legacy_wldev *dev, | |||
| 1056 | b43legacy_generate_plcp_hdr(&plcp, size + FCS_LEN, rate->hw_value); | 1056 | b43legacy_generate_plcp_hdr(&plcp, size + FCS_LEN, rate->hw_value); |
| 1057 | dur = ieee80211_generic_frame_duration(dev->wl->hw, | 1057 | dur = ieee80211_generic_frame_duration(dev->wl->hw, |
| 1058 | dev->wl->vif, | 1058 | dev->wl->vif, |
| 1059 | IEEE80211_BAND_2GHZ, | 1059 | NL80211_BAND_2GHZ, |
| 1060 | size, | 1060 | size, |
| 1061 | rate); | 1061 | rate); |
| 1062 | /* Write PLCP in two parts and timing for packet transfer */ | 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, | |||
| 1122 | IEEE80211_STYPE_PROBE_RESP); | 1122 | IEEE80211_STYPE_PROBE_RESP); |
| 1123 | dur = ieee80211_generic_frame_duration(dev->wl->hw, | 1123 | dur = ieee80211_generic_frame_duration(dev->wl->hw, |
| 1124 | dev->wl->vif, | 1124 | dev->wl->vif, |
| 1125 | IEEE80211_BAND_2GHZ, | 1125 | NL80211_BAND_2GHZ, |
| 1126 | *dest_size, | 1126 | *dest_size, |
| 1127 | rate); | 1127 | rate); |
| 1128 | hdr->duration_id = dur; | 1128 | hdr->duration_id = dur; |
| @@ -2719,7 +2719,7 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw, | |||
| 2719 | 2719 | ||
| 2720 | /* Switch the PHY mode (if necessary). */ | 2720 | /* Switch the PHY mode (if necessary). */ |
| 2721 | switch (conf->chandef.chan->band) { | 2721 | switch (conf->chandef.chan->band) { |
| 2722 | case IEEE80211_BAND_2GHZ: | 2722 | case NL80211_BAND_2GHZ: |
| 2723 | if (phy->type == B43legacy_PHYTYPE_B) | 2723 | if (phy->type == B43legacy_PHYTYPE_B) |
| 2724 | new_phymode = B43legacy_PHYMODE_B; | 2724 | new_phymode = B43legacy_PHYMODE_B; |
| 2725 | else | 2725 | else |
| @@ -2792,7 +2792,7 @@ out_unlock_mutex: | |||
| 2792 | static void b43legacy_update_basic_rates(struct b43legacy_wldev *dev, u32 brates) | 2792 | static void b43legacy_update_basic_rates(struct b43legacy_wldev *dev, u32 brates) |
| 2793 | { | 2793 | { |
| 2794 | struct ieee80211_supported_band *sband = | 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 | struct ieee80211_rate *rate; | 2796 | struct ieee80211_rate *rate; |
| 2797 | int i; | 2797 | int i; |
| 2798 | u16 basic, direct, offset, basic_offset, rateptr; | 2798 | u16 basic, direct, offset, basic_offset, rateptr; |
| @@ -3630,13 +3630,13 @@ static int b43legacy_setup_modes(struct b43legacy_wldev *dev, | |||
| 3630 | 3630 | ||
| 3631 | phy->possible_phymodes = 0; | 3631 | phy->possible_phymodes = 0; |
| 3632 | if (have_bphy) { | 3632 | if (have_bphy) { |
| 3633 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 3633 | hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 3634 | &b43legacy_band_2GHz_BPHY; | 3634 | &b43legacy_band_2GHz_BPHY; |
| 3635 | phy->possible_phymodes |= B43legacy_PHYMODE_B; | 3635 | phy->possible_phymodes |= B43legacy_PHYMODE_B; |
| 3636 | } | 3636 | } |
| 3637 | 3637 | ||
| 3638 | if (have_gphy) { | 3638 | if (have_gphy) { |
| 3639 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 3639 | hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 3640 | &b43legacy_band_2GHz_GPHY; | 3640 | &b43legacy_band_2GHz_GPHY; |
| 3641 | phy->possible_phymodes |= B43legacy_PHYMODE_G; | 3641 | phy->possible_phymodes |= B43legacy_PHYMODE_G; |
| 3642 | } | 3642 | } |
diff --git a/drivers/net/wireless/broadcom/b43legacy/xmit.c b/drivers/net/wireless/broadcom/b43legacy/xmit.c index 34bf3f0b729f..35ccf400b02c 100644 --- a/drivers/net/wireless/broadcom/b43legacy/xmit.c +++ b/drivers/net/wireless/broadcom/b43legacy/xmit.c | |||
| @@ -565,7 +565,7 @@ void b43legacy_rx(struct b43legacy_wldev *dev, | |||
| 565 | switch (chanstat & B43legacy_RX_CHAN_PHYTYPE) { | 565 | switch (chanstat & B43legacy_RX_CHAN_PHYTYPE) { |
| 566 | case B43legacy_PHYTYPE_B: | 566 | case B43legacy_PHYTYPE_B: |
| 567 | case B43legacy_PHYTYPE_G: | 567 | case B43legacy_PHYTYPE_G: |
| 568 | status.band = IEEE80211_BAND_2GHZ; | 568 | status.band = NL80211_BAND_2GHZ; |
| 569 | status.freq = chanid + 2400; | 569 | status.freq = chanid + 2400; |
| 570 | break; | 570 | break; |
| 571 | default: | 571 | default: |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index d5c2a27573b4..9a567e263bb1 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | |||
| @@ -144,7 +144,7 @@ static struct ieee80211_rate __wl_rates[] = { | |||
| 144 | #define wl_a_rates_size (wl_g_rates_size - 4) | 144 | #define wl_a_rates_size (wl_g_rates_size - 4) |
| 145 | 145 | ||
| 146 | #define CHAN2G(_channel, _freq) { \ | 146 | #define CHAN2G(_channel, _freq) { \ |
| 147 | .band = IEEE80211_BAND_2GHZ, \ | 147 | .band = NL80211_BAND_2GHZ, \ |
| 148 | .center_freq = (_freq), \ | 148 | .center_freq = (_freq), \ |
| 149 | .hw_value = (_channel), \ | 149 | .hw_value = (_channel), \ |
| 150 | .flags = IEEE80211_CHAN_DISABLED, \ | 150 | .flags = IEEE80211_CHAN_DISABLED, \ |
| @@ -153,7 +153,7 @@ static struct ieee80211_rate __wl_rates[] = { | |||
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | #define CHAN5G(_channel) { \ | 155 | #define CHAN5G(_channel) { \ |
| 156 | .band = IEEE80211_BAND_5GHZ, \ | 156 | .band = NL80211_BAND_5GHZ, \ |
| 157 | .center_freq = 5000 + (5 * (_channel)), \ | 157 | .center_freq = 5000 + (5 * (_channel)), \ |
| 158 | .hw_value = (_channel), \ | 158 | .hw_value = (_channel), \ |
| 159 | .flags = IEEE80211_CHAN_DISABLED, \ | 159 | .flags = IEEE80211_CHAN_DISABLED, \ |
| @@ -181,13 +181,13 @@ static struct ieee80211_channel __wl_5ghz_channels[] = { | |||
| 181 | * above is added to the band during setup. | 181 | * above is added to the band during setup. |
| 182 | */ | 182 | */ |
| 183 | static const struct ieee80211_supported_band __wl_band_2ghz = { | 183 | static const struct ieee80211_supported_band __wl_band_2ghz = { |
| 184 | .band = IEEE80211_BAND_2GHZ, | 184 | .band = NL80211_BAND_2GHZ, |
| 185 | .bitrates = wl_g_rates, | 185 | .bitrates = wl_g_rates, |
| 186 | .n_bitrates = wl_g_rates_size, | 186 | .n_bitrates = wl_g_rates_size, |
| 187 | }; | 187 | }; |
| 188 | 188 | ||
| 189 | static const struct ieee80211_supported_band __wl_band_5ghz = { | 189 | static const struct ieee80211_supported_band __wl_band_5ghz = { |
| 190 | .band = IEEE80211_BAND_5GHZ, | 190 | .band = NL80211_BAND_5GHZ, |
| 191 | .bitrates = wl_a_rates, | 191 | .bitrates = wl_a_rates, |
| 192 | .n_bitrates = wl_a_rates_size, | 192 | .n_bitrates = wl_a_rates_size, |
| 193 | }; | 193 | }; |
| @@ -292,13 +292,13 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf, | |||
| 292 | WARN_ON_ONCE(1); | 292 | WARN_ON_ONCE(1); |
| 293 | } | 293 | } |
| 294 | switch (ch->chan->band) { | 294 | switch (ch->chan->band) { |
| 295 | case IEEE80211_BAND_2GHZ: | 295 | case NL80211_BAND_2GHZ: |
| 296 | ch_inf.band = BRCMU_CHAN_BAND_2G; | 296 | ch_inf.band = BRCMU_CHAN_BAND_2G; |
| 297 | break; | 297 | break; |
| 298 | case IEEE80211_BAND_5GHZ: | 298 | case NL80211_BAND_5GHZ: |
| 299 | ch_inf.band = BRCMU_CHAN_BAND_5G; | 299 | ch_inf.band = BRCMU_CHAN_BAND_5G; |
| 300 | break; | 300 | break; |
| 301 | case IEEE80211_BAND_60GHZ: | 301 | case NL80211_BAND_60GHZ: |
| 302 | default: | 302 | default: |
| 303 | WARN_ON_ONCE(1); | 303 | WARN_ON_ONCE(1); |
| 304 | } | 304 | } |
| @@ -2679,9 +2679,9 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg, | |||
| 2679 | channel = bi->ctl_ch; | 2679 | channel = bi->ctl_ch; |
| 2680 | 2680 | ||
| 2681 | if (channel <= CH_MAX_2G_CHANNEL) | 2681 | if (channel <= CH_MAX_2G_CHANNEL) |
| 2682 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; | 2682 | band = wiphy->bands[NL80211_BAND_2GHZ]; |
| 2683 | else | 2683 | else |
| 2684 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; | 2684 | band = wiphy->bands[NL80211_BAND_5GHZ]; |
| 2685 | 2685 | ||
| 2686 | freq = ieee80211_channel_to_frequency(channel, band->band); | 2686 | freq = ieee80211_channel_to_frequency(channel, band->band); |
| 2687 | notify_channel = ieee80211_get_channel(wiphy, freq); | 2687 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| @@ -2788,9 +2788,9 @@ static s32 brcmf_inform_ibss(struct brcmf_cfg80211_info *cfg, | |||
| 2788 | cfg->d11inf.decchspec(&ch); | 2788 | cfg->d11inf.decchspec(&ch); |
| 2789 | 2789 | ||
| 2790 | if (ch.band == BRCMU_CHAN_BAND_2G) | 2790 | if (ch.band == BRCMU_CHAN_BAND_2G) |
| 2791 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; | 2791 | band = wiphy->bands[NL80211_BAND_2GHZ]; |
| 2792 | else | 2792 | else |
| 2793 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; | 2793 | band = wiphy->bands[NL80211_BAND_5GHZ]; |
| 2794 | 2794 | ||
| 2795 | freq = ieee80211_channel_to_frequency(ch.chnum, band->band); | 2795 | freq = ieee80211_channel_to_frequency(ch.chnum, band->band); |
| 2796 | cfg->channel = freq; | 2796 | cfg->channel = freq; |
| @@ -5215,9 +5215,9 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg, | |||
| 5215 | cfg->d11inf.decchspec(&ch); | 5215 | cfg->d11inf.decchspec(&ch); |
| 5216 | 5216 | ||
| 5217 | if (ch.band == BRCMU_CHAN_BAND_2G) | 5217 | if (ch.band == BRCMU_CHAN_BAND_2G) |
| 5218 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; | 5218 | band = wiphy->bands[NL80211_BAND_2GHZ]; |
| 5219 | else | 5219 | else |
| 5220 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; | 5220 | band = wiphy->bands[NL80211_BAND_5GHZ]; |
| 5221 | 5221 | ||
| 5222 | freq = ieee80211_channel_to_frequency(ch.chnum, band->band); | 5222 | freq = ieee80211_channel_to_frequency(ch.chnum, band->band); |
| 5223 | notify_channel = ieee80211_get_channel(wiphy, freq); | 5223 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| @@ -5707,11 +5707,11 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, | |||
| 5707 | } | 5707 | } |
| 5708 | 5708 | ||
| 5709 | wiphy = cfg_to_wiphy(cfg); | 5709 | wiphy = cfg_to_wiphy(cfg); |
| 5710 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; | 5710 | band = wiphy->bands[NL80211_BAND_2GHZ]; |
| 5711 | if (band) | 5711 | if (band) |
| 5712 | for (i = 0; i < band->n_channels; i++) | 5712 | for (i = 0; i < band->n_channels; i++) |
| 5713 | band->channels[i].flags = IEEE80211_CHAN_DISABLED; | 5713 | band->channels[i].flags = IEEE80211_CHAN_DISABLED; |
| 5714 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; | 5714 | band = wiphy->bands[NL80211_BAND_5GHZ]; |
| 5715 | if (band) | 5715 | if (band) |
| 5716 | for (i = 0; i < band->n_channels; i++) | 5716 | for (i = 0; i < band->n_channels; i++) |
| 5717 | band->channels[i].flags = IEEE80211_CHAN_DISABLED; | 5717 | band->channels[i].flags = IEEE80211_CHAN_DISABLED; |
| @@ -5722,9 +5722,9 @@ static int brcmf_construct_chaninfo(struct brcmf_cfg80211_info *cfg, | |||
| 5722 | cfg->d11inf.decchspec(&ch); | 5722 | cfg->d11inf.decchspec(&ch); |
| 5723 | 5723 | ||
| 5724 | if (ch.band == BRCMU_CHAN_BAND_2G) { | 5724 | if (ch.band == BRCMU_CHAN_BAND_2G) { |
| 5725 | band = wiphy->bands[IEEE80211_BAND_2GHZ]; | 5725 | band = wiphy->bands[NL80211_BAND_2GHZ]; |
| 5726 | } else if (ch.band == BRCMU_CHAN_BAND_5G) { | 5726 | } else if (ch.band == BRCMU_CHAN_BAND_5G) { |
| 5727 | band = wiphy->bands[IEEE80211_BAND_5GHZ]; | 5727 | band = wiphy->bands[NL80211_BAND_5GHZ]; |
| 5728 | } else { | 5728 | } else { |
| 5729 | brcmf_err("Invalid channel Spec. 0x%x.\n", ch.chspec); | 5729 | brcmf_err("Invalid channel Spec. 0x%x.\n", ch.chspec); |
| 5730 | continue; | 5730 | continue; |
| @@ -5839,7 +5839,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg) | |||
| 5839 | return err; | 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 | list = (struct brcmf_chanspec_list *)pbuf; | 5843 | list = (struct brcmf_chanspec_list *)pbuf; |
| 5844 | num_chan = le32_to_cpu(list->count); | 5844 | num_chan = le32_to_cpu(list->count); |
| 5845 | for (i = 0; i < num_chan; i++) { | 5845 | for (i = 0; i < num_chan; i++) { |
| @@ -5871,11 +5871,11 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) | |||
| 5871 | band = WLC_BAND_2G; | 5871 | band = WLC_BAND_2G; |
| 5872 | err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); | 5872 | err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); |
| 5873 | if (!err) { | 5873 | if (!err) { |
| 5874 | bw_cap[IEEE80211_BAND_2GHZ] = band; | 5874 | bw_cap[NL80211_BAND_2GHZ] = band; |
| 5875 | band = WLC_BAND_5G; | 5875 | band = WLC_BAND_5G; |
| 5876 | err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); | 5876 | err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); |
| 5877 | if (!err) { | 5877 | if (!err) { |
| 5878 | bw_cap[IEEE80211_BAND_5GHZ] = band; | 5878 | bw_cap[NL80211_BAND_5GHZ] = band; |
| 5879 | return; | 5879 | return; |
| 5880 | } | 5880 | } |
| 5881 | WARN_ON(1); | 5881 | WARN_ON(1); |
| @@ -5890,14 +5890,14 @@ static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) | |||
| 5890 | 5890 | ||
| 5891 | switch (mimo_bwcap) { | 5891 | switch (mimo_bwcap) { |
| 5892 | case WLC_N_BW_40ALL: | 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 | /* fall-thru */ | 5894 | /* fall-thru */ |
| 5895 | case WLC_N_BW_20IN2G_40IN5G: | 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 | /* fall-thru */ | 5897 | /* fall-thru */ |
| 5898 | case WLC_N_BW_20ALL: | 5898 | case WLC_N_BW_20ALL: |
| 5899 | bw_cap[IEEE80211_BAND_2GHZ] |= WLC_BW_20MHZ_BIT; | 5899 | bw_cap[NL80211_BAND_2GHZ] |= WLC_BW_20MHZ_BIT; |
| 5900 | bw_cap[IEEE80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT; | 5900 | bw_cap[NL80211_BAND_5GHZ] |= WLC_BW_20MHZ_BIT; |
| 5901 | break; | 5901 | break; |
| 5902 | default: | 5902 | default: |
| 5903 | brcmf_err("invalid mimo_bw_cap value\n"); | 5903 | brcmf_err("invalid mimo_bw_cap value\n"); |
| @@ -5938,7 +5938,7 @@ static void brcmf_update_vht_cap(struct ieee80211_supported_band *band, | |||
| 5938 | __le16 mcs_map; | 5938 | __le16 mcs_map; |
| 5939 | 5939 | ||
| 5940 | /* not allowed in 2.4G band */ | 5940 | /* not allowed in 2.4G band */ |
| 5941 | if (band->band == IEEE80211_BAND_2GHZ) | 5941 | if (band->band == NL80211_BAND_2GHZ) |
| 5942 | return; | 5942 | return; |
| 5943 | 5943 | ||
| 5944 | band->vht_cap.vht_supported = true; | 5944 | band->vht_cap.vht_supported = true; |
| @@ -5997,8 +5997,8 @@ static int brcmf_setup_wiphybands(struct wiphy *wiphy) | |||
| 5997 | brcmf_get_bwcap(ifp, bw_cap); | 5997 | brcmf_get_bwcap(ifp, bw_cap); |
| 5998 | } | 5998 | } |
| 5999 | brcmf_dbg(INFO, "nmode=%d, vhtmode=%d, bw_cap=(%d, %d)\n", | 5999 | brcmf_dbg(INFO, "nmode=%d, vhtmode=%d, bw_cap=(%d, %d)\n", |
| 6000 | nmode, vhtmode, bw_cap[IEEE80211_BAND_2GHZ], | 6000 | nmode, vhtmode, bw_cap[NL80211_BAND_2GHZ], |
| 6001 | bw_cap[IEEE80211_BAND_5GHZ]); | 6001 | bw_cap[NL80211_BAND_5GHZ]); |
| 6002 | 6002 | ||
| 6003 | err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); | 6003 | err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); |
| 6004 | if (err) { | 6004 | if (err) { |
| @@ -6321,7 +6321,7 @@ static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) | |||
| 6321 | } | 6321 | } |
| 6322 | 6322 | ||
| 6323 | band->n_channels = ARRAY_SIZE(__wl_2ghz_channels); | 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 | if (bandlist[i] == cpu_to_le32(WLC_BAND_5G)) { | 6326 | if (bandlist[i] == cpu_to_le32(WLC_BAND_5G)) { |
| 6327 | band = kmemdup(&__wl_band_5ghz, sizeof(__wl_band_5ghz), | 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) | |||
| 6338 | } | 6338 | } |
| 6339 | 6339 | ||
| 6340 | band->n_channels = ARRAY_SIZE(__wl_5ghz_channels); | 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 | err = brcmf_setup_wiphybands(wiphy); | 6344 | err = brcmf_setup_wiphybands(wiphy); |
| @@ -6604,13 +6604,13 @@ static void brcmf_free_wiphy(struct wiphy *wiphy) | |||
| 6604 | kfree(wiphy->iface_combinations[i].limits); | 6604 | kfree(wiphy->iface_combinations[i].limits); |
| 6605 | } | 6605 | } |
| 6606 | kfree(wiphy->iface_combinations); | 6606 | kfree(wiphy->iface_combinations); |
| 6607 | if (wiphy->bands[IEEE80211_BAND_2GHZ]) { | 6607 | if (wiphy->bands[NL80211_BAND_2GHZ]) { |
| 6608 | kfree(wiphy->bands[IEEE80211_BAND_2GHZ]->channels); | 6608 | kfree(wiphy->bands[NL80211_BAND_2GHZ]->channels); |
| 6609 | kfree(wiphy->bands[IEEE80211_BAND_2GHZ]); | 6609 | kfree(wiphy->bands[NL80211_BAND_2GHZ]); |
| 6610 | } | 6610 | } |
| 6611 | if (wiphy->bands[IEEE80211_BAND_5GHZ]) { | 6611 | if (wiphy->bands[NL80211_BAND_5GHZ]) { |
| 6612 | kfree(wiphy->bands[IEEE80211_BAND_5GHZ]->channels); | 6612 | kfree(wiphy->bands[NL80211_BAND_5GHZ]->channels); |
| 6613 | kfree(wiphy->bands[IEEE80211_BAND_5GHZ]); | 6613 | kfree(wiphy->bands[NL80211_BAND_5GHZ]); |
| 6614 | } | 6614 | } |
| 6615 | wiphy_free(wiphy); | 6615 | wiphy_free(wiphy); |
| 6616 | } | 6616 | } |
| @@ -6698,8 +6698,8 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr, | |||
| 6698 | * cfg80211 here that we do and have it decide we can enable | 6698 | * cfg80211 here that we do and have it decide we can enable |
| 6699 | * it. But first check if device does support 2G operation. | 6699 | * it. But first check if device does support 2G operation. |
| 6700 | */ | 6700 | */ |
| 6701 | if (wiphy->bands[IEEE80211_BAND_2GHZ]) { | 6701 | if (wiphy->bands[NL80211_BAND_2GHZ]) { |
| 6702 | cap = &wiphy->bands[IEEE80211_BAND_2GHZ]->ht_cap.cap; | 6702 | cap = &wiphy->bands[NL80211_BAND_2GHZ]->ht_cap.cap; |
| 6703 | *cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 6703 | *cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; |
| 6704 | } | 6704 | } |
| 6705 | err = wiphy_register(wiphy); | 6705 | err = wiphy_register(wiphy); |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c index b5a49e564f25..c2ac91df35ed 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | |||
| @@ -1430,8 +1430,8 @@ int brcmf_p2p_notify_action_frame_rx(struct brcmf_if *ifp, | |||
| 1430 | 1430 | ||
| 1431 | freq = ieee80211_channel_to_frequency(ch.chnum, | 1431 | freq = ieee80211_channel_to_frequency(ch.chnum, |
| 1432 | ch.band == BRCMU_CHAN_BAND_2G ? | 1432 | ch.band == BRCMU_CHAN_BAND_2G ? |
| 1433 | IEEE80211_BAND_2GHZ : | 1433 | NL80211_BAND_2GHZ : |
| 1434 | IEEE80211_BAND_5GHZ); | 1434 | NL80211_BAND_5GHZ); |
| 1435 | 1435 | ||
| 1436 | wdev = &ifp->vif->wdev; | 1436 | wdev = &ifp->vif->wdev; |
| 1437 | cfg80211_rx_mgmt(wdev, freq, 0, (u8 *)mgmt_frame, mgmt_frame_len, 0); | 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, | |||
| 1900 | mgmt_frame_len = e->datalen - sizeof(*rxframe); | 1900 | mgmt_frame_len = e->datalen - sizeof(*rxframe); |
| 1901 | freq = ieee80211_channel_to_frequency(ch.chnum, | 1901 | freq = ieee80211_channel_to_frequency(ch.chnum, |
| 1902 | ch.band == BRCMU_CHAN_BAND_2G ? | 1902 | ch.band == BRCMU_CHAN_BAND_2G ? |
| 1903 | IEEE80211_BAND_2GHZ : | 1903 | NL80211_BAND_2GHZ : |
| 1904 | IEEE80211_BAND_5GHZ); | 1904 | NL80211_BAND_5GHZ); |
| 1905 | 1905 | ||
| 1906 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, 0); | 1906 | cfg80211_rx_mgmt(&vif->wdev, freq, 0, mgmt_frame, mgmt_frame_len, 0); |
| 1907 | 1907 | ||
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c index 38bd5890bd53..3a03287fa912 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/channel.c | |||
| @@ -636,7 +636,7 @@ static void brcms_reg_apply_radar_flags(struct wiphy *wiphy) | |||
| 636 | struct ieee80211_channel *ch; | 636 | struct ieee80211_channel *ch; |
| 637 | int i; | 637 | int i; |
| 638 | 638 | ||
| 639 | sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | 639 | sband = wiphy->bands[NL80211_BAND_5GHZ]; |
| 640 | if (!sband) | 640 | if (!sband) |
| 641 | return; | 641 | return; |
| 642 | 642 | ||
| @@ -666,7 +666,7 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy, | |||
| 666 | const struct ieee80211_reg_rule *rule; | 666 | const struct ieee80211_reg_rule *rule; |
| 667 | int band, i; | 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 | sband = wiphy->bands[band]; | 670 | sband = wiphy->bands[band]; |
| 671 | if (!sband) | 671 | if (!sband) |
| 672 | continue; | 672 | continue; |
| @@ -710,7 +710,7 @@ static void brcms_reg_notifier(struct wiphy *wiphy, | |||
| 710 | brcms_reg_apply_beaconing_flags(wiphy, request->initiator); | 710 | brcms_reg_apply_beaconing_flags(wiphy, request->initiator); |
| 711 | 711 | ||
| 712 | /* Disable radio if all channels disallowed by regulatory */ | 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 | sband = wiphy->bands[band]; | 714 | sband = wiphy->bands[band]; |
| 715 | if (!sband) | 715 | if (!sband) |
| 716 | continue; | 716 | continue; |
| @@ -755,9 +755,9 @@ void brcms_c_regd_init(struct brcms_c_info *wlc) | |||
| 755 | &sup_chan); | 755 | &sup_chan); |
| 756 | 756 | ||
| 757 | if (band_idx == BAND_2G_INDEX) | 757 | if (band_idx == BAND_2G_INDEX) |
| 758 | sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | 758 | sband = wiphy->bands[NL80211_BAND_2GHZ]; |
| 759 | else | 759 | else |
| 760 | sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | 760 | sband = wiphy->bands[NL80211_BAND_5GHZ]; |
| 761 | 761 | ||
| 762 | for (i = 0; i < sband->n_channels; i++) { | 762 | for (i = 0; i < sband->n_channels; i++) { |
| 763 | ch = &sband->channels[i]; | 763 | ch = &sband->channels[i]; |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c index 61ae2768132a..7c2a9a9bc372 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/mac80211_if.c | |||
| @@ -49,7 +49,7 @@ | |||
| 49 | FIF_PSPOLL) | 49 | FIF_PSPOLL) |
| 50 | 50 | ||
| 51 | #define CHAN2GHZ(channel, freqency, chflags) { \ | 51 | #define CHAN2GHZ(channel, freqency, chflags) { \ |
| 52 | .band = IEEE80211_BAND_2GHZ, \ | 52 | .band = NL80211_BAND_2GHZ, \ |
| 53 | .center_freq = (freqency), \ | 53 | .center_freq = (freqency), \ |
| 54 | .hw_value = (channel), \ | 54 | .hw_value = (channel), \ |
| 55 | .flags = chflags, \ | 55 | .flags = chflags, \ |
| @@ -58,7 +58,7 @@ | |||
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | #define CHAN5GHZ(channel, chflags) { \ | 60 | #define CHAN5GHZ(channel, chflags) { \ |
| 61 | .band = IEEE80211_BAND_5GHZ, \ | 61 | .band = NL80211_BAND_5GHZ, \ |
| 62 | .center_freq = 5000 + 5*(channel), \ | 62 | .center_freq = 5000 + 5*(channel), \ |
| 63 | .hw_value = (channel), \ | 63 | .hw_value = (channel), \ |
| 64 | .flags = chflags, \ | 64 | .flags = chflags, \ |
| @@ -217,7 +217,7 @@ static struct ieee80211_rate legacy_ratetable[] = { | |||
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = { | 219 | static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = { |
| 220 | .band = IEEE80211_BAND_2GHZ, | 220 | .band = NL80211_BAND_2GHZ, |
| 221 | .channels = brcms_2ghz_chantable, | 221 | .channels = brcms_2ghz_chantable, |
| 222 | .n_channels = ARRAY_SIZE(brcms_2ghz_chantable), | 222 | .n_channels = ARRAY_SIZE(brcms_2ghz_chantable), |
| 223 | .bitrates = legacy_ratetable, | 223 | .bitrates = legacy_ratetable, |
| @@ -238,7 +238,7 @@ static const struct ieee80211_supported_band brcms_band_2GHz_nphy_template = { | |||
| 238 | }; | 238 | }; |
| 239 | 239 | ||
| 240 | static const struct ieee80211_supported_band brcms_band_5GHz_nphy_template = { | 240 | static const struct ieee80211_supported_band brcms_band_5GHz_nphy_template = { |
| 241 | .band = IEEE80211_BAND_5GHZ, | 241 | .band = NL80211_BAND_5GHZ, |
| 242 | .channels = brcms_5ghz_nphy_chantable, | 242 | .channels = brcms_5ghz_nphy_chantable, |
| 243 | .n_channels = ARRAY_SIZE(brcms_5ghz_nphy_chantable), | 243 | .n_channels = ARRAY_SIZE(brcms_5ghz_nphy_chantable), |
| 244 | .bitrates = legacy_ratetable + BRCMS_LEGACY_5G_RATE_OFFSET, | 244 | .bitrates = legacy_ratetable + BRCMS_LEGACY_5G_RATE_OFFSET, |
| @@ -1026,8 +1026,8 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw) | |||
| 1026 | int has_5g = 0; | 1026 | int has_5g = 0; |
| 1027 | u16 phy_type; | 1027 | u16 phy_type; |
| 1028 | 1028 | ||
| 1029 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL; | 1029 | hw->wiphy->bands[NL80211_BAND_2GHZ] = NULL; |
| 1030 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; | 1030 | hw->wiphy->bands[NL80211_BAND_5GHZ] = NULL; |
| 1031 | 1031 | ||
| 1032 | phy_type = brcms_c_get_phy_type(wl->wlc, 0); | 1032 | phy_type = brcms_c_get_phy_type(wl->wlc, 0); |
| 1033 | if (phy_type == PHY_TYPE_N || phy_type == PHY_TYPE_LCN) { | 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) | |||
| 1038 | band->ht_cap.mcs.rx_mask[1] = 0; | 1038 | band->ht_cap.mcs.rx_mask[1] = 0; |
| 1039 | band->ht_cap.mcs.rx_highest = cpu_to_le16(72); | 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 | } else { | 1042 | } else { |
| 1043 | return -EPERM; | 1043 | return -EPERM; |
| 1044 | } | 1044 | } |
| @@ -1049,7 +1049,7 @@ static int ieee_hw_rate_init(struct ieee80211_hw *hw) | |||
| 1049 | if (phy_type == PHY_TYPE_N || phy_type == PHY_TYPE_LCN) { | 1049 | if (phy_type == PHY_TYPE_N || phy_type == PHY_TYPE_LCN) { |
| 1050 | band = &wlc->bandstate[BAND_5G_INDEX]->band; | 1050 | band = &wlc->bandstate[BAND_5G_INDEX]->band; |
| 1051 | *band = brcms_band_5GHz_nphy_template; | 1051 | *band = brcms_band_5GHz_nphy_template; |
| 1052 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band; | 1052 | hw->wiphy->bands[NL80211_BAND_5GHZ] = band; |
| 1053 | } else { | 1053 | } else { |
| 1054 | return -EPERM; | 1054 | return -EPERM; |
| 1055 | } | 1055 | } |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c index 218cbc8bf3a7..e16ee60639f5 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | |||
| @@ -7076,7 +7076,7 @@ prep_mac80211_status(struct brcms_c_info *wlc, struct d11rxhdr *rxh, | |||
| 7076 | channel = BRCMS_CHAN_CHANNEL(rxh->RxChan); | 7076 | channel = BRCMS_CHAN_CHANNEL(rxh->RxChan); |
| 7077 | 7077 | ||
| 7078 | rx_status->band = | 7078 | rx_status->band = |
| 7079 | channel > 14 ? IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; | 7079 | channel > 14 ? NL80211_BAND_5GHZ : NL80211_BAND_2GHZ; |
| 7080 | rx_status->freq = | 7080 | rx_status->freq = |
| 7081 | ieee80211_channel_to_frequency(channel, rx_status->band); | 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, | |||
| 7143 | * a subset of the 2.4G rates. See bitrates field | 7143 | * a subset of the 2.4G rates. See bitrates field |
| 7144 | * of brcms_band_5GHz_nphy (in mac80211_if.c). | 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 | rx_status->rate_idx -= BRCMS_LEGACY_5G_RATE_OFFSET; | 7147 | rx_status->rate_idx -= BRCMS_LEGACY_5G_RATE_OFFSET; |
| 7148 | 7148 | ||
| 7149 | /* Determine short preamble and rate_idx */ | 7149 | /* Determine short preamble and rate_idx */ |
diff --git a/drivers/net/wireless/cisco/airo.c b/drivers/net/wireless/cisco/airo.c index d2353f6e5214..4bd9e2b97e86 100644 --- a/drivers/net/wireless/cisco/airo.c +++ b/drivers/net/wireless/cisco/airo.c | |||
| @@ -5836,7 +5836,7 @@ static int airo_get_freq(struct net_device *dev, | |||
| 5836 | ch = le16_to_cpu(status_rid.channel); | 5836 | ch = le16_to_cpu(status_rid.channel); |
| 5837 | if((ch > 0) && (ch < 15)) { | 5837 | if((ch > 0) && (ch < 15)) { |
| 5838 | fwrq->m = 100000 * | 5838 | fwrq->m = 100000 * |
| 5839 | ieee80211_channel_to_frequency(ch, IEEE80211_BAND_2GHZ); | 5839 | ieee80211_channel_to_frequency(ch, NL80211_BAND_2GHZ); |
| 5840 | fwrq->e = 1; | 5840 | fwrq->e = 1; |
| 5841 | } else { | 5841 | } else { |
| 5842 | fwrq->m = ch; | 5842 | fwrq->m = ch; |
| @@ -6894,7 +6894,7 @@ static int airo_get_range(struct net_device *dev, | |||
| 6894 | for(i = 0; i < 14; i++) { | 6894 | for(i = 0; i < 14; i++) { |
| 6895 | range->freq[k].i = i + 1; /* List index */ | 6895 | range->freq[k].i = i + 1; /* List index */ |
| 6896 | range->freq[k].m = 100000 * | 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 | range->freq[k++].e = 1; /* Values in MHz -> * 10^5 * 10 */ | 6898 | range->freq[k++].e = 1; /* Values in MHz -> * 10^5 * 10 */ |
| 6899 | } | 6899 | } |
| 6900 | range->num_frequency = k; | 6900 | range->num_frequency = k; |
| @@ -7302,7 +7302,7 @@ static inline char *airo_translate_scan(struct net_device *dev, | |||
| 7302 | iwe.cmd = SIOCGIWFREQ; | 7302 | iwe.cmd = SIOCGIWFREQ; |
| 7303 | iwe.u.freq.m = le16_to_cpu(bss->dsChannel); | 7303 | iwe.u.freq.m = le16_to_cpu(bss->dsChannel); |
| 7304 | iwe.u.freq.m = 100000 * | 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 | iwe.u.freq.e = 1; | 7306 | iwe.u.freq.e = 1; |
| 7307 | current_ev = iwe_stream_add_event(info, current_ev, end_buf, | 7307 | current_ev = iwe_stream_add_event(info, current_ev, end_buf, |
| 7308 | &iwe, IW_EV_FREQ_LEN); | 7308 | &iwe, IW_EV_FREQ_LEN); |
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index 717320b17622..e1e42ed6c412 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c | |||
| @@ -1913,7 +1913,7 @@ static int ipw2100_wdev_init(struct net_device *dev) | |||
| 1913 | if (geo->bg_channels) { | 1913 | if (geo->bg_channels) { |
| 1914 | struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; | 1914 | struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; |
| 1915 | 1915 | ||
| 1916 | bg_band->band = IEEE80211_BAND_2GHZ; | 1916 | bg_band->band = NL80211_BAND_2GHZ; |
| 1917 | bg_band->n_channels = geo->bg_channels; | 1917 | bg_band->n_channels = geo->bg_channels; |
| 1918 | bg_band->channels = kcalloc(geo->bg_channels, | 1918 | bg_band->channels = kcalloc(geo->bg_channels, |
| 1919 | sizeof(struct ieee80211_channel), | 1919 | sizeof(struct ieee80211_channel), |
| @@ -1924,7 +1924,7 @@ static int ipw2100_wdev_init(struct net_device *dev) | |||
| 1924 | } | 1924 | } |
| 1925 | /* translate geo->bg to bg_band.channels */ | 1925 | /* translate geo->bg to bg_band.channels */ |
| 1926 | for (i = 0; i < geo->bg_channels; i++) { | 1926 | for (i = 0; i < geo->bg_channels; i++) { |
| 1927 | bg_band->channels[i].band = IEEE80211_BAND_2GHZ; | 1927 | bg_band->channels[i].band = NL80211_BAND_2GHZ; |
| 1928 | bg_band->channels[i].center_freq = geo->bg[i].freq; | 1928 | bg_band->channels[i].center_freq = geo->bg[i].freq; |
| 1929 | bg_band->channels[i].hw_value = geo->bg[i].channel; | 1929 | bg_band->channels[i].hw_value = geo->bg[i].channel; |
| 1930 | bg_band->channels[i].max_power = geo->bg[i].max_power; | 1930 | bg_band->channels[i].max_power = geo->bg[i].max_power; |
| @@ -1945,7 +1945,7 @@ static int ipw2100_wdev_init(struct net_device *dev) | |||
| 1945 | bg_band->bitrates = ipw2100_bg_rates; | 1945 | bg_band->bitrates = ipw2100_bg_rates; |
| 1946 | bg_band->n_bitrates = RATE_COUNT; | 1946 | bg_band->n_bitrates = RATE_COUNT; |
| 1947 | 1947 | ||
| 1948 | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band; | 1948 | wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band; |
| 1949 | } | 1949 | } |
| 1950 | 1950 | ||
| 1951 | wdev->wiphy->cipher_suites = ipw_cipher_suites; | 1951 | wdev->wiphy->cipher_suites = ipw_cipher_suites; |
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index ed0adaf1eec4..dac13cf42e9f 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c | |||
| @@ -11359,7 +11359,7 @@ static int ipw_wdev_init(struct net_device *dev) | |||
| 11359 | if (geo->bg_channels) { | 11359 | if (geo->bg_channels) { |
| 11360 | struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; | 11360 | struct ieee80211_supported_band *bg_band = &priv->ieee->bg_band; |
| 11361 | 11361 | ||
| 11362 | bg_band->band = IEEE80211_BAND_2GHZ; | 11362 | bg_band->band = NL80211_BAND_2GHZ; |
| 11363 | bg_band->n_channels = geo->bg_channels; | 11363 | bg_band->n_channels = geo->bg_channels; |
| 11364 | bg_band->channels = kcalloc(geo->bg_channels, | 11364 | bg_band->channels = kcalloc(geo->bg_channels, |
| 11365 | sizeof(struct ieee80211_channel), | 11365 | sizeof(struct ieee80211_channel), |
| @@ -11370,7 +11370,7 @@ static int ipw_wdev_init(struct net_device *dev) | |||
| 11370 | } | 11370 | } |
| 11371 | /* translate geo->bg to bg_band.channels */ | 11371 | /* translate geo->bg to bg_band.channels */ |
| 11372 | for (i = 0; i < geo->bg_channels; i++) { | 11372 | for (i = 0; i < geo->bg_channels; i++) { |
| 11373 | bg_band->channels[i].band = IEEE80211_BAND_2GHZ; | 11373 | bg_band->channels[i].band = NL80211_BAND_2GHZ; |
| 11374 | bg_band->channels[i].center_freq = geo->bg[i].freq; | 11374 | bg_band->channels[i].center_freq = geo->bg[i].freq; |
| 11375 | bg_band->channels[i].hw_value = geo->bg[i].channel; | 11375 | bg_band->channels[i].hw_value = geo->bg[i].channel; |
| 11376 | bg_band->channels[i].max_power = geo->bg[i].max_power; | 11376 | bg_band->channels[i].max_power = geo->bg[i].max_power; |
| @@ -11391,14 +11391,14 @@ static int ipw_wdev_init(struct net_device *dev) | |||
| 11391 | bg_band->bitrates = ipw2200_bg_rates; | 11391 | bg_band->bitrates = ipw2200_bg_rates; |
| 11392 | bg_band->n_bitrates = ipw2200_num_bg_rates; | 11392 | bg_band->n_bitrates = ipw2200_num_bg_rates; |
| 11393 | 11393 | ||
| 11394 | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = bg_band; | 11394 | wdev->wiphy->bands[NL80211_BAND_2GHZ] = bg_band; |
| 11395 | } | 11395 | } |
| 11396 | 11396 | ||
| 11397 | /* fill-out priv->ieee->a_band */ | 11397 | /* fill-out priv->ieee->a_band */ |
| 11398 | if (geo->a_channels) { | 11398 | if (geo->a_channels) { |
| 11399 | struct ieee80211_supported_band *a_band = &priv->ieee->a_band; | 11399 | struct ieee80211_supported_band *a_band = &priv->ieee->a_band; |
| 11400 | 11400 | ||
| 11401 | a_band->band = IEEE80211_BAND_5GHZ; | 11401 | a_band->band = NL80211_BAND_5GHZ; |
| 11402 | a_band->n_channels = geo->a_channels; | 11402 | a_band->n_channels = geo->a_channels; |
| 11403 | a_band->channels = kcalloc(geo->a_channels, | 11403 | a_band->channels = kcalloc(geo->a_channels, |
| 11404 | sizeof(struct ieee80211_channel), | 11404 | sizeof(struct ieee80211_channel), |
| @@ -11409,7 +11409,7 @@ static int ipw_wdev_init(struct net_device *dev) | |||
| 11409 | } | 11409 | } |
| 11410 | /* translate geo->a to a_band.channels */ | 11410 | /* translate geo->a to a_band.channels */ |
| 11411 | for (i = 0; i < geo->a_channels; i++) { | 11411 | for (i = 0; i < geo->a_channels; i++) { |
| 11412 | a_band->channels[i].band = IEEE80211_BAND_5GHZ; | 11412 | a_band->channels[i].band = NL80211_BAND_5GHZ; |
| 11413 | a_band->channels[i].center_freq = geo->a[i].freq; | 11413 | a_band->channels[i].center_freq = geo->a[i].freq; |
| 11414 | a_band->channels[i].hw_value = geo->a[i].channel; | 11414 | a_band->channels[i].hw_value = geo->a[i].channel; |
| 11415 | a_band->channels[i].max_power = geo->a[i].max_power; | 11415 | a_band->channels[i].max_power = geo->a[i].max_power; |
| @@ -11430,7 +11430,7 @@ static int ipw_wdev_init(struct net_device *dev) | |||
| 11430 | a_band->bitrates = ipw2200_a_rates; | 11430 | a_band->bitrates = ipw2200_a_rates; |
| 11431 | a_band->n_bitrates = ipw2200_num_a_rates; | 11431 | a_band->n_bitrates = ipw2200_num_a_rates; |
| 11432 | 11432 | ||
| 11433 | wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = a_band; | 11433 | wdev->wiphy->bands[NL80211_BAND_5GHZ] = a_band; |
| 11434 | } | 11434 | } |
| 11435 | 11435 | ||
| 11436 | wdev->wiphy->cipher_suites = ipw_cipher_suites; | 11436 | wdev->wiphy->cipher_suites = ipw_cipher_suites; |
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c index af1b3e6839fa..466912eb2d87 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c | |||
| @@ -1547,7 +1547,7 @@ il3945_irq_tasklet(struct il_priv *il) | |||
| 1547 | } | 1547 | } |
| 1548 | 1548 | ||
| 1549 | static int | 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 | u8 is_active, u8 n_probes, | 1551 | u8 is_active, u8 n_probes, |
| 1552 | struct il3945_scan_channel *scan_ch, | 1552 | struct il3945_scan_channel *scan_ch, |
| 1553 | struct ieee80211_vif *vif) | 1553 | struct ieee80211_vif *vif) |
| @@ -1618,7 +1618,7 @@ il3945_get_channels_for_scan(struct il_priv *il, enum ieee80211_band band, | |||
| 1618 | /* scan_pwr_info->tpc.dsp_atten; */ | 1618 | /* scan_pwr_info->tpc.dsp_atten; */ |
| 1619 | 1619 | ||
| 1620 | /*scan_pwr_info->tpc.tx_gain; */ | 1620 | /*scan_pwr_info->tpc.tx_gain; */ |
| 1621 | if (band == IEEE80211_BAND_5GHZ) | 1621 | if (band == NL80211_BAND_5GHZ) |
| 1622 | scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3; | 1622 | scan_ch->tpc.tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 1623 | else { | 1623 | else { |
| 1624 | scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3)); | 1624 | scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3)); |
| @@ -2534,7 +2534,7 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
| 2534 | }; | 2534 | }; |
| 2535 | struct il3945_scan_cmd *scan; | 2535 | struct il3945_scan_cmd *scan; |
| 2536 | u8 n_probes = 0; | 2536 | u8 n_probes = 0; |
| 2537 | enum ieee80211_band band; | 2537 | enum nl80211_band band; |
| 2538 | bool is_active = false; | 2538 | bool is_active = false; |
| 2539 | int ret; | 2539 | int ret; |
| 2540 | u16 len; | 2540 | u16 len; |
| @@ -2615,14 +2615,14 @@ il3945_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
| 2615 | /* flags + rate selection */ | 2615 | /* flags + rate selection */ |
| 2616 | 2616 | ||
| 2617 | switch (il->scan_band) { | 2617 | switch (il->scan_band) { |
| 2618 | case IEEE80211_BAND_2GHZ: | 2618 | case NL80211_BAND_2GHZ: |
| 2619 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; | 2619 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; |
| 2620 | scan->tx_cmd.rate = RATE_1M_PLCP; | 2620 | scan->tx_cmd.rate = RATE_1M_PLCP; |
| 2621 | band = IEEE80211_BAND_2GHZ; | 2621 | band = NL80211_BAND_2GHZ; |
| 2622 | break; | 2622 | break; |
| 2623 | case IEEE80211_BAND_5GHZ: | 2623 | case NL80211_BAND_5GHZ: |
| 2624 | scan->tx_cmd.rate = RATE_6M_PLCP; | 2624 | scan->tx_cmd.rate = RATE_6M_PLCP; |
| 2625 | band = IEEE80211_BAND_5GHZ; | 2625 | band = NL80211_BAND_5GHZ; |
| 2626 | break; | 2626 | break; |
| 2627 | default: | 2627 | default: |
| 2628 | IL_WARN("Invalid scan band\n"); | 2628 | IL_WARN("Invalid scan band\n"); |
| @@ -3507,7 +3507,7 @@ il3945_init_drv(struct il_priv *il) | |||
| 3507 | 3507 | ||
| 3508 | il->ieee_channels = NULL; | 3508 | il->ieee_channels = NULL; |
| 3509 | il->ieee_rates = NULL; | 3509 | il->ieee_rates = NULL; |
| 3510 | il->band = IEEE80211_BAND_2GHZ; | 3510 | il->band = NL80211_BAND_2GHZ; |
| 3511 | 3511 | ||
| 3512 | il->iw_mode = NL80211_IFTYPE_STATION; | 3512 | il->iw_mode = NL80211_IFTYPE_STATION; |
| 3513 | il->missed_beacon_threshold = IL_MISSED_BEACON_THRESHOLD_DEF; | 3513 | il->missed_beacon_threshold = IL_MISSED_BEACON_THRESHOLD_DEF; |
| @@ -3582,13 +3582,13 @@ il3945_setup_mac(struct il_priv *il) | |||
| 3582 | /* Default value; 4 EDCA QOS priorities */ | 3582 | /* Default value; 4 EDCA QOS priorities */ |
| 3583 | hw->queues = 4; | 3583 | hw->queues = 4; |
| 3584 | 3584 | ||
| 3585 | if (il->bands[IEEE80211_BAND_2GHZ].n_channels) | 3585 | if (il->bands[NL80211_BAND_2GHZ].n_channels) |
| 3586 | il->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 3586 | il->hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 3587 | &il->bands[IEEE80211_BAND_2GHZ]; | 3587 | &il->bands[NL80211_BAND_2GHZ]; |
| 3588 | 3588 | ||
| 3589 | if (il->bands[IEEE80211_BAND_5GHZ].n_channels) | 3589 | if (il->bands[NL80211_BAND_5GHZ].n_channels) |
| 3590 | il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 3590 | il->hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 3591 | &il->bands[IEEE80211_BAND_5GHZ]; | 3591 | &il->bands[NL80211_BAND_5GHZ]; |
| 3592 | 3592 | ||
| 3593 | il_leds_init(il); | 3593 | il_leds_init(il); |
| 3594 | 3594 | ||
| @@ -3761,7 +3761,7 @@ il3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 3761 | goto out_release_irq; | 3761 | goto out_release_irq; |
| 3762 | } | 3762 | } |
| 3763 | 3763 | ||
| 3764 | il_set_rxon_channel(il, &il->bands[IEEE80211_BAND_2GHZ].channels[5]); | 3764 | il_set_rxon_channel(il, &il->bands[NL80211_BAND_2GHZ].channels[5]); |
| 3765 | il3945_setup_deferred_work(il); | 3765 | il3945_setup_deferred_work(il); |
| 3766 | il3945_setup_handlers(il); | 3766 | il3945_setup_handlers(il); |
| 3767 | il_power_initialize(il); | 3767 | il_power_initialize(il); |
diff --git a/drivers/net/wireless/intel/iwlegacy/3945-rs.c b/drivers/net/wireless/intel/iwlegacy/3945-rs.c index 76b0729ade17..03ad9b8b55f4 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945-rs.c +++ b/drivers/net/wireless/intel/iwlegacy/3945-rs.c | |||
| @@ -97,7 +97,7 @@ static struct il3945_tpt_entry il3945_tpt_table_g[] = { | |||
| 97 | #define RATE_RETRY_TH 15 | 97 | #define RATE_RETRY_TH 15 |
| 98 | 98 | ||
| 99 | static u8 | 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 | u32 idx = 0; | 102 | u32 idx = 0; |
| 103 | u32 table_size = 0; | 103 | u32 table_size = 0; |
| @@ -107,11 +107,11 @@ il3945_get_rate_idx_by_rssi(s32 rssi, enum ieee80211_band band) | |||
| 107 | rssi = IL_MIN_RSSI_VAL; | 107 | rssi = IL_MIN_RSSI_VAL; |
| 108 | 108 | ||
| 109 | switch (band) { | 109 | switch (band) { |
| 110 | case IEEE80211_BAND_2GHZ: | 110 | case NL80211_BAND_2GHZ: |
| 111 | tpt_table = il3945_tpt_table_g; | 111 | tpt_table = il3945_tpt_table_g; |
| 112 | table_size = ARRAY_SIZE(il3945_tpt_table_g); | 112 | table_size = ARRAY_SIZE(il3945_tpt_table_g); |
| 113 | break; | 113 | break; |
| 114 | case IEEE80211_BAND_5GHZ: | 114 | case NL80211_BAND_5GHZ: |
| 115 | tpt_table = il3945_tpt_table_a; | 115 | tpt_table = il3945_tpt_table_a; |
| 116 | table_size = ARRAY_SIZE(il3945_tpt_table_a); | 116 | table_size = ARRAY_SIZE(il3945_tpt_table_a); |
| 117 | break; | 117 | break; |
| @@ -380,7 +380,7 @@ il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) | |||
| 380 | 380 | ||
| 381 | il->_3945.sta_supp_rates = sta->supp_rates[sband->band]; | 381 | il->_3945.sta_supp_rates = sta->supp_rates[sband->band]; |
| 382 | /* For 5 GHz band it start at IL_FIRST_OFDM_RATE */ | 382 | /* For 5 GHz band it start at IL_FIRST_OFDM_RATE */ |
| 383 | if (sband->band == IEEE80211_BAND_5GHZ) { | 383 | if (sband->band == NL80211_BAND_5GHZ) { |
| 384 | rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; | 384 | rs_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; |
| 385 | il->_3945.sta_supp_rates <<= IL_FIRST_OFDM_RATE; | 385 | il->_3945.sta_supp_rates <<= IL_FIRST_OFDM_RATE; |
| 386 | } | 386 | } |
| @@ -541,7 +541,7 @@ il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband, | |||
| 541 | 541 | ||
| 542 | static u16 | 542 | static u16 |
| 543 | il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask, | 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 | u8 high = RATE_INVALID; | 546 | u8 high = RATE_INVALID; |
| 547 | u8 low = RATE_INVALID; | 547 | u8 low = RATE_INVALID; |
| @@ -549,7 +549,7 @@ il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask, | |||
| 549 | 549 | ||
| 550 | /* 802.11A walks to the next literal adjacent rate in | 550 | /* 802.11A walks to the next literal adjacent rate in |
| 551 | * the rate table */ | 551 | * the rate table */ |
| 552 | if (unlikely(band == IEEE80211_BAND_5GHZ)) { | 552 | if (unlikely(band == NL80211_BAND_5GHZ)) { |
| 553 | int i; | 553 | int i; |
| 554 | u32 mask; | 554 | u32 mask; |
| 555 | 555 | ||
| @@ -657,14 +657,14 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
| 657 | 657 | ||
| 658 | /* get user max rate if set */ | 658 | /* get user max rate if set */ |
| 659 | max_rate_idx = txrc->max_rate_idx; | 659 | max_rate_idx = txrc->max_rate_idx; |
| 660 | if (sband->band == IEEE80211_BAND_5GHZ && max_rate_idx != -1) | 660 | if (sband->band == NL80211_BAND_5GHZ && max_rate_idx != -1) |
| 661 | max_rate_idx += IL_FIRST_OFDM_RATE; | 661 | max_rate_idx += IL_FIRST_OFDM_RATE; |
| 662 | if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT) | 662 | if (max_rate_idx < 0 || max_rate_idx >= RATE_COUNT) |
| 663 | max_rate_idx = -1; | 663 | max_rate_idx = -1; |
| 664 | 664 | ||
| 665 | idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1); | 665 | idx = min(rs_sta->last_txrate_idx & 0xffff, RATE_COUNT_3945 - 1); |
| 666 | 666 | ||
| 667 | if (sband->band == IEEE80211_BAND_5GHZ) | 667 | if (sband->band == NL80211_BAND_5GHZ) |
| 668 | rate_mask = rate_mask << IL_FIRST_OFDM_RATE; | 668 | rate_mask = rate_mask << IL_FIRST_OFDM_RATE; |
| 669 | 669 | ||
| 670 | spin_lock_irqsave(&rs_sta->lock, flags); | 670 | spin_lock_irqsave(&rs_sta->lock, flags); |
| @@ -806,7 +806,7 @@ il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
| 806 | 806 | ||
| 807 | out: | 807 | out: |
| 808 | 808 | ||
| 809 | if (sband->band == IEEE80211_BAND_5GHZ) { | 809 | if (sband->band == NL80211_BAND_5GHZ) { |
| 810 | if (WARN_ON_ONCE(idx < IL_FIRST_OFDM_RATE)) | 810 | if (WARN_ON_ONCE(idx < IL_FIRST_OFDM_RATE)) |
| 811 | idx = IL_FIRST_OFDM_RATE; | 811 | idx = IL_FIRST_OFDM_RATE; |
| 812 | rs_sta->last_txrate_idx = idx; | 812 | rs_sta->last_txrate_idx = idx; |
| @@ -935,7 +935,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
| 935 | 935 | ||
| 936 | rs_sta->tgg = 0; | 936 | rs_sta->tgg = 0; |
| 937 | switch (il->band) { | 937 | switch (il->band) { |
| 938 | case IEEE80211_BAND_2GHZ: | 938 | case NL80211_BAND_2GHZ: |
| 939 | /* TODO: this always does G, not a regression */ | 939 | /* TODO: this always does G, not a regression */ |
| 940 | if (il->active.flags & RXON_FLG_TGG_PROTECT_MSK) { | 940 | if (il->active.flags & RXON_FLG_TGG_PROTECT_MSK) { |
| 941 | rs_sta->tgg = 1; | 941 | rs_sta->tgg = 1; |
| @@ -943,7 +943,7 @@ il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id) | |||
| 943 | } else | 943 | } else |
| 944 | rs_sta->expected_tpt = il3945_expected_tpt_g; | 944 | rs_sta->expected_tpt = il3945_expected_tpt_g; |
| 945 | break; | 945 | break; |
| 946 | case IEEE80211_BAND_5GHZ: | 946 | case NL80211_BAND_5GHZ: |
| 947 | rs_sta->expected_tpt = il3945_expected_tpt_a; | 947 | rs_sta->expected_tpt = il3945_expected_tpt_a; |
| 948 | break; | 948 | break; |
| 949 | default: | 949 | default: |
diff --git a/drivers/net/wireless/intel/iwlegacy/3945.c b/drivers/net/wireless/intel/iwlegacy/3945.c index 93bdf684babe..7bcedbb53d94 100644 --- a/drivers/net/wireless/intel/iwlegacy/3945.c +++ b/drivers/net/wireless/intel/iwlegacy/3945.c | |||
| @@ -255,13 +255,13 @@ il3945_rs_next_rate(struct il_priv *il, int rate) | |||
| 255 | int next_rate = il3945_get_prev_ieee_rate(rate); | 255 | int next_rate = il3945_get_prev_ieee_rate(rate); |
| 256 | 256 | ||
| 257 | switch (il->band) { | 257 | switch (il->band) { |
| 258 | case IEEE80211_BAND_5GHZ: | 258 | case NL80211_BAND_5GHZ: |
| 259 | if (rate == RATE_12M_IDX) | 259 | if (rate == RATE_12M_IDX) |
| 260 | next_rate = RATE_9M_IDX; | 260 | next_rate = RATE_9M_IDX; |
| 261 | else if (rate == RATE_6M_IDX) | 261 | else if (rate == RATE_6M_IDX) |
| 262 | next_rate = RATE_6M_IDX; | 262 | next_rate = RATE_6M_IDX; |
| 263 | break; | 263 | break; |
| 264 | case IEEE80211_BAND_2GHZ: | 264 | case NL80211_BAND_2GHZ: |
| 265 | if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) && | 265 | if (!(il->_3945.sta_supp_rates & IL_OFDM_RATES_MASK) && |
| 266 | il_is_associated(il)) { | 266 | il_is_associated(il)) { |
| 267 | if (rate == RATE_11M_IDX) | 267 | if (rate == RATE_11M_IDX) |
| @@ -349,7 +349,7 @@ il3945_hdl_tx(struct il_priv *il, struct il_rx_buf *rxb) | |||
| 349 | 349 | ||
| 350 | /* Fill the MRR chain with some info about on-chip retransmissions */ | 350 | /* Fill the MRR chain with some info about on-chip retransmissions */ |
| 351 | rate_idx = il3945_hwrate_to_plcp_idx(tx_resp->rate); | 351 | rate_idx = il3945_hwrate_to_plcp_idx(tx_resp->rate); |
| 352 | if (info->band == IEEE80211_BAND_5GHZ) | 352 | if (info->band == NL80211_BAND_5GHZ) |
| 353 | rate_idx -= IL_FIRST_OFDM_RATE; | 353 | rate_idx -= IL_FIRST_OFDM_RATE; |
| 354 | 354 | ||
| 355 | fail = tx_resp->failure_frame; | 355 | fail = tx_resp->failure_frame; |
| @@ -554,14 +554,14 @@ il3945_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) | |||
| 554 | rx_status.mactime = le64_to_cpu(rx_end->timestamp); | 554 | rx_status.mactime = le64_to_cpu(rx_end->timestamp); |
| 555 | rx_status.band = | 555 | rx_status.band = |
| 556 | (rx_hdr-> | 556 | (rx_hdr-> |
| 557 | phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? IEEE80211_BAND_2GHZ : | 557 | phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? NL80211_BAND_2GHZ : |
| 558 | IEEE80211_BAND_5GHZ; | 558 | NL80211_BAND_5GHZ; |
| 559 | rx_status.freq = | 559 | rx_status.freq = |
| 560 | ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel), | 560 | ieee80211_channel_to_frequency(le16_to_cpu(rx_hdr->channel), |
| 561 | rx_status.band); | 561 | rx_status.band); |
| 562 | 562 | ||
| 563 | rx_status.rate_idx = il3945_hwrate_to_plcp_idx(rx_hdr->rate); | 563 | rx_status.rate_idx = il3945_hwrate_to_plcp_idx(rx_hdr->rate); |
| 564 | if (rx_status.band == IEEE80211_BAND_5GHZ) | 564 | if (rx_status.band == NL80211_BAND_5GHZ) |
| 565 | rx_status.rate_idx -= IL_FIRST_OFDM_RATE; | 565 | rx_status.rate_idx -= IL_FIRST_OFDM_RATE; |
| 566 | 566 | ||
| 567 | rx_status.antenna = | 567 | rx_status.antenna = |
| @@ -1409,7 +1409,7 @@ il3945_send_tx_power(struct il_priv *il) | |||
| 1409 | 1409 | ||
| 1410 | chan = le16_to_cpu(il->active.channel); | 1410 | chan = le16_to_cpu(il->active.channel); |
| 1411 | 1411 | ||
| 1412 | txpower.band = (il->band == IEEE80211_BAND_5GHZ) ? 0 : 1; | 1412 | txpower.band = (il->band == NL80211_BAND_5GHZ) ? 0 : 1; |
| 1413 | ch_info = il_get_channel_info(il, il->band, chan); | 1413 | ch_info = il_get_channel_info(il, il->band, chan); |
| 1414 | if (!ch_info) { | 1414 | if (!ch_info) { |
| 1415 | IL_ERR("Failed to get channel info for channel %d [%d]\n", chan, | 1415 | IL_ERR("Failed to get channel info for channel %d [%d]\n", chan, |
| @@ -2310,7 +2310,7 @@ il3945_manage_ibss_station(struct il_priv *il, struct ieee80211_vif *vif, | |||
| 2310 | 2310 | ||
| 2311 | il3945_sync_sta(il, vif_priv->ibss_bssid_sta_id, | 2311 | il3945_sync_sta(il, vif_priv->ibss_bssid_sta_id, |
| 2312 | (il->band == | 2312 | (il->band == |
| 2313 | IEEE80211_BAND_5GHZ) ? RATE_6M_PLCP : | 2313 | NL80211_BAND_5GHZ) ? RATE_6M_PLCP : |
| 2314 | RATE_1M_PLCP); | 2314 | RATE_1M_PLCP); |
| 2315 | il3945_rate_scale_init(il->hw, vif_priv->ibss_bssid_sta_id); | 2315 | il3945_rate_scale_init(il->hw, vif_priv->ibss_bssid_sta_id); |
| 2316 | 2316 | ||
| @@ -2343,7 +2343,7 @@ il3945_init_hw_rate_table(struct il_priv *il) | |||
| 2343 | } | 2343 | } |
| 2344 | 2344 | ||
| 2345 | switch (il->band) { | 2345 | switch (il->band) { |
| 2346 | case IEEE80211_BAND_5GHZ: | 2346 | case NL80211_BAND_5GHZ: |
| 2347 | D_RATE("Select A mode rate scale\n"); | 2347 | D_RATE("Select A mode rate scale\n"); |
| 2348 | /* If one of the following CCK rates is used, | 2348 | /* If one of the following CCK rates is used, |
| 2349 | * have it fall back to the 6M OFDM rate */ | 2349 | * have it fall back to the 6M OFDM rate */ |
| @@ -2359,7 +2359,7 @@ il3945_init_hw_rate_table(struct il_priv *il) | |||
| 2359 | il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx; | 2359 | il3945_rates[IL_FIRST_OFDM_RATE].table_rs_idx; |
| 2360 | break; | 2360 | break; |
| 2361 | 2361 | ||
| 2362 | case IEEE80211_BAND_2GHZ: | 2362 | case NL80211_BAND_2GHZ: |
| 2363 | D_RATE("Select B/G mode rate scale\n"); | 2363 | D_RATE("Select B/G mode rate scale\n"); |
| 2364 | /* If an OFDM rate is used, have it fall back to the | 2364 | /* If an OFDM rate is used, have it fall back to the |
| 2365 | * 1M CCK rates */ | 2365 | * 1M CCK rates */ |
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c index f9ed48070e17..a91d170a614b 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c | |||
| @@ -457,7 +457,7 @@ il4965_rxq_stop(struct il_priv *il) | |||
| 457 | } | 457 | } |
| 458 | 458 | ||
| 459 | int | 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 | int idx = 0; | 462 | int idx = 0; |
| 463 | int band_offset = 0; | 463 | int band_offset = 0; |
| @@ -468,7 +468,7 @@ il4965_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) | |||
| 468 | return idx; | 468 | return idx; |
| 469 | /* Legacy rate format, search for match in table */ | 469 | /* Legacy rate format, search for match in table */ |
| 470 | } else { | 470 | } else { |
| 471 | if (band == IEEE80211_BAND_5GHZ) | 471 | if (band == NL80211_BAND_5GHZ) |
| 472 | band_offset = IL_FIRST_OFDM_RATE; | 472 | band_offset = IL_FIRST_OFDM_RATE; |
| 473 | for (idx = band_offset; idx < RATE_COUNT_LEGACY; idx++) | 473 | for (idx = band_offset; idx < RATE_COUNT_LEGACY; idx++) |
| 474 | if (il_rates[idx].plcp == (rate_n_flags & 0xFF)) | 474 | if (il_rates[idx].plcp == (rate_n_flags & 0xFF)) |
| @@ -688,8 +688,8 @@ il4965_hdl_rx(struct il_priv *il, struct il_rx_buf *rxb) | |||
| 688 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); | 688 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); |
| 689 | rx_status.band = | 689 | rx_status.band = |
| 690 | (phy_res-> | 690 | (phy_res-> |
| 691 | phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? IEEE80211_BAND_2GHZ : | 691 | phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? NL80211_BAND_2GHZ : |
| 692 | IEEE80211_BAND_5GHZ; | 692 | NL80211_BAND_5GHZ; |
| 693 | rx_status.freq = | 693 | rx_status.freq = |
| 694 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), | 694 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), |
| 695 | rx_status.band); | 695 | rx_status.band); |
| @@ -766,7 +766,7 @@ il4965_hdl_rx_phy(struct il_priv *il, struct il_rx_buf *rxb) | |||
| 766 | 766 | ||
| 767 | static int | 767 | static int |
| 768 | il4965_get_channels_for_scan(struct il_priv *il, struct ieee80211_vif *vif, | 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 | u8 n_probes, struct il_scan_channel *scan_ch) | 770 | u8 n_probes, struct il_scan_channel *scan_ch) |
| 771 | { | 771 | { |
| 772 | struct ieee80211_channel *chan; | 772 | struct ieee80211_channel *chan; |
| @@ -822,7 +822,7 @@ il4965_get_channels_for_scan(struct il_priv *il, struct ieee80211_vif *vif, | |||
| 822 | * power level: | 822 | * power level: |
| 823 | * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; | 823 | * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; |
| 824 | */ | 824 | */ |
| 825 | if (band == IEEE80211_BAND_5GHZ) | 825 | if (band == NL80211_BAND_5GHZ) |
| 826 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; | 826 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 827 | else | 827 | else |
| 828 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); | 828 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); |
| @@ -870,7 +870,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
| 870 | u32 rate_flags = 0; | 870 | u32 rate_flags = 0; |
| 871 | u16 cmd_len; | 871 | u16 cmd_len; |
| 872 | u16 rx_chain = 0; | 872 | u16 rx_chain = 0; |
| 873 | enum ieee80211_band band; | 873 | enum nl80211_band band; |
| 874 | u8 n_probes = 0; | 874 | u8 n_probes = 0; |
| 875 | u8 rx_ant = il->hw_params.valid_rx_ant; | 875 | u8 rx_ant = il->hw_params.valid_rx_ant; |
| 876 | u8 rate; | 876 | u8 rate; |
| @@ -944,7 +944,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
| 944 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; | 944 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
| 945 | 945 | ||
| 946 | switch (il->scan_band) { | 946 | switch (il->scan_band) { |
| 947 | case IEEE80211_BAND_2GHZ: | 947 | case NL80211_BAND_2GHZ: |
| 948 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; | 948 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; |
| 949 | chan_mod = | 949 | chan_mod = |
| 950 | le32_to_cpu(il->active.flags & RXON_FLG_CHANNEL_MODE_MSK) >> | 950 | le32_to_cpu(il->active.flags & RXON_FLG_CHANNEL_MODE_MSK) >> |
| @@ -956,7 +956,7 @@ il4965_request_scan(struct il_priv *il, struct ieee80211_vif *vif) | |||
| 956 | rate_flags = RATE_MCS_CCK_MSK; | 956 | rate_flags = RATE_MCS_CCK_MSK; |
| 957 | } | 957 | } |
| 958 | break; | 958 | break; |
| 959 | case IEEE80211_BAND_5GHZ: | 959 | case NL80211_BAND_5GHZ: |
| 960 | rate = RATE_6M_PLCP; | 960 | rate = RATE_6M_PLCP; |
| 961 | break; | 961 | break; |
| 962 | default: | 962 | default: |
| @@ -1590,7 +1590,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, | |||
| 1590 | || rate_idx > RATE_COUNT_LEGACY) | 1590 | || rate_idx > RATE_COUNT_LEGACY) |
| 1591 | rate_idx = rate_lowest_index(&il->bands[info->band], sta); | 1591 | rate_idx = rate_lowest_index(&il->bands[info->band], sta); |
| 1592 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ | 1592 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
| 1593 | if (info->band == IEEE80211_BAND_5GHZ) | 1593 | if (info->band == NL80211_BAND_5GHZ) |
| 1594 | rate_idx += IL_FIRST_OFDM_RATE; | 1594 | rate_idx += IL_FIRST_OFDM_RATE; |
| 1595 | /* Get PLCP rate for tx_cmd->rate_n_flags */ | 1595 | /* Get PLCP rate for tx_cmd->rate_n_flags */ |
| 1596 | rate_plcp = il_rates[rate_idx].plcp; | 1596 | rate_plcp = il_rates[rate_idx].plcp; |
| @@ -3051,7 +3051,7 @@ il4965_sta_alloc_lq(struct il_priv *il, u8 sta_id) | |||
| 3051 | } | 3051 | } |
| 3052 | /* Set up the rate scaling to start at selected rate, fall back | 3052 | /* Set up the rate scaling to start at selected rate, fall back |
| 3053 | * all the way down to 1M in IEEE order, and then spin on 1M */ | 3053 | * all the way down to 1M in IEEE order, and then spin on 1M */ |
| 3054 | if (il->band == IEEE80211_BAND_5GHZ) | 3054 | if (il->band == NL80211_BAND_5GHZ) |
| 3055 | r = RATE_6M_IDX; | 3055 | r = RATE_6M_IDX; |
| 3056 | else | 3056 | else |
| 3057 | r = RATE_1M_IDX; | 3057 | r = RATE_1M_IDX; |
| @@ -5790,12 +5790,12 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length) | |||
| 5790 | 5790 | ||
| 5791 | hw->max_listen_interval = IL_CONN_MAX_LISTEN_INTERVAL; | 5791 | hw->max_listen_interval = IL_CONN_MAX_LISTEN_INTERVAL; |
| 5792 | 5792 | ||
| 5793 | if (il->bands[IEEE80211_BAND_2GHZ].n_channels) | 5793 | if (il->bands[NL80211_BAND_2GHZ].n_channels) |
| 5794 | il->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 5794 | il->hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 5795 | &il->bands[IEEE80211_BAND_2GHZ]; | 5795 | &il->bands[NL80211_BAND_2GHZ]; |
| 5796 | if (il->bands[IEEE80211_BAND_5GHZ].n_channels) | 5796 | if (il->bands[NL80211_BAND_5GHZ].n_channels) |
| 5797 | il->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 5797 | il->hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 5798 | &il->bands[IEEE80211_BAND_5GHZ]; | 5798 | &il->bands[NL80211_BAND_5GHZ]; |
| 5799 | 5799 | ||
| 5800 | il_leds_init(il); | 5800 | il_leds_init(il); |
| 5801 | 5801 | ||
| @@ -6368,7 +6368,7 @@ il4965_init_drv(struct il_priv *il) | |||
| 6368 | 6368 | ||
| 6369 | il->ieee_channels = NULL; | 6369 | il->ieee_channels = NULL; |
| 6370 | il->ieee_rates = NULL; | 6370 | il->ieee_rates = NULL; |
| 6371 | il->band = IEEE80211_BAND_2GHZ; | 6371 | il->band = NL80211_BAND_2GHZ; |
| 6372 | 6372 | ||
| 6373 | il->iw_mode = NL80211_IFTYPE_STATION; | 6373 | il->iw_mode = NL80211_IFTYPE_STATION; |
| 6374 | il->current_ht_config.smps = IEEE80211_SMPS_STATIC; | 6374 | il->current_ht_config.smps = IEEE80211_SMPS_STATIC; |
| @@ -6480,7 +6480,7 @@ il4965_set_hw_params(struct il_priv *il) | |||
| 6480 | il->hw_params.max_data_size = IL49_RTC_DATA_SIZE; | 6480 | il->hw_params.max_data_size = IL49_RTC_DATA_SIZE; |
| 6481 | il->hw_params.max_inst_size = IL49_RTC_INST_SIZE; | 6481 | il->hw_params.max_inst_size = IL49_RTC_INST_SIZE; |
| 6482 | il->hw_params.max_bsm_size = BSM_SRAM_SIZE; | 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 | il->hw_params.rx_wrt_ptr_reg = FH49_RSCSR_CHNL0_WPTR; | 6485 | il->hw_params.rx_wrt_ptr_reg = FH49_RSCSR_CHNL0_WPTR; |
| 6486 | 6486 | ||
diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c index bac60b2bc3f0..a867ae7f4095 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c +++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c | |||
| @@ -549,7 +549,7 @@ il4965_rate_n_flags_from_tbl(struct il_priv *il, struct il_scale_tbl_info *tbl, | |||
| 549 | */ | 549 | */ |
| 550 | static int | 550 | static int |
| 551 | il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, | 551 | il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, |
| 552 | enum ieee80211_band band, | 552 | enum nl80211_band band, |
| 553 | struct il_scale_tbl_info *tbl, int *rate_idx) | 553 | struct il_scale_tbl_info *tbl, int *rate_idx) |
| 554 | { | 554 | { |
| 555 | u32 ant_msk = (rate_n_flags & RATE_MCS_ANT_ABC_MSK); | 555 | u32 ant_msk = (rate_n_flags & RATE_MCS_ANT_ABC_MSK); |
| @@ -574,7 +574,7 @@ il4965_rs_get_tbl_info_from_mcs(const u32 rate_n_flags, | |||
| 574 | /* legacy rate format */ | 574 | /* legacy rate format */ |
| 575 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { | 575 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { |
| 576 | if (il4965_num_of_ant == 1) { | 576 | if (il4965_num_of_ant == 1) { |
| 577 | if (band == IEEE80211_BAND_5GHZ) | 577 | if (band == NL80211_BAND_5GHZ) |
| 578 | tbl->lq_type = LQ_A; | 578 | tbl->lq_type = LQ_A; |
| 579 | else | 579 | else |
| 580 | tbl->lq_type = LQ_G; | 580 | tbl->lq_type = LQ_G; |
| @@ -743,7 +743,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, | |||
| 743 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) { | 743 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_idx)) { |
| 744 | switch_to_legacy = 1; | 744 | switch_to_legacy = 1; |
| 745 | scale_idx = rs_ht_to_legacy[scale_idx]; | 745 | scale_idx = rs_ht_to_legacy[scale_idx]; |
| 746 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 746 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 747 | tbl->lq_type = LQ_A; | 747 | tbl->lq_type = LQ_A; |
| 748 | else | 748 | else |
| 749 | tbl->lq_type = LQ_G; | 749 | tbl->lq_type = LQ_G; |
| @@ -762,7 +762,7 @@ il4965_rs_get_lower_rate(struct il_lq_sta *lq_sta, | |||
| 762 | /* Mask with station rate restriction */ | 762 | /* Mask with station rate restriction */ |
| 763 | if (is_legacy(tbl->lq_type)) { | 763 | if (is_legacy(tbl->lq_type)) { |
| 764 | /* supp_rates has no CCK bits in A mode */ | 764 | /* supp_rates has no CCK bits in A mode */ |
| 765 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 765 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 766 | rate_mask = | 766 | rate_mask = |
| 767 | (u16) (rate_mask & | 767 | (u16) (rate_mask & |
| 768 | (lq_sta->supp_rates << IL_FIRST_OFDM_RATE)); | 768 | (lq_sta->supp_rates << IL_FIRST_OFDM_RATE)); |
| @@ -851,7 +851,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, | |||
| 851 | table = &lq_sta->lq; | 851 | table = &lq_sta->lq; |
| 852 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); | 852 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); |
| 853 | il4965_rs_get_tbl_info_from_mcs(tx_rate, il->band, &tbl_type, &rs_idx); | 853 | il4965_rs_get_tbl_info_from_mcs(tx_rate, il->band, &tbl_type, &rs_idx); |
| 854 | if (il->band == IEEE80211_BAND_5GHZ) | 854 | if (il->band == NL80211_BAND_5GHZ) |
| 855 | rs_idx -= IL_FIRST_OFDM_RATE; | 855 | rs_idx -= IL_FIRST_OFDM_RATE; |
| 856 | mac_flags = info->status.rates[0].flags; | 856 | mac_flags = info->status.rates[0].flags; |
| 857 | mac_idx = info->status.rates[0].idx; | 857 | mac_idx = info->status.rates[0].idx; |
| @@ -864,7 +864,7 @@ il4965_rs_tx_status(void *il_r, struct ieee80211_supported_band *sband, | |||
| 864 | * mac80211 HT idx is always zero-idxed; we need to move | 864 | * mac80211 HT idx is always zero-idxed; we need to move |
| 865 | * HT OFDM rates after CCK rates in 2.4 GHz band | 865 | * HT OFDM rates after CCK rates in 2.4 GHz band |
| 866 | */ | 866 | */ |
| 867 | if (il->band == IEEE80211_BAND_2GHZ) | 867 | if (il->band == NL80211_BAND_2GHZ) |
| 868 | mac_idx += IL_FIRST_OFDM_RATE; | 868 | mac_idx += IL_FIRST_OFDM_RATE; |
| 869 | } | 869 | } |
| 870 | /* Here we actually compare this rate to the latest LQ command */ | 870 | /* Here we actually compare this rate to the latest LQ command */ |
| @@ -1816,7 +1816,7 @@ il4965_rs_rate_scale_perform(struct il_priv *il, struct sk_buff *skb, | |||
| 1816 | 1816 | ||
| 1817 | /* mask with station rate restriction */ | 1817 | /* mask with station rate restriction */ |
| 1818 | if (is_legacy(tbl->lq_type)) { | 1818 | if (is_legacy(tbl->lq_type)) { |
| 1819 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 1819 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 1820 | /* supp_rates has no CCK bits in A mode */ | 1820 | /* supp_rates has no CCK bits in A mode */ |
| 1821 | rate_scale_idx_msk = | 1821 | rate_scale_idx_msk = |
| 1822 | (u16) (rate_mask & | 1822 | (u16) (rate_mask & |
| @@ -2212,7 +2212,7 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
| 2212 | /* Get max rate if user set max rate */ | 2212 | /* Get max rate if user set max rate */ |
| 2213 | if (lq_sta) { | 2213 | if (lq_sta) { |
| 2214 | lq_sta->max_rate_idx = txrc->max_rate_idx; | 2214 | lq_sta->max_rate_idx = txrc->max_rate_idx; |
| 2215 | if (sband->band == IEEE80211_BAND_5GHZ && | 2215 | if (sband->band == NL80211_BAND_5GHZ && |
| 2216 | lq_sta->max_rate_idx != -1) | 2216 | lq_sta->max_rate_idx != -1) |
| 2217 | lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; | 2217 | lq_sta->max_rate_idx += IL_FIRST_OFDM_RATE; |
| 2218 | if (lq_sta->max_rate_idx < 0 || | 2218 | if (lq_sta->max_rate_idx < 0 || |
| @@ -2258,11 +2258,11 @@ il4965_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta, | |||
| 2258 | } else { | 2258 | } else { |
| 2259 | /* Check for invalid rates */ | 2259 | /* Check for invalid rates */ |
| 2260 | if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY || | 2260 | if (rate_idx < 0 || rate_idx >= RATE_COUNT_LEGACY || |
| 2261 | (sband->band == IEEE80211_BAND_5GHZ && | 2261 | (sband->band == NL80211_BAND_5GHZ && |
| 2262 | rate_idx < IL_FIRST_OFDM_RATE)) | 2262 | rate_idx < IL_FIRST_OFDM_RATE)) |
| 2263 | rate_idx = rate_lowest_index(sband, sta); | 2263 | rate_idx = rate_lowest_index(sband, sta); |
| 2264 | /* On valid 5 GHz rate, adjust idx */ | 2264 | /* On valid 5 GHz rate, adjust idx */ |
| 2265 | else if (sband->band == IEEE80211_BAND_5GHZ) | 2265 | else if (sband->band == NL80211_BAND_5GHZ) |
| 2266 | rate_idx -= IL_FIRST_OFDM_RATE; | 2266 | rate_idx -= IL_FIRST_OFDM_RATE; |
| 2267 | info->control.rates[0].flags = 0; | 2267 | info->control.rates[0].flags = 0; |
| 2268 | } | 2268 | } |
| @@ -2362,7 +2362,7 @@ il4965_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id) | |||
| 2362 | 2362 | ||
| 2363 | /* Set last_txrate_idx to lowest rate */ | 2363 | /* Set last_txrate_idx to lowest rate */ |
| 2364 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); | 2364 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); |
| 2365 | if (sband->band == IEEE80211_BAND_5GHZ) | 2365 | if (sband->band == NL80211_BAND_5GHZ) |
| 2366 | lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; | 2366 | lq_sta->last_txrate_idx += IL_FIRST_OFDM_RATE; |
| 2367 | lq_sta->is_agg = 0; | 2367 | lq_sta->is_agg = 0; |
| 2368 | 2368 | ||
diff --git a/drivers/net/wireless/intel/iwlegacy/4965.c b/drivers/net/wireless/intel/iwlegacy/4965.c index fe47db9c20cd..c3c638ed0ed7 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965.c +++ b/drivers/net/wireless/intel/iwlegacy/4965.c | |||
| @@ -1267,7 +1267,7 @@ il4965_send_tx_power(struct il_priv *il) | |||
| 1267 | "TX Power requested while scanning!\n")) | 1267 | "TX Power requested while scanning!\n")) |
| 1268 | return -EAGAIN; | 1268 | return -EAGAIN; |
| 1269 | 1269 | ||
| 1270 | band = il->band == IEEE80211_BAND_2GHZ; | 1270 | band = il->band == NL80211_BAND_2GHZ; |
| 1271 | 1271 | ||
| 1272 | is_ht40 = iw4965_is_ht40_channel(il->active.flags); | 1272 | is_ht40 = iw4965_is_ht40_channel(il->active.flags); |
| 1273 | 1273 | ||
| @@ -1480,7 +1480,7 @@ il4965_hw_channel_switch(struct il_priv *il, | |||
| 1480 | u8 switch_count; | 1480 | u8 switch_count; |
| 1481 | u16 beacon_interval = le16_to_cpu(il->timing.beacon_interval); | 1481 | u16 beacon_interval = le16_to_cpu(il->timing.beacon_interval); |
| 1482 | struct ieee80211_vif *vif = il->vif; | 1482 | struct ieee80211_vif *vif = il->vif; |
| 1483 | band = (il->band == IEEE80211_BAND_2GHZ); | 1483 | band = (il->band == NL80211_BAND_2GHZ); |
| 1484 | 1484 | ||
| 1485 | if (WARN_ON_ONCE(vif == NULL)) | 1485 | if (WARN_ON_ONCE(vif == NULL)) |
| 1486 | return -EIO; | 1486 | return -EIO; |
| @@ -1918,7 +1918,7 @@ struct il_cfg il4965_cfg = { | |||
| 1918 | * Force use of chains B and C for scan RX on 5 GHz band | 1918 | * Force use of chains B and C for scan RX on 5 GHz band |
| 1919 | * because the device has off-channel reception on chain A. | 1919 | * because the device has off-channel reception on chain A. |
| 1920 | */ | 1920 | */ |
| 1921 | .scan_rx_antennas[IEEE80211_BAND_5GHZ] = ANT_BC, | 1921 | .scan_rx_antennas[NL80211_BAND_5GHZ] = ANT_BC, |
| 1922 | 1922 | ||
| 1923 | .eeprom_size = IL4965_EEPROM_IMG_SIZE, | 1923 | .eeprom_size = IL4965_EEPROM_IMG_SIZE, |
| 1924 | .num_of_queues = IL49_NUM_QUEUES, | 1924 | .num_of_queues = IL49_NUM_QUEUES, |
diff --git a/drivers/net/wireless/intel/iwlegacy/4965.h b/drivers/net/wireless/intel/iwlegacy/4965.h index e432715e02d8..527e8b531aed 100644 --- a/drivers/net/wireless/intel/iwlegacy/4965.h +++ b/drivers/net/wireless/intel/iwlegacy/4965.h | |||
| @@ -68,7 +68,7 @@ void il4965_rx_replenish(struct il_priv *il); | |||
| 68 | void il4965_rx_replenish_now(struct il_priv *il); | 68 | void il4965_rx_replenish_now(struct il_priv *il); |
| 69 | void il4965_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq); | 69 | void il4965_rx_queue_free(struct il_priv *il, struct il_rx_queue *rxq); |
| 70 | int il4965_rxq_stop(struct il_priv *il); | 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 | void il4965_rx_handle(struct il_priv *il); | 72 | void il4965_rx_handle(struct il_priv *il); |
| 73 | 73 | ||
| 74 | /* tx */ | 74 | /* tx */ |
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c index 2cc3d42bbab7..eb24b9241bb2 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.c +++ b/drivers/net/wireless/intel/iwlegacy/common.c | |||
| @@ -860,7 +860,7 @@ il_init_band_reference(const struct il_priv *il, int eep_band, | |||
| 860 | * Does not set up a command, or touch hardware. | 860 | * Does not set up a command, or touch hardware. |
| 861 | */ | 861 | */ |
| 862 | static int | 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 | const struct il_eeprom_channel *eeprom_ch, | 864 | const struct il_eeprom_channel *eeprom_ch, |
| 865 | u8 clear_ht40_extension_channel) | 865 | u8 clear_ht40_extension_channel) |
| 866 | { | 866 | { |
| @@ -945,7 +945,7 @@ il_init_channel_map(struct il_priv *il) | |||
| 945 | ch_info->channel = eeprom_ch_idx[ch]; | 945 | ch_info->channel = eeprom_ch_idx[ch]; |
| 946 | ch_info->band = | 946 | ch_info->band = |
| 947 | (band == | 947 | (band == |
| 948 | 1) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 948 | 1) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
| 949 | 949 | ||
| 950 | /* permanently store EEPROM's channel regulatory flags | 950 | /* permanently store EEPROM's channel regulatory flags |
| 951 | * and max power in channel info database. */ | 951 | * and max power in channel info database. */ |
| @@ -1003,14 +1003,14 @@ il_init_channel_map(struct il_priv *il) | |||
| 1003 | 1003 | ||
| 1004 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ | 1004 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ |
| 1005 | for (band = 6; band <= 7; band++) { | 1005 | for (band = 6; band <= 7; band++) { |
| 1006 | enum ieee80211_band ieeeband; | 1006 | enum nl80211_band ieeeband; |
| 1007 | 1007 | ||
| 1008 | il_init_band_reference(il, band, &eeprom_ch_count, | 1008 | il_init_band_reference(il, band, &eeprom_ch_count, |
| 1009 | &eeprom_ch_info, &eeprom_ch_idx); | 1009 | &eeprom_ch_info, &eeprom_ch_idx); |
| 1010 | 1010 | ||
| 1011 | /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ | 1011 | /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ |
| 1012 | ieeeband = | 1012 | ieeeband = |
| 1013 | (band == 6) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 1013 | (band == 6) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
| 1014 | 1014 | ||
| 1015 | /* Loop through each band adding each of the channels */ | 1015 | /* Loop through each band adding each of the channels */ |
| 1016 | for (ch = 0; ch < eeprom_ch_count; ch++) { | 1016 | for (ch = 0; ch < eeprom_ch_count; ch++) { |
| @@ -1048,19 +1048,19 @@ EXPORT_SYMBOL(il_free_channel_map); | |||
| 1048 | * Based on band and channel number. | 1048 | * Based on band and channel number. |
| 1049 | */ | 1049 | */ |
| 1050 | const struct il_channel_info * | 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 | u16 channel) | 1052 | u16 channel) |
| 1053 | { | 1053 | { |
| 1054 | int i; | 1054 | int i; |
| 1055 | 1055 | ||
| 1056 | switch (band) { | 1056 | switch (band) { |
| 1057 | case IEEE80211_BAND_5GHZ: | 1057 | case NL80211_BAND_5GHZ: |
| 1058 | for (i = 14; i < il->channel_count; i++) { | 1058 | for (i = 14; i < il->channel_count; i++) { |
| 1059 | if (il->channel_info[i].channel == channel) | 1059 | if (il->channel_info[i].channel == channel) |
| 1060 | return &il->channel_info[i]; | 1060 | return &il->channel_info[i]; |
| 1061 | } | 1061 | } |
| 1062 | break; | 1062 | break; |
| 1063 | case IEEE80211_BAND_2GHZ: | 1063 | case NL80211_BAND_2GHZ: |
| 1064 | if (channel >= 1 && channel <= 14) | 1064 | if (channel >= 1 && channel <= 14) |
| 1065 | return &il->channel_info[channel - 1]; | 1065 | return &il->channel_info[channel - 1]; |
| 1066 | break; | 1066 | break; |
| @@ -1457,7 +1457,7 @@ il_hdl_scan_complete(struct il_priv *il, struct il_rx_buf *rxb) | |||
| 1457 | clear_bit(S_SCAN_HW, &il->status); | 1457 | clear_bit(S_SCAN_HW, &il->status); |
| 1458 | 1458 | ||
| 1459 | D_SCAN("Scan on %sGHz took %dms\n", | 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 | jiffies_to_msecs(jiffies - il->scan_start)); | 1461 | jiffies_to_msecs(jiffies - il->scan_start)); |
| 1462 | 1462 | ||
| 1463 | queue_work(il->workqueue, &il->scan_completed); | 1463 | queue_work(il->workqueue, &il->scan_completed); |
| @@ -1475,10 +1475,10 @@ il_setup_rx_scan_handlers(struct il_priv *il) | |||
| 1475 | EXPORT_SYMBOL(il_setup_rx_scan_handlers); | 1475 | EXPORT_SYMBOL(il_setup_rx_scan_handlers); |
| 1476 | 1476 | ||
| 1477 | u16 | 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 | u8 n_probes) | 1479 | u8 n_probes) |
| 1480 | { | 1480 | { |
| 1481 | if (band == IEEE80211_BAND_5GHZ) | 1481 | if (band == NL80211_BAND_5GHZ) |
| 1482 | return IL_ACTIVE_DWELL_TIME_52 + | 1482 | return IL_ACTIVE_DWELL_TIME_52 + |
| 1483 | IL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); | 1483 | IL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); |
| 1484 | else | 1484 | else |
| @@ -1488,14 +1488,14 @@ il_get_active_dwell_time(struct il_priv *il, enum ieee80211_band band, | |||
| 1488 | EXPORT_SYMBOL(il_get_active_dwell_time); | 1488 | EXPORT_SYMBOL(il_get_active_dwell_time); |
| 1489 | 1489 | ||
| 1490 | u16 | 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 | struct ieee80211_vif *vif) | 1492 | struct ieee80211_vif *vif) |
| 1493 | { | 1493 | { |
| 1494 | u16 value; | 1494 | u16 value; |
| 1495 | 1495 | ||
| 1496 | u16 passive = | 1496 | u16 passive = |
| 1497 | (band == | 1497 | (band == |
| 1498 | IEEE80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE + | 1498 | NL80211_BAND_2GHZ) ? IL_PASSIVE_DWELL_BASE + |
| 1499 | IL_PASSIVE_DWELL_TIME_24 : IL_PASSIVE_DWELL_BASE + | 1499 | IL_PASSIVE_DWELL_TIME_24 : IL_PASSIVE_DWELL_BASE + |
| 1500 | IL_PASSIVE_DWELL_TIME_52; | 1500 | IL_PASSIVE_DWELL_TIME_52; |
| 1501 | 1501 | ||
| @@ -1520,10 +1520,10 @@ void | |||
| 1520 | il_init_scan_params(struct il_priv *il) | 1520 | il_init_scan_params(struct il_priv *il) |
| 1521 | { | 1521 | { |
| 1522 | u8 ant_idx = fls(il->hw_params.valid_tx_ant) - 1; | 1522 | u8 ant_idx = fls(il->hw_params.valid_tx_ant) - 1; |
| 1523 | if (!il->scan_tx_ant[IEEE80211_BAND_5GHZ]) | 1523 | if (!il->scan_tx_ant[NL80211_BAND_5GHZ]) |
| 1524 | il->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx; | 1524 | il->scan_tx_ant[NL80211_BAND_5GHZ] = ant_idx; |
| 1525 | if (!il->scan_tx_ant[IEEE80211_BAND_2GHZ]) | 1525 | if (!il->scan_tx_ant[NL80211_BAND_2GHZ]) |
| 1526 | il->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx; | 1526 | il->scan_tx_ant[NL80211_BAND_2GHZ] = ant_idx; |
| 1527 | } | 1527 | } |
| 1528 | EXPORT_SYMBOL(il_init_scan_params); | 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, | |||
| 2003 | il_set_ht_add_station(il, sta_id, sta); | 2003 | il_set_ht_add_station(il, sta_id, sta); |
| 2004 | 2004 | ||
| 2005 | /* 3945 only */ | 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 | /* Turn on both antennas for the station... */ | 2007 | /* Turn on both antennas for the station... */ |
| 2008 | station->sta.rate_n_flags = cpu_to_le16(rate | RATE_MCS_ANT_AB_MSK); | 2008 | station->sta.rate_n_flags = cpu_to_le16(rate | RATE_MCS_ANT_AB_MSK); |
| 2009 | 2009 | ||
| @@ -3382,7 +3382,7 @@ EXPORT_SYMBOL(il_bcast_addr); | |||
| 3382 | static void | 3382 | static void |
| 3383 | il_init_ht_hw_capab(const struct il_priv *il, | 3383 | il_init_ht_hw_capab(const struct il_priv *il, |
| 3384 | struct ieee80211_sta_ht_cap *ht_info, | 3384 | struct ieee80211_sta_ht_cap *ht_info, |
| 3385 | enum ieee80211_band band) | 3385 | enum nl80211_band band) |
| 3386 | { | 3386 | { |
| 3387 | u16 max_bit_rate = 0; | 3387 | u16 max_bit_rate = 0; |
| 3388 | u8 rx_chains_num = il->hw_params.rx_chains_num; | 3388 | u8 rx_chains_num = il->hw_params.rx_chains_num; |
| @@ -3443,8 +3443,8 @@ il_init_geos(struct il_priv *il) | |||
| 3443 | int i = 0; | 3443 | int i = 0; |
| 3444 | s8 max_tx_power = 0; | 3444 | s8 max_tx_power = 0; |
| 3445 | 3445 | ||
| 3446 | if (il->bands[IEEE80211_BAND_2GHZ].n_bitrates || | 3446 | if (il->bands[NL80211_BAND_2GHZ].n_bitrates || |
| 3447 | il->bands[IEEE80211_BAND_5GHZ].n_bitrates) { | 3447 | il->bands[NL80211_BAND_5GHZ].n_bitrates) { |
| 3448 | D_INFO("Geography modes already initialized.\n"); | 3448 | D_INFO("Geography modes already initialized.\n"); |
| 3449 | set_bit(S_GEO_CONFIGURED, &il->status); | 3449 | set_bit(S_GEO_CONFIGURED, &il->status); |
| 3450 | return 0; | 3450 | return 0; |
| @@ -3465,23 +3465,23 @@ il_init_geos(struct il_priv *il) | |||
| 3465 | } | 3465 | } |
| 3466 | 3466 | ||
| 3467 | /* 5.2GHz channels start after the 2.4GHz channels */ | 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 | sband->channels = &channels[ARRAY_SIZE(il_eeprom_band_1)]; | 3469 | sband->channels = &channels[ARRAY_SIZE(il_eeprom_band_1)]; |
| 3470 | /* just OFDM */ | 3470 | /* just OFDM */ |
| 3471 | sband->bitrates = &rates[IL_FIRST_OFDM_RATE]; | 3471 | sband->bitrates = &rates[IL_FIRST_OFDM_RATE]; |
| 3472 | sband->n_bitrates = RATE_COUNT_LEGACY - IL_FIRST_OFDM_RATE; | 3472 | sband->n_bitrates = RATE_COUNT_LEGACY - IL_FIRST_OFDM_RATE; |
| 3473 | 3473 | ||
| 3474 | if (il->cfg->sku & IL_SKU_N) | 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 | sband->channels = channels; | 3478 | sband->channels = channels; |
| 3479 | /* OFDM & CCK */ | 3479 | /* OFDM & CCK */ |
| 3480 | sband->bitrates = rates; | 3480 | sband->bitrates = rates; |
| 3481 | sband->n_bitrates = RATE_COUNT_LEGACY; | 3481 | sband->n_bitrates = RATE_COUNT_LEGACY; |
| 3482 | 3482 | ||
| 3483 | if (il->cfg->sku & IL_SKU_N) | 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 | il->ieee_channels = channels; | 3486 | il->ieee_channels = channels; |
| 3487 | il->ieee_rates = rates; | 3487 | il->ieee_rates = rates; |
| @@ -3532,7 +3532,7 @@ il_init_geos(struct il_priv *il) | |||
| 3532 | il->tx_power_user_lmt = max_tx_power; | 3532 | il->tx_power_user_lmt = max_tx_power; |
| 3533 | il->tx_power_next = max_tx_power; | 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 | (il->cfg->sku & IL_SKU_A)) { | 3536 | (il->cfg->sku & IL_SKU_A)) { |
| 3537 | IL_INFO("Incorrectly detected BG card as ABG. " | 3537 | IL_INFO("Incorrectly detected BG card as ABG. " |
| 3538 | "Please send your PCI ID 0x%04X:0x%04X to maintainer.\n", | 3538 | "Please send your PCI ID 0x%04X:0x%04X to maintainer.\n", |
| @@ -3541,8 +3541,8 @@ il_init_geos(struct il_priv *il) | |||
| 3541 | } | 3541 | } |
| 3542 | 3542 | ||
| 3543 | IL_INFO("Tunable channels: %d 802.11bg, %d 802.11a channels\n", | 3543 | IL_INFO("Tunable channels: %d 802.11bg, %d 802.11a channels\n", |
| 3544 | il->bands[IEEE80211_BAND_2GHZ].n_channels, | 3544 | il->bands[NL80211_BAND_2GHZ].n_channels, |
| 3545 | il->bands[IEEE80211_BAND_5GHZ].n_channels); | 3545 | il->bands[NL80211_BAND_5GHZ].n_channels); |
| 3546 | 3546 | ||
| 3547 | set_bit(S_GEO_CONFIGURED, &il->status); | 3547 | set_bit(S_GEO_CONFIGURED, &il->status); |
| 3548 | 3548 | ||
| @@ -3563,7 +3563,7 @@ il_free_geos(struct il_priv *il) | |||
| 3563 | EXPORT_SYMBOL(il_free_geos); | 3563 | EXPORT_SYMBOL(il_free_geos); |
| 3564 | 3564 | ||
| 3565 | static bool | 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 | u16 channel, u8 extension_chan_offset) | 3567 | u16 channel, u8 extension_chan_offset) |
| 3568 | { | 3568 | { |
| 3569 | const struct il_channel_info *ch_info; | 3569 | const struct il_channel_info *ch_info; |
| @@ -3926,14 +3926,14 @@ EXPORT_SYMBOL(il_set_rxon_ht); | |||
| 3926 | 3926 | ||
| 3927 | /* Return valid, unused, channel for a passive scan to reset the RF */ | 3927 | /* Return valid, unused, channel for a passive scan to reset the RF */ |
| 3928 | u8 | 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 | const struct il_channel_info *ch_info; | 3931 | const struct il_channel_info *ch_info; |
| 3932 | int i; | 3932 | int i; |
| 3933 | u8 channel = 0; | 3933 | u8 channel = 0; |
| 3934 | u8 min, max; | 3934 | u8 min, max; |
| 3935 | 3935 | ||
| 3936 | if (band == IEEE80211_BAND_5GHZ) { | 3936 | if (band == NL80211_BAND_5GHZ) { |
| 3937 | min = 14; | 3937 | min = 14; |
| 3938 | max = il->channel_count; | 3938 | max = il->channel_count; |
| 3939 | } else { | 3939 | } else { |
| @@ -3965,14 +3965,14 @@ EXPORT_SYMBOL(il_get_single_channel_number); | |||
| 3965 | int | 3965 | int |
| 3966 | il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch) | 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 | u16 channel = ch->hw_value; | 3969 | u16 channel = ch->hw_value; |
| 3970 | 3970 | ||
| 3971 | if (le16_to_cpu(il->staging.channel) == channel && il->band == band) | 3971 | if (le16_to_cpu(il->staging.channel) == channel && il->band == band) |
| 3972 | return 0; | 3972 | return 0; |
| 3973 | 3973 | ||
| 3974 | il->staging.channel = cpu_to_le16(channel); | 3974 | il->staging.channel = cpu_to_le16(channel); |
| 3975 | if (band == IEEE80211_BAND_5GHZ) | 3975 | if (band == NL80211_BAND_5GHZ) |
| 3976 | il->staging.flags &= ~RXON_FLG_BAND_24G_MSK; | 3976 | il->staging.flags &= ~RXON_FLG_BAND_24G_MSK; |
| 3977 | else | 3977 | else |
| 3978 | il->staging.flags |= RXON_FLG_BAND_24G_MSK; | 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) | |||
| 3986 | EXPORT_SYMBOL(il_set_rxon_channel); | 3986 | EXPORT_SYMBOL(il_set_rxon_channel); |
| 3987 | 3987 | ||
| 3988 | void | 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 | struct ieee80211_vif *vif) | 3990 | struct ieee80211_vif *vif) |
| 3991 | { | 3991 | { |
| 3992 | if (band == IEEE80211_BAND_5GHZ) { | 3992 | if (band == NL80211_BAND_5GHZ) { |
| 3993 | il->staging.flags &= | 3993 | il->staging.flags &= |
| 3994 | ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK | | 3994 | ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK | |
| 3995 | RXON_FLG_CCK_MSK); | 3995 | RXON_FLG_CCK_MSK); |
| @@ -5415,7 +5415,7 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
| 5415 | 5415 | ||
| 5416 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { | 5416 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { |
| 5417 | D_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot); | 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 | il->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; | 5419 | il->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; |
| 5420 | else | 5420 | else |
| 5421 | il->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; | 5421 | il->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; |
diff --git a/drivers/net/wireless/intel/iwlegacy/common.h b/drivers/net/wireless/intel/iwlegacy/common.h index ce52cf114fde..726ede391cb9 100644 --- a/drivers/net/wireless/intel/iwlegacy/common.h +++ b/drivers/net/wireless/intel/iwlegacy/common.h | |||
| @@ -432,7 +432,7 @@ u16 il_eeprom_query16(const struct il_priv *il, size_t offset); | |||
| 432 | int il_init_channel_map(struct il_priv *il); | 432 | int il_init_channel_map(struct il_priv *il); |
| 433 | void il_free_channel_map(struct il_priv *il); | 433 | void il_free_channel_map(struct il_priv *il); |
| 434 | const struct il_channel_info *il_get_channel_info(const struct il_priv *il, | 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 | u16 channel); | 436 | u16 channel); |
| 437 | 437 | ||
| 438 | #define IL_NUM_SCAN_RATES (2) | 438 | #define IL_NUM_SCAN_RATES (2) |
| @@ -497,7 +497,7 @@ struct il_channel_info { | |||
| 497 | 497 | ||
| 498 | u8 group_idx; /* 0-4, maps channel to group1/2/3/4/5 */ | 498 | u8 group_idx; /* 0-4, maps channel to group1/2/3/4/5 */ |
| 499 | u8 band_idx; /* 0-4, maps channel to band1/2/3/4/5 */ | 499 | u8 band_idx; /* 0-4, maps channel to band1/2/3/4/5 */ |
| 500 | enum ieee80211_band band; | 500 | enum nl80211_band band; |
| 501 | 501 | ||
| 502 | /* HT40 channel info */ | 502 | /* HT40 channel info */ |
| 503 | s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */ | 503 | s8 ht40_max_power_avg; /* (dBm) regul. eeprom, normal Tx, any rate */ |
| @@ -811,7 +811,7 @@ struct il_sensitivity_ranges { | |||
| 811 | * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR | 811 | * @rx_wrt_ptr_reg: FH{39}_RSCSR_CHNL0_WPTR |
| 812 | * @max_stations: | 812 | * @max_stations: |
| 813 | * @ht40_channel: is 40MHz width possible in band 2.4 | 813 | * @ht40_channel: is 40MHz width possible in band 2.4 |
| 814 | * BIT(IEEE80211_BAND_5GHZ) BIT(IEEE80211_BAND_5GHZ) | 814 | * BIT(NL80211_BAND_5GHZ) BIT(NL80211_BAND_5GHZ) |
| 815 | * @sw_crypto: 0 for hw, 1 for sw | 815 | * @sw_crypto: 0 for hw, 1 for sw |
| 816 | * @max_xxx_size: for ucode uses | 816 | * @max_xxx_size: for ucode uses |
| 817 | * @ct_kill_threshold: temperature threshold | 817 | * @ct_kill_threshold: temperature threshold |
| @@ -1141,13 +1141,13 @@ struct il_priv { | |||
| 1141 | struct list_head free_frames; | 1141 | struct list_head free_frames; |
| 1142 | int frames_count; | 1142 | int frames_count; |
| 1143 | 1143 | ||
| 1144 | enum ieee80211_band band; | 1144 | enum nl80211_band band; |
| 1145 | int alloc_rxb_page; | 1145 | int alloc_rxb_page; |
| 1146 | 1146 | ||
| 1147 | void (*handlers[IL_CN_MAX]) (struct il_priv *il, | 1147 | void (*handlers[IL_CN_MAX]) (struct il_priv *il, |
| 1148 | struct il_rx_buf *rxb); | 1148 | struct il_rx_buf *rxb); |
| 1149 | 1149 | ||
| 1150 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 1150 | struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; |
| 1151 | 1151 | ||
| 1152 | /* spectrum measurement report caching */ | 1152 | /* spectrum measurement report caching */ |
| 1153 | struct il_spectrum_notification measure_report; | 1153 | struct il_spectrum_notification measure_report; |
| @@ -1176,10 +1176,10 @@ struct il_priv { | |||
| 1176 | unsigned long scan_start; | 1176 | unsigned long scan_start; |
| 1177 | unsigned long scan_start_tsf; | 1177 | unsigned long scan_start_tsf; |
| 1178 | void *scan_cmd; | 1178 | void *scan_cmd; |
| 1179 | enum ieee80211_band scan_band; | 1179 | enum nl80211_band scan_band; |
| 1180 | struct cfg80211_scan_request *scan_request; | 1180 | struct cfg80211_scan_request *scan_request; |
| 1181 | struct ieee80211_vif *scan_vif; | 1181 | struct ieee80211_vif *scan_vif; |
| 1182 | u8 scan_tx_ant[IEEE80211_NUM_BANDS]; | 1182 | u8 scan_tx_ant[NUM_NL80211_BANDS]; |
| 1183 | u8 mgmt_tx_ant; | 1183 | u8 mgmt_tx_ant; |
| 1184 | 1184 | ||
| 1185 | /* spinlock */ | 1185 | /* spinlock */ |
| @@ -1479,7 +1479,7 @@ il_is_channel_radar(const struct il_channel_info *ch_info) | |||
| 1479 | static inline u8 | 1479 | static inline u8 |
| 1480 | il_is_channel_a_band(const struct il_channel_info *ch_info) | 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 | static inline int | 1485 | static inline int |
| @@ -1673,7 +1673,7 @@ struct il_cfg { | |||
| 1673 | /* params not likely to change within a device family */ | 1673 | /* params not likely to change within a device family */ |
| 1674 | struct il_base_params *base_params; | 1674 | struct il_base_params *base_params; |
| 1675 | /* params likely to change within a device family */ | 1675 | /* params likely to change within a device family */ |
| 1676 | u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; | 1676 | u8 scan_rx_antennas[NUM_NL80211_BANDS]; |
| 1677 | enum il_led_mode led_mode; | 1677 | enum il_led_mode led_mode; |
| 1678 | 1678 | ||
| 1679 | int eeprom_size; | 1679 | int eeprom_size; |
| @@ -1707,9 +1707,9 @@ void il_set_rxon_hwcrypto(struct il_priv *il, int hw_decrypt); | |||
| 1707 | int il_check_rxon_cmd(struct il_priv *il); | 1707 | int il_check_rxon_cmd(struct il_priv *il); |
| 1708 | int il_full_rxon_required(struct il_priv *il); | 1708 | int il_full_rxon_required(struct il_priv *il); |
| 1709 | int il_set_rxon_channel(struct il_priv *il, struct ieee80211_channel *ch); | 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 | struct ieee80211_vif *vif); | 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 | void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf); | 1713 | void il_set_rxon_ht(struct il_priv *il, struct il_ht_config *ht_conf); |
| 1714 | bool il_is_ht40_tx_allowed(struct il_priv *il, | 1714 | bool il_is_ht40_tx_allowed(struct il_priv *il, |
| 1715 | struct ieee80211_sta_ht_cap *ht_cap); | 1715 | struct ieee80211_sta_ht_cap *ht_cap); |
| @@ -1793,9 +1793,9 @@ int il_force_reset(struct il_priv *il, bool external); | |||
| 1793 | u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, | 1793 | u16 il_fill_probe_req(struct il_priv *il, struct ieee80211_mgmt *frame, |
| 1794 | const u8 *ta, const u8 *ie, int ie_len, int left); | 1794 | const u8 *ta, const u8 *ie, int ie_len, int left); |
| 1795 | void il_setup_rx_scan_handlers(struct il_priv *il); | 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 | u8 n_probes); | 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 | struct ieee80211_vif *vif); | 1799 | struct ieee80211_vif *vif); |
| 1800 | void il_setup_scan_deferred_work(struct il_priv *il); | 1800 | void il_setup_scan_deferred_work(struct il_priv *il); |
| 1801 | void il_cancel_scan_deferred_work(struct il_priv *il); | 1801 | void il_cancel_scan_deferred_work(struct il_priv *il); |
| @@ -1955,7 +1955,7 @@ il_commit_rxon(struct il_priv *il) | |||
| 1955 | } | 1955 | } |
| 1956 | 1956 | ||
| 1957 | static inline const struct ieee80211_supported_band * | 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 | return il->hw->wiphy->bands[band]; | 1960 | return il->hw->wiphy->bands[band]; |
| 1961 | } | 1961 | } |
| @@ -2813,7 +2813,7 @@ struct il_lq_sta { | |||
| 2813 | u8 action_counter; /* # mode-switch actions tried */ | 2813 | u8 action_counter; /* # mode-switch actions tried */ |
| 2814 | u8 is_green; | 2814 | u8 is_green; |
| 2815 | u8 is_dup; | 2815 | u8 is_dup; |
| 2816 | enum ieee80211_band band; | 2816 | enum nl80211_band band; |
| 2817 | 2817 | ||
| 2818 | /* The following are bitmaps of rates; RATE_6M_MASK, etc. */ | 2818 | /* The following are bitmaps of rates; RATE_6M_MASK, etc. */ |
| 2819 | u32 supp_rates; | 2819 | u32 supp_rates; |
diff --git a/drivers/net/wireless/intel/iwlegacy/debug.c b/drivers/net/wireless/intel/iwlegacy/debug.c index 908b9f4fef6f..6fc6b7ff9849 100644 --- a/drivers/net/wireless/intel/iwlegacy/debug.c +++ b/drivers/net/wireless/intel/iwlegacy/debug.c | |||
| @@ -544,7 +544,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count, | |||
| 544 | return -ENOMEM; | 544 | return -ENOMEM; |
| 545 | } | 545 | } |
| 546 | 546 | ||
| 547 | supp_band = il_get_hw_mode(il, IEEE80211_BAND_2GHZ); | 547 | supp_band = il_get_hw_mode(il, NL80211_BAND_2GHZ); |
| 548 | if (supp_band) { | 548 | if (supp_band) { |
| 549 | channels = supp_band->channels; | 549 | channels = supp_band->channels; |
| 550 | 550 | ||
| @@ -571,7 +571,7 @@ il_dbgfs_channels_read(struct file *file, char __user *user_buf, size_t count, | |||
| 571 | flags & IEEE80211_CHAN_NO_IR ? | 571 | flags & IEEE80211_CHAN_NO_IR ? |
| 572 | "passive only" : "active/passive"); | 572 | "passive only" : "active/passive"); |
| 573 | } | 573 | } |
| 574 | supp_band = il_get_hw_mode(il, IEEE80211_BAND_5GHZ); | 574 | supp_band = il_get_hw_mode(il, NL80211_BAND_5GHZ); |
| 575 | if (supp_band) { | 575 | if (supp_band) { |
| 576 | channels = supp_band->channels; | 576 | channels = supp_band->channels; |
| 577 | 577 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/agn.h b/drivers/net/wireless/intel/iwlwifi/dvm/agn.h index 9de277c6c420..b79e38734f2f 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/agn.h +++ b/drivers/net/wireless/intel/iwlwifi/dvm/agn.h | |||
| @@ -158,7 +158,7 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, | |||
| 158 | struct iwl_rxon_context *ctx); | 158 | struct iwl_rxon_context *ctx); |
| 159 | void iwl_set_flags_for_band(struct iwl_priv *priv, | 159 | void iwl_set_flags_for_band(struct iwl_priv *priv, |
| 160 | struct iwl_rxon_context *ctx, | 160 | struct iwl_rxon_context *ctx, |
| 161 | enum ieee80211_band band, | 161 | enum nl80211_band band, |
| 162 | struct ieee80211_vif *vif); | 162 | struct ieee80211_vif *vif); |
| 163 | 163 | ||
| 164 | /* uCode */ | 164 | /* uCode */ |
| @@ -186,7 +186,7 @@ int iwl_send_statistics_request(struct iwl_priv *priv, | |||
| 186 | u8 flags, bool clear); | 186 | u8 flags, bool clear); |
| 187 | 187 | ||
| 188 | static inline const struct ieee80211_supported_band *iwl_get_hw_mode( | 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 | return priv->hw->wiphy->bands[band]; | 191 | return priv->hw->wiphy->bands[band]; |
| 192 | } | 192 | } |
| @@ -198,7 +198,7 @@ int iwlagn_suspend(struct iwl_priv *priv, struct cfg80211_wowlan *wowlan); | |||
| 198 | #endif | 198 | #endif |
| 199 | 199 | ||
| 200 | /* rx */ | 200 | /* rx */ |
| 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 | void iwl_setup_rx_handlers(struct iwl_priv *priv); | 202 | void iwl_setup_rx_handlers(struct iwl_priv *priv); |
| 203 | void iwl_chswitch_done(struct iwl_priv *priv, bool is_success); | 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); | |||
| 258 | int __must_check iwl_scan_initiate(struct iwl_priv *priv, | 258 | int __must_check iwl_scan_initiate(struct iwl_priv *priv, |
| 259 | struct ieee80211_vif *vif, | 259 | struct ieee80211_vif *vif, |
| 260 | enum iwl_scan_type scan_type, | 260 | enum iwl_scan_type scan_type, |
| 261 | enum ieee80211_band band); | 261 | enum nl80211_band band); |
| 262 | 262 | ||
| 263 | /* For faster active scanning, scan will move to the next channel if fewer than | 263 | /* For faster active scanning, scan will move to the next channel if fewer than |
| 264 | * PLCP_QUIET_THRESH packets are heard on this channel within | 264 | * PLCP_QUIET_THRESH packets are heard on this channel within |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c index 74c51615244e..f6591c83d636 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c | |||
| @@ -335,7 +335,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf, | |||
| 335 | if (!buf) | 335 | if (!buf) |
| 336 | return -ENOMEM; | 336 | return -ENOMEM; |
| 337 | 337 | ||
| 338 | supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_2GHZ); | 338 | supp_band = iwl_get_hw_mode(priv, NL80211_BAND_2GHZ); |
| 339 | if (supp_band) { | 339 | if (supp_band) { |
| 340 | channels = supp_band->channels; | 340 | channels = supp_band->channels; |
| 341 | 341 | ||
| @@ -358,7 +358,7 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf, | |||
| 358 | IEEE80211_CHAN_NO_IR ? | 358 | IEEE80211_CHAN_NO_IR ? |
| 359 | "passive only" : "active/passive"); | 359 | "passive only" : "active/passive"); |
| 360 | } | 360 | } |
| 361 | supp_band = iwl_get_hw_mode(priv, IEEE80211_BAND_5GHZ); | 361 | supp_band = iwl_get_hw_mode(priv, NL80211_BAND_5GHZ); |
| 362 | if (supp_band) { | 362 | if (supp_band) { |
| 363 | channels = supp_band->channels; | 363 | channels = supp_band->channels; |
| 364 | 364 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/dev.h b/drivers/net/wireless/intel/iwlwifi/dvm/dev.h index 1a7ead753eee..8148df61a916 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/dev.h +++ b/drivers/net/wireless/intel/iwlwifi/dvm/dev.h | |||
| @@ -677,7 +677,7 @@ struct iwl_priv { | |||
| 677 | 677 | ||
| 678 | struct iwl_hw_params hw_params; | 678 | struct iwl_hw_params hw_params; |
| 679 | 679 | ||
| 680 | enum ieee80211_band band; | 680 | enum nl80211_band band; |
| 681 | u8 valid_contexts; | 681 | u8 valid_contexts; |
| 682 | 682 | ||
| 683 | void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv, | 683 | void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv, |
| @@ -722,11 +722,11 @@ struct iwl_priv { | |||
| 722 | unsigned long scan_start; | 722 | unsigned long scan_start; |
| 723 | unsigned long scan_start_tsf; | 723 | unsigned long scan_start_tsf; |
| 724 | void *scan_cmd; | 724 | void *scan_cmd; |
| 725 | enum ieee80211_band scan_band; | 725 | enum nl80211_band scan_band; |
| 726 | struct cfg80211_scan_request *scan_request; | 726 | struct cfg80211_scan_request *scan_request; |
| 727 | struct ieee80211_vif *scan_vif; | 727 | struct ieee80211_vif *scan_vif; |
| 728 | enum iwl_scan_type scan_type; | 728 | enum iwl_scan_type scan_type; |
| 729 | u8 scan_tx_ant[IEEE80211_NUM_BANDS]; | 729 | u8 scan_tx_ant[NUM_NL80211_BANDS]; |
| 730 | u8 mgmt_tx_ant; | 730 | u8 mgmt_tx_ant; |
| 731 | 731 | ||
| 732 | /* max number of station keys */ | 732 | /* max number of station keys */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/devices.c b/drivers/net/wireless/intel/iwlwifi/dvm/devices.c index cc13c04063a5..f21732ec3b25 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/devices.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/devices.c | |||
| @@ -420,7 +420,7 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
| 420 | .data = { &cmd, }, | 420 | .data = { &cmd, }, |
| 421 | }; | 421 | }; |
| 422 | 422 | ||
| 423 | cmd.band = priv->band == IEEE80211_BAND_2GHZ; | 423 | cmd.band = priv->band == NL80211_BAND_2GHZ; |
| 424 | ch = ch_switch->chandef.chan->hw_value; | 424 | ch = ch_switch->chandef.chan->hw_value; |
| 425 | IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", | 425 | IWL_DEBUG_11H(priv, "channel switch from %d to %d\n", |
| 426 | ctx->active.channel, ch); | 426 | ctx->active.channel, ch); |
| @@ -588,7 +588,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
| 588 | 588 | ||
| 589 | hcmd.data[0] = cmd; | 589 | hcmd.data[0] = cmd; |
| 590 | 590 | ||
| 591 | cmd->band = priv->band == IEEE80211_BAND_2GHZ; | 591 | cmd->band = priv->band == NL80211_BAND_2GHZ; |
| 592 | ch = ch_switch->chandef.chan->hw_value; | 592 | ch = ch_switch->chandef.chan->hw_value; |
| 593 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", | 593 | IWL_DEBUG_11H(priv, "channel switch from %u to %u\n", |
| 594 | ctx->active.channel, ch); | 594 | ctx->active.channel, ch); |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c index 1799469268ea..8dda52ae3bb5 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/lib.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/lib.c | |||
| @@ -94,7 +94,7 @@ void iwlagn_temperature(struct iwl_priv *priv) | |||
| 94 | iwl_tt_handler(priv); | 94 | iwl_tt_handler(priv); |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 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 | int idx = 0; | 99 | int idx = 0; |
| 100 | int band_offset = 0; | 100 | int band_offset = 0; |
| @@ -105,7 +105,7 @@ int iwlagn_hwrate_to_mac80211_idx(u32 rate_n_flags, enum ieee80211_band band) | |||
| 105 | return idx; | 105 | return idx; |
| 106 | /* Legacy rate format, search for match in table */ | 106 | /* Legacy rate format, search for match in table */ |
| 107 | } else { | 107 | } else { |
| 108 | if (band == IEEE80211_BAND_5GHZ) | 108 | if (band == NL80211_BAND_5GHZ) |
| 109 | band_offset = IWL_FIRST_OFDM_RATE; | 109 | band_offset = IWL_FIRST_OFDM_RATE; |
| 110 | for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) | 110 | for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) |
| 111 | if (iwl_rates[idx].plcp == (rate_n_flags & 0xFF)) | 111 | if (iwl_rates[idx].plcp == (rate_n_flags & 0xFF)) |
| @@ -878,7 +878,7 @@ u8 iwl_toggle_tx_ant(struct iwl_priv *priv, u8 ant, u8 valid) | |||
| 878 | int i; | 878 | int i; |
| 879 | u8 ind = ant; | 879 | u8 ind = ant; |
| 880 | 880 | ||
| 881 | if (priv->band == IEEE80211_BAND_2GHZ && | 881 | if (priv->band == NL80211_BAND_2GHZ && |
| 882 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) | 882 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) |
| 883 | return 0; | 883 | return 0; |
| 884 | 884 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c index c63ea79571ff..8c0719468d00 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/mac80211.c | |||
| @@ -202,12 +202,12 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
| 202 | 202 | ||
| 203 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; | 203 | hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL; |
| 204 | 204 | ||
| 205 | if (priv->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels) | 205 | if (priv->nvm_data->bands[NL80211_BAND_2GHZ].n_channels) |
| 206 | priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 206 | priv->hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 207 | &priv->nvm_data->bands[IEEE80211_BAND_2GHZ]; | 207 | &priv->nvm_data->bands[NL80211_BAND_2GHZ]; |
| 208 | if (priv->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels) | 208 | if (priv->nvm_data->bands[NL80211_BAND_5GHZ].n_channels) |
| 209 | priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 209 | priv->hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 210 | &priv->nvm_data->bands[IEEE80211_BAND_5GHZ]; | 210 | &priv->nvm_data->bands[NL80211_BAND_5GHZ]; |
| 211 | 211 | ||
| 212 | hw->wiphy->hw_version = priv->trans->hw_id; | 212 | hw->wiphy->hw_version = priv->trans->hw_id; |
| 213 | 213 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c index 614716251c39..37b32a6f60fd 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c | |||
| @@ -262,7 +262,7 @@ int iwlagn_send_beacon_cmd(struct iwl_priv *priv) | |||
| 262 | rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant); | 262 | rate_flags = iwl_ant_idx_to_flags(priv->mgmt_tx_ant); |
| 263 | 263 | ||
| 264 | /* In mac80211, rates for 5 GHz start at 0 */ | 264 | /* In mac80211, rates for 5 GHz start at 0 */ |
| 265 | if (info->band == IEEE80211_BAND_5GHZ) | 265 | if (info->band == NL80211_BAND_5GHZ) |
| 266 | rate += IWL_FIRST_OFDM_RATE; | 266 | rate += IWL_FIRST_OFDM_RATE; |
| 267 | else if (rate >= IWL_FIRST_CCK_RATE && rate <= IWL_LAST_CCK_RATE) | 267 | else if (rate >= IWL_FIRST_CCK_RATE && rate <= IWL_LAST_CCK_RATE) |
| 268 | rate_flags |= RATE_MCS_CCK_MSK; | 268 | rate_flags |= RATE_MCS_CCK_MSK; |
| @@ -1117,7 +1117,7 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
| 1117 | 1117 | ||
| 1118 | INIT_LIST_HEAD(&priv->calib_results); | 1118 | INIT_LIST_HEAD(&priv->calib_results); |
| 1119 | 1119 | ||
| 1120 | priv->band = IEEE80211_BAND_2GHZ; | 1120 | priv->band = NL80211_BAND_2GHZ; |
| 1121 | 1121 | ||
| 1122 | priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold; | 1122 | priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold; |
| 1123 | 1123 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c index ee7505537c96..b95c2d76db33 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/rs.c | |||
| @@ -599,7 +599,7 @@ static u32 rate_n_flags_from_tbl(struct iwl_priv *priv, | |||
| 599 | * fill "search" or "active" tx mode table. | 599 | * fill "search" or "active" tx mode table. |
| 600 | */ | 600 | */ |
| 601 | static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags, | 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 | struct iwl_scale_tbl_info *tbl, | 603 | struct iwl_scale_tbl_info *tbl, |
| 604 | int *rate_idx) | 604 | int *rate_idx) |
| 605 | { | 605 | { |
| @@ -624,7 +624,7 @@ static int rs_get_tbl_info_from_mcs(const u32 rate_n_flags, | |||
| 624 | /* legacy rate format */ | 624 | /* legacy rate format */ |
| 625 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { | 625 | if (!(rate_n_flags & RATE_MCS_HT_MSK)) { |
| 626 | if (num_of_ant == 1) { | 626 | if (num_of_ant == 1) { |
| 627 | if (band == IEEE80211_BAND_5GHZ) | 627 | if (band == NL80211_BAND_5GHZ) |
| 628 | tbl->lq_type = LQ_A; | 628 | tbl->lq_type = LQ_A; |
| 629 | else | 629 | else |
| 630 | tbl->lq_type = LQ_G; | 630 | tbl->lq_type = LQ_G; |
| @@ -802,7 +802,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, | |||
| 802 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { | 802 | if (!is_legacy(tbl->lq_type) && (!ht_possible || !scale_index)) { |
| 803 | switch_to_legacy = 1; | 803 | switch_to_legacy = 1; |
| 804 | scale_index = rs_ht_to_legacy[scale_index]; | 804 | scale_index = rs_ht_to_legacy[scale_index]; |
| 805 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 805 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 806 | tbl->lq_type = LQ_A; | 806 | tbl->lq_type = LQ_A; |
| 807 | else | 807 | else |
| 808 | tbl->lq_type = LQ_G; | 808 | tbl->lq_type = LQ_G; |
| @@ -821,7 +821,7 @@ static u32 rs_get_lower_rate(struct iwl_lq_sta *lq_sta, | |||
| 821 | /* Mask with station rate restriction */ | 821 | /* Mask with station rate restriction */ |
| 822 | if (is_legacy(tbl->lq_type)) { | 822 | if (is_legacy(tbl->lq_type)) { |
| 823 | /* supp_rates has no CCK bits in A mode */ | 823 | /* supp_rates has no CCK bits in A mode */ |
| 824 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 824 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 825 | rate_mask = (u16)(rate_mask & | 825 | rate_mask = (u16)(rate_mask & |
| 826 | (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); | 826 | (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); |
| 827 | else | 827 | else |
| @@ -939,7 +939,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
| 939 | table = &lq_sta->lq; | 939 | table = &lq_sta->lq; |
| 940 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); | 940 | tx_rate = le32_to_cpu(table->rs_table[0].rate_n_flags); |
| 941 | rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, &rs_index); | 941 | rs_get_tbl_info_from_mcs(tx_rate, priv->band, &tbl_type, &rs_index); |
| 942 | if (priv->band == IEEE80211_BAND_5GHZ) | 942 | if (priv->band == NL80211_BAND_5GHZ) |
| 943 | rs_index -= IWL_FIRST_OFDM_RATE; | 943 | rs_index -= IWL_FIRST_OFDM_RATE; |
| 944 | mac_flags = info->status.rates[0].flags; | 944 | mac_flags = info->status.rates[0].flags; |
| 945 | mac_index = info->status.rates[0].idx; | 945 | mac_index = info->status.rates[0].idx; |
| @@ -952,7 +952,7 @@ static void rs_tx_status(void *priv_r, struct ieee80211_supported_band *sband, | |||
| 952 | * mac80211 HT index is always zero-indexed; we need to move | 952 | * mac80211 HT index is always zero-indexed; we need to move |
| 953 | * HT OFDM rates after CCK rates in 2.4 GHz band | 953 | * HT OFDM rates after CCK rates in 2.4 GHz band |
| 954 | */ | 954 | */ |
| 955 | if (priv->band == IEEE80211_BAND_2GHZ) | 955 | if (priv->band == NL80211_BAND_2GHZ) |
| 956 | mac_index += IWL_FIRST_OFDM_RATE; | 956 | mac_index += IWL_FIRST_OFDM_RATE; |
| 957 | } | 957 | } |
| 958 | /* Here we actually compare this rate to the latest LQ command */ | 958 | /* Here we actually compare this rate to the latest LQ command */ |
| @@ -2284,7 +2284,7 @@ static void rs_rate_scale_perform(struct iwl_priv *priv, | |||
| 2284 | 2284 | ||
| 2285 | /* mask with station rate restriction */ | 2285 | /* mask with station rate restriction */ |
| 2286 | if (is_legacy(tbl->lq_type)) { | 2286 | if (is_legacy(tbl->lq_type)) { |
| 2287 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 2287 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 2288 | /* supp_rates has no CCK bits in A mode */ | 2288 | /* supp_rates has no CCK bits in A mode */ |
| 2289 | rate_scale_index_msk = (u16) (rate_mask & | 2289 | rate_scale_index_msk = (u16) (rate_mask & |
| 2290 | (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); | 2290 | (lq_sta->supp_rates << IWL_FIRST_OFDM_RATE)); |
| @@ -2721,7 +2721,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, | |||
| 2721 | /* Get max rate if user set max rate */ | 2721 | /* Get max rate if user set max rate */ |
| 2722 | if (lq_sta) { | 2722 | if (lq_sta) { |
| 2723 | lq_sta->max_rate_idx = txrc->max_rate_idx; | 2723 | lq_sta->max_rate_idx = txrc->max_rate_idx; |
| 2724 | if ((sband->band == IEEE80211_BAND_5GHZ) && | 2724 | if ((sband->band == NL80211_BAND_5GHZ) && |
| 2725 | (lq_sta->max_rate_idx != -1)) | 2725 | (lq_sta->max_rate_idx != -1)) |
| 2726 | lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE; | 2726 | lq_sta->max_rate_idx += IWL_FIRST_OFDM_RATE; |
| 2727 | if ((lq_sta->max_rate_idx < 0) || | 2727 | if ((lq_sta->max_rate_idx < 0) || |
| @@ -2763,11 +2763,11 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta, | |||
| 2763 | } else { | 2763 | } else { |
| 2764 | /* Check for invalid rates */ | 2764 | /* Check for invalid rates */ |
| 2765 | if ((rate_idx < 0) || (rate_idx >= IWL_RATE_COUNT_LEGACY) || | 2765 | if ((rate_idx < 0) || (rate_idx >= IWL_RATE_COUNT_LEGACY) || |
| 2766 | ((sband->band == IEEE80211_BAND_5GHZ) && | 2766 | ((sband->band == NL80211_BAND_5GHZ) && |
| 2767 | (rate_idx < IWL_FIRST_OFDM_RATE))) | 2767 | (rate_idx < IWL_FIRST_OFDM_RATE))) |
| 2768 | rate_idx = rate_lowest_index(sband, sta); | 2768 | rate_idx = rate_lowest_index(sband, sta); |
| 2769 | /* On valid 5 GHz rate, adjust index */ | 2769 | /* On valid 5 GHz rate, adjust index */ |
| 2770 | else if (sband->band == IEEE80211_BAND_5GHZ) | 2770 | else if (sband->band == NL80211_BAND_5GHZ) |
| 2771 | rate_idx -= IWL_FIRST_OFDM_RATE; | 2771 | rate_idx -= IWL_FIRST_OFDM_RATE; |
| 2772 | info->control.rates[0].flags = 0; | 2772 | info->control.rates[0].flags = 0; |
| 2773 | } | 2773 | } |
| @@ -2880,7 +2880,7 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i | |||
| 2880 | 2880 | ||
| 2881 | /* Set last_txrate_idx to lowest rate */ | 2881 | /* Set last_txrate_idx to lowest rate */ |
| 2882 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); | 2882 | lq_sta->last_txrate_idx = rate_lowest_index(sband, sta); |
| 2883 | if (sband->band == IEEE80211_BAND_5GHZ) | 2883 | if (sband->band == NL80211_BAND_5GHZ) |
| 2884 | lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; | 2884 | lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; |
| 2885 | lq_sta->is_agg = 0; | 2885 | lq_sta->is_agg = 0; |
| 2886 | #ifdef CONFIG_MAC80211_DEBUGFS | 2886 | #ifdef CONFIG_MAC80211_DEBUGFS |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rs.h b/drivers/net/wireless/intel/iwlwifi/dvm/rs.h index c5fe44584613..50c1e951dd2d 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/rs.h +++ b/drivers/net/wireless/intel/iwlwifi/dvm/rs.h | |||
| @@ -355,7 +355,7 @@ struct iwl_lq_sta { | |||
| 355 | u8 action_counter; /* # mode-switch actions tried */ | 355 | u8 action_counter; /* # mode-switch actions tried */ |
| 356 | u8 is_green; | 356 | u8 is_green; |
| 357 | u8 is_dup; | 357 | u8 is_dup; |
| 358 | enum ieee80211_band band; | 358 | enum nl80211_band band; |
| 359 | 359 | ||
| 360 | /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ | 360 | /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ |
| 361 | u32 supp_rates; | 361 | u32 supp_rates; |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rx.c b/drivers/net/wireless/intel/iwlwifi/dvm/rx.c index 27ea61e3a390..dfa2041cfdac 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/rx.c | |||
| @@ -834,7 +834,7 @@ static void iwlagn_rx_reply_rx(struct iwl_priv *priv, | |||
| 834 | /* rx_status carries information about the packet to mac80211 */ | 834 | /* rx_status carries information about the packet to mac80211 */ |
| 835 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); | 835 | rx_status.mactime = le64_to_cpu(phy_res->timestamp); |
| 836 | rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? | 836 | rx_status.band = (phy_res->phy_flags & RX_RES_PHY_FLAGS_BAND_24_MSK) ? |
| 837 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 837 | NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
| 838 | rx_status.freq = | 838 | rx_status.freq = |
| 839 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), | 839 | ieee80211_channel_to_frequency(le16_to_cpu(phy_res->channel), |
| 840 | rx_status.band); | 840 | rx_status.band); |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c b/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c index 2d47cb24c48b..b228552184b5 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/rxon.c | |||
| @@ -719,7 +719,7 @@ void iwl_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_config *ht_conf) | |||
| 719 | void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, | 719 | void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, |
| 720 | struct iwl_rxon_context *ctx) | 720 | struct iwl_rxon_context *ctx) |
| 721 | { | 721 | { |
| 722 | enum ieee80211_band band = ch->band; | 722 | enum nl80211_band band = ch->band; |
| 723 | u16 channel = ch->hw_value; | 723 | u16 channel = ch->hw_value; |
| 724 | 724 | ||
| 725 | if ((le16_to_cpu(ctx->staging.channel) == channel) && | 725 | if ((le16_to_cpu(ctx->staging.channel) == channel) && |
| @@ -727,7 +727,7 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, | |||
| 727 | return; | 727 | return; |
| 728 | 728 | ||
| 729 | ctx->staging.channel = cpu_to_le16(channel); | 729 | ctx->staging.channel = cpu_to_le16(channel); |
| 730 | if (band == IEEE80211_BAND_5GHZ) | 730 | if (band == NL80211_BAND_5GHZ) |
| 731 | ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK; | 731 | ctx->staging.flags &= ~RXON_FLG_BAND_24G_MSK; |
| 732 | else | 732 | else |
| 733 | ctx->staging.flags |= RXON_FLG_BAND_24G_MSK; | 733 | ctx->staging.flags |= RXON_FLG_BAND_24G_MSK; |
| @@ -740,10 +740,10 @@ void iwl_set_rxon_channel(struct iwl_priv *priv, struct ieee80211_channel *ch, | |||
| 740 | 740 | ||
| 741 | void iwl_set_flags_for_band(struct iwl_priv *priv, | 741 | void iwl_set_flags_for_band(struct iwl_priv *priv, |
| 742 | struct iwl_rxon_context *ctx, | 742 | struct iwl_rxon_context *ctx, |
| 743 | enum ieee80211_band band, | 743 | enum nl80211_band band, |
| 744 | struct ieee80211_vif *vif) | 744 | struct ieee80211_vif *vif) |
| 745 | { | 745 | { |
| 746 | if (band == IEEE80211_BAND_5GHZ) { | 746 | if (band == NL80211_BAND_5GHZ) { |
| 747 | ctx->staging.flags &= | 747 | ctx->staging.flags &= |
| 748 | ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK | 748 | ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK |
| 749 | | RXON_FLG_CCK_MSK); | 749 | | RXON_FLG_CCK_MSK); |
| @@ -1476,7 +1476,7 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, | |||
| 1476 | 1476 | ||
| 1477 | iwlagn_set_rxon_chain(priv, ctx); | 1477 | iwlagn_set_rxon_chain(priv, ctx); |
| 1478 | 1478 | ||
| 1479 | if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) | 1479 | if (bss_conf->use_cts_prot && (priv->band != NL80211_BAND_5GHZ)) |
| 1480 | ctx->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; | 1480 | ctx->staging.flags |= RXON_FLG_TGG_PROTECT_MSK; |
| 1481 | else | 1481 | else |
| 1482 | ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; | 1482 | ctx->staging.flags &= ~RXON_FLG_TGG_PROTECT_MSK; |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c index 81a2ddbe9569..d01766f16175 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/scan.c | |||
| @@ -312,7 +312,7 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv, | |||
| 312 | scan_notif->tsf_high, scan_notif->status); | 312 | scan_notif->tsf_high, scan_notif->status); |
| 313 | 313 | ||
| 314 | IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n", | 314 | IWL_DEBUG_SCAN(priv, "Scan on %sGHz took %dms\n", |
| 315 | (priv->scan_band == IEEE80211_BAND_2GHZ) ? "2.4" : "5.2", | 315 | (priv->scan_band == NL80211_BAND_2GHZ) ? "2.4" : "5.2", |
| 316 | jiffies_to_msecs(jiffies - priv->scan_start)); | 316 | jiffies_to_msecs(jiffies - priv->scan_start)); |
| 317 | 317 | ||
| 318 | /* | 318 | /* |
| @@ -362,9 +362,9 @@ void iwl_setup_rx_scan_handlers(struct iwl_priv *priv) | |||
| 362 | } | 362 | } |
| 363 | 363 | ||
| 364 | static u16 iwl_get_active_dwell_time(struct iwl_priv *priv, | 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 | return IWL_ACTIVE_DWELL_TIME_52 + | 368 | return IWL_ACTIVE_DWELL_TIME_52 + |
| 369 | IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); | 369 | IWL_ACTIVE_DWELL_FACTOR_52GHZ * (n_probes + 1); |
| 370 | else | 370 | else |
| @@ -431,9 +431,9 @@ static u16 iwl_limit_dwell(struct iwl_priv *priv, u16 dwell_time) | |||
| 431 | } | 431 | } |
| 432 | 432 | ||
| 433 | static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, | 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 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : | 437 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_24 : |
| 438 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52; | 438 | IWL_PASSIVE_DWELL_BASE + IWL_PASSIVE_DWELL_TIME_52; |
| 439 | 439 | ||
| @@ -442,7 +442,7 @@ static u16 iwl_get_passive_dwell_time(struct iwl_priv *priv, | |||
| 442 | 442 | ||
| 443 | /* Return valid, unused, channel for a passive scan to reset the RF */ | 443 | /* Return valid, unused, channel for a passive scan to reset the RF */ |
| 444 | static u8 iwl_get_single_channel_number(struct iwl_priv *priv, | 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 | struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band]; | 447 | struct ieee80211_supported_band *sband = priv->hw->wiphy->bands[band]; |
| 448 | struct iwl_rxon_context *ctx; | 448 | struct iwl_rxon_context *ctx; |
| @@ -470,7 +470,7 @@ static u8 iwl_get_single_channel_number(struct iwl_priv *priv, | |||
| 470 | 470 | ||
| 471 | static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, | 471 | static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, |
| 472 | struct ieee80211_vif *vif, | 472 | struct ieee80211_vif *vif, |
| 473 | enum ieee80211_band band, | 473 | enum nl80211_band band, |
| 474 | struct iwl_scan_channel *scan_ch) | 474 | struct iwl_scan_channel *scan_ch) |
| 475 | { | 475 | { |
| 476 | const struct ieee80211_supported_band *sband; | 476 | const struct ieee80211_supported_band *sband; |
| @@ -492,7 +492,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, | |||
| 492 | cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME); | 492 | cpu_to_le16(IWL_RADIO_RESET_DWELL_TIME); |
| 493 | /* Set txpower levels to defaults */ | 493 | /* Set txpower levels to defaults */ |
| 494 | scan_ch->dsp_atten = 110; | 494 | scan_ch->dsp_atten = 110; |
| 495 | if (band == IEEE80211_BAND_5GHZ) | 495 | if (band == NL80211_BAND_5GHZ) |
| 496 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; | 496 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 497 | else | 497 | else |
| 498 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); | 498 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); |
| @@ -505,7 +505,7 @@ static int iwl_get_channel_for_reset_scan(struct iwl_priv *priv, | |||
| 505 | 505 | ||
| 506 | static int iwl_get_channels_for_scan(struct iwl_priv *priv, | 506 | static int iwl_get_channels_for_scan(struct iwl_priv *priv, |
| 507 | struct ieee80211_vif *vif, | 507 | struct ieee80211_vif *vif, |
| 508 | enum ieee80211_band band, | 508 | enum nl80211_band band, |
| 509 | u8 is_active, u8 n_probes, | 509 | u8 is_active, u8 n_probes, |
| 510 | struct iwl_scan_channel *scan_ch) | 510 | struct iwl_scan_channel *scan_ch) |
| 511 | { | 511 | { |
| @@ -553,7 +553,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv, | |||
| 553 | * power level: | 553 | * power level: |
| 554 | * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; | 554 | * scan_ch->tx_gain = ((1 << 5) | (2 << 3)) | 3; |
| 555 | */ | 555 | */ |
| 556 | if (band == IEEE80211_BAND_5GHZ) | 556 | if (band == NL80211_BAND_5GHZ) |
| 557 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; | 557 | scan_ch->tx_gain = ((1 << 5) | (3 << 3)) | 3; |
| 558 | else | 558 | else |
| 559 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); | 559 | scan_ch->tx_gain = ((1 << 5) | (5 << 3)); |
| @@ -636,7 +636,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
| 636 | u32 rate_flags = 0; | 636 | u32 rate_flags = 0; |
| 637 | u16 cmd_len = 0; | 637 | u16 cmd_len = 0; |
| 638 | u16 rx_chain = 0; | 638 | u16 rx_chain = 0; |
| 639 | enum ieee80211_band band; | 639 | enum nl80211_band band; |
| 640 | u8 n_probes = 0; | 640 | u8 n_probes = 0; |
| 641 | u8 rx_ant = priv->nvm_data->valid_rx_ant; | 641 | u8 rx_ant = priv->nvm_data->valid_rx_ant; |
| 642 | u8 rate; | 642 | u8 rate; |
| @@ -750,7 +750,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
| 750 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; | 750 | scan->tx_cmd.stop_time.life_time = TX_CMD_LIFE_TIME_INFINITE; |
| 751 | 751 | ||
| 752 | switch (priv->scan_band) { | 752 | switch (priv->scan_band) { |
| 753 | case IEEE80211_BAND_2GHZ: | 753 | case NL80211_BAND_2GHZ: |
| 754 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; | 754 | scan->flags = RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK; |
| 755 | chan_mod = le32_to_cpu( | 755 | chan_mod = le32_to_cpu( |
| 756 | priv->contexts[IWL_RXON_CTX_BSS].active.flags & | 756 | priv->contexts[IWL_RXON_CTX_BSS].active.flags & |
| @@ -771,7 +771,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
| 771 | priv->lib->bt_params->advanced_bt_coexist) | 771 | priv->lib->bt_params->advanced_bt_coexist) |
| 772 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; | 772 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; |
| 773 | break; | 773 | break; |
| 774 | case IEEE80211_BAND_5GHZ: | 774 | case NL80211_BAND_5GHZ: |
| 775 | rate = IWL_RATE_6M_PLCP; | 775 | rate = IWL_RATE_6M_PLCP; |
| 776 | break; | 776 | break; |
| 777 | default: | 777 | default: |
| @@ -809,7 +809,7 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
| 809 | 809 | ||
| 810 | band = priv->scan_band; | 810 | band = priv->scan_band; |
| 811 | 811 | ||
| 812 | if (band == IEEE80211_BAND_2GHZ && | 812 | if (band == NL80211_BAND_2GHZ && |
| 813 | priv->lib->bt_params && | 813 | priv->lib->bt_params && |
| 814 | priv->lib->bt_params->advanced_bt_coexist) { | 814 | priv->lib->bt_params->advanced_bt_coexist) { |
| 815 | /* transmit 2.4 GHz probes only on first antenna */ | 815 | /* transmit 2.4 GHz probes only on first antenna */ |
| @@ -925,16 +925,16 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
| 925 | void iwl_init_scan_params(struct iwl_priv *priv) | 925 | void iwl_init_scan_params(struct iwl_priv *priv) |
| 926 | { | 926 | { |
| 927 | u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1; | 927 | u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1; |
| 928 | if (!priv->scan_tx_ant[IEEE80211_BAND_5GHZ]) | 928 | if (!priv->scan_tx_ant[NL80211_BAND_5GHZ]) |
| 929 | priv->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx; | 929 | priv->scan_tx_ant[NL80211_BAND_5GHZ] = ant_idx; |
| 930 | if (!priv->scan_tx_ant[IEEE80211_BAND_2GHZ]) | 930 | if (!priv->scan_tx_ant[NL80211_BAND_2GHZ]) |
| 931 | priv->scan_tx_ant[IEEE80211_BAND_2GHZ] = ant_idx; | 931 | priv->scan_tx_ant[NL80211_BAND_2GHZ] = ant_idx; |
| 932 | } | 932 | } |
| 933 | 933 | ||
| 934 | int __must_check iwl_scan_initiate(struct iwl_priv *priv, | 934 | int __must_check iwl_scan_initiate(struct iwl_priv *priv, |
| 935 | struct ieee80211_vif *vif, | 935 | struct ieee80211_vif *vif, |
| 936 | enum iwl_scan_type scan_type, | 936 | enum iwl_scan_type scan_type, |
| 937 | enum ieee80211_band band) | 937 | enum nl80211_band band) |
| 938 | { | 938 | { |
| 939 | int ret; | 939 | int ret; |
| 940 | 940 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c index 8e9768a553e4..de6ec9b7ace4 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/sta.c | |||
| @@ -579,7 +579,7 @@ static void iwl_sta_fill_lq(struct iwl_priv *priv, struct iwl_rxon_context *ctx, | |||
| 579 | 579 | ||
| 580 | /* Set up the rate scaling to start at selected rate, fall back | 580 | /* Set up the rate scaling to start at selected rate, fall back |
| 581 | * all the way down to 1M in IEEE order, and then spin on 1M */ | 581 | * all the way down to 1M in IEEE order, and then spin on 1M */ |
| 582 | if (priv->band == IEEE80211_BAND_5GHZ) | 582 | if (priv->band == NL80211_BAND_5GHZ) |
| 583 | r = IWL_RATE_6M_INDEX; | 583 | r = IWL_RATE_6M_INDEX; |
| 584 | else if (ctx && ctx->vif && ctx->vif->p2p) | 584 | else if (ctx && ctx->vif && ctx->vif->p2p) |
| 585 | r = IWL_RATE_6M_INDEX; | 585 | r = IWL_RATE_6M_INDEX; |
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/tx.c b/drivers/net/wireless/intel/iwlwifi/dvm/tx.c index 59e2001c39f8..4b97371c3b42 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/tx.c | |||
| @@ -81,7 +81,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, | |||
| 81 | tx_flags |= TX_CMD_FLG_TSF_MSK; | 81 | tx_flags |= TX_CMD_FLG_TSF_MSK; |
| 82 | else if (ieee80211_is_back_req(fc)) | 82 | else if (ieee80211_is_back_req(fc)) |
| 83 | tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; | 83 | tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; |
| 84 | else if (info->band == IEEE80211_BAND_2GHZ && | 84 | else if (info->band == NL80211_BAND_2GHZ && |
| 85 | priv->lib->bt_params && | 85 | priv->lib->bt_params && |
| 86 | priv->lib->bt_params->advanced_bt_coexist && | 86 | priv->lib->bt_params->advanced_bt_coexist && |
| 87 | (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || | 87 | (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || |
| @@ -177,7 +177,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
| 177 | rate_idx = rate_lowest_index( | 177 | rate_idx = rate_lowest_index( |
| 178 | &priv->nvm_data->bands[info->band], sta); | 178 | &priv->nvm_data->bands[info->band], sta); |
| 179 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ | 179 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
| 180 | if (info->band == IEEE80211_BAND_5GHZ) | 180 | if (info->band == NL80211_BAND_5GHZ) |
| 181 | rate_idx += IWL_FIRST_OFDM_RATE; | 181 | rate_idx += IWL_FIRST_OFDM_RATE; |
| 182 | /* Get PLCP rate for tx_cmd->rate_n_flags */ | 182 | /* Get PLCP rate for tx_cmd->rate_n_flags */ |
| 183 | rate_plcp = iwl_rates[rate_idx].plcp; | 183 | rate_plcp = iwl_rates[rate_idx].plcp; |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-1000.c b/drivers/net/wireless/intel/iwlwifi/iwl-1000.c index ef22c3d168fc..5c2aae64d59f 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-1000.c | |||
| @@ -64,7 +64,7 @@ static const struct iwl_base_params iwl1000_base_params = { | |||
| 64 | static const struct iwl_ht_params iwl1000_ht_params = { | 64 | static const struct iwl_ht_params iwl1000_ht_params = { |
| 65 | .ht_greenfield_support = true, | 65 | .ht_greenfield_support = true, |
| 66 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 66 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
| 67 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ), | 67 | .ht40_bands = BIT(NL80211_BAND_2GHZ), |
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | static const struct iwl_eeprom_params iwl1000_eeprom_params = { | 70 | static const struct iwl_eeprom_params iwl1000_eeprom_params = { |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-2000.c b/drivers/net/wireless/intel/iwlwifi/iwl-2000.c index dc246c997084..2e823bdc4757 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-2000.c | |||
| @@ -89,7 +89,7 @@ static const struct iwl_base_params iwl2030_base_params = { | |||
| 89 | static const struct iwl_ht_params iwl2000_ht_params = { | 89 | static const struct iwl_ht_params iwl2000_ht_params = { |
| 90 | .ht_greenfield_support = true, | 90 | .ht_greenfield_support = true, |
| 91 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 91 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
| 92 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ), | 92 | .ht40_bands = BIT(NL80211_BAND_2GHZ), |
| 93 | }; | 93 | }; |
| 94 | 94 | ||
| 95 | static const struct iwl_eeprom_params iwl20x0_eeprom_params = { | 95 | static const struct iwl_eeprom_params iwl20x0_eeprom_params = { |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-5000.c b/drivers/net/wireless/intel/iwlwifi/iwl-5000.c index 4dcdab6781cc..4c3e3cf4c799 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-5000.c | |||
| @@ -62,7 +62,7 @@ static const struct iwl_base_params iwl5000_base_params = { | |||
| 62 | 62 | ||
| 63 | static const struct iwl_ht_params iwl5000_ht_params = { | 63 | static const struct iwl_ht_params iwl5000_ht_params = { |
| 64 | .ht_greenfield_support = true, | 64 | .ht_greenfield_support = true, |
| 65 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | 65 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
| 66 | }; | 66 | }; |
| 67 | 67 | ||
| 68 | static const struct iwl_eeprom_params iwl5000_eeprom_params = { | 68 | static const struct iwl_eeprom_params iwl5000_eeprom_params = { |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-6000.c b/drivers/net/wireless/intel/iwlwifi/iwl-6000.c index 9938f5340ac0..5a7b7e1f0aab 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-6000.c | |||
| @@ -110,7 +110,7 @@ static const struct iwl_base_params iwl6000_g2_base_params = { | |||
| 110 | static const struct iwl_ht_params iwl6000_ht_params = { | 110 | static const struct iwl_ht_params iwl6000_ht_params = { |
| 111 | .ht_greenfield_support = true, | 111 | .ht_greenfield_support = true, |
| 112 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 112 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
| 113 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | 113 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | static const struct iwl_eeprom_params iwl6000_eeprom_params = { | 116 | static const struct iwl_eeprom_params iwl6000_eeprom_params = { |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c index b6283c881d42..abd2904ecc48 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-7000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-7000.c | |||
| @@ -156,7 +156,7 @@ static const struct iwl_tt_params iwl7000_high_temp_tt_params = { | |||
| 156 | 156 | ||
| 157 | static const struct iwl_ht_params iwl7000_ht_params = { | 157 | static const struct iwl_ht_params iwl7000_ht_params = { |
| 158 | .stbc = true, | 158 | .stbc = true, |
| 159 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | 159 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
| 160 | }; | 160 | }; |
| 161 | 161 | ||
| 162 | #define IWL_DEVICE_7000_COMMON \ | 162 | #define IWL_DEVICE_7000_COMMON \ |
| @@ -287,7 +287,7 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = { | |||
| 287 | static const struct iwl_ht_params iwl7265_ht_params = { | 287 | static const struct iwl_ht_params iwl7265_ht_params = { |
| 288 | .stbc = true, | 288 | .stbc = true, |
| 289 | .ldpc = true, | 289 | .ldpc = true, |
| 290 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | 290 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | const struct iwl_cfg iwl3165_2ac_cfg = { | 293 | const struct iwl_cfg iwl3165_2ac_cfg = { |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c index 0728a288aa3d..a9212a12f4da 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-8000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-8000.c | |||
| @@ -124,7 +124,7 @@ static const struct iwl_base_params iwl8000_base_params = { | |||
| 124 | static const struct iwl_ht_params iwl8000_ht_params = { | 124 | static const struct iwl_ht_params iwl8000_ht_params = { |
| 125 | .stbc = true, | 125 | .stbc = true, |
| 126 | .ldpc = true, | 126 | .ldpc = true, |
| 127 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | 127 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
| 128 | }; | 128 | }; |
| 129 | 129 | ||
| 130 | static const struct iwl_tt_params iwl8000_tt_params = { | 130 | static const struct iwl_tt_params iwl8000_tt_params = { |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c index a3d35aa291a9..b9aca3795f06 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-9000.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-9000.c | |||
| @@ -93,7 +93,7 @@ static const struct iwl_base_params iwl9000_base_params = { | |||
| 93 | static const struct iwl_ht_params iwl9000_ht_params = { | 93 | static const struct iwl_ht_params iwl9000_ht_params = { |
| 94 | .stbc = true, | 94 | .stbc = true, |
| 95 | .ldpc = true, | 95 | .ldpc = true, |
| 96 | .ht40_bands = BIT(IEEE80211_BAND_2GHZ) | BIT(IEEE80211_BAND_5GHZ), | 96 | .ht40_bands = BIT(NL80211_BAND_2GHZ) | BIT(NL80211_BAND_5GHZ), |
| 97 | }; | 97 | }; |
| 98 | 98 | ||
| 99 | static const struct iwl_tt_params iwl9000_tt_params = { | 99 | static const struct iwl_tt_params iwl9000_tt_params = { |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 08bb4f4e424a..720679889ab3 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h | |||
| @@ -185,7 +185,7 @@ struct iwl_base_params { | |||
| 185 | * @stbc: support Tx STBC and 1*SS Rx STBC | 185 | * @stbc: support Tx STBC and 1*SS Rx STBC |
| 186 | * @ldpc: support Tx/Rx with LDPC | 186 | * @ldpc: support Tx/Rx with LDPC |
| 187 | * @use_rts_for_aggregation: use rts/cts protection for HT traffic | 187 | * @use_rts_for_aggregation: use rts/cts protection for HT traffic |
| 188 | * @ht40_bands: bitmap of bands (using %IEEE80211_BAND_*) that support HT40 | 188 | * @ht40_bands: bitmap of bands (using %NL80211_BAND_*) that support HT40 |
| 189 | */ | 189 | */ |
| 190 | struct iwl_ht_params { | 190 | struct iwl_ht_params { |
| 191 | enum ieee80211_smps_mode smps_mode; | 191 | enum ieee80211_smps_mode smps_mode; |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c index c15f5be85197..bf1b69aec813 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | |||
| @@ -390,10 +390,10 @@ iwl_eeprom_enh_txp_read_element(struct iwl_nvm_data *data, | |||
| 390 | int n_channels, s8 max_txpower_avg) | 390 | int n_channels, s8 max_txpower_avg) |
| 391 | { | 391 | { |
| 392 | int ch_idx; | 392 | int ch_idx; |
| 393 | enum ieee80211_band band; | 393 | enum nl80211_band band; |
| 394 | 394 | ||
| 395 | band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ? | 395 | band = txp->flags & IWL_EEPROM_ENH_TXP_FL_BAND_52G ? |
| 396 | IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; | 396 | NL80211_BAND_5GHZ : NL80211_BAND_2GHZ; |
| 397 | 397 | ||
| 398 | for (ch_idx = 0; ch_idx < n_channels; ch_idx++) { | 398 | for (ch_idx = 0; ch_idx < n_channels; ch_idx++) { |
| 399 | struct ieee80211_channel *chan = &data->channels[ch_idx]; | 399 | struct ieee80211_channel *chan = &data->channels[ch_idx]; |
| @@ -526,7 +526,7 @@ static void iwl_init_band_reference(const struct iwl_cfg *cfg, | |||
| 526 | 526 | ||
| 527 | static void iwl_mod_ht40_chan_info(struct device *dev, | 527 | static void iwl_mod_ht40_chan_info(struct device *dev, |
| 528 | struct iwl_nvm_data *data, int n_channels, | 528 | struct iwl_nvm_data *data, int n_channels, |
| 529 | enum ieee80211_band band, u16 channel, | 529 | enum nl80211_band band, u16 channel, |
| 530 | const struct iwl_eeprom_channel *eeprom_ch, | 530 | const struct iwl_eeprom_channel *eeprom_ch, |
| 531 | u8 clear_ht40_extension_channel) | 531 | u8 clear_ht40_extension_channel) |
| 532 | { | 532 | { |
| @@ -548,7 +548,7 @@ static void iwl_mod_ht40_chan_info(struct device *dev, | |||
| 548 | IWL_DEBUG_EEPROM(dev, | 548 | IWL_DEBUG_EEPROM(dev, |
| 549 | "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm): Ad-Hoc %ssupported\n", | 549 | "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm): Ad-Hoc %ssupported\n", |
| 550 | channel, | 550 | channel, |
| 551 | band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4", | 551 | band == NL80211_BAND_5GHZ ? "5.2" : "2.4", |
| 552 | CHECK_AND_PRINT(IBSS), | 552 | CHECK_AND_PRINT(IBSS), |
| 553 | CHECK_AND_PRINT(ACTIVE), | 553 | CHECK_AND_PRINT(ACTIVE), |
| 554 | CHECK_AND_PRINT(RADAR), | 554 | CHECK_AND_PRINT(RADAR), |
| @@ -606,8 +606,8 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, | |||
| 606 | n_channels++; | 606 | n_channels++; |
| 607 | 607 | ||
| 608 | channel->hw_value = eeprom_ch_array[ch_idx]; | 608 | channel->hw_value = eeprom_ch_array[ch_idx]; |
| 609 | channel->band = (band == 1) ? IEEE80211_BAND_2GHZ | 609 | channel->band = (band == 1) ? NL80211_BAND_2GHZ |
| 610 | : IEEE80211_BAND_5GHZ; | 610 | : NL80211_BAND_5GHZ; |
| 611 | channel->center_freq = | 611 | channel->center_freq = |
| 612 | ieee80211_channel_to_frequency( | 612 | ieee80211_channel_to_frequency( |
| 613 | channel->hw_value, channel->band); | 613 | channel->hw_value, channel->band); |
| @@ -677,15 +677,15 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, | |||
| 677 | 677 | ||
| 678 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ | 678 | /* Two additional EEPROM bands for 2.4 and 5 GHz HT40 channels */ |
| 679 | for (band = 6; band <= 7; band++) { | 679 | for (band = 6; band <= 7; band++) { |
| 680 | enum ieee80211_band ieeeband; | 680 | enum nl80211_band ieeeband; |
| 681 | 681 | ||
| 682 | iwl_init_band_reference(cfg, eeprom, eeprom_size, band, | 682 | iwl_init_band_reference(cfg, eeprom, eeprom_size, band, |
| 683 | &eeprom_ch_count, &eeprom_ch_info, | 683 | &eeprom_ch_count, &eeprom_ch_info, |
| 684 | &eeprom_ch_array); | 684 | &eeprom_ch_array); |
| 685 | 685 | ||
| 686 | /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ | 686 | /* EEPROM band 6 is 2.4, band 7 is 5 GHz */ |
| 687 | ieeeband = (band == 6) ? IEEE80211_BAND_2GHZ | 687 | ieeeband = (band == 6) ? NL80211_BAND_2GHZ |
| 688 | : IEEE80211_BAND_5GHZ; | 688 | : NL80211_BAND_5GHZ; |
| 689 | 689 | ||
| 690 | /* Loop through each band adding each of the channels */ | 690 | /* Loop through each band adding each of the channels */ |
| 691 | for (ch_idx = 0; ch_idx < eeprom_ch_count; ch_idx++) { | 691 | for (ch_idx = 0; ch_idx < eeprom_ch_count; ch_idx++) { |
| @@ -708,7 +708,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, | |||
| 708 | 708 | ||
| 709 | int iwl_init_sband_channels(struct iwl_nvm_data *data, | 709 | int iwl_init_sband_channels(struct iwl_nvm_data *data, |
| 710 | struct ieee80211_supported_band *sband, | 710 | struct ieee80211_supported_band *sband, |
| 711 | int n_channels, enum ieee80211_band band) | 711 | int n_channels, enum nl80211_band band) |
| 712 | { | 712 | { |
| 713 | struct ieee80211_channel *chan = &data->channels[0]; | 713 | struct ieee80211_channel *chan = &data->channels[0]; |
| 714 | int n = 0, idx = 0; | 714 | int n = 0, idx = 0; |
| @@ -734,7 +734,7 @@ int iwl_init_sband_channels(struct iwl_nvm_data *data, | |||
| 734 | void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, | 734 | void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, |
| 735 | struct iwl_nvm_data *data, | 735 | struct iwl_nvm_data *data, |
| 736 | struct ieee80211_sta_ht_cap *ht_info, | 736 | struct ieee80211_sta_ht_cap *ht_info, |
| 737 | enum ieee80211_band band, | 737 | enum nl80211_band band, |
| 738 | u8 tx_chains, u8 rx_chains) | 738 | u8 tx_chains, u8 rx_chains) |
| 739 | { | 739 | { |
| 740 | int max_bit_rate = 0; | 740 | int max_bit_rate = 0; |
| @@ -813,22 +813,22 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, | |||
| 813 | int n_used = 0; | 813 | int n_used = 0; |
| 814 | struct ieee80211_supported_band *sband; | 814 | struct ieee80211_supported_band *sband; |
| 815 | 815 | ||
| 816 | sband = &data->bands[IEEE80211_BAND_2GHZ]; | 816 | sband = &data->bands[NL80211_BAND_2GHZ]; |
| 817 | sband->band = IEEE80211_BAND_2GHZ; | 817 | sband->band = NL80211_BAND_2GHZ; |
| 818 | sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; | 818 | sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; |
| 819 | sband->n_bitrates = N_RATES_24; | 819 | sband->n_bitrates = N_RATES_24; |
| 820 | n_used += iwl_init_sband_channels(data, sband, n_channels, | 820 | n_used += iwl_init_sband_channels(data, sband, n_channels, |
| 821 | IEEE80211_BAND_2GHZ); | 821 | NL80211_BAND_2GHZ); |
| 822 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_2GHZ, | 822 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ, |
| 823 | data->valid_tx_ant, data->valid_rx_ant); | 823 | data->valid_tx_ant, data->valid_rx_ant); |
| 824 | 824 | ||
| 825 | sband = &data->bands[IEEE80211_BAND_5GHZ]; | 825 | sband = &data->bands[NL80211_BAND_5GHZ]; |
| 826 | sband->band = IEEE80211_BAND_5GHZ; | 826 | sband->band = NL80211_BAND_5GHZ; |
| 827 | sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; | 827 | sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; |
| 828 | sband->n_bitrates = N_RATES_52; | 828 | sband->n_bitrates = N_RATES_52; |
| 829 | n_used += iwl_init_sband_channels(data, sband, n_channels, | 829 | n_used += iwl_init_sband_channels(data, sband, n_channels, |
| 830 | IEEE80211_BAND_5GHZ); | 830 | NL80211_BAND_5GHZ); |
| 831 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_5GHZ, | 831 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ, |
| 832 | data->valid_tx_ant, data->valid_rx_ant); | 832 | data->valid_tx_ant, data->valid_rx_ant); |
| 833 | 833 | ||
| 834 | if (n_channels != n_used) | 834 | if (n_channels != n_used) |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h index ad2b834668ff..53f39a34eca2 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h | |||
| @@ -98,7 +98,7 @@ struct iwl_nvm_data { | |||
| 98 | s8 max_tx_pwr_half_dbm; | 98 | s8 max_tx_pwr_half_dbm; |
| 99 | 99 | ||
| 100 | bool lar_enabled; | 100 | bool lar_enabled; |
| 101 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 101 | struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; |
| 102 | struct ieee80211_channel channels[]; | 102 | struct ieee80211_channel channels[]; |
| 103 | }; | 103 | }; |
| 104 | 104 | ||
| @@ -133,12 +133,12 @@ int iwl_nvm_check_version(struct iwl_nvm_data *data, | |||
| 133 | 133 | ||
| 134 | int iwl_init_sband_channels(struct iwl_nvm_data *data, | 134 | int iwl_init_sband_channels(struct iwl_nvm_data *data, |
| 135 | struct ieee80211_supported_band *sband, | 135 | struct ieee80211_supported_band *sband, |
| 136 | int n_channels, enum ieee80211_band band); | 136 | int n_channels, enum nl80211_band band); |
| 137 | 137 | ||
| 138 | void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, | 138 | void iwl_init_ht_hw_capab(const struct iwl_cfg *cfg, |
| 139 | struct iwl_nvm_data *data, | 139 | struct iwl_nvm_data *data, |
| 140 | struct ieee80211_sta_ht_cap *ht_info, | 140 | struct ieee80211_sta_ht_cap *ht_info, |
| 141 | enum ieee80211_band band, | 141 | enum nl80211_band band, |
| 142 | u8 tx_chains, u8 rx_chains); | 142 | u8 tx_chains, u8 rx_chains); |
| 143 | 143 | ||
| 144 | #endif /* __iwl_eeprom_parse_h__ */ | 144 | #endif /* __iwl_eeprom_parse_h__ */ |
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 93a689583dff..14743c37d976 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | |||
| @@ -308,7 +308,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, | |||
| 308 | 308 | ||
| 309 | channel->hw_value = nvm_chan[ch_idx]; | 309 | channel->hw_value = nvm_chan[ch_idx]; |
| 310 | channel->band = (ch_idx < num_2ghz_channels) ? | 310 | channel->band = (ch_idx < num_2ghz_channels) ? |
| 311 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 311 | NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
| 312 | channel->center_freq = | 312 | channel->center_freq = |
| 313 | ieee80211_channel_to_frequency( | 313 | ieee80211_channel_to_frequency( |
| 314 | channel->hw_value, channel->band); | 314 | channel->hw_value, channel->band); |
| @@ -320,7 +320,7 @@ static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, | |||
| 320 | * is not used in mvm, and is used for backwards compatibility | 320 | * is not used in mvm, and is used for backwards compatibility |
| 321 | */ | 321 | */ |
| 322 | channel->max_power = IWL_DEFAULT_MAX_TX_POWER; | 322 | channel->max_power = IWL_DEFAULT_MAX_TX_POWER; |
| 323 | is_5ghz = channel->band == IEEE80211_BAND_5GHZ; | 323 | is_5ghz = channel->band == NL80211_BAND_5GHZ; |
| 324 | 324 | ||
| 325 | /* don't put limitations in case we're using LAR */ | 325 | /* don't put limitations in case we're using LAR */ |
| 326 | if (!lar_supported) | 326 | if (!lar_supported) |
| @@ -439,22 +439,22 @@ static void iwl_init_sbands(struct device *dev, const struct iwl_cfg *cfg, | |||
| 439 | &ch_section[NVM_CHANNELS_FAMILY_8000], | 439 | &ch_section[NVM_CHANNELS_FAMILY_8000], |
| 440 | lar_supported); | 440 | lar_supported); |
| 441 | 441 | ||
| 442 | sband = &data->bands[IEEE80211_BAND_2GHZ]; | 442 | sband = &data->bands[NL80211_BAND_2GHZ]; |
| 443 | sband->band = IEEE80211_BAND_2GHZ; | 443 | sband->band = NL80211_BAND_2GHZ; |
| 444 | sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; | 444 | sband->bitrates = &iwl_cfg80211_rates[RATES_24_OFFS]; |
| 445 | sband->n_bitrates = N_RATES_24; | 445 | sband->n_bitrates = N_RATES_24; |
| 446 | n_used += iwl_init_sband_channels(data, sband, n_channels, | 446 | n_used += iwl_init_sband_channels(data, sband, n_channels, |
| 447 | IEEE80211_BAND_2GHZ); | 447 | NL80211_BAND_2GHZ); |
| 448 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_2GHZ, | 448 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_2GHZ, |
| 449 | tx_chains, rx_chains); | 449 | tx_chains, rx_chains); |
| 450 | 450 | ||
| 451 | sband = &data->bands[IEEE80211_BAND_5GHZ]; | 451 | sband = &data->bands[NL80211_BAND_5GHZ]; |
| 452 | sband->band = IEEE80211_BAND_5GHZ; | 452 | sband->band = NL80211_BAND_5GHZ; |
| 453 | sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; | 453 | sband->bitrates = &iwl_cfg80211_rates[RATES_52_OFFS]; |
| 454 | sband->n_bitrates = N_RATES_52; | 454 | sband->n_bitrates = N_RATES_52; |
| 455 | n_used += iwl_init_sband_channels(data, sband, n_channels, | 455 | n_used += iwl_init_sband_channels(data, sband, n_channels, |
| 456 | IEEE80211_BAND_5GHZ); | 456 | NL80211_BAND_5GHZ); |
| 457 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, IEEE80211_BAND_5GHZ, | 457 | iwl_init_ht_hw_capab(cfg, data, &sband->ht_cap, NL80211_BAND_5GHZ, |
| 458 | tx_chains, rx_chains); | 458 | tx_chains, rx_chains); |
| 459 | if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac) | 459 | if (data->sku_cap_11ac_enable && !iwlwifi_mod_params.disable_11ac) |
| 460 | iwl_init_vht_hw_capab(cfg, data, &sband->vht_cap, | 460 | iwl_init_vht_hw_capab(cfg, data, &sband->vht_cap, |
| @@ -781,7 +781,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
| 781 | struct ieee80211_regdomain *regd; | 781 | struct ieee80211_regdomain *regd; |
| 782 | int size_of_regd; | 782 | int size_of_regd; |
| 783 | struct ieee80211_reg_rule *rule; | 783 | struct ieee80211_reg_rule *rule; |
| 784 | enum ieee80211_band band; | 784 | enum nl80211_band band; |
| 785 | int center_freq, prev_center_freq = 0; | 785 | int center_freq, prev_center_freq = 0; |
| 786 | int valid_rules = 0; | 786 | int valid_rules = 0; |
| 787 | bool new_rule; | 787 | bool new_rule; |
| @@ -809,7 +809,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
| 809 | for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { | 809 | for (ch_idx = 0; ch_idx < num_of_ch; ch_idx++) { |
| 810 | ch_flags = (u16)__le32_to_cpup(channels + ch_idx); | 810 | ch_flags = (u16)__le32_to_cpup(channels + ch_idx); |
| 811 | band = (ch_idx < NUM_2GHZ_CHANNELS) ? | 811 | band = (ch_idx < NUM_2GHZ_CHANNELS) ? |
| 812 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 812 | NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
| 813 | center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx], | 813 | center_freq = ieee80211_channel_to_frequency(nvm_chan[ch_idx], |
| 814 | band); | 814 | band); |
| 815 | new_rule = false; | 815 | new_rule = false; |
| @@ -857,7 +857,7 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg, | |||
| 857 | IWL_DEBUG_DEV(dev, IWL_DL_LAR, | 857 | IWL_DEBUG_DEV(dev, IWL_DL_LAR, |
| 858 | "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n", | 858 | "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n", |
| 859 | center_freq, | 859 | center_freq, |
| 860 | band == IEEE80211_BAND_5GHZ ? "5.2" : "2.4", | 860 | band == NL80211_BAND_5GHZ ? "5.2" : "2.4", |
| 861 | CHECK_AND_PRINT_I(VALID), | 861 | CHECK_AND_PRINT_I(VALID), |
| 862 | CHECK_AND_PRINT_I(ACTIVE), | 862 | CHECK_AND_PRINT_I(ACTIVE), |
| 863 | CHECK_AND_PRINT_I(RADAR), | 863 | CHECK_AND_PRINT_I(RADAR), |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c index 35cdeca3d61e..a63f5bbb1ba7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/coex.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/coex.c | |||
| @@ -378,7 +378,7 @@ iwl_get_coex_type(struct iwl_mvm *mvm, const struct ieee80211_vif *vif) | |||
| 378 | chanctx_conf = rcu_dereference(vif->chanctx_conf); | 378 | chanctx_conf = rcu_dereference(vif->chanctx_conf); |
| 379 | 379 | ||
| 380 | if (!chanctx_conf || | 380 | if (!chanctx_conf || |
| 381 | chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ) { | 381 | chanctx_conf->def.chan->band != NL80211_BAND_2GHZ) { |
| 382 | rcu_read_unlock(); | 382 | rcu_read_unlock(); |
| 383 | return BT_COEX_INVALID_LUT; | 383 | return BT_COEX_INVALID_LUT; |
| 384 | } | 384 | } |
| @@ -537,7 +537,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, | |||
| 537 | 537 | ||
| 538 | /* If channel context is invalid or not on 2.4GHz .. */ | 538 | /* If channel context is invalid or not on 2.4GHz .. */ |
| 539 | if ((!chanctx_conf || | 539 | if ((!chanctx_conf || |
| 540 | chanctx_conf->def.chan->band != IEEE80211_BAND_2GHZ)) { | 540 | chanctx_conf->def.chan->band != NL80211_BAND_2GHZ)) { |
| 541 | if (vif->type == NL80211_IFTYPE_STATION) { | 541 | if (vif->type == NL80211_IFTYPE_STATION) { |
| 542 | /* ... relax constraints and disable rssi events */ | 542 | /* ... relax constraints and disable rssi events */ |
| 543 | iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, | 543 | iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX, |
| @@ -857,11 +857,11 @@ bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm) | |||
| 857 | } | 857 | } |
| 858 | 858 | ||
| 859 | bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, | 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 | u32 bt_activity = le32_to_cpu(mvm->last_bt_notif.bt_activity_grading); | 862 | u32 bt_activity = le32_to_cpu(mvm->last_bt_notif.bt_activity_grading); |
| 863 | 863 | ||
| 864 | if (band != IEEE80211_BAND_2GHZ) | 864 | if (band != NL80211_BAND_2GHZ) |
| 865 | return false; | 865 | return false; |
| 866 | 866 | ||
| 867 | return bt_activity >= BT_LOW_TRAFFIC; | 867 | return bt_activity >= BT_LOW_TRAFFIC; |
| @@ -873,7 +873,7 @@ u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | |||
| 873 | __le16 fc = hdr->frame_control; | 873 | __le16 fc = hdr->frame_control; |
| 874 | bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm); | 874 | bool mplut_enabled = iwl_mvm_is_mplut_supported(mvm); |
| 875 | 875 | ||
| 876 | if (info->band != IEEE80211_BAND_2GHZ) | 876 | if (info->band != NL80211_BAND_2GHZ) |
| 877 | return 0; | 877 | return 0; |
| 878 | 878 | ||
| 879 | if (unlikely(mvm->bt_tx_prio)) | 879 | if (unlikely(mvm->bt_tx_prio)) |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c index 3a279d3403ef..fb96bc00f022 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | |||
| @@ -724,9 +724,9 @@ static ssize_t iwl_dbgfs_tof_responder_params_write(struct ieee80211_vif *vif, | |||
| 724 | 724 | ||
| 725 | ret = kstrtou32(data, 10, &value); | 725 | ret = kstrtou32(data, 10, &value); |
| 726 | if (ret == 0 && value) { | 726 | if (ret == 0 && value) { |
| 727 | enum ieee80211_band band = (cmd->channel_num <= 14) ? | 727 | enum nl80211_band band = (cmd->channel_num <= 14) ? |
| 728 | IEEE80211_BAND_2GHZ : | 728 | NL80211_BAND_2GHZ : |
| 729 | IEEE80211_BAND_5GHZ; | 729 | NL80211_BAND_5GHZ; |
| 730 | struct ieee80211_channel chn = { | 730 | struct ieee80211_channel chn = { |
| 731 | .band = band, | 731 | .band = band, |
| 732 | .center_freq = ieee80211_channel_to_frequency( | 732 | .center_freq = ieee80211_channel_to_frequency( |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 6ad5c602e84c..9e97cf4ff1c5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c | |||
| @@ -980,7 +980,7 @@ int iwl_mvm_up(struct iwl_mvm *mvm) | |||
| 980 | goto error; | 980 | goto error; |
| 981 | 981 | ||
| 982 | /* Add all the PHY contexts */ | 982 | /* Add all the PHY contexts */ |
| 983 | chan = &mvm->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->channels[0]; | 983 | chan = &mvm->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels[0]; |
| 984 | cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT); | 984 | cfg80211_chandef_create(&chandef, chan, NL80211_CHAN_NO_HT); |
| 985 | for (i = 0; i < NUM_PHY_CTX; i++) { | 985 | for (i = 0; i < NUM_PHY_CTX; i++) { |
| 986 | /* | 986 | /* |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index 923d19112e0c..456067b2f48d 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | |||
| @@ -559,7 +559,7 @@ void iwl_mvm_mac_ctxt_release(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
| 559 | 559 | ||
| 560 | static void iwl_mvm_ack_rates(struct iwl_mvm *mvm, | 560 | static void iwl_mvm_ack_rates(struct iwl_mvm *mvm, |
| 561 | struct ieee80211_vif *vif, | 561 | struct ieee80211_vif *vif, |
| 562 | enum ieee80211_band band, | 562 | enum nl80211_band band, |
| 563 | u8 *cck_rates, u8 *ofdm_rates) | 563 | u8 *cck_rates, u8 *ofdm_rates) |
| 564 | { | 564 | { |
| 565 | struct ieee80211_supported_band *sband; | 565 | struct ieee80211_supported_band *sband; |
| @@ -730,7 +730,7 @@ static void iwl_mvm_mac_ctxt_cmd_common(struct iwl_mvm *mvm, | |||
| 730 | rcu_read_lock(); | 730 | rcu_read_lock(); |
| 731 | chanctx = rcu_dereference(vif->chanctx_conf); | 731 | chanctx = rcu_dereference(vif->chanctx_conf); |
| 732 | iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band | 732 | iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band |
| 733 | : IEEE80211_BAND_2GHZ, | 733 | : NL80211_BAND_2GHZ, |
| 734 | &cck_ack_rates, &ofdm_ack_rates); | 734 | &cck_ack_rates, &ofdm_ack_rates); |
| 735 | rcu_read_unlock(); | 735 | rcu_read_unlock(); |
| 736 | 736 | ||
| @@ -1065,7 +1065,7 @@ static int iwl_mvm_mac_ctxt_send_beacon(struct iwl_mvm *mvm, | |||
| 1065 | cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << | 1065 | cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << |
| 1066 | RATE_MCS_ANT_POS); | 1066 | RATE_MCS_ANT_POS); |
| 1067 | 1067 | ||
| 1068 | if (info->band == IEEE80211_BAND_5GHZ || vif->p2p) { | 1068 | if (info->band == NL80211_BAND_5GHZ || vif->p2p) { |
| 1069 | rate = IWL_FIRST_OFDM_RATE; | 1069 | rate = IWL_FIRST_OFDM_RATE; |
| 1070 | } else { | 1070 | } else { |
| 1071 | rate = IWL_FIRST_CCK_RATE; | 1071 | rate = IWL_FIRST_CCK_RATE; |
| @@ -1516,7 +1516,7 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm, | |||
| 1516 | rx_status.device_timestamp = le32_to_cpu(sb->system_time); | 1516 | rx_status.device_timestamp = le32_to_cpu(sb->system_time); |
| 1517 | rx_status.band = | 1517 | rx_status.band = |
| 1518 | (sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? | 1518 | (sb->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? |
| 1519 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 1519 | NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
| 1520 | rx_status.freq = | 1520 | rx_status.freq = |
| 1521 | ieee80211_channel_to_frequency(le16_to_cpu(sb->channel), | 1521 | ieee80211_channel_to_frequency(le16_to_cpu(sb->channel), |
| 1522 | rx_status.band); | 1522 | rx_status.band); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 4f5ec495b460..ef91b3770703 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | |||
| @@ -550,18 +550,18 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) | |||
| 550 | else | 550 | else |
| 551 | mvm->max_scans = IWL_MVM_MAX_LMAC_SCANS; | 551 | mvm->max_scans = IWL_MVM_MAX_LMAC_SCANS; |
| 552 | 552 | ||
| 553 | if (mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels) | 553 | if (mvm->nvm_data->bands[NL80211_BAND_2GHZ].n_channels) |
| 554 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 554 | hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 555 | &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; | 555 | &mvm->nvm_data->bands[NL80211_BAND_2GHZ]; |
| 556 | if (mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels) { | 556 | if (mvm->nvm_data->bands[NL80211_BAND_5GHZ].n_channels) { |
| 557 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 557 | hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 558 | &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; | 558 | &mvm->nvm_data->bands[NL80211_BAND_5GHZ]; |
| 559 | 559 | ||
| 560 | if (fw_has_capa(&mvm->fw->ucode_capa, | 560 | if (fw_has_capa(&mvm->fw->ucode_capa, |
| 561 | IWL_UCODE_TLV_CAPA_BEAMFORMER) && | 561 | IWL_UCODE_TLV_CAPA_BEAMFORMER) && |
| 562 | fw_has_api(&mvm->fw->ucode_capa, | 562 | fw_has_api(&mvm->fw->ucode_capa, |
| 563 | IWL_UCODE_TLV_API_LQ_SS_PARAMS)) | 563 | IWL_UCODE_TLV_API_LQ_SS_PARAMS)) |
| 564 | hw->wiphy->bands[IEEE80211_BAND_5GHZ]->vht_cap.cap |= | 564 | hw->wiphy->bands[NL80211_BAND_5GHZ]->vht_cap.cap |= |
| 565 | IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE; | 565 | IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE; |
| 566 | } | 566 | } |
| 567 | 567 | ||
| @@ -2911,7 +2911,7 @@ static int iwl_mvm_send_aux_roc_cmd(struct iwl_mvm *mvm, | |||
| 2911 | cpu_to_le32(FW_CMD_ID_AND_COLOR(MAC_INDEX_AUX, 0)), | 2911 | cpu_to_le32(FW_CMD_ID_AND_COLOR(MAC_INDEX_AUX, 0)), |
| 2912 | .sta_id_and_color = cpu_to_le32(mvm->aux_sta.sta_id), | 2912 | .sta_id_and_color = cpu_to_le32(mvm->aux_sta.sta_id), |
| 2913 | /* Set the channel info data */ | 2913 | /* Set the channel info data */ |
| 2914 | .channel_info.band = (channel->band == IEEE80211_BAND_2GHZ) ? | 2914 | .channel_info.band = (channel->band == NL80211_BAND_2GHZ) ? |
| 2915 | PHY_BAND_24 : PHY_BAND_5, | 2915 | PHY_BAND_24 : PHY_BAND_5, |
| 2916 | .channel_info.channel = channel->hw_value, | 2916 | .channel_info.channel = channel->hw_value, |
| 2917 | .channel_info.width = PHY_VHT_CHANNEL_MODE20, | 2917 | .channel_info.width = PHY_VHT_CHANNEL_MODE20, |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 2d685e02d488..85800ba0c667 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | |||
| @@ -1133,9 +1133,9 @@ int iwl_run_init_mvm_ucode(struct iwl_mvm *mvm, bool read_nvm); | |||
| 1133 | 1133 | ||
| 1134 | /* Utils */ | 1134 | /* Utils */ |
| 1135 | int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, | 1135 | int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, |
| 1136 | enum ieee80211_band band); | 1136 | enum nl80211_band band); |
| 1137 | void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, | 1137 | void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, |
| 1138 | enum ieee80211_band band, | 1138 | enum nl80211_band band, |
| 1139 | struct ieee80211_tx_rate *r); | 1139 | struct ieee80211_tx_rate *r); |
| 1140 | u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx); | 1140 | u8 iwl_mvm_mac80211_idx_to_hwrate(int rate_idx); |
| 1141 | void iwl_mvm_dump_nic_error_log(struct iwl_mvm *mvm); | 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, | |||
| 1468 | bool iwl_mvm_bt_coex_is_ant_avail(struct iwl_mvm *mvm, u8 ant); | 1468 | bool iwl_mvm_bt_coex_is_ant_avail(struct iwl_mvm *mvm, u8 ant); |
| 1469 | bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm); | 1469 | bool iwl_mvm_bt_coex_is_shared_ant_avail(struct iwl_mvm *mvm); |
| 1470 | bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, | 1470 | bool iwl_mvm_bt_coex_is_tpc_allowed(struct iwl_mvm *mvm, |
| 1471 | enum ieee80211_band band); | 1471 | enum nl80211_band band); |
| 1472 | u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, | 1472 | u8 iwl_mvm_bt_coex_tx_prio(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, |
| 1473 | struct ieee80211_tx_info *info, u8 ac); | 1473 | struct ieee80211_tx_info *info, u8 ac); |
| 1474 | 1474 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c index 6e6a56f2153d..95138830b9f8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/phy-ctxt.c | |||
| @@ -147,7 +147,7 @@ static void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm, | |||
| 147 | u8 active_cnt, idle_cnt; | 147 | u8 active_cnt, idle_cnt; |
| 148 | 148 | ||
| 149 | /* Set the channel info data */ | 149 | /* Set the channel info data */ |
| 150 | cmd->ci.band = (chandef->chan->band == IEEE80211_BAND_2GHZ ? | 150 | cmd->ci.band = (chandef->chan->band == NL80211_BAND_2GHZ ? |
| 151 | PHY_BAND_24 : PHY_BAND_5); | 151 | PHY_BAND_24 : PHY_BAND_5); |
| 152 | 152 | ||
| 153 | cmd->ci.channel = chandef->chan->hw_value; | 153 | cmd->ci.channel = chandef->chan->hw_value; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index 61d0a8cd13f9..81dd2f6a48a5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c | |||
| @@ -829,7 +829,7 @@ static u32 ucode_rate_from_rs_rate(struct iwl_mvm *mvm, | |||
| 829 | 829 | ||
| 830 | /* Convert a ucode rate into an rs_rate object */ | 830 | /* Convert a ucode rate into an rs_rate object */ |
| 831 | static int rs_rate_from_ucode_rate(const u32 ucode_rate, | 831 | static int rs_rate_from_ucode_rate(const u32 ucode_rate, |
| 832 | enum ieee80211_band band, | 832 | enum nl80211_band band, |
| 833 | struct rs_rate *rate) | 833 | struct rs_rate *rate) |
| 834 | { | 834 | { |
| 835 | u32 ant_msk = ucode_rate & RATE_MCS_ANT_ABC_MSK; | 835 | u32 ant_msk = ucode_rate & RATE_MCS_ANT_ABC_MSK; |
| @@ -848,7 +848,7 @@ static int rs_rate_from_ucode_rate(const u32 ucode_rate, | |||
| 848 | if (!(ucode_rate & RATE_MCS_HT_MSK) && | 848 | if (!(ucode_rate & RATE_MCS_HT_MSK) && |
| 849 | !(ucode_rate & RATE_MCS_VHT_MSK)) { | 849 | !(ucode_rate & RATE_MCS_VHT_MSK)) { |
| 850 | if (num_of_ant == 1) { | 850 | if (num_of_ant == 1) { |
| 851 | if (band == IEEE80211_BAND_5GHZ) | 851 | if (band == NL80211_BAND_5GHZ) |
| 852 | rate->type = LQ_LEGACY_A; | 852 | rate->type = LQ_LEGACY_A; |
| 853 | else | 853 | else |
| 854 | rate->type = LQ_LEGACY_G; | 854 | rate->type = LQ_LEGACY_G; |
| @@ -1043,7 +1043,7 @@ static void rs_get_lower_rate_down_column(struct iwl_lq_sta *lq_sta, | |||
| 1043 | return; | 1043 | return; |
| 1044 | } else if (is_siso(rate)) { | 1044 | } else if (is_siso(rate)) { |
| 1045 | /* Downgrade to Legacy if we were in SISO */ | 1045 | /* Downgrade to Legacy if we were in SISO */ |
| 1046 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 1046 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 1047 | rate->type = LQ_LEGACY_A; | 1047 | rate->type = LQ_LEGACY_A; |
| 1048 | else | 1048 | else |
| 1049 | rate->type = LQ_LEGACY_G; | 1049 | rate->type = LQ_LEGACY_G; |
| @@ -1850,7 +1850,7 @@ static int rs_switch_to_column(struct iwl_mvm *mvm, | |||
| 1850 | rate->ant = column->ant; | 1850 | rate->ant = column->ant; |
| 1851 | 1851 | ||
| 1852 | if (column->mode == RS_LEGACY) { | 1852 | if (column->mode == RS_LEGACY) { |
| 1853 | if (lq_sta->band == IEEE80211_BAND_5GHZ) | 1853 | if (lq_sta->band == NL80211_BAND_5GHZ) |
| 1854 | rate->type = LQ_LEGACY_A; | 1854 | rate->type = LQ_LEGACY_A; |
| 1855 | else | 1855 | else |
| 1856 | rate->type = LQ_LEGACY_G; | 1856 | rate->type = LQ_LEGACY_G; |
| @@ -2020,7 +2020,7 @@ static void rs_get_adjacent_txp(struct iwl_mvm *mvm, int index, | |||
| 2020 | } | 2020 | } |
| 2021 | 2021 | ||
| 2022 | static bool rs_tpc_allowed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | 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 | int index = rate->index; | 2025 | int index = rate->index; |
| 2026 | bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM); | 2026 | bool cam = (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_CAM); |
| @@ -2126,7 +2126,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, | |||
| 2126 | struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); | 2126 | struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); |
| 2127 | struct ieee80211_vif *vif = mvm_sta->vif; | 2127 | struct ieee80211_vif *vif = mvm_sta->vif; |
| 2128 | struct ieee80211_chanctx_conf *chanctx_conf; | 2128 | struct ieee80211_chanctx_conf *chanctx_conf; |
| 2129 | enum ieee80211_band band; | 2129 | enum nl80211_band band; |
| 2130 | struct iwl_rate_scale_data *window; | 2130 | struct iwl_rate_scale_data *window; |
| 2131 | struct rs_rate *rate = &tbl->rate; | 2131 | struct rs_rate *rate = &tbl->rate; |
| 2132 | enum tpc_action action; | 2132 | enum tpc_action action; |
| @@ -2148,7 +2148,7 @@ static bool rs_tpc_perform(struct iwl_mvm *mvm, | |||
| 2148 | rcu_read_lock(); | 2148 | rcu_read_lock(); |
| 2149 | chanctx_conf = rcu_dereference(vif->chanctx_conf); | 2149 | chanctx_conf = rcu_dereference(vif->chanctx_conf); |
| 2150 | if (WARN_ON(!chanctx_conf)) | 2150 | if (WARN_ON(!chanctx_conf)) |
| 2151 | band = IEEE80211_NUM_BANDS; | 2151 | band = NUM_NL80211_BANDS; |
| 2152 | else | 2152 | else |
| 2153 | band = chanctx_conf->def.chan->band; | 2153 | band = chanctx_conf->def.chan->band; |
| 2154 | rcu_read_unlock(); | 2154 | rcu_read_unlock(); |
| @@ -2606,7 +2606,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, | |||
| 2606 | rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; | 2606 | rate->type = lq_sta->is_vht ? LQ_VHT_MIMO2 : LQ_HT_MIMO2; |
| 2607 | else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID) | 2607 | else if (lq_sta->max_siso_rate_idx != IWL_RATE_INVALID) |
| 2608 | rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO; | 2608 | rate->type = lq_sta->is_vht ? LQ_VHT_SISO : LQ_HT_SISO; |
| 2609 | else if (lq_sta->band == IEEE80211_BAND_5GHZ) | 2609 | else if (lq_sta->band == NL80211_BAND_5GHZ) |
| 2610 | rate->type = LQ_LEGACY_A; | 2610 | rate->type = LQ_LEGACY_A; |
| 2611 | else | 2611 | else |
| 2612 | rate->type = LQ_LEGACY_G; | 2612 | rate->type = LQ_LEGACY_G; |
| @@ -2623,7 +2623,7 @@ static void rs_init_optimal_rate(struct iwl_mvm *mvm, | |||
| 2623 | } else { | 2623 | } else { |
| 2624 | lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate; | 2624 | lq_sta->optimal_rate_mask = lq_sta->active_legacy_rate; |
| 2625 | 2625 | ||
| 2626 | if (lq_sta->band == IEEE80211_BAND_5GHZ) { | 2626 | if (lq_sta->band == NL80211_BAND_5GHZ) { |
| 2627 | lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy; | 2627 | lq_sta->optimal_rates = rs_optimal_rates_5ghz_legacy; |
| 2628 | lq_sta->optimal_nentries = | 2628 | lq_sta->optimal_nentries = |
| 2629 | ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); | 2629 | ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); |
| @@ -2679,7 +2679,7 @@ static struct rs_rate *rs_get_optimal_rate(struct iwl_mvm *mvm, | |||
| 2679 | static void rs_get_initial_rate(struct iwl_mvm *mvm, | 2679 | static void rs_get_initial_rate(struct iwl_mvm *mvm, |
| 2680 | struct ieee80211_sta *sta, | 2680 | struct ieee80211_sta *sta, |
| 2681 | struct iwl_lq_sta *lq_sta, | 2681 | struct iwl_lq_sta *lq_sta, |
| 2682 | enum ieee80211_band band, | 2682 | enum nl80211_band band, |
| 2683 | struct rs_rate *rate) | 2683 | struct rs_rate *rate) |
| 2684 | { | 2684 | { |
| 2685 | int i, nentries; | 2685 | int i, nentries; |
| @@ -2714,7 +2714,7 @@ static void rs_get_initial_rate(struct iwl_mvm *mvm, | |||
| 2714 | rate->index = find_first_bit(&lq_sta->active_legacy_rate, | 2714 | rate->index = find_first_bit(&lq_sta->active_legacy_rate, |
| 2715 | BITS_PER_LONG); | 2715 | BITS_PER_LONG); |
| 2716 | 2716 | ||
| 2717 | if (band == IEEE80211_BAND_5GHZ) { | 2717 | if (band == NL80211_BAND_5GHZ) { |
| 2718 | rate->type = LQ_LEGACY_A; | 2718 | rate->type = LQ_LEGACY_A; |
| 2719 | initial_rates = rs_optimal_rates_5ghz_legacy; | 2719 | initial_rates = rs_optimal_rates_5ghz_legacy; |
| 2720 | nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); | 2720 | nentries = ARRAY_SIZE(rs_optimal_rates_5ghz_legacy); |
| @@ -2814,7 +2814,7 @@ void rs_update_last_rssi(struct iwl_mvm *mvm, | |||
| 2814 | static void rs_initialize_lq(struct iwl_mvm *mvm, | 2814 | static void rs_initialize_lq(struct iwl_mvm *mvm, |
| 2815 | struct ieee80211_sta *sta, | 2815 | struct ieee80211_sta *sta, |
| 2816 | struct iwl_lq_sta *lq_sta, | 2816 | struct iwl_lq_sta *lq_sta, |
| 2817 | enum ieee80211_band band, | 2817 | enum nl80211_band band, |
| 2818 | bool init) | 2818 | bool init) |
| 2819 | { | 2819 | { |
| 2820 | struct iwl_scale_tbl_info *tbl; | 2820 | struct iwl_scale_tbl_info *tbl; |
| @@ -3097,7 +3097,7 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg) | |||
| 3097 | * Called after adding a new station to initialize rate scaling | 3097 | * Called after adding a new station to initialize rate scaling |
| 3098 | */ | 3098 | */ |
| 3099 | void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | 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 | int i, j; | 3102 | int i, j; |
| 3103 | struct ieee80211_hw *hw = mvm->hw; | 3103 | struct ieee80211_hw *hw = mvm->hw; |
| @@ -3203,7 +3203,7 @@ static void rs_rate_update(void *mvm_r, | |||
| 3203 | #ifdef CONFIG_MAC80211_DEBUGFS | 3203 | #ifdef CONFIG_MAC80211_DEBUGFS |
| 3204 | static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, | 3204 | static void rs_build_rates_table_from_fixed(struct iwl_mvm *mvm, |
| 3205 | struct iwl_lq_cmd *lq_cmd, | 3205 | struct iwl_lq_cmd *lq_cmd, |
| 3206 | enum ieee80211_band band, | 3206 | enum nl80211_band band, |
| 3207 | u32 ucode_rate) | 3207 | u32 ucode_rate) |
| 3208 | { | 3208 | { |
| 3209 | struct rs_rate rate; | 3209 | struct rs_rate rate; |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h index bdb6f2d8d854..90d046fb24a0 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.h | |||
| @@ -305,7 +305,7 @@ struct iwl_lq_sta { | |||
| 305 | bool stbc_capable; /* Tx STBC is supported by chip and Rx by STA */ | 305 | bool stbc_capable; /* Tx STBC is supported by chip and Rx by STA */ |
| 306 | bool bfer_capable; /* Remote supports beamformee and we BFer */ | 306 | bool bfer_capable; /* Remote supports beamformee and we BFer */ |
| 307 | 307 | ||
| 308 | enum ieee80211_band band; | 308 | enum nl80211_band band; |
| 309 | 309 | ||
| 310 | /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ | 310 | /* The following are bitmaps of rates; IWL_RATE_6M_MASK, etc. */ |
| 311 | unsigned long active_legacy_rate; | 311 | unsigned long active_legacy_rate; |
| @@ -358,7 +358,7 @@ struct iwl_lq_sta { | |||
| 358 | 358 | ||
| 359 | /* Initialize station's rate scaling information after adding station */ | 359 | /* Initialize station's rate scaling information after adding station */ |
| 360 | void iwl_mvm_rs_rate_init(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | 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 | /* Notify RS about Tx status */ | 363 | /* Notify RS about Tx status */ |
| 364 | void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, | 364 | void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index d8cadf2fe098..263e8a8576b7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c | |||
| @@ -319,7 +319,7 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, | |||
| 319 | rx_status->device_timestamp = le32_to_cpu(phy_info->system_timestamp); | 319 | rx_status->device_timestamp = le32_to_cpu(phy_info->system_timestamp); |
| 320 | rx_status->band = | 320 | rx_status->band = |
| 321 | (phy_info->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? | 321 | (phy_info->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? |
| 322 | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; | 322 | NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
| 323 | rx_status->freq = | 323 | rx_status->freq = |
| 324 | ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel), | 324 | ieee80211_channel_to_frequency(le16_to_cpu(phy_info->channel), |
| 325 | rx_status->band); | 325 | rx_status->band); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index d4a4c13400cb..651604d18a32 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | |||
| @@ -456,8 +456,8 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, | |||
| 456 | 456 | ||
| 457 | rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise); | 457 | rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise); |
| 458 | rx_status->device_timestamp = le32_to_cpu(desc->gp2_on_air_rise); | 458 | rx_status->device_timestamp = le32_to_cpu(desc->gp2_on_air_rise); |
| 459 | rx_status->band = desc->channel > 14 ? IEEE80211_BAND_5GHZ : | 459 | rx_status->band = desc->channel > 14 ? NL80211_BAND_5GHZ : |
| 460 | IEEE80211_BAND_2GHZ; | 460 | NL80211_BAND_2GHZ; |
| 461 | rx_status->freq = ieee80211_channel_to_frequency(desc->channel, | 461 | rx_status->freq = ieee80211_channel_to_frequency(desc->channel, |
| 462 | rx_status->band); | 462 | rx_status->band); |
| 463 | iwl_mvm_get_signal_strength(mvm, desc, rx_status); | 463 | iwl_mvm_get_signal_strength(mvm, desc, rx_status); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index c1d1be9c5d01..6f609dd5c222 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |||
| @@ -163,16 +163,16 @@ static inline __le16 iwl_mvm_scan_rx_chain(struct iwl_mvm *mvm) | |||
| 163 | return cpu_to_le16(rx_chain); | 163 | return cpu_to_le16(rx_chain); |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 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 | return cpu_to_le32(PHY_BAND_24); | 169 | return cpu_to_le32(PHY_BAND_24); |
| 170 | else | 170 | else |
| 171 | return cpu_to_le32(PHY_BAND_5); | 171 | return cpu_to_le32(PHY_BAND_5); |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | static inline __le32 | 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 | bool no_cck) | 176 | bool no_cck) |
| 177 | { | 177 | { |
| 178 | u32 tx_ant; | 178 | u32 tx_ant; |
| @@ -182,7 +182,7 @@ iwl_mvm_scan_rate_n_flags(struct iwl_mvm *mvm, enum ieee80211_band band, | |||
| 182 | mvm->scan_last_antenna_idx); | 182 | mvm->scan_last_antenna_idx); |
| 183 | tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS; | 183 | tx_ant = BIT(mvm->scan_last_antenna_idx) << RATE_MCS_ANT_POS; |
| 184 | 184 | ||
| 185 | if (band == IEEE80211_BAND_2GHZ && !no_cck) | 185 | if (band == NL80211_BAND_2GHZ && !no_cck) |
| 186 | return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK | | 186 | return cpu_to_le32(IWL_RATE_1M_PLCP | RATE_MCS_CCK_MSK | |
| 187 | tx_ant); | 187 | tx_ant); |
| 188 | else | 188 | else |
| @@ -591,14 +591,14 @@ static void iwl_mvm_scan_fill_tx_cmd(struct iwl_mvm *mvm, | |||
| 591 | tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | | 591 | tx_cmd[0].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | |
| 592 | TX_CMD_FLG_BT_DIS); | 592 | TX_CMD_FLG_BT_DIS); |
| 593 | tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, | 593 | tx_cmd[0].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, |
| 594 | IEEE80211_BAND_2GHZ, | 594 | NL80211_BAND_2GHZ, |
| 595 | no_cck); | 595 | no_cck); |
| 596 | tx_cmd[0].sta_id = mvm->aux_sta.sta_id; | 596 | tx_cmd[0].sta_id = mvm->aux_sta.sta_id; |
| 597 | 597 | ||
| 598 | tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | | 598 | tx_cmd[1].tx_flags = cpu_to_le32(TX_CMD_FLG_SEQ_CTL | |
| 599 | TX_CMD_FLG_BT_DIS); | 599 | TX_CMD_FLG_BT_DIS); |
| 600 | tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, | 600 | tx_cmd[1].rate_n_flags = iwl_mvm_scan_rate_n_flags(mvm, |
| 601 | IEEE80211_BAND_5GHZ, | 601 | NL80211_BAND_5GHZ, |
| 602 | no_cck); | 602 | no_cck); |
| 603 | tx_cmd[1].sta_id = mvm->aux_sta.sta_id; | 603 | tx_cmd[1].sta_id = mvm->aux_sta.sta_id; |
| 604 | } | 604 | } |
| @@ -695,19 +695,19 @@ iwl_mvm_build_scan_probe(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | |||
| 695 | 695 | ||
| 696 | /* Insert ds parameter set element on 2.4 GHz band */ | 696 | /* Insert ds parameter set element on 2.4 GHz band */ |
| 697 | newpos = iwl_mvm_copy_and_insert_ds_elem(mvm, | 697 | newpos = iwl_mvm_copy_and_insert_ds_elem(mvm, |
| 698 | ies->ies[IEEE80211_BAND_2GHZ], | 698 | ies->ies[NL80211_BAND_2GHZ], |
| 699 | ies->len[IEEE80211_BAND_2GHZ], | 699 | ies->len[NL80211_BAND_2GHZ], |
| 700 | pos); | 700 | pos); |
| 701 | params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf); | 701 | params->preq.band_data[0].offset = cpu_to_le16(pos - params->preq.buf); |
| 702 | params->preq.band_data[0].len = cpu_to_le16(newpos - pos); | 702 | params->preq.band_data[0].len = cpu_to_le16(newpos - pos); |
| 703 | pos = newpos; | 703 | pos = newpos; |
| 704 | 704 | ||
| 705 | memcpy(pos, ies->ies[IEEE80211_BAND_5GHZ], | 705 | memcpy(pos, ies->ies[NL80211_BAND_5GHZ], |
| 706 | ies->len[IEEE80211_BAND_5GHZ]); | 706 | ies->len[NL80211_BAND_5GHZ]); |
| 707 | params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf); | 707 | params->preq.band_data[1].offset = cpu_to_le16(pos - params->preq.buf); |
| 708 | params->preq.band_data[1].len = | 708 | params->preq.band_data[1].len = |
| 709 | cpu_to_le16(ies->len[IEEE80211_BAND_5GHZ]); | 709 | cpu_to_le16(ies->len[NL80211_BAND_5GHZ]); |
| 710 | pos += ies->len[IEEE80211_BAND_5GHZ]; | 710 | pos += ies->len[NL80211_BAND_5GHZ]; |
| 711 | 711 | ||
| 712 | memcpy(pos, ies->common_ies, ies->common_ie_len); | 712 | memcpy(pos, ies->common_ies, ies->common_ie_len); |
| 713 | params->preq.common_data.offset = cpu_to_le16(pos - params->preq.buf); | 713 | params->preq.common_data.offset = cpu_to_le16(pos - params->preq.buf); |
| @@ -921,10 +921,10 @@ static __le32 iwl_mvm_scan_config_rates(struct iwl_mvm *mvm) | |||
| 921 | unsigned int rates = 0; | 921 | unsigned int rates = 0; |
| 922 | int i; | 922 | int i; |
| 923 | 923 | ||
| 924 | band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; | 924 | band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ]; |
| 925 | for (i = 0; i < band->n_bitrates; i++) | 925 | for (i = 0; i < band->n_bitrates; i++) |
| 926 | rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); | 926 | rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); |
| 927 | band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; | 927 | band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ]; |
| 928 | for (i = 0; i < band->n_bitrates; i++) | 928 | for (i = 0; i < band->n_bitrates; i++) |
| 929 | rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); | 929 | rates |= rate_to_scan_rate_flag(band->bitrates[i].hw_value); |
| 930 | 930 | ||
| @@ -939,8 +939,8 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm) | |||
| 939 | struct iwl_scan_config *scan_config; | 939 | struct iwl_scan_config *scan_config; |
| 940 | struct ieee80211_supported_band *band; | 940 | struct ieee80211_supported_band *band; |
| 941 | int num_channels = | 941 | int num_channels = |
| 942 | mvm->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels + | 942 | mvm->nvm_data->bands[NL80211_BAND_2GHZ].n_channels + |
| 943 | mvm->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels; | 943 | mvm->nvm_data->bands[NL80211_BAND_5GHZ].n_channels; |
| 944 | int ret, i, j = 0, cmd_size; | 944 | int ret, i, j = 0, cmd_size; |
| 945 | struct iwl_host_cmd cmd = { | 945 | struct iwl_host_cmd cmd = { |
| 946 | .id = iwl_cmd_id(SCAN_CFG_CMD, IWL_ALWAYS_LONG_GROUP, 0), | 946 | .id = iwl_cmd_id(SCAN_CFG_CMD, IWL_ALWAYS_LONG_GROUP, 0), |
| @@ -994,10 +994,10 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm) | |||
| 994 | IWL_CHANNEL_FLAG_EBS_ADD | | 994 | IWL_CHANNEL_FLAG_EBS_ADD | |
| 995 | IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE; | 995 | IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE; |
| 996 | 996 | ||
| 997 | band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; | 997 | band = &mvm->nvm_data->bands[NL80211_BAND_2GHZ]; |
| 998 | for (i = 0; i < band->n_channels; i++, j++) | 998 | for (i = 0; i < band->n_channels; i++, j++) |
| 999 | scan_config->channel_array[j] = band->channels[i].hw_value; | 999 | scan_config->channel_array[j] = band->channels[i].hw_value; |
| 1000 | band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; | 1000 | band = &mvm->nvm_data->bands[NL80211_BAND_5GHZ]; |
| 1001 | for (i = 0; i < band->n_channels; i++, j++) | 1001 | for (i = 0; i < band->n_channels; i++, j++) |
| 1002 | scan_config->channel_array[j] = band->channels[i].hw_value; | 1002 | scan_config->channel_array[j] = band->channels[i].hw_value; |
| 1003 | 1003 | ||
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c b/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c index 18711c5de35a..9f160fc58cd0 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tdls.c | |||
| @@ -444,7 +444,7 @@ iwl_mvm_tdls_config_channel_switch(struct iwl_mvm *mvm, | |||
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | if (chandef) { | 446 | if (chandef) { |
| 447 | cmd.ci.band = (chandef->chan->band == IEEE80211_BAND_2GHZ ? | 447 | cmd.ci.band = (chandef->chan->band == NL80211_BAND_2GHZ ? |
| 448 | PHY_BAND_24 : PHY_BAND_5); | 448 | PHY_BAND_24 : PHY_BAND_5); |
| 449 | cmd.ci.channel = chandef->chan->hw_value; | 449 | cmd.ci.channel = chandef->chan->hw_value; |
| 450 | cmd.ci.width = iwl_mvm_get_channel_width(chandef); | 450 | cmd.ci.width = iwl_mvm_get_channel_width(chandef); |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index efb9b98c4c98..bd286fca3776 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c | |||
| @@ -359,7 +359,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, | |||
| 359 | &mvm->nvm_data->bands[info->band], sta); | 359 | &mvm->nvm_data->bands[info->band], sta); |
| 360 | 360 | ||
| 361 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ | 361 | /* For 5 GHZ band, remap mac80211 rate indices into driver indices */ |
| 362 | if (info->band == IEEE80211_BAND_5GHZ) | 362 | if (info->band == NL80211_BAND_5GHZ) |
| 363 | rate_idx += IWL_FIRST_OFDM_RATE; | 363 | rate_idx += IWL_FIRST_OFDM_RATE; |
| 364 | 364 | ||
| 365 | /* For 2.4 GHZ band, check that there is no need to remap */ | 365 | /* For 2.4 GHZ band, check that there is no need to remap */ |
| @@ -372,7 +372,7 @@ void iwl_mvm_set_tx_cmd_rate(struct iwl_mvm *mvm, struct iwl_tx_cmd *tx_cmd, | |||
| 372 | iwl_mvm_next_antenna(mvm, iwl_mvm_get_valid_tx_ant(mvm), | 372 | iwl_mvm_next_antenna(mvm, iwl_mvm_get_valid_tx_ant(mvm), |
| 373 | mvm->mgmt_last_antenna_idx); | 373 | mvm->mgmt_last_antenna_idx); |
| 374 | 374 | ||
| 375 | if (info->band == IEEE80211_BAND_2GHZ && | 375 | if (info->band == NL80211_BAND_2GHZ && |
| 376 | !iwl_mvm_bt_coex_is_shared_ant_avail(mvm)) | 376 | !iwl_mvm_bt_coex_is_shared_ant_avail(mvm)) |
| 377 | rate_flags = mvm->cfg->non_shared_ant << RATE_MCS_ANT_POS; | 377 | rate_flags = mvm->cfg->non_shared_ant << RATE_MCS_ANT_POS; |
| 378 | else | 378 | else |
| @@ -1052,7 +1052,7 @@ const char *iwl_mvm_get_tx_fail_reason(u32 status) | |||
| 1052 | #endif /* CONFIG_IWLWIFI_DEBUG */ | 1052 | #endif /* CONFIG_IWLWIFI_DEBUG */ |
| 1053 | 1053 | ||
| 1054 | void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, | 1054 | void iwl_mvm_hwrate_to_tx_rate(u32 rate_n_flags, |
| 1055 | enum ieee80211_band band, | 1055 | enum nl80211_band band, |
| 1056 | struct ieee80211_tx_rate *r) | 1056 | struct ieee80211_tx_rate *r) |
| 1057 | { | 1057 | { |
| 1058 | if (rate_n_flags & RATE_HT_MCS_GF_MSK) | 1058 | if (rate_n_flags & RATE_HT_MCS_GF_MSK) |
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index 486c98541afc..f0ffd62f02d3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c | |||
| @@ -217,14 +217,14 @@ static const u8 fw_rate_idx_to_plcp[IWL_RATE_COUNT] = { | |||
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, | 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 | int rate = rate_n_flags & RATE_LEGACY_RATE_MSK; | 222 | int rate = rate_n_flags & RATE_LEGACY_RATE_MSK; |
| 223 | int idx; | 223 | int idx; |
| 224 | int band_offset = 0; | 224 | int band_offset = 0; |
| 225 | 225 | ||
| 226 | /* Legacy rate format, search for match in table */ | 226 | /* Legacy rate format, search for match in table */ |
| 227 | if (band == IEEE80211_BAND_5GHZ) | 227 | if (band == NL80211_BAND_5GHZ) |
| 228 | band_offset = IWL_FIRST_OFDM_RATE; | 228 | band_offset = IWL_FIRST_OFDM_RATE; |
| 229 | for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) | 229 | for (idx = band_offset; idx < IWL_RATE_COUNT_LEGACY; idx++) |
| 230 | if (fw_rate_idx_to_plcp[idx] == rate) | 230 | if (fw_rate_idx_to_plcp[idx] == rate) |
diff --git a/drivers/net/wireless/intersil/orinoco/cfg.c b/drivers/net/wireless/intersil/orinoco/cfg.c index 0f6ea316e38e..7aa47069af0a 100644 --- a/drivers/net/wireless/intersil/orinoco/cfg.c +++ b/drivers/net/wireless/intersil/orinoco/cfg.c | |||
| @@ -60,14 +60,14 @@ int orinoco_wiphy_register(struct wiphy *wiphy) | |||
| 60 | if (priv->channel_mask & (1 << i)) { | 60 | if (priv->channel_mask & (1 << i)) { |
| 61 | priv->channels[i].center_freq = | 61 | priv->channels[i].center_freq = |
| 62 | ieee80211_channel_to_frequency(i + 1, | 62 | ieee80211_channel_to_frequency(i + 1, |
| 63 | IEEE80211_BAND_2GHZ); | 63 | NL80211_BAND_2GHZ); |
| 64 | channels++; | 64 | channels++; |
| 65 | } | 65 | } |
| 66 | } | 66 | } |
| 67 | priv->band.channels = priv->channels; | 67 | priv->band.channels = priv->channels; |
| 68 | priv->band.n_channels = channels; | 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 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; | 71 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; |
| 72 | 72 | ||
| 73 | i = 0; | 73 | i = 0; |
| @@ -175,7 +175,7 @@ static int orinoco_set_monitor_channel(struct wiphy *wiphy, | |||
| 175 | if (cfg80211_get_chandef_type(chandef) != NL80211_CHAN_NO_HT) | 175 | if (cfg80211_get_chandef_type(chandef) != NL80211_CHAN_NO_HT) |
| 176 | return -EINVAL; | 176 | return -EINVAL; |
| 177 | 177 | ||
| 178 | if (chandef->chan->band != IEEE80211_BAND_2GHZ) | 178 | if (chandef->chan->band != NL80211_BAND_2GHZ) |
| 179 | return -EINVAL; | 179 | return -EINVAL; |
| 180 | 180 | ||
| 181 | channel = ieee80211_frequency_to_channel(chandef->chan->center_freq); | 181 | channel = ieee80211_frequency_to_channel(chandef->chan->center_freq); |
diff --git a/drivers/net/wireless/intersil/orinoco/hw.c b/drivers/net/wireless/intersil/orinoco/hw.c index e27e32851f1e..61af5a28f269 100644 --- a/drivers/net/wireless/intersil/orinoco/hw.c +++ b/drivers/net/wireless/intersil/orinoco/hw.c | |||
| @@ -1193,7 +1193,7 @@ int orinoco_hw_get_freq(struct orinoco_private *priv) | |||
| 1193 | goto out; | 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 | out: | 1198 | out: |
| 1199 | orinoco_unlock(priv, &flags); | 1199 | orinoco_unlock(priv, &flags); |
diff --git a/drivers/net/wireless/intersil/orinoco/scan.c b/drivers/net/wireless/intersil/orinoco/scan.c index 2c66166add70..d0ceb06c72d0 100644 --- a/drivers/net/wireless/intersil/orinoco/scan.c +++ b/drivers/net/wireless/intersil/orinoco/scan.c | |||
| @@ -111,7 +111,7 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | freq = ieee80211_channel_to_frequency( | 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 | channel = ieee80211_get_channel(wiphy, freq); | 115 | channel = ieee80211_get_channel(wiphy, freq); |
| 116 | if (!channel) { | 116 | if (!channel) { |
| 117 | printk(KERN_DEBUG "Invalid channel designation %04X(%04X)", | 117 | printk(KERN_DEBUG "Invalid channel designation %04X(%04X)", |
| @@ -148,7 +148,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, | |||
| 148 | ie_len = len - sizeof(*bss); | 148 | ie_len = len - sizeof(*bss); |
| 149 | ie = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bss->data, ie_len); | 149 | ie = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bss->data, ie_len); |
| 150 | chan = ie ? ie[2] : 0; | 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 | channel = ieee80211_get_channel(wiphy, freq); | 152 | channel = ieee80211_get_channel(wiphy, freq); |
| 153 | 153 | ||
| 154 | timestamp = le64_to_cpu(bss->timestamp); | 154 | timestamp = le64_to_cpu(bss->timestamp); |
diff --git a/drivers/net/wireless/intersil/p54/eeprom.c b/drivers/net/wireless/intersil/p54/eeprom.c index 2fe713eda7ad..d4c73d39336f 100644 --- a/drivers/net/wireless/intersil/p54/eeprom.c +++ b/drivers/net/wireless/intersil/p54/eeprom.c | |||
| @@ -76,14 +76,14 @@ struct p54_channel_entry { | |||
| 76 | u16 data; | 76 | u16 data; |
| 77 | int index; | 77 | int index; |
| 78 | int max_power; | 78 | int max_power; |
| 79 | enum ieee80211_band band; | 79 | enum nl80211_band band; |
| 80 | }; | 80 | }; |
| 81 | 81 | ||
| 82 | struct p54_channel_list { | 82 | struct p54_channel_list { |
| 83 | struct p54_channel_entry *channels; | 83 | struct p54_channel_entry *channels; |
| 84 | size_t entries; | 84 | size_t entries; |
| 85 | size_t max_entries; | 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 | static int p54_get_band_from_freq(u16 freq) | 89 | static int p54_get_band_from_freq(u16 freq) |
| @@ -91,10 +91,10 @@ static int p54_get_band_from_freq(u16 freq) | |||
| 91 | /* FIXME: sync these values with the 802.11 spec */ | 91 | /* FIXME: sync these values with the 802.11 spec */ |
| 92 | 92 | ||
| 93 | if ((freq >= 2412) && (freq <= 2484)) | 93 | if ((freq >= 2412) && (freq <= 2484)) |
| 94 | return IEEE80211_BAND_2GHZ; | 94 | return NL80211_BAND_2GHZ; |
| 95 | 95 | ||
| 96 | if ((freq >= 4920) && (freq <= 5825)) | 96 | if ((freq >= 4920) && (freq <= 5825)) |
| 97 | return IEEE80211_BAND_5GHZ; | 97 | return NL80211_BAND_5GHZ; |
| 98 | 98 | ||
| 99 | return -1; | 99 | return -1; |
| 100 | } | 100 | } |
| @@ -124,16 +124,16 @@ static int p54_compare_rssichan(const void *_a, | |||
| 124 | 124 | ||
| 125 | static int p54_fill_band_bitrates(struct ieee80211_hw *dev, | 125 | static int p54_fill_band_bitrates(struct ieee80211_hw *dev, |
| 126 | struct ieee80211_supported_band *band_entry, | 126 | struct ieee80211_supported_band *band_entry, |
| 127 | enum ieee80211_band band) | 127 | enum nl80211_band band) |
| 128 | { | 128 | { |
| 129 | /* TODO: generate rate array dynamically */ | 129 | /* TODO: generate rate array dynamically */ |
| 130 | 130 | ||
| 131 | switch (band) { | 131 | switch (band) { |
| 132 | case IEEE80211_BAND_2GHZ: | 132 | case NL80211_BAND_2GHZ: |
| 133 | band_entry->bitrates = p54_bgrates; | 133 | band_entry->bitrates = p54_bgrates; |
| 134 | band_entry->n_bitrates = ARRAY_SIZE(p54_bgrates); | 134 | band_entry->n_bitrates = ARRAY_SIZE(p54_bgrates); |
| 135 | break; | 135 | break; |
| 136 | case IEEE80211_BAND_5GHZ: | 136 | case NL80211_BAND_5GHZ: |
| 137 | band_entry->bitrates = p54_arates; | 137 | band_entry->bitrates = p54_arates; |
| 138 | band_entry->n_bitrates = ARRAY_SIZE(p54_arates); | 138 | band_entry->n_bitrates = ARRAY_SIZE(p54_arates); |
| 139 | break; | 139 | break; |
| @@ -147,7 +147,7 @@ static int p54_fill_band_bitrates(struct ieee80211_hw *dev, | |||
| 147 | static int p54_generate_band(struct ieee80211_hw *dev, | 147 | static int p54_generate_band(struct ieee80211_hw *dev, |
| 148 | struct p54_channel_list *list, | 148 | struct p54_channel_list *list, |
| 149 | unsigned int *chan_num, | 149 | unsigned int *chan_num, |
| 150 | enum ieee80211_band band) | 150 | enum nl80211_band band) |
| 151 | { | 151 | { |
| 152 | struct p54_common *priv = dev->priv; | 152 | struct p54_common *priv = dev->priv; |
| 153 | struct ieee80211_supported_band *tmp, *old; | 153 | struct ieee80211_supported_band *tmp, *old; |
| @@ -206,7 +206,7 @@ static int p54_generate_band(struct ieee80211_hw *dev, | |||
| 206 | 206 | ||
| 207 | if (j == 0) { | 207 | if (j == 0) { |
| 208 | wiphy_err(dev->wiphy, "Disabling totally damaged %d GHz band\n", | 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 | ret = -ENODATA; | 211 | ret = -ENODATA; |
| 212 | goto err_out; | 212 | goto err_out; |
| @@ -396,7 +396,7 @@ static int p54_generate_channel_lists(struct ieee80211_hw *dev) | |||
| 396 | p54_compare_channels, NULL); | 396 | p54_compare_channels, NULL); |
| 397 | 397 | ||
| 398 | k = 0; | 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 | if (p54_generate_band(dev, list, &k, i) == 0) | 400 | if (p54_generate_band(dev, list, &k, i) == 0) |
| 401 | j++; | 401 | j++; |
| 402 | } | 402 | } |
| @@ -573,10 +573,10 @@ static int p54_parse_rssical(struct ieee80211_hw *dev, | |||
| 573 | for (i = 0; i < entries; i++) { | 573 | for (i = 0; i < entries; i++) { |
| 574 | u16 freq = 0; | 574 | u16 freq = 0; |
| 575 | switch (i) { | 575 | switch (i) { |
| 576 | case IEEE80211_BAND_2GHZ: | 576 | case NL80211_BAND_2GHZ: |
| 577 | freq = 2437; | 577 | freq = 2437; |
| 578 | break; | 578 | break; |
| 579 | case IEEE80211_BAND_5GHZ: | 579 | case NL80211_BAND_5GHZ: |
| 580 | freq = 5240; | 580 | freq = 5240; |
| 581 | break; | 581 | break; |
| 582 | } | 582 | } |
| @@ -902,11 +902,11 @@ good_eeprom: | |||
| 902 | if (priv->rxhw == PDR_SYNTH_FRONTEND_XBOW) | 902 | if (priv->rxhw == PDR_SYNTH_FRONTEND_XBOW) |
| 903 | p54_init_xbow_synth(priv); | 903 | p54_init_xbow_synth(priv); |
| 904 | if (!(synth & PDR_SYNTH_24_GHZ_DISABLED)) | 904 | if (!(synth & PDR_SYNTH_24_GHZ_DISABLED)) |
| 905 | dev->wiphy->bands[IEEE80211_BAND_2GHZ] = | 905 | dev->wiphy->bands[NL80211_BAND_2GHZ] = |
| 906 | priv->band_table[IEEE80211_BAND_2GHZ]; | 906 | priv->band_table[NL80211_BAND_2GHZ]; |
| 907 | if (!(synth & PDR_SYNTH_5_GHZ_DISABLED)) | 907 | if (!(synth & PDR_SYNTH_5_GHZ_DISABLED)) |
| 908 | dev->wiphy->bands[IEEE80211_BAND_5GHZ] = | 908 | dev->wiphy->bands[NL80211_BAND_5GHZ] = |
| 909 | priv->band_table[IEEE80211_BAND_5GHZ]; | 909 | priv->band_table[NL80211_BAND_5GHZ]; |
| 910 | if ((synth & PDR_SYNTH_RX_DIV_MASK) == PDR_SYNTH_RX_DIV_SUPPORTED) | 910 | if ((synth & PDR_SYNTH_RX_DIV_MASK) == PDR_SYNTH_RX_DIV_SUPPORTED) |
| 911 | priv->rx_diversity_mask = 3; | 911 | priv->rx_diversity_mask = 3; |
| 912 | if ((synth & PDR_SYNTH_TX_DIV_MASK) == PDR_SYNTH_TX_DIV_SUPPORTED) | 912 | if ((synth & PDR_SYNTH_TX_DIV_MASK) == PDR_SYNTH_TX_DIV_SUPPORTED) |
diff --git a/drivers/net/wireless/intersil/p54/main.c b/drivers/net/wireless/intersil/p54/main.c index 7805864e76f9..d5a3bf91a03e 100644 --- a/drivers/net/wireless/intersil/p54/main.c +++ b/drivers/net/wireless/intersil/p54/main.c | |||
| @@ -477,7 +477,7 @@ static void p54_bss_info_changed(struct ieee80211_hw *dev, | |||
| 477 | p54_set_edcf(priv); | 477 | p54_set_edcf(priv); |
| 478 | } | 478 | } |
| 479 | if (changed & BSS_CHANGED_BASIC_RATES) { | 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 | priv->basic_rate_mask = (info->basic_rates << 4); | 481 | priv->basic_rate_mask = (info->basic_rates << 4); |
| 482 | else | 482 | else |
| 483 | priv->basic_rate_mask = info->basic_rates; | 483 | priv->basic_rate_mask = info->basic_rates; |
| @@ -829,7 +829,7 @@ void p54_free_common(struct ieee80211_hw *dev) | |||
| 829 | struct p54_common *priv = dev->priv; | 829 | struct p54_common *priv = dev->priv; |
| 830 | unsigned int i; | 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 | kfree(priv->band_table[i]); | 833 | kfree(priv->band_table[i]); |
| 834 | 834 | ||
| 835 | kfree(priv->iq_autocal); | 835 | kfree(priv->iq_autocal); |
diff --git a/drivers/net/wireless/intersil/p54/p54.h b/drivers/net/wireless/intersil/p54/p54.h index 40b401ed6845..529939e611cd 100644 --- a/drivers/net/wireless/intersil/p54/p54.h +++ b/drivers/net/wireless/intersil/p54/p54.h | |||
| @@ -223,7 +223,7 @@ struct p54_common { | |||
| 223 | struct p54_cal_database *curve_data; | 223 | struct p54_cal_database *curve_data; |
| 224 | struct p54_cal_database *output_limit; | 224 | struct p54_cal_database *output_limit; |
| 225 | struct p54_cal_database *rssi_db; | 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 | /* BBP/MAC state */ | 228 | /* BBP/MAC state */ |
| 229 | u8 mac_addr[ETH_ALEN]; | 229 | u8 mac_addr[ETH_ALEN]; |
diff --git a/drivers/net/wireless/intersil/p54/txrx.c b/drivers/net/wireless/intersil/p54/txrx.c index 24e5ff9a9272..1af7da0b386e 100644 --- a/drivers/net/wireless/intersil/p54/txrx.c +++ b/drivers/net/wireless/intersil/p54/txrx.c | |||
| @@ -353,7 +353,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb) | |||
| 353 | rx_status->signal = p54_rssi_to_dbm(priv, hdr->rssi); | 353 | rx_status->signal = p54_rssi_to_dbm(priv, hdr->rssi); |
| 354 | if (hdr->rate & 0x10) | 354 | if (hdr->rate & 0x10) |
| 355 | rx_status->flag |= RX_FLAG_SHORTPRE; | 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 | rx_status->rate_idx = (rate < 4) ? 0 : rate - 4; | 357 | rx_status->rate_idx = (rate < 4) ? 0 : rate - 4; |
| 358 | else | 358 | else |
| 359 | rx_status->rate_idx = rate; | 359 | rx_status->rate_idx = rate; |
| @@ -867,7 +867,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, | |||
| 867 | for (i = 0; i < nrates && ridx < 8; i++) { | 867 | for (i = 0; i < nrates && ridx < 8; i++) { |
| 868 | /* we register the rates in perfect order */ | 868 | /* we register the rates in perfect order */ |
| 869 | rate = info->control.rates[i].idx; | 869 | rate = info->control.rates[i].idx; |
| 870 | if (info->band == IEEE80211_BAND_5GHZ) | 870 | if (info->band == NL80211_BAND_5GHZ) |
| 871 | rate += 4; | 871 | rate += 4; |
| 872 | 872 | ||
| 873 | /* store the count we actually calculated for TX status */ | 873 | /* store the count we actually calculated for TX status */ |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 2b185feb1aa0..c757f14c4c00 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
| @@ -255,14 +255,14 @@ static struct class *hwsim_class; | |||
| 255 | static struct net_device *hwsim_mon; /* global monitor netdev */ | 255 | static struct net_device *hwsim_mon; /* global monitor netdev */ |
| 256 | 256 | ||
| 257 | #define CHAN2G(_freq) { \ | 257 | #define CHAN2G(_freq) { \ |
| 258 | .band = IEEE80211_BAND_2GHZ, \ | 258 | .band = NL80211_BAND_2GHZ, \ |
| 259 | .center_freq = (_freq), \ | 259 | .center_freq = (_freq), \ |
| 260 | .hw_value = (_freq), \ | 260 | .hw_value = (_freq), \ |
| 261 | .max_power = 20, \ | 261 | .max_power = 20, \ |
| 262 | } | 262 | } |
| 263 | 263 | ||
| 264 | #define CHAN5G(_freq) { \ | 264 | #define CHAN5G(_freq) { \ |
| 265 | .band = IEEE80211_BAND_5GHZ, \ | 265 | .band = NL80211_BAND_5GHZ, \ |
| 266 | .center_freq = (_freq), \ | 266 | .center_freq = (_freq), \ |
| 267 | .hw_value = (_freq), \ | 267 | .hw_value = (_freq), \ |
| 268 | .max_power = 20, \ | 268 | .max_power = 20, \ |
| @@ -479,7 +479,7 @@ struct mac80211_hwsim_data { | |||
| 479 | struct list_head list; | 479 | struct list_head list; |
| 480 | struct ieee80211_hw *hw; | 480 | struct ieee80211_hw *hw; |
| 481 | struct device *dev; | 481 | struct device *dev; |
| 482 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 482 | struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; |
| 483 | struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)]; | 483 | struct ieee80211_channel channels_2ghz[ARRAY_SIZE(hwsim_channels_2ghz)]; |
| 484 | struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)]; | 484 | struct ieee80211_channel channels_5ghz[ARRAY_SIZE(hwsim_channels_5ghz)]; |
| 485 | struct ieee80211_rate rates[ARRAY_SIZE(hwsim_rates)]; | 485 | struct ieee80211_rate rates[ARRAY_SIZE(hwsim_rates)]; |
| @@ -2347,7 +2347,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, | |||
| 2347 | u8 addr[ETH_ALEN]; | 2347 | u8 addr[ETH_ALEN]; |
| 2348 | struct mac80211_hwsim_data *data; | 2348 | struct mac80211_hwsim_data *data; |
| 2349 | struct ieee80211_hw *hw; | 2349 | struct ieee80211_hw *hw; |
| 2350 | enum ieee80211_band band; | 2350 | enum nl80211_band band; |
| 2351 | const struct ieee80211_ops *ops = &mac80211_hwsim_ops; | 2351 | const struct ieee80211_ops *ops = &mac80211_hwsim_ops; |
| 2352 | int idx; | 2352 | int idx; |
| 2353 | 2353 | ||
| @@ -2476,16 +2476,16 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, | |||
| 2476 | sizeof(hwsim_channels_5ghz)); | 2476 | sizeof(hwsim_channels_5ghz)); |
| 2477 | memcpy(data->rates, hwsim_rates, sizeof(hwsim_rates)); | 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 | struct ieee80211_supported_band *sband = &data->bands[band]; | 2480 | struct ieee80211_supported_band *sband = &data->bands[band]; |
| 2481 | switch (band) { | 2481 | switch (band) { |
| 2482 | case IEEE80211_BAND_2GHZ: | 2482 | case NL80211_BAND_2GHZ: |
| 2483 | sband->channels = data->channels_2ghz; | 2483 | sband->channels = data->channels_2ghz; |
| 2484 | sband->n_channels = ARRAY_SIZE(hwsim_channels_2ghz); | 2484 | sband->n_channels = ARRAY_SIZE(hwsim_channels_2ghz); |
| 2485 | sband->bitrates = data->rates; | 2485 | sband->bitrates = data->rates; |
| 2486 | sband->n_bitrates = ARRAY_SIZE(hwsim_rates); | 2486 | sband->n_bitrates = ARRAY_SIZE(hwsim_rates); |
| 2487 | break; | 2487 | break; |
| 2488 | case IEEE80211_BAND_5GHZ: | 2488 | case NL80211_BAND_5GHZ: |
| 2489 | sband->channels = data->channels_5ghz; | 2489 | sband->channels = data->channels_5ghz; |
| 2490 | sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz); | 2490 | sband->n_channels = ARRAY_SIZE(hwsim_channels_5ghz); |
| 2491 | sband->bitrates = data->rates + 4; | 2491 | sband->bitrates = data->rates + 4; |
diff --git a/drivers/net/wireless/marvell/libertas/cfg.c b/drivers/net/wireless/marvell/libertas/cfg.c index 2eea76a340b7..776b44bfd93a 100644 --- a/drivers/net/wireless/marvell/libertas/cfg.c +++ b/drivers/net/wireless/marvell/libertas/cfg.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | 23 | ||
| 24 | 24 | ||
| 25 | #define CHAN2G(_channel, _freq, _flags) { \ | 25 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 26 | .band = IEEE80211_BAND_2GHZ, \ | 26 | .band = NL80211_BAND_2GHZ, \ |
| 27 | .center_freq = (_freq), \ | 27 | .center_freq = (_freq), \ |
| 28 | .hw_value = (_channel), \ | 28 | .hw_value = (_channel), \ |
| 29 | .flags = (_flags), \ | 29 | .flags = (_flags), \ |
| @@ -639,7 +639,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, | |||
| 639 | if (chan_no != -1) { | 639 | if (chan_no != -1) { |
| 640 | struct wiphy *wiphy = priv->wdev->wiphy; | 640 | struct wiphy *wiphy = priv->wdev->wiphy; |
| 641 | int freq = ieee80211_channel_to_frequency(chan_no, | 641 | int freq = ieee80211_channel_to_frequency(chan_no, |
| 642 | IEEE80211_BAND_2GHZ); | 642 | NL80211_BAND_2GHZ); |
| 643 | struct ieee80211_channel *channel = | 643 | struct ieee80211_channel *channel = |
| 644 | ieee80211_get_channel(wiphy, freq); | 644 | ieee80211_get_channel(wiphy, freq); |
| 645 | 645 | ||
| @@ -1266,7 +1266,7 @@ _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) | |||
| 1266 | { | 1266 | { |
| 1267 | struct cfg80211_scan_request *creq = NULL; | 1267 | struct cfg80211_scan_request *creq = NULL; |
| 1268 | int i, n_channels = ieee80211_get_num_supported_channels(wiphy); | 1268 | int i, n_channels = ieee80211_get_num_supported_channels(wiphy); |
| 1269 | enum ieee80211_band band; | 1269 | enum nl80211_band band; |
| 1270 | 1270 | ||
| 1271 | creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) + | 1271 | creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) + |
| 1272 | n_channels * sizeof(void *), | 1272 | n_channels * sizeof(void *), |
| @@ -1281,7 +1281,7 @@ _new_connect_scan_req(struct wiphy *wiphy, struct cfg80211_connect_params *sme) | |||
| 1281 | 1281 | ||
| 1282 | /* Scan all available channels */ | 1282 | /* Scan all available channels */ |
| 1283 | i = 0; | 1283 | i = 0; |
| 1284 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | 1284 | for (band = 0; band < NUM_NL80211_BANDS; band++) { |
| 1285 | int j; | 1285 | int j; |
| 1286 | 1286 | ||
| 1287 | if (!wiphy->bands[band]) | 1287 | if (!wiphy->bands[band]) |
| @@ -2200,7 +2200,7 @@ int lbs_cfg_register(struct lbs_private *priv) | |||
| 2200 | if (lbs_mesh_activated(priv)) | 2200 | if (lbs_mesh_activated(priv)) |
| 2201 | wdev->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MESH_POINT); | 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 | * We could check priv->fwcapinfo && FW_CAPINFO_WPA, but I have | 2206 | * We could check priv->fwcapinfo && FW_CAPINFO_WPA, but I have |
diff --git a/drivers/net/wireless/marvell/libertas/cmd.c b/drivers/net/wireless/marvell/libertas/cmd.c index 4ddd0e5a6b85..301170cccfff 100644 --- a/drivers/net/wireless/marvell/libertas/cmd.c +++ b/drivers/net/wireless/marvell/libertas/cmd.c | |||
| @@ -743,7 +743,7 @@ int lbs_set_11d_domain_info(struct lbs_private *priv) | |||
| 743 | struct cmd_ds_802_11d_domain_info cmd; | 743 | struct cmd_ds_802_11d_domain_info cmd; |
| 744 | struct mrvl_ie_domain_param_set *domain = &cmd.domain; | 744 | struct mrvl_ie_domain_param_set *domain = &cmd.domain; |
| 745 | struct ieee80211_country_ie_triplet *t; | 745 | struct ieee80211_country_ie_triplet *t; |
| 746 | enum ieee80211_band band; | 746 | enum nl80211_band band; |
| 747 | struct ieee80211_channel *ch; | 747 | struct ieee80211_channel *ch; |
| 748 | u8 num_triplet = 0; | 748 | u8 num_triplet = 0; |
| 749 | u8 num_parsed_chan = 0; | 749 | u8 num_parsed_chan = 0; |
| @@ -777,7 +777,7 @@ int lbs_set_11d_domain_info(struct lbs_private *priv) | |||
| 777 | * etc. | 777 | * etc. |
| 778 | */ | 778 | */ |
| 779 | for (band = 0; | 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 | band++) { | 781 | band++) { |
| 782 | 782 | ||
| 783 | if (!bands[band]) | 783 | if (!bands[band]) |
diff --git a/drivers/net/wireless/marvell/libertas_tf/main.c b/drivers/net/wireless/marvell/libertas_tf/main.c index a47f0acc099a..0bf8916a02cf 100644 --- a/drivers/net/wireless/marvell/libertas_tf/main.c +++ b/drivers/net/wireless/marvell/libertas_tf/main.c | |||
| @@ -570,7 +570,7 @@ int lbtf_rx(struct lbtf_private *priv, struct sk_buff *skb) | |||
| 570 | if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) | 570 | if (!(prxpd->status & cpu_to_le16(MRVDRV_RXPD_STATUS_OK))) |
| 571 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; | 571 | stats.flag |= RX_FLAG_FAILED_FCS_CRC; |
| 572 | stats.freq = priv->cur_freq; | 572 | stats.freq = priv->cur_freq; |
| 573 | stats.band = IEEE80211_BAND_2GHZ; | 573 | stats.band = NL80211_BAND_2GHZ; |
| 574 | stats.signal = prxpd->snr; | 574 | stats.signal = prxpd->snr; |
| 575 | priv->noise = prxpd->nf; | 575 | priv->noise = prxpd->nf; |
| 576 | /* Marvell rate index has a hole at value 4 */ | 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) | |||
| 642 | priv->band.bitrates = priv->rates; | 642 | priv->band.bitrates = priv->rates; |
| 643 | priv->band.n_channels = ARRAY_SIZE(lbtf_channels); | 643 | priv->band.n_channels = ARRAY_SIZE(lbtf_channels); |
| 644 | priv->band.channels = priv->channels; | 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 | hw->wiphy->interface_modes = | 646 | hw->wiphy->interface_modes = |
| 647 | BIT(NL80211_IFTYPE_STATION) | | 647 | BIT(NL80211_IFTYPE_STATION) | |
| 648 | BIT(NL80211_IFTYPE_ADHOC); | 648 | BIT(NL80211_IFTYPE_ADHOC); |
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index 49661e087811..6db202fa7157 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c | |||
| @@ -474,7 +474,7 @@ int mwifiex_send_domain_info_cmd_fw(struct wiphy *wiphy) | |||
| 474 | u8 no_of_parsed_chan = 0; | 474 | u8 no_of_parsed_chan = 0; |
| 475 | u8 first_chan = 0, next_chan = 0, max_pwr = 0; | 475 | u8 first_chan = 0, next_chan = 0, max_pwr = 0; |
| 476 | u8 i, flag = 0; | 476 | u8 i, flag = 0; |
| 477 | enum ieee80211_band band; | 477 | enum nl80211_band band; |
| 478 | struct ieee80211_supported_band *sband; | 478 | struct ieee80211_supported_band *sband; |
| 479 | struct ieee80211_channel *ch; | 479 | struct ieee80211_channel *ch; |
| 480 | struct mwifiex_adapter *adapter = mwifiex_cfg80211_get_adapter(wiphy); | 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, | |||
| 1410 | { | 1410 | { |
| 1411 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | 1411 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); |
| 1412 | struct mwifiex_chan_stats *pchan_stats = priv->adapter->chan_stats; | 1412 | struct mwifiex_chan_stats *pchan_stats = priv->adapter->chan_stats; |
| 1413 | enum ieee80211_band band; | 1413 | enum nl80211_band band; |
| 1414 | 1414 | ||
| 1415 | mwifiex_dbg(priv->adapter, DUMP, "dump_survey idx=%d\n", idx); | 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, | |||
| 1586 | { | 1586 | { |
| 1587 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); | 1587 | struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); |
| 1588 | u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; | 1588 | u16 bitmap_rates[MAX_BITMAP_RATES_SIZE]; |
| 1589 | enum ieee80211_band band; | 1589 | enum nl80211_band band; |
| 1590 | struct mwifiex_adapter *adapter = priv->adapter; | 1590 | struct mwifiex_adapter *adapter = priv->adapter; |
| 1591 | 1591 | ||
| 1592 | if (!priv->media_connected) { | 1592 | if (!priv->media_connected) { |
| @@ -1600,11 +1600,11 @@ static int mwifiex_cfg80211_set_bitrate_mask(struct wiphy *wiphy, | |||
| 1600 | memset(bitmap_rates, 0, sizeof(bitmap_rates)); | 1600 | memset(bitmap_rates, 0, sizeof(bitmap_rates)); |
| 1601 | 1601 | ||
| 1602 | /* Fill HR/DSSS rates. */ | 1602 | /* Fill HR/DSSS rates. */ |
| 1603 | if (band == IEEE80211_BAND_2GHZ) | 1603 | if (band == NL80211_BAND_2GHZ) |
| 1604 | bitmap_rates[0] = mask->control[band].legacy & 0x000f; | 1604 | bitmap_rates[0] = mask->control[band].legacy & 0x000f; |
| 1605 | 1605 | ||
| 1606 | /* Fill OFDM rates */ | 1606 | /* Fill OFDM rates */ |
| 1607 | if (band == IEEE80211_BAND_2GHZ) | 1607 | if (band == NL80211_BAND_2GHZ) |
| 1608 | bitmap_rates[1] = (mask->control[band].legacy & 0x0ff0) >> 4; | 1608 | bitmap_rates[1] = (mask->control[band].legacy & 0x0ff0) >> 4; |
| 1609 | else | 1609 | else |
| 1610 | bitmap_rates[1] = mask->control[band].legacy; | 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) | |||
| 1771 | } else { | 1771 | } else { |
| 1772 | struct ieee80211_sta_ht_cap *ht_info; | 1772 | struct ieee80211_sta_ht_cap *ht_info; |
| 1773 | int rx_mcs_supp; | 1773 | int rx_mcs_supp; |
| 1774 | enum ieee80211_band band; | 1774 | enum nl80211_band band; |
| 1775 | 1775 | ||
| 1776 | if ((tx_ant == 0x1 && rx_ant == 0x1)) { | 1776 | if ((tx_ant == 0x1 && rx_ant == 0x1)) { |
| 1777 | adapter->user_dev_mcs_support = HT_STREAM_1X1; | 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) | |||
| 1785 | MWIFIEX_11AC_MCS_MAP_2X2; | 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 | if (!adapter->wiphy->bands[band]) | 1789 | if (!adapter->wiphy->bands[band]) |
| 1790 | continue; | 1790 | continue; |
| 1791 | 1791 | ||
| @@ -1997,7 +1997,7 @@ static int mwifiex_cfg80211_inform_ibss_bss(struct mwifiex_private *priv) | |||
| 1997 | struct cfg80211_bss *bss; | 1997 | struct cfg80211_bss *bss; |
| 1998 | int ie_len; | 1998 | int ie_len; |
| 1999 | u8 ie_buf[IEEE80211_MAX_SSID_LEN + sizeof(struct ieee_types_header)]; | 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 | if (mwifiex_get_bss_info(priv, &bss_info)) | 2002 | if (mwifiex_get_bss_info(priv, &bss_info)) |
| 2003 | return -1; | 2003 | return -1; |
| @@ -2271,7 +2271,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv, | |||
| 2271 | int index = 0, i; | 2271 | int index = 0, i; |
| 2272 | u8 config_bands = 0; | 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 | if (!params->basic_rates) { | 2275 | if (!params->basic_rates) { |
| 2276 | config_bands = BAND_B | BAND_G; | 2276 | config_bands = BAND_B | BAND_G; |
| 2277 | } else { | 2277 | } else { |
| @@ -2859,18 +2859,18 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy, | |||
| 2859 | mwifiex_init_priv_params(priv, dev); | 2859 | mwifiex_init_priv_params(priv, dev); |
| 2860 | priv->netdev = dev; | 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 | if (adapter->is_hw_11ac_capable) | 2863 | if (adapter->is_hw_11ac_capable) |
| 2864 | mwifiex_setup_vht_caps( | 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 | if (adapter->config_bands & BAND_A) | 2867 | if (adapter->config_bands & BAND_A) |
| 2868 | mwifiex_setup_ht_caps( | 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 | if ((adapter->config_bands & BAND_A) && adapter->is_hw_11ac_capable) | 2871 | if ((adapter->config_bands & BAND_A) && adapter->is_hw_11ac_capable) |
| 2872 | mwifiex_setup_vht_caps( | 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 | dev_net_set(dev, wiphy_net(wiphy)); | 2875 | dev_net_set(dev, wiphy_net(wiphy)); |
| 2876 | dev->ieee80211_ptr = &priv->wdev; | 2876 | dev->ieee80211_ptr = &priv->wdev; |
| @@ -3821,7 +3821,7 @@ static int mwifiex_cfg80211_get_channel(struct wiphy *wiphy, | |||
| 3821 | struct ieee80211_channel *chan; | 3821 | struct ieee80211_channel *chan; |
| 3822 | u8 second_chan_offset; | 3822 | u8 second_chan_offset; |
| 3823 | enum nl80211_channel_type chan_type; | 3823 | enum nl80211_channel_type chan_type; |
| 3824 | enum ieee80211_band band; | 3824 | enum nl80211_band band; |
| 3825 | int freq; | 3825 | int freq; |
| 3826 | int ret = -ENODATA; | 3826 | int ret = -ENODATA; |
| 3827 | 3827 | ||
| @@ -4053,11 +4053,11 @@ int mwifiex_register_cfg80211(struct mwifiex_adapter *adapter) | |||
| 4053 | BIT(NL80211_IFTYPE_P2P_GO) | | 4053 | BIT(NL80211_IFTYPE_P2P_GO) | |
| 4054 | BIT(NL80211_IFTYPE_AP); | 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 | if (adapter->config_bands & BAND_A) | 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 | else | 4059 | else |
| 4060 | wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; | 4060 | wiphy->bands[NL80211_BAND_5GHZ] = NULL; |
| 4061 | 4061 | ||
| 4062 | if (adapter->drcs_enabled && ISSUPP_DRCS_ENABLED(adapter->fw_cap_info)) | 4062 | if (adapter->drcs_enabled && ISSUPP_DRCS_ENABLED(adapter->fw_cap_info)) |
| 4063 | wiphy->iface_combinations = &mwifiex_iface_comb_ap_sta_drcs; | 4063 | wiphy->iface_combinations = &mwifiex_iface_comb_ap_sta_drcs; |
diff --git a/drivers/net/wireless/marvell/mwifiex/cfp.c b/drivers/net/wireless/marvell/mwifiex/cfp.c index 09fae27140f7..1ff22055e54f 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfp.c +++ b/drivers/net/wireless/marvell/mwifiex/cfp.c | |||
| @@ -322,9 +322,9 @@ mwifiex_get_cfp(struct mwifiex_private *priv, u8 band, u16 channel, u32 freq) | |||
| 322 | return cfp; | 322 | return cfp; |
| 323 | 323 | ||
| 324 | if (mwifiex_band_to_radio_type(band) == HostCmd_SCAN_RADIO_TYPE_BG) | 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 | else | 326 | else |
| 327 | sband = priv->wdev.wiphy->bands[IEEE80211_BAND_5GHZ]; | 327 | sband = priv->wdev.wiphy->bands[NL80211_BAND_5GHZ]; |
| 328 | 328 | ||
| 329 | if (!sband) { | 329 | if (!sband) { |
| 330 | mwifiex_dbg(priv->adapter, ERROR, | 330 | mwifiex_dbg(priv->adapter, ERROR, |
| @@ -399,15 +399,15 @@ u32 mwifiex_get_rates_from_cfg80211(struct mwifiex_private *priv, | |||
| 399 | int i; | 399 | int i; |
| 400 | 400 | ||
| 401 | if (radio_type) { | 401 | if (radio_type) { |
| 402 | sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | 402 | sband = wiphy->bands[NL80211_BAND_5GHZ]; |
| 403 | if (WARN_ON_ONCE(!sband)) | 403 | if (WARN_ON_ONCE(!sband)) |
| 404 | return 0; | 404 | return 0; |
| 405 | rate_mask = request->rates[IEEE80211_BAND_5GHZ]; | 405 | rate_mask = request->rates[NL80211_BAND_5GHZ]; |
| 406 | } else { | 406 | } else { |
| 407 | sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | 407 | sband = wiphy->bands[NL80211_BAND_2GHZ]; |
| 408 | if (WARN_ON_ONCE(!sband)) | 408 | if (WARN_ON_ONCE(!sband)) |
| 409 | return 0; | 409 | return 0; |
| 410 | rate_mask = request->rates[IEEE80211_BAND_2GHZ]; | 410 | rate_mask = request->rates[NL80211_BAND_2GHZ]; |
| 411 | } | 411 | } |
| 412 | 412 | ||
| 413 | num_rates = 0; | 413 | num_rates = 0; |
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c index 489f7a911a83..624b0a95c64e 100644 --- a/drivers/net/wireless/marvell/mwifiex/scan.c +++ b/drivers/net/wireless/marvell/mwifiex/scan.c | |||
| @@ -494,13 +494,13 @@ mwifiex_scan_create_channel_list(struct mwifiex_private *priv, | |||
| 494 | *scan_chan_list, | 494 | *scan_chan_list, |
| 495 | u8 filtered_scan) | 495 | u8 filtered_scan) |
| 496 | { | 496 | { |
| 497 | enum ieee80211_band band; | 497 | enum nl80211_band band; |
| 498 | struct ieee80211_supported_band *sband; | 498 | struct ieee80211_supported_band *sband; |
| 499 | struct ieee80211_channel *ch; | 499 | struct ieee80211_channel *ch; |
| 500 | struct mwifiex_adapter *adapter = priv->adapter; | 500 | struct mwifiex_adapter *adapter = priv->adapter; |
| 501 | int chan_idx = 0, i; | 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 | if (!priv->wdev.wiphy->bands[band]) | 505 | if (!priv->wdev.wiphy->bands[band]) |
| 506 | continue; | 506 | continue; |
| @@ -557,13 +557,13 @@ mwifiex_bgscan_create_channel_list(struct mwifiex_private *priv, | |||
| 557 | struct mwifiex_chan_scan_param_set | 557 | struct mwifiex_chan_scan_param_set |
| 558 | *scan_chan_list) | 558 | *scan_chan_list) |
| 559 | { | 559 | { |
| 560 | enum ieee80211_band band; | 560 | enum nl80211_band band; |
| 561 | struct ieee80211_supported_band *sband; | 561 | struct ieee80211_supported_band *sband; |
| 562 | struct ieee80211_channel *ch; | 562 | struct ieee80211_channel *ch; |
| 563 | struct mwifiex_adapter *adapter = priv->adapter; | 563 | struct mwifiex_adapter *adapter = priv->adapter; |
| 564 | int chan_idx = 0, i; | 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 | if (!priv->wdev.wiphy->bands[band]) | 567 | if (!priv->wdev.wiphy->bands[band]) |
| 568 | continue; | 568 | continue; |
| 569 | 569 | ||
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c index 92ce32f5bb13..f79d00d1e294 100644 --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c | |||
| @@ -816,7 +816,7 @@ void mwifiex_uap_set_channel(struct mwifiex_private *priv, | |||
| 816 | chandef.chan->center_freq); | 816 | chandef.chan->center_freq); |
| 817 | 817 | ||
| 818 | /* Set appropriate bands */ | 818 | /* Set appropriate bands */ |
| 819 | if (chandef.chan->band == IEEE80211_BAND_2GHZ) { | 819 | if (chandef.chan->band == NL80211_BAND_2GHZ) { |
| 820 | bss_cfg->band_cfg = BAND_CONFIG_BG; | 820 | bss_cfg->band_cfg = BAND_CONFIG_BG; |
| 821 | config_bands = BAND_B | BAND_G; | 821 | config_bands = BAND_B | BAND_G; |
| 822 | 822 | ||
diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c index 088429d0a634..b1b400b59d86 100644 --- a/drivers/net/wireless/marvell/mwl8k.c +++ b/drivers/net/wireless/marvell/mwl8k.c | |||
| @@ -346,20 +346,20 @@ struct mwl8k_sta { | |||
| 346 | #define MWL8K_STA(_sta) ((struct mwl8k_sta *)&((_sta)->drv_priv)) | 346 | #define MWL8K_STA(_sta) ((struct mwl8k_sta *)&((_sta)->drv_priv)) |
| 347 | 347 | ||
| 348 | static const struct ieee80211_channel mwl8k_channels_24[] = { | 348 | static const struct ieee80211_channel mwl8k_channels_24[] = { |
| 349 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, }, | 349 | { .band = NL80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, }, |
| 350 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, }, | 350 | { .band = NL80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, }, |
| 351 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, .hw_value = 3, }, | 351 | { .band = NL80211_BAND_2GHZ, .center_freq = 2422, .hw_value = 3, }, |
| 352 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, .hw_value = 4, }, | 352 | { .band = NL80211_BAND_2GHZ, .center_freq = 2427, .hw_value = 4, }, |
| 353 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, .hw_value = 5, }, | 353 | { .band = NL80211_BAND_2GHZ, .center_freq = 2432, .hw_value = 5, }, |
| 354 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, .hw_value = 6, }, | 354 | { .band = NL80211_BAND_2GHZ, .center_freq = 2437, .hw_value = 6, }, |
| 355 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, .hw_value = 7, }, | 355 | { .band = NL80211_BAND_2GHZ, .center_freq = 2442, .hw_value = 7, }, |
| 356 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, .hw_value = 8, }, | 356 | { .band = NL80211_BAND_2GHZ, .center_freq = 2447, .hw_value = 8, }, |
| 357 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, .hw_value = 9, }, | 357 | { .band = NL80211_BAND_2GHZ, .center_freq = 2452, .hw_value = 9, }, |
| 358 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, .hw_value = 10, }, | 358 | { .band = NL80211_BAND_2GHZ, .center_freq = 2457, .hw_value = 10, }, |
| 359 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, .hw_value = 11, }, | 359 | { .band = NL80211_BAND_2GHZ, .center_freq = 2462, .hw_value = 11, }, |
| 360 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, .hw_value = 12, }, | 360 | { .band = NL80211_BAND_2GHZ, .center_freq = 2467, .hw_value = 12, }, |
| 361 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, .hw_value = 13, }, | 361 | { .band = NL80211_BAND_2GHZ, .center_freq = 2472, .hw_value = 13, }, |
| 362 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, .hw_value = 14, }, | 362 | { .band = NL80211_BAND_2GHZ, .center_freq = 2484, .hw_value = 14, }, |
| 363 | }; | 363 | }; |
| 364 | 364 | ||
| 365 | static const struct ieee80211_rate mwl8k_rates_24[] = { | 365 | static const struct ieee80211_rate mwl8k_rates_24[] = { |
| @@ -379,10 +379,10 @@ static const struct ieee80211_rate mwl8k_rates_24[] = { | |||
| 379 | }; | 379 | }; |
| 380 | 380 | ||
| 381 | static const struct ieee80211_channel mwl8k_channels_50[] = { | 381 | static const struct ieee80211_channel mwl8k_channels_50[] = { |
| 382 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5180, .hw_value = 36, }, | 382 | { .band = NL80211_BAND_5GHZ, .center_freq = 5180, .hw_value = 36, }, |
| 383 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5200, .hw_value = 40, }, | 383 | { .band = NL80211_BAND_5GHZ, .center_freq = 5200, .hw_value = 40, }, |
| 384 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5220, .hw_value = 44, }, | 384 | { .band = NL80211_BAND_5GHZ, .center_freq = 5220, .hw_value = 44, }, |
| 385 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5240, .hw_value = 48, }, | 385 | { .band = NL80211_BAND_5GHZ, .center_freq = 5240, .hw_value = 48, }, |
| 386 | }; | 386 | }; |
| 387 | 387 | ||
| 388 | static const struct ieee80211_rate mwl8k_rates_50[] = { | 388 | static const struct ieee80211_rate mwl8k_rates_50[] = { |
| @@ -1010,11 +1010,11 @@ mwl8k_rxd_ap_process(void *_rxd, struct ieee80211_rx_status *status, | |||
| 1010 | } | 1010 | } |
| 1011 | 1011 | ||
| 1012 | if (rxd->channel > 14) { | 1012 | if (rxd->channel > 14) { |
| 1013 | status->band = IEEE80211_BAND_5GHZ; | 1013 | status->band = NL80211_BAND_5GHZ; |
| 1014 | if (!(status->flag & RX_FLAG_HT)) | 1014 | if (!(status->flag & RX_FLAG_HT)) |
| 1015 | status->rate_idx -= 5; | 1015 | status->rate_idx -= 5; |
| 1016 | } else { | 1016 | } else { |
| 1017 | status->band = IEEE80211_BAND_2GHZ; | 1017 | status->band = NL80211_BAND_2GHZ; |
| 1018 | } | 1018 | } |
| 1019 | status->freq = ieee80211_channel_to_frequency(rxd->channel, | 1019 | status->freq = ieee80211_channel_to_frequency(rxd->channel, |
| 1020 | status->band); | 1020 | status->band); |
| @@ -1118,11 +1118,11 @@ mwl8k_rxd_sta_process(void *_rxd, struct ieee80211_rx_status *status, | |||
| 1118 | status->flag |= RX_FLAG_HT; | 1118 | status->flag |= RX_FLAG_HT; |
| 1119 | 1119 | ||
| 1120 | if (rxd->channel > 14) { | 1120 | if (rxd->channel > 14) { |
| 1121 | status->band = IEEE80211_BAND_5GHZ; | 1121 | status->band = NL80211_BAND_5GHZ; |
| 1122 | if (!(status->flag & RX_FLAG_HT)) | 1122 | if (!(status->flag & RX_FLAG_HT)) |
| 1123 | status->rate_idx -= 5; | 1123 | status->rate_idx -= 5; |
| 1124 | } else { | 1124 | } else { |
| 1125 | status->band = IEEE80211_BAND_2GHZ; | 1125 | status->band = NL80211_BAND_2GHZ; |
| 1126 | } | 1126 | } |
| 1127 | status->freq = ieee80211_channel_to_frequency(rxd->channel, | 1127 | status->freq = ieee80211_channel_to_frequency(rxd->channel, |
| 1128 | status->band); | 1128 | status->band); |
| @@ -2300,13 +2300,13 @@ static void mwl8k_setup_2ghz_band(struct ieee80211_hw *hw) | |||
| 2300 | BUILD_BUG_ON(sizeof(priv->rates_24) != sizeof(mwl8k_rates_24)); | 2300 | BUILD_BUG_ON(sizeof(priv->rates_24) != sizeof(mwl8k_rates_24)); |
| 2301 | memcpy(priv->rates_24, mwl8k_rates_24, sizeof(mwl8k_rates_24)); | 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 | priv->band_24.channels = priv->channels_24; | 2304 | priv->band_24.channels = priv->channels_24; |
| 2305 | priv->band_24.n_channels = ARRAY_SIZE(mwl8k_channels_24); | 2305 | priv->band_24.n_channels = ARRAY_SIZE(mwl8k_channels_24); |
| 2306 | priv->band_24.bitrates = priv->rates_24; | 2306 | priv->band_24.bitrates = priv->rates_24; |
| 2307 | priv->band_24.n_bitrates = ARRAY_SIZE(mwl8k_rates_24); | 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 | static void mwl8k_setup_5ghz_band(struct ieee80211_hw *hw) | 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) | |||
| 2319 | BUILD_BUG_ON(sizeof(priv->rates_50) != sizeof(mwl8k_rates_50)); | 2319 | BUILD_BUG_ON(sizeof(priv->rates_50) != sizeof(mwl8k_rates_50)); |
| 2320 | memcpy(priv->rates_50, mwl8k_rates_50, sizeof(mwl8k_rates_50)); | 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 | priv->band_50.channels = priv->channels_50; | 2323 | priv->band_50.channels = priv->channels_50; |
| 2324 | priv->band_50.n_channels = ARRAY_SIZE(mwl8k_channels_50); | 2324 | priv->band_50.n_channels = ARRAY_SIZE(mwl8k_channels_50); |
| 2325 | priv->band_50.bitrates = priv->rates_50; | 2325 | priv->band_50.bitrates = priv->rates_50; |
| 2326 | priv->band_50.n_bitrates = ARRAY_SIZE(mwl8k_rates_50); | 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, | |||
| 2876 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); | 2876 | cmd->header.length = cpu_to_le16(sizeof(*cmd)); |
| 2877 | cmd->action = cpu_to_le16(MWL8K_CMD_SET_LIST); | 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 | cmd->band = cpu_to_le16(0x1); | 2880 | cmd->band = cpu_to_le16(0x1); |
| 2881 | else if (channel->band == IEEE80211_BAND_5GHZ) | 2881 | else if (channel->band == NL80211_BAND_5GHZ) |
| 2882 | cmd->band = cpu_to_le16(0x4); | 2882 | cmd->band = cpu_to_le16(0x4); |
| 2883 | 2883 | ||
| 2884 | cmd->channel = cpu_to_le16(channel->hw_value); | 2884 | cmd->channel = cpu_to_le16(channel->hw_value); |
| @@ -3067,7 +3067,7 @@ static int freq_to_idx(struct mwl8k_priv *priv, int freq) | |||
| 3067 | struct ieee80211_supported_band *sband; | 3067 | struct ieee80211_supported_band *sband; |
| 3068 | int band, ch, idx = 0; | 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 | sband = priv->hw->wiphy->bands[band]; | 3071 | sband = priv->hw->wiphy->bands[band]; |
| 3072 | if (!sband) | 3072 | if (!sband) |
| 3073 | continue; | 3073 | continue; |
| @@ -3149,9 +3149,9 @@ static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, | |||
| 3149 | cmd->action = cpu_to_le16(MWL8K_CMD_SET); | 3149 | cmd->action = cpu_to_le16(MWL8K_CMD_SET); |
| 3150 | cmd->current_channel = channel->hw_value; | 3150 | cmd->current_channel = channel->hw_value; |
| 3151 | 3151 | ||
| 3152 | if (channel->band == IEEE80211_BAND_2GHZ) | 3152 | if (channel->band == NL80211_BAND_2GHZ) |
| 3153 | cmd->channel_flags |= cpu_to_le32(0x00000001); | 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 | cmd->channel_flags |= cpu_to_le32(0x00000004); | 3155 | cmd->channel_flags |= cpu_to_le32(0x00000004); |
| 3156 | 3156 | ||
| 3157 | if (!priv->sw_scan_start) { | 3157 | if (!priv->sw_scan_start) { |
| @@ -4094,10 +4094,10 @@ static int mwl8k_cmd_set_new_stn_add(struct ieee80211_hw *hw, | |||
| 4094 | memcpy(cmd->mac_addr, sta->addr, ETH_ALEN); | 4094 | memcpy(cmd->mac_addr, sta->addr, ETH_ALEN); |
| 4095 | cmd->stn_id = cpu_to_le16(sta->aid); | 4095 | cmd->stn_id = cpu_to_le16(sta->aid); |
| 4096 | cmd->action = cpu_to_le16(MWL8K_STA_ACTION_ADD); | 4096 | cmd->action = cpu_to_le16(MWL8K_STA_ACTION_ADD); |
| 4097 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) | 4097 | if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) |
| 4098 | rates = sta->supp_rates[IEEE80211_BAND_2GHZ]; | 4098 | rates = sta->supp_rates[NL80211_BAND_2GHZ]; |
| 4099 | else | 4099 | else |
| 4100 | rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; | 4100 | rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5; |
| 4101 | cmd->legacy_rates = cpu_to_le32(rates); | 4101 | cmd->legacy_rates = cpu_to_le32(rates); |
| 4102 | if (sta->ht_cap.ht_supported) { | 4102 | if (sta->ht_cap.ht_supported) { |
| 4103 | cmd->ht_rates[0] = sta->ht_cap.mcs.rx_mask[0]; | 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, | |||
| 4529 | p->ht_caps = cpu_to_le16(sta->ht_cap.cap); | 4529 | p->ht_caps = cpu_to_le16(sta->ht_cap.cap); |
| 4530 | p->extended_ht_caps = (sta->ht_cap.ampdu_factor & 3) | | 4530 | p->extended_ht_caps = (sta->ht_cap.ampdu_factor & 3) | |
| 4531 | ((sta->ht_cap.ampdu_density & 7) << 2); | 4531 | ((sta->ht_cap.ampdu_density & 7) << 2); |
| 4532 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) | 4532 | if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) |
| 4533 | rates = sta->supp_rates[IEEE80211_BAND_2GHZ]; | 4533 | rates = sta->supp_rates[NL80211_BAND_2GHZ]; |
| 4534 | else | 4534 | else |
| 4535 | rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5; | 4535 | rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5; |
| 4536 | legacy_rate_mask_to_array(p->legacy_rates, rates); | 4536 | legacy_rate_mask_to_array(p->legacy_rates, rates); |
| 4537 | memcpy(p->ht_rates, sta->ht_cap.mcs.rx_mask, 16); | 4537 | memcpy(p->ht_rates, sta->ht_cap.mcs.rx_mask, 16); |
| 4538 | p->interop = 1; | 4538 | p->interop = 1; |
| @@ -5010,11 +5010,11 @@ mwl8k_bss_info_changed_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
| 5010 | goto out; | 5010 | goto out; |
| 5011 | } | 5011 | } |
| 5012 | 5012 | ||
| 5013 | if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) { | 5013 | if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ) { |
| 5014 | ap_legacy_rates = ap->supp_rates[IEEE80211_BAND_2GHZ]; | 5014 | ap_legacy_rates = ap->supp_rates[NL80211_BAND_2GHZ]; |
| 5015 | } else { | 5015 | } else { |
| 5016 | ap_legacy_rates = | 5016 | ap_legacy_rates = |
| 5017 | ap->supp_rates[IEEE80211_BAND_5GHZ] << 5; | 5017 | ap->supp_rates[NL80211_BAND_5GHZ] << 5; |
| 5018 | } | 5018 | } |
| 5019 | memcpy(ap_mcs_rates, ap->ht_cap.mcs.rx_mask, 16); | 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, | |||
| 5042 | idx--; | 5042 | idx--; |
| 5043 | 5043 | ||
| 5044 | if (hw->conf.chandef.chan->band == | 5044 | if (hw->conf.chandef.chan->band == |
| 5045 | IEEE80211_BAND_2GHZ) | 5045 | NL80211_BAND_2GHZ) |
| 5046 | rate = mwl8k_rates_24[idx].hw_value; | 5046 | rate = mwl8k_rates_24[idx].hw_value; |
| 5047 | else | 5047 | else |
| 5048 | rate = mwl8k_rates_50[idx].hw_value; | 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, | |||
| 5116 | if (idx) | 5116 | if (idx) |
| 5117 | idx--; | 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 | rate = mwl8k_rates_24[idx].hw_value; | 5120 | rate = mwl8k_rates_24[idx].hw_value; |
| 5121 | else | 5121 | else |
| 5122 | rate = mwl8k_rates_50[idx].hw_value; | 5122 | rate = mwl8k_rates_50[idx].hw_value; |
| @@ -5388,7 +5388,7 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, | |||
| 5388 | struct ieee80211_supported_band *sband; | 5388 | struct ieee80211_supported_band *sband; |
| 5389 | 5389 | ||
| 5390 | if (priv->ap_fw) { | 5390 | if (priv->ap_fw) { |
| 5391 | sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ]; | 5391 | sband = hw->wiphy->bands[NL80211_BAND_2GHZ]; |
| 5392 | 5392 | ||
| 5393 | if (sband && idx >= sband->n_channels) { | 5393 | if (sband && idx >= sband->n_channels) { |
| 5394 | idx -= sband->n_channels; | 5394 | idx -= sband->n_channels; |
| @@ -5396,7 +5396,7 @@ static int mwl8k_get_survey(struct ieee80211_hw *hw, int idx, | |||
| 5396 | } | 5396 | } |
| 5397 | 5397 | ||
| 5398 | if (!sband) | 5398 | if (!sband) |
| 5399 | sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ]; | 5399 | sband = hw->wiphy->bands[NL80211_BAND_5GHZ]; |
| 5400 | 5400 | ||
| 5401 | if (!sband || idx >= sband->n_channels) | 5401 | if (!sband || idx >= sband->n_channels) |
| 5402 | return -ENOENT; | 5402 | return -ENOENT; |
diff --git a/drivers/net/wireless/mediatek/mt7601u/init.c b/drivers/net/wireless/mediatek/mt7601u/init.c index 26190fd33407..8fa78d7156be 100644 --- a/drivers/net/wireless/mediatek/mt7601u/init.c +++ b/drivers/net/wireless/mediatek/mt7601u/init.c | |||
| @@ -469,7 +469,7 @@ struct mt7601u_dev *mt7601u_alloc_device(struct device *pdev) | |||
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | #define CHAN2G(_idx, _freq) { \ | 471 | #define CHAN2G(_idx, _freq) { \ |
| 472 | .band = IEEE80211_BAND_2GHZ, \ | 472 | .band = NL80211_BAND_2GHZ, \ |
| 473 | .center_freq = (_freq), \ | 473 | .center_freq = (_freq), \ |
| 474 | .hw_value = (_idx), \ | 474 | .hw_value = (_idx), \ |
| 475 | .max_power = 30, \ | 475 | .max_power = 30, \ |
| @@ -563,7 +563,7 @@ mt76_init_sband_2g(struct mt7601u_dev *dev) | |||
| 563 | { | 563 | { |
| 564 | dev->sband_2g = devm_kzalloc(dev->dev, sizeof(*dev->sband_2g), | 564 | dev->sband_2g = devm_kzalloc(dev->dev, sizeof(*dev->sband_2g), |
| 565 | GFP_KERNEL); | 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 | WARN_ON(dev->ee->reg.start - 1 + dev->ee->reg.num > | 568 | WARN_ON(dev->ee->reg.start - 1 + dev->ee->reg.num > |
| 569 | ARRAY_SIZE(mt76_channels_2ghz)); | 569 | ARRAY_SIZE(mt76_channels_2ghz)); |
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index 7fa0128de7e3..c36fa4e03fb6 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c | |||
| @@ -777,7 +777,7 @@ static int rt2800_agc_to_rssi(struct rt2x00_dev *rt2x00dev, u32 rxwi_w2) | |||
| 777 | u8 offset1; | 777 | u8 offset1; |
| 778 | u8 offset2; | 778 | u8 offset2; |
| 779 | 779 | ||
| 780 | if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) { | 780 | if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) { |
| 781 | rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_BG, &eeprom); | 781 | rt2800_eeprom_read(rt2x00dev, EEPROM_RSSI_BG, &eeprom); |
| 782 | offset0 = rt2x00_get_field16(eeprom, EEPROM_RSSI_BG_OFFSET0); | 782 | offset0 = rt2x00_get_field16(eeprom, EEPROM_RSSI_BG_OFFSET0); |
| 783 | offset1 = rt2x00_get_field16(eeprom, EEPROM_RSSI_BG_OFFSET1); | 783 | offset1 = rt2x00_get_field16(eeprom, EEPROM_RSSI_BG_OFFSET1); |
| @@ -1174,7 +1174,7 @@ static void rt2800_brightness_set(struct led_classdev *led_cdev, | |||
| 1174 | container_of(led_cdev, struct rt2x00_led, led_dev); | 1174 | container_of(led_cdev, struct rt2x00_led, led_dev); |
| 1175 | unsigned int enabled = brightness != LED_OFF; | 1175 | unsigned int enabled = brightness != LED_OFF; |
| 1176 | unsigned int bg_mode = | 1176 | unsigned int bg_mode = |
| 1177 | (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_2GHZ); | 1177 | (enabled && led->rt2x00dev->curr_band == NL80211_BAND_2GHZ); |
| 1178 | unsigned int polarity = | 1178 | unsigned int polarity = |
| 1179 | rt2x00_get_field16(led->rt2x00dev->led_mcu_reg, | 1179 | rt2x00_get_field16(led->rt2x00dev->led_mcu_reg, |
| 1180 | EEPROM_FREQ_LED_POLARITY); | 1180 | EEPROM_FREQ_LED_POLARITY); |
| @@ -1741,7 +1741,7 @@ static void rt2800_config_3572bt_ant(struct rt2x00_dev *rt2x00dev) | |||
| 1741 | u8 led_ctrl, led_g_mode, led_r_mode; | 1741 | u8 led_ctrl, led_g_mode, led_r_mode; |
| 1742 | 1742 | ||
| 1743 | rt2800_register_read(rt2x00dev, GPIO_SWITCH, ®); | 1743 | rt2800_register_read(rt2x00dev, GPIO_SWITCH, ®); |
| 1744 | if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | 1744 | if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { |
| 1745 | rt2x00_set_field32(®, GPIO_SWITCH_0, 1); | 1745 | rt2x00_set_field32(®, GPIO_SWITCH_0, 1); |
| 1746 | rt2x00_set_field32(®, GPIO_SWITCH_1, 1); | 1746 | rt2x00_set_field32(®, GPIO_SWITCH_1, 1); |
| 1747 | } else { | 1747 | } else { |
| @@ -1844,7 +1844,7 @@ void rt2800_config_ant(struct rt2x00_dev *rt2x00dev, struct antenna_setup *ant) | |||
| 1844 | rt2x00_has_cap_bt_coexist(rt2x00dev)) { | 1844 | rt2x00_has_cap_bt_coexist(rt2x00dev)) { |
| 1845 | rt2x00_set_field8(&r3, BBP3_RX_ADC, 1); | 1845 | rt2x00_set_field8(&r3, BBP3_RX_ADC, 1); |
| 1846 | rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, | 1846 | rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, |
| 1847 | rt2x00dev->curr_band == IEEE80211_BAND_5GHZ); | 1847 | rt2x00dev->curr_band == NL80211_BAND_5GHZ); |
| 1848 | rt2800_set_ant_diversity(rt2x00dev, ANTENNA_B); | 1848 | rt2800_set_ant_diversity(rt2x00dev, ANTENNA_B); |
| 1849 | } else { | 1849 | } else { |
| 1850 | rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, 1); | 1850 | rt2x00_set_field8(&r3, BBP3_RX_ANTENNA, 1); |
| @@ -3451,7 +3451,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev) | |||
| 3451 | * Matching Delta value -4 -3 -2 -1 0 +1 +2 +3 +4 | 3451 | * Matching Delta value -4 -3 -2 -1 0 +1 +2 +3 +4 |
| 3452 | * Example TSSI bounds 0xF0 0xD0 0xB5 0xA0 0x88 0x45 0x25 0x15 0x00 | 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 | rt2800_eeprom_read(rt2x00dev, EEPROM_TSSI_BOUND_BG1, &eeprom); | 3455 | rt2800_eeprom_read(rt2x00dev, EEPROM_TSSI_BOUND_BG1, &eeprom); |
| 3456 | tssi_bounds[0] = rt2x00_get_field16(eeprom, | 3456 | tssi_bounds[0] = rt2x00_get_field16(eeprom, |
| 3457 | EEPROM_TSSI_BOUND_BG1_MINUS4); | 3457 | EEPROM_TSSI_BOUND_BG1_MINUS4); |
| @@ -3546,7 +3546,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev) | |||
| 3546 | } | 3546 | } |
| 3547 | 3547 | ||
| 3548 | static int rt2800_get_txpower_bw_comp(struct rt2x00_dev *rt2x00dev, | 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 | u16 eeprom; | 3551 | u16 eeprom; |
| 3552 | u8 comp_en; | 3552 | u8 comp_en; |
| @@ -3562,7 +3562,7 @@ static int rt2800_get_txpower_bw_comp(struct rt2x00_dev *rt2x00dev, | |||
| 3562 | !test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags)) | 3562 | !test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags)) |
| 3563 | return 0; | 3563 | return 0; |
| 3564 | 3564 | ||
| 3565 | if (band == IEEE80211_BAND_2GHZ) { | 3565 | if (band == NL80211_BAND_2GHZ) { |
| 3566 | comp_en = rt2x00_get_field16(eeprom, | 3566 | comp_en = rt2x00_get_field16(eeprom, |
| 3567 | EEPROM_TXPOWER_DELTA_ENABLE_2G); | 3567 | EEPROM_TXPOWER_DELTA_ENABLE_2G); |
| 3568 | if (comp_en) { | 3568 | if (comp_en) { |
| @@ -3611,7 +3611,7 @@ static int rt2800_get_txpower_reg_delta(struct rt2x00_dev *rt2x00dev, | |||
| 3611 | } | 3611 | } |
| 3612 | 3612 | ||
| 3613 | static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b, | 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 | u8 txpower, int delta) | 3615 | u8 txpower, int delta) |
| 3616 | { | 3616 | { |
| 3617 | u16 eeprom; | 3617 | u16 eeprom; |
| @@ -3639,7 +3639,7 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b, | |||
| 3639 | rt2800_eeprom_read(rt2x00dev, EEPROM_EIRP_MAX_TX_POWER, | 3639 | rt2800_eeprom_read(rt2x00dev, EEPROM_EIRP_MAX_TX_POWER, |
| 3640 | &eeprom); | 3640 | &eeprom); |
| 3641 | 3641 | ||
| 3642 | if (band == IEEE80211_BAND_2GHZ) | 3642 | if (band == NL80211_BAND_2GHZ) |
| 3643 | eirp_txpower_criterion = rt2x00_get_field16(eeprom, | 3643 | eirp_txpower_criterion = rt2x00_get_field16(eeprom, |
| 3644 | EEPROM_EIRP_MAX_TX_POWER_2GHZ); | 3644 | EEPROM_EIRP_MAX_TX_POWER_2GHZ); |
| 3645 | else | 3645 | else |
| @@ -3686,7 +3686,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, | |||
| 3686 | u16 eeprom; | 3686 | u16 eeprom; |
| 3687 | u32 regs[TX_PWR_CFG_IDX_COUNT]; | 3687 | u32 regs[TX_PWR_CFG_IDX_COUNT]; |
| 3688 | unsigned int offset; | 3688 | unsigned int offset; |
| 3689 | enum ieee80211_band band = chan->band; | 3689 | enum nl80211_band band = chan->band; |
| 3690 | int delta; | 3690 | int delta; |
| 3691 | int i; | 3691 | int i; |
| 3692 | 3692 | ||
| @@ -3697,7 +3697,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, | |||
| 3697 | /* calculate temperature compensation delta */ | 3697 | /* calculate temperature compensation delta */ |
| 3698 | delta = rt2800_get_gain_calibration_delta(rt2x00dev); | 3698 | delta = rt2800_get_gain_calibration_delta(rt2x00dev); |
| 3699 | 3699 | ||
| 3700 | if (band == IEEE80211_BAND_5GHZ) | 3700 | if (band == NL80211_BAND_5GHZ) |
| 3701 | offset = 16; | 3701 | offset = 16; |
| 3702 | else | 3702 | else |
| 3703 | offset = 0; | 3703 | offset = 0; |
| @@ -4055,7 +4055,7 @@ static void rt2800_config_txpower_rt3593(struct rt2x00_dev *rt2x00dev, | |||
| 4055 | for (i = 0; i < TX_PWR_CFG_IDX_COUNT; i++) | 4055 | for (i = 0; i < TX_PWR_CFG_IDX_COUNT; i++) |
| 4056 | rt2x00_dbg(rt2x00dev, | 4056 | rt2x00_dbg(rt2x00dev, |
| 4057 | "band:%cGHz, BW:%c0MHz, TX_PWR_CFG_%d%s = %08lx\n", | 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 | (test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags)) ? | 4059 | (test_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags)) ? |
| 4060 | '4' : '2', | 4060 | '4' : '2', |
| 4061 | (i > TX_PWR_CFG_9_IDX) ? | 4061 | (i > TX_PWR_CFG_9_IDX) ? |
| @@ -4081,7 +4081,7 @@ static void rt2800_config_txpower_rt28xx(struct rt2x00_dev *rt2x00dev, | |||
| 4081 | u16 eeprom; | 4081 | u16 eeprom; |
| 4082 | u32 reg, offset; | 4082 | u32 reg, offset; |
| 4083 | int i, is_rate_b, delta, power_ctrl; | 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 | * Calculate HT40 compensation. For 40MHz we need to add or subtract | 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) | |||
| 4436 | { | 4436 | { |
| 4437 | u8 vgc; | 4437 | u8 vgc; |
| 4438 | 4438 | ||
| 4439 | if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) { | 4439 | if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) { |
| 4440 | if (rt2x00_rt(rt2x00dev, RT3070) || | 4440 | if (rt2x00_rt(rt2x00dev, RT3070) || |
| 4441 | rt2x00_rt(rt2x00dev, RT3071) || | 4441 | rt2x00_rt(rt2x00dev, RT3071) || |
| 4442 | rt2x00_rt(rt2x00dev, RT3090) || | 4442 | rt2x00_rt(rt2x00dev, RT3090) || |
| @@ -4511,7 +4511,7 @@ void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, | |||
| 4511 | case RT3572: | 4511 | case RT3572: |
| 4512 | case RT3593: | 4512 | case RT3593: |
| 4513 | if (qual->rssi > -65) { | 4513 | if (qual->rssi > -65) { |
| 4514 | if (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ) | 4514 | if (rt2x00dev->curr_band == NL80211_BAND_2GHZ) |
| 4515 | vgc += 0x20; | 4515 | vgc += 0x20; |
| 4516 | else | 4516 | else |
| 4517 | vgc += 0x10; | 4517 | vgc += 0x10; |
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00.h b/drivers/net/wireless/ralink/rt2x00/rt2x00.h index 3dacede7da5e..f68d492129c6 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h | |||
| @@ -753,8 +753,8 @@ struct rt2x00_dev { | |||
| 753 | * IEEE80211 control structure. | 753 | * IEEE80211 control structure. |
| 754 | */ | 754 | */ |
| 755 | struct ieee80211_hw *hw; | 755 | struct ieee80211_hw *hw; |
| 756 | struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS]; | 756 | struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; |
| 757 | enum ieee80211_band curr_band; | 757 | enum nl80211_band curr_band; |
| 758 | int curr_freq; | 758 | int curr_freq; |
| 759 | 759 | ||
| 760 | /* | 760 | /* |
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c index b2f7c586045d..4e0c5653054b 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | |||
| @@ -911,7 +911,7 @@ static void rt2x00lib_channel(struct ieee80211_channel *entry, | |||
| 911 | const int value) | 911 | const int value) |
| 912 | { | 912 | { |
| 913 | /* XXX: this assumption about the band is wrong for 802.11j */ | 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 | entry->center_freq = ieee80211_channel_to_frequency(channel, | 915 | entry->center_freq = ieee80211_channel_to_frequency(channel, |
| 916 | entry->band); | 916 | entry->band); |
| 917 | entry->hw_value = value; | 917 | entry->hw_value = value; |
| @@ -975,13 +975,13 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, | |||
| 975 | * Channels: 2.4 GHz | 975 | * Channels: 2.4 GHz |
| 976 | */ | 976 | */ |
| 977 | if (spec->supported_bands & SUPPORT_BAND_2GHZ) { | 977 | if (spec->supported_bands & SUPPORT_BAND_2GHZ) { |
| 978 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_channels = 14; | 978 | rt2x00dev->bands[NL80211_BAND_2GHZ].n_channels = 14; |
| 979 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].n_bitrates = num_rates; | 979 | rt2x00dev->bands[NL80211_BAND_2GHZ].n_bitrates = num_rates; |
| 980 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].channels = channels; | 980 | rt2x00dev->bands[NL80211_BAND_2GHZ].channels = channels; |
| 981 | rt2x00dev->bands[IEEE80211_BAND_2GHZ].bitrates = rates; | 981 | rt2x00dev->bands[NL80211_BAND_2GHZ].bitrates = rates; |
| 982 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 982 | hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 983 | &rt2x00dev->bands[IEEE80211_BAND_2GHZ]; | 983 | &rt2x00dev->bands[NL80211_BAND_2GHZ]; |
| 984 | memcpy(&rt2x00dev->bands[IEEE80211_BAND_2GHZ].ht_cap, | 984 | memcpy(&rt2x00dev->bands[NL80211_BAND_2GHZ].ht_cap, |
| 985 | &spec->ht, sizeof(spec->ht)); | 985 | &spec->ht, sizeof(spec->ht)); |
| 986 | } | 986 | } |
| 987 | 987 | ||
| @@ -991,15 +991,15 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, | |||
| 991 | * Channels: OFDM, UNII, HiperLAN2. | 991 | * Channels: OFDM, UNII, HiperLAN2. |
| 992 | */ | 992 | */ |
| 993 | if (spec->supported_bands & SUPPORT_BAND_5GHZ) { | 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 | spec->num_channels - 14; | 995 | spec->num_channels - 14; |
| 996 | rt2x00dev->bands[IEEE80211_BAND_5GHZ].n_bitrates = | 996 | rt2x00dev->bands[NL80211_BAND_5GHZ].n_bitrates = |
| 997 | num_rates - 4; | 997 | num_rates - 4; |
| 998 | rt2x00dev->bands[IEEE80211_BAND_5GHZ].channels = &channels[14]; | 998 | rt2x00dev->bands[NL80211_BAND_5GHZ].channels = &channels[14]; |
| 999 | rt2x00dev->bands[IEEE80211_BAND_5GHZ].bitrates = &rates[4]; | 999 | rt2x00dev->bands[NL80211_BAND_5GHZ].bitrates = &rates[4]; |
| 1000 | hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 1000 | hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 1001 | &rt2x00dev->bands[IEEE80211_BAND_5GHZ]; | 1001 | &rt2x00dev->bands[NL80211_BAND_5GHZ]; |
| 1002 | memcpy(&rt2x00dev->bands[IEEE80211_BAND_5GHZ].ht_cap, | 1002 | memcpy(&rt2x00dev->bands[NL80211_BAND_5GHZ].ht_cap, |
| 1003 | &spec->ht, sizeof(spec->ht)); | 1003 | &spec->ht, sizeof(spec->ht)); |
| 1004 | } | 1004 | } |
| 1005 | 1005 | ||
| @@ -1016,11 +1016,11 @@ static void rt2x00lib_remove_hw(struct rt2x00_dev *rt2x00dev) | |||
| 1016 | if (test_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags)) | 1016 | if (test_bit(DEVICE_STATE_REGISTERED_HW, &rt2x00dev->flags)) |
| 1017 | ieee80211_unregister_hw(rt2x00dev->hw); | 1017 | ieee80211_unregister_hw(rt2x00dev->hw); |
| 1018 | 1018 | ||
| 1019 | if (likely(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ])) { | 1019 | if (likely(rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ])) { |
| 1020 | kfree(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->channels); | 1020 | kfree(rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ]->channels); |
| 1021 | kfree(rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ]->bitrates); | 1021 | kfree(rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ]->bitrates); |
| 1022 | rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = NULL; | 1022 | rt2x00dev->hw->wiphy->bands[NL80211_BAND_2GHZ] = NULL; |
| 1023 | rt2x00dev->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = NULL; | 1023 | rt2x00dev->hw->wiphy->bands[NL80211_BAND_5GHZ] = NULL; |
| 1024 | } | 1024 | } |
| 1025 | 1025 | ||
| 1026 | kfree(rt2x00dev->spec.channels_info); | 1026 | kfree(rt2x00dev->spec.channels_info); |
diff --git a/drivers/net/wireless/ralink/rt2x00/rt61pci.c b/drivers/net/wireless/ralink/rt2x00/rt61pci.c index 24a3436ef952..03013eb2f642 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt61pci.c +++ b/drivers/net/wireless/ralink/rt2x00/rt61pci.c | |||
| @@ -252,9 +252,9 @@ static void rt61pci_brightness_set(struct led_classdev *led_cdev, | |||
| 252 | container_of(led_cdev, struct rt2x00_led, led_dev); | 252 | container_of(led_cdev, struct rt2x00_led, led_dev); |
| 253 | unsigned int enabled = brightness != LED_OFF; | 253 | unsigned int enabled = brightness != LED_OFF; |
| 254 | unsigned int a_mode = | 254 | unsigned int a_mode = |
| 255 | (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_5GHZ); | 255 | (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); |
| 256 | unsigned int bg_mode = | 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 | if (led->type == LED_TYPE_RADIO) { | 259 | if (led->type == LED_TYPE_RADIO) { |
| 260 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, | 260 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, |
| @@ -643,12 +643,12 @@ static void rt61pci_config_antenna_5x(struct rt2x00_dev *rt2x00dev, | |||
| 643 | case ANTENNA_HW_DIVERSITY: | 643 | case ANTENNA_HW_DIVERSITY: |
| 644 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2); | 644 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2); |
| 645 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, | 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 | break; | 647 | break; |
| 648 | case ANTENNA_A: | 648 | case ANTENNA_A: |
| 649 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); | 649 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 650 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0); | 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 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); | 652 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); |
| 653 | else | 653 | else |
| 654 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); | 654 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); |
| @@ -657,7 +657,7 @@ static void rt61pci_config_antenna_5x(struct rt2x00_dev *rt2x00dev, | |||
| 657 | default: | 657 | default: |
| 658 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); | 658 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 659 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0); | 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 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); | 661 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); |
| 662 | else | 662 | else |
| 663 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); | 663 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); |
| @@ -808,7 +808,7 @@ static void rt61pci_config_ant(struct rt2x00_dev *rt2x00dev, | |||
| 808 | BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY || | 808 | BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY || |
| 809 | ant->tx == ANTENNA_SW_DIVERSITY); | 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 | sel = antenna_sel_a; | 812 | sel = antenna_sel_a; |
| 813 | lna = rt2x00_has_cap_external_lna_a(rt2x00dev); | 813 | lna = rt2x00_has_cap_external_lna_a(rt2x00dev); |
| 814 | } else { | 814 | } else { |
| @@ -822,9 +822,9 @@ static void rt61pci_config_ant(struct rt2x00_dev *rt2x00dev, | |||
| 822 | rt2x00mmio_register_read(rt2x00dev, PHY_CSR0, ®); | 822 | rt2x00mmio_register_read(rt2x00dev, PHY_CSR0, ®); |
| 823 | 823 | ||
| 824 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_BG, | 824 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_BG, |
| 825 | rt2x00dev->curr_band == IEEE80211_BAND_2GHZ); | 825 | rt2x00dev->curr_band == NL80211_BAND_2GHZ); |
| 826 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_A, | 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 | rt2x00mmio_register_write(rt2x00dev, PHY_CSR0, reg); | 829 | rt2x00mmio_register_write(rt2x00dev, PHY_CSR0, reg); |
| 830 | 830 | ||
| @@ -846,7 +846,7 @@ static void rt61pci_config_lna_gain(struct rt2x00_dev *rt2x00dev, | |||
| 846 | u16 eeprom; | 846 | u16 eeprom; |
| 847 | short lna_gain = 0; | 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 | if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) | 850 | if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) |
| 851 | lna_gain += 14; | 851 | lna_gain += 14; |
| 852 | 852 | ||
| @@ -1048,7 +1048,7 @@ static void rt61pci_link_tuner(struct rt2x00_dev *rt2x00dev, | |||
| 1048 | /* | 1048 | /* |
| 1049 | * Determine r17 bounds. | 1049 | * Determine r17 bounds. |
| 1050 | */ | 1050 | */ |
| 1051 | if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | 1051 | if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { |
| 1052 | low_bound = 0x28; | 1052 | low_bound = 0x28; |
| 1053 | up_bound = 0x48; | 1053 | up_bound = 0x48; |
| 1054 | if (rt2x00_has_cap_external_lna_a(rt2x00dev)) { | 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) | |||
| 2077 | return 0; | 2077 | return 0; |
| 2078 | } | 2078 | } |
| 2079 | 2079 | ||
| 2080 | if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | 2080 | if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { |
| 2081 | if (lna == 3 || lna == 2) | 2081 | if (lna == 3 || lna == 2) |
| 2082 | offset += 10; | 2082 | offset += 10; |
| 2083 | } | 2083 | } |
diff --git a/drivers/net/wireless/ralink/rt2x00/rt73usb.c b/drivers/net/wireless/ralink/rt2x00/rt73usb.c index 7bbc86931168..c1397a6d3cee 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt73usb.c +++ b/drivers/net/wireless/ralink/rt2x00/rt73usb.c | |||
| @@ -197,9 +197,9 @@ static void rt73usb_brightness_set(struct led_classdev *led_cdev, | |||
| 197 | container_of(led_cdev, struct rt2x00_led, led_dev); | 197 | container_of(led_cdev, struct rt2x00_led, led_dev); |
| 198 | unsigned int enabled = brightness != LED_OFF; | 198 | unsigned int enabled = brightness != LED_OFF; |
| 199 | unsigned int a_mode = | 199 | unsigned int a_mode = |
| 200 | (enabled && led->rt2x00dev->curr_band == IEEE80211_BAND_5GHZ); | 200 | (enabled && led->rt2x00dev->curr_band == NL80211_BAND_5GHZ); |
| 201 | unsigned int bg_mode = | 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 | if (led->type == LED_TYPE_RADIO) { | 204 | if (led->type == LED_TYPE_RADIO) { |
| 205 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, | 205 | rt2x00_set_field16(&led->rt2x00dev->led_mcu_reg, |
| @@ -593,13 +593,13 @@ static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev, | |||
| 593 | case ANTENNA_HW_DIVERSITY: | 593 | case ANTENNA_HW_DIVERSITY: |
| 594 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2); | 594 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 2); |
| 595 | temp = !rt2x00_has_cap_frame_type(rt2x00dev) && | 595 | temp = !rt2x00_has_cap_frame_type(rt2x00dev) && |
| 596 | (rt2x00dev->curr_band != IEEE80211_BAND_5GHZ); | 596 | (rt2x00dev->curr_band != NL80211_BAND_5GHZ); |
| 597 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, temp); | 597 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, temp); |
| 598 | break; | 598 | break; |
| 599 | case ANTENNA_A: | 599 | case ANTENNA_A: |
| 600 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); | 600 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 601 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0); | 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 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); | 603 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); |
| 604 | else | 604 | else |
| 605 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); | 605 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); |
| @@ -608,7 +608,7 @@ static void rt73usb_config_antenna_5x(struct rt2x00_dev *rt2x00dev, | |||
| 608 | default: | 608 | default: |
| 609 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); | 609 | rt2x00_set_field8(&r4, BBP_R4_RX_ANTENNA_CONTROL, 1); |
| 610 | rt2x00_set_field8(&r4, BBP_R4_RX_FRAME_END, 0); | 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 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); | 612 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 3); |
| 613 | else | 613 | else |
| 614 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); | 614 | rt2x00_set_field8(&r77, BBP_R77_RX_ANTENNA, 0); |
| @@ -704,7 +704,7 @@ static void rt73usb_config_ant(struct rt2x00_dev *rt2x00dev, | |||
| 704 | BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY || | 704 | BUG_ON(ant->rx == ANTENNA_SW_DIVERSITY || |
| 705 | ant->tx == ANTENNA_SW_DIVERSITY); | 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 | sel = antenna_sel_a; | 708 | sel = antenna_sel_a; |
| 709 | lna = rt2x00_has_cap_external_lna_a(rt2x00dev); | 709 | lna = rt2x00_has_cap_external_lna_a(rt2x00dev); |
| 710 | } else { | 710 | } else { |
| @@ -718,9 +718,9 @@ static void rt73usb_config_ant(struct rt2x00_dev *rt2x00dev, | |||
| 718 | rt2x00usb_register_read(rt2x00dev, PHY_CSR0, ®); | 718 | rt2x00usb_register_read(rt2x00dev, PHY_CSR0, ®); |
| 719 | 719 | ||
| 720 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_BG, | 720 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_BG, |
| 721 | (rt2x00dev->curr_band == IEEE80211_BAND_2GHZ)); | 721 | (rt2x00dev->curr_band == NL80211_BAND_2GHZ)); |
| 722 | rt2x00_set_field32(®, PHY_CSR0_PA_PE_A, | 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 | rt2x00usb_register_write(rt2x00dev, PHY_CSR0, reg); | 725 | rt2x00usb_register_write(rt2x00dev, PHY_CSR0, reg); |
| 726 | 726 | ||
| @@ -736,7 +736,7 @@ static void rt73usb_config_lna_gain(struct rt2x00_dev *rt2x00dev, | |||
| 736 | u16 eeprom; | 736 | u16 eeprom; |
| 737 | short lna_gain = 0; | 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 | if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) | 740 | if (rt2x00_has_cap_external_lna_bg(rt2x00dev)) |
| 741 | lna_gain += 14; | 741 | lna_gain += 14; |
| 742 | 742 | ||
| @@ -923,7 +923,7 @@ static void rt73usb_link_tuner(struct rt2x00_dev *rt2x00dev, | |||
| 923 | /* | 923 | /* |
| 924 | * Determine r17 bounds. | 924 | * Determine r17 bounds. |
| 925 | */ | 925 | */ |
| 926 | if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | 926 | if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { |
| 927 | low_bound = 0x28; | 927 | low_bound = 0x28; |
| 928 | up_bound = 0x48; | 928 | up_bound = 0x48; |
| 929 | 929 | ||
| @@ -1657,7 +1657,7 @@ static int rt73usb_agc_to_rssi(struct rt2x00_dev *rt2x00dev, int rxd_w1) | |||
| 1657 | return 0; | 1657 | return 0; |
| 1658 | } | 1658 | } |
| 1659 | 1659 | ||
| 1660 | if (rt2x00dev->curr_band == IEEE80211_BAND_5GHZ) { | 1660 | if (rt2x00dev->curr_band == NL80211_BAND_5GHZ) { |
| 1661 | if (rt2x00_has_cap_external_lna_a(rt2x00dev)) { | 1661 | if (rt2x00_has_cap_external_lna_a(rt2x00dev)) { |
| 1662 | if (lna == 3 || lna == 2) | 1662 | if (lna == 3 || lna == 2) |
| 1663 | offset += 10; | 1663 | offset += 10; |
diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c index c76af5d8b8e0..ba242d0160ec 100644 --- a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c +++ b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | |||
| @@ -526,7 +526,7 @@ static void rtl8180_tx(struct ieee80211_hw *dev, | |||
| 526 | * ieee80211_generic_frame_duration | 526 | * ieee80211_generic_frame_duration |
| 527 | */ | 527 | */ |
| 528 | duration = ieee80211_generic_frame_duration(dev, priv->vif, | 528 | duration = ieee80211_generic_frame_duration(dev, priv->vif, |
| 529 | IEEE80211_BAND_2GHZ, skb->len, | 529 | NL80211_BAND_2GHZ, skb->len, |
| 530 | ieee80211_get_tx_rate(dev, info)); | 530 | ieee80211_get_tx_rate(dev, info)); |
| 531 | 531 | ||
| 532 | frame_duration = priv->ack_time + le16_to_cpu(duration); | 532 | frame_duration = priv->ack_time + le16_to_cpu(duration); |
| @@ -1529,7 +1529,7 @@ static void rtl8180_bss_info_changed(struct ieee80211_hw *dev, | |||
| 1529 | priv->ack_time = | 1529 | priv->ack_time = |
| 1530 | le16_to_cpu(ieee80211_generic_frame_duration(dev, | 1530 | le16_to_cpu(ieee80211_generic_frame_duration(dev, |
| 1531 | priv->vif, | 1531 | priv->vif, |
| 1532 | IEEE80211_BAND_2GHZ, 10, | 1532 | NL80211_BAND_2GHZ, 10, |
| 1533 | &priv->rates[0])) - 10; | 1533 | &priv->rates[0])) - 10; |
| 1534 | 1534 | ||
| 1535 | rtl8180_conf_erp(dev, info); | 1535 | rtl8180_conf_erp(dev, info); |
| @@ -1795,12 +1795,12 @@ static int rtl8180_probe(struct pci_dev *pdev, | |||
| 1795 | memcpy(priv->channels, rtl818x_channels, sizeof(rtl818x_channels)); | 1795 | memcpy(priv->channels, rtl818x_channels, sizeof(rtl818x_channels)); |
| 1796 | memcpy(priv->rates, rtl818x_rates, sizeof(rtl818x_rates)); | 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 | priv->band.channels = priv->channels; | 1799 | priv->band.channels = priv->channels; |
| 1800 | priv->band.n_channels = ARRAY_SIZE(rtl818x_channels); | 1800 | priv->band.n_channels = ARRAY_SIZE(rtl818x_channels); |
| 1801 | priv->band.bitrates = priv->rates; | 1801 | priv->band.bitrates = priv->rates; |
| 1802 | priv->band.n_bitrates = 4; | 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 | ieee80211_hw_set(dev, HOST_BROADCAST_PS_BUFFERING); | 1805 | ieee80211_hw_set(dev, HOST_BROADCAST_PS_BUFFERING); |
| 1806 | ieee80211_hw_set(dev, RX_INCLUDES_FCS); | 1806 | ieee80211_hw_set(dev, RX_INCLUDES_FCS); |
diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c index b7f72f9c7988..231f84db9ab0 100644 --- a/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c +++ b/drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c | |||
| @@ -1470,12 +1470,12 @@ static int rtl8187_probe(struct usb_interface *intf, | |||
| 1470 | memcpy(priv->rates, rtl818x_rates, sizeof(rtl818x_rates)); | 1470 | memcpy(priv->rates, rtl818x_rates, sizeof(rtl818x_rates)); |
| 1471 | priv->map = (struct rtl818x_csr *)0xFF00; | 1471 | priv->map = (struct rtl818x_csr *)0xFF00; |
| 1472 | 1472 | ||
| 1473 | priv->band.band = IEEE80211_BAND_2GHZ; | 1473 | priv->band.band = NL80211_BAND_2GHZ; |
| 1474 | priv->band.channels = priv->channels; | 1474 | priv->band.channels = priv->channels; |
| 1475 | priv->band.n_channels = ARRAY_SIZE(rtl818x_channels); | 1475 | priv->band.n_channels = ARRAY_SIZE(rtl818x_channels); |
| 1476 | priv->band.bitrates = priv->rates; | 1476 | priv->band.bitrates = priv->rates; |
| 1477 | priv->band.n_bitrates = ARRAY_SIZE(rtl818x_rates); | 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 | ieee80211_hw_set(dev, RX_INCLUDES_FCS); | 1481 | ieee80211_hw_set(dev, RX_INCLUDES_FCS); |
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c index 333addd3d46a..db8433a9efe2 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.c | |||
| @@ -91,33 +91,33 @@ static struct ieee80211_rate rtl8xxxu_rates[] = { | |||
| 91 | }; | 91 | }; |
| 92 | 92 | ||
| 93 | static struct ieee80211_channel rtl8xxxu_channels_2g[] = { | 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 | .hw_value = 1, .max_power = 30 }, | 95 | .hw_value = 1, .max_power = 30 }, |
| 96 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, | 96 | { .band = NL80211_BAND_2GHZ, .center_freq = 2417, |
| 97 | .hw_value = 2, .max_power = 30 }, | 97 | .hw_value = 2, .max_power = 30 }, |
| 98 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, | 98 | { .band = NL80211_BAND_2GHZ, .center_freq = 2422, |
| 99 | .hw_value = 3, .max_power = 30 }, | 99 | .hw_value = 3, .max_power = 30 }, |
| 100 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, | 100 | { .band = NL80211_BAND_2GHZ, .center_freq = 2427, |
| 101 | .hw_value = 4, .max_power = 30 }, | 101 | .hw_value = 4, .max_power = 30 }, |
| 102 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, | 102 | { .band = NL80211_BAND_2GHZ, .center_freq = 2432, |
| 103 | .hw_value = 5, .max_power = 30 }, | 103 | .hw_value = 5, .max_power = 30 }, |
| 104 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, | 104 | { .band = NL80211_BAND_2GHZ, .center_freq = 2437, |
| 105 | .hw_value = 6, .max_power = 30 }, | 105 | .hw_value = 6, .max_power = 30 }, |
| 106 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, | 106 | { .band = NL80211_BAND_2GHZ, .center_freq = 2442, |
| 107 | .hw_value = 7, .max_power = 30 }, | 107 | .hw_value = 7, .max_power = 30 }, |
| 108 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, | 108 | { .band = NL80211_BAND_2GHZ, .center_freq = 2447, |
| 109 | .hw_value = 8, .max_power = 30 }, | 109 | .hw_value = 8, .max_power = 30 }, |
| 110 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, | 110 | { .band = NL80211_BAND_2GHZ, .center_freq = 2452, |
| 111 | .hw_value = 9, .max_power = 30 }, | 111 | .hw_value = 9, .max_power = 30 }, |
| 112 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, | 112 | { .band = NL80211_BAND_2GHZ, .center_freq = 2457, |
| 113 | .hw_value = 10, .max_power = 30 }, | 113 | .hw_value = 10, .max_power = 30 }, |
| 114 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, | 114 | { .band = NL80211_BAND_2GHZ, .center_freq = 2462, |
| 115 | .hw_value = 11, .max_power = 30 }, | 115 | .hw_value = 11, .max_power = 30 }, |
| 116 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, | 116 | { .band = NL80211_BAND_2GHZ, .center_freq = 2467, |
| 117 | .hw_value = 12, .max_power = 30 }, | 117 | .hw_value = 12, .max_power = 30 }, |
| 118 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, | 118 | { .band = NL80211_BAND_2GHZ, .center_freq = 2472, |
| 119 | .hw_value = 13, .max_power = 30 }, | 119 | .hw_value = 13, .max_power = 30 }, |
| 120 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, | 120 | { .band = NL80211_BAND_2GHZ, .center_freq = 2484, |
| 121 | .hw_value = 14, .max_power = 30 } | 121 | .hw_value = 14, .max_power = 30 } |
| 122 | }; | 122 | }; |
| 123 | 123 | ||
| @@ -8378,7 +8378,7 @@ static int rtl8xxxu_probe(struct usb_interface *interface, | |||
| 8378 | dev_info(&udev->dev, "Enabling HT_20_40 on the 2.4GHz band\n"); | 8378 | dev_info(&udev->dev, "Enabling HT_20_40 on the 2.4GHz band\n"); |
| 8379 | sband->ht_cap.cap |= IEEE80211_HT_CAP_SUP_WIDTH_20_40; | 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 | hw->wiphy->rts_threshold = 2347; | 8383 | hw->wiphy->rts_threshold = 2347; |
| 8384 | 8384 | ||
diff --git a/drivers/net/wireless/realtek/rtlwifi/base.c b/drivers/net/wireless/realtek/rtlwifi/base.c index 0517a4f2d3f2..c74eb139bfa1 100644 --- a/drivers/net/wireless/realtek/rtlwifi/base.c +++ b/drivers/net/wireless/realtek/rtlwifi/base.c | |||
| @@ -131,7 +131,7 @@ static struct ieee80211_rate rtl_ratetable_5g[] = { | |||
| 131 | }; | 131 | }; |
| 132 | 132 | ||
| 133 | static const struct ieee80211_supported_band rtl_band_2ghz = { | 133 | static const struct ieee80211_supported_band rtl_band_2ghz = { |
| 134 | .band = IEEE80211_BAND_2GHZ, | 134 | .band = NL80211_BAND_2GHZ, |
| 135 | 135 | ||
| 136 | .channels = rtl_channeltable_2g, | 136 | .channels = rtl_channeltable_2g, |
| 137 | .n_channels = ARRAY_SIZE(rtl_channeltable_2g), | 137 | .n_channels = ARRAY_SIZE(rtl_channeltable_2g), |
| @@ -143,7 +143,7 @@ static const struct ieee80211_supported_band rtl_band_2ghz = { | |||
| 143 | }; | 143 | }; |
| 144 | 144 | ||
| 145 | static struct ieee80211_supported_band rtl_band_5ghz = { | 145 | static struct ieee80211_supported_band rtl_band_5ghz = { |
| 146 | .band = IEEE80211_BAND_5GHZ, | 146 | .band = NL80211_BAND_5GHZ, |
| 147 | 147 | ||
| 148 | .channels = rtl_channeltable_5g, | 148 | .channels = rtl_channeltable_5g, |
| 149 | .n_channels = ARRAY_SIZE(rtl_channeltable_5g), | 149 | .n_channels = ARRAY_SIZE(rtl_channeltable_5g), |
| @@ -197,7 +197,7 @@ static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, | |||
| 197 | 197 | ||
| 198 | ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; | 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 | *base on ant_num | 201 | *base on ant_num |
| 202 | *rx_mask: RX mask | 202 | *rx_mask: RX mask |
| 203 | *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7 | 203 | *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7 |
| @@ -328,26 +328,26 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) | |||
| 328 | rtlhal->bandset == BAND_ON_BOTH) { | 328 | rtlhal->bandset == BAND_ON_BOTH) { |
| 329 | /* 1: 2.4 G bands */ | 329 | /* 1: 2.4 G bands */ |
| 330 | /* <1> use mac->bands as mem for hw->wiphy->bands */ | 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 | * to default value(1T1R) */ | 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 | sizeof(struct ieee80211_supported_band)); | 336 | sizeof(struct ieee80211_supported_band)); |
| 337 | 337 | ||
| 338 | /* <3> init ht cap base on ant_num */ | 338 | /* <3> init ht cap base on ant_num */ |
| 339 | _rtl_init_hw_ht_capab(hw, &sband->ht_cap); | 339 | _rtl_init_hw_ht_capab(hw, &sband->ht_cap); |
| 340 | 340 | ||
| 341 | /* <4> set mac->sband to wiphy->sband */ | 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 | /* 2: 5 G bands */ | 344 | /* 2: 5 G bands */ |
| 345 | /* <1> use mac->bands as mem for hw->wiphy->bands */ | 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 | * to default value(1T1R) */ | 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 | sizeof(struct ieee80211_supported_band)); | 351 | sizeof(struct ieee80211_supported_band)); |
| 352 | 352 | ||
| 353 | /* <3> init ht cap base on ant_num */ | 353 | /* <3> init ht cap base on ant_num */ |
| @@ -355,15 +355,15 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) | |||
| 355 | 355 | ||
| 356 | _rtl_init_hw_vht_capab(hw, &sband->vht_cap); | 356 | _rtl_init_hw_vht_capab(hw, &sband->vht_cap); |
| 357 | /* <4> set mac->sband to wiphy->sband */ | 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 | } else { | 359 | } else { |
| 360 | if (rtlhal->current_bandtype == BAND_ON_2_4G) { | 360 | if (rtlhal->current_bandtype == BAND_ON_2_4G) { |
| 361 | /* <1> use mac->bands as mem for hw->wiphy->bands */ | 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 | * to default value(1T1R) */ | 365 | * to default value(1T1R) */ |
| 366 | memcpy(&(rtlmac->bands[IEEE80211_BAND_2GHZ]), | 366 | memcpy(&(rtlmac->bands[NL80211_BAND_2GHZ]), |
| 367 | &rtl_band_2ghz, | 367 | &rtl_band_2ghz, |
| 368 | sizeof(struct ieee80211_supported_band)); | 368 | sizeof(struct ieee80211_supported_band)); |
| 369 | 369 | ||
| @@ -371,14 +371,14 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) | |||
| 371 | _rtl_init_hw_ht_capab(hw, &sband->ht_cap); | 371 | _rtl_init_hw_ht_capab(hw, &sband->ht_cap); |
| 372 | 372 | ||
| 373 | /* <4> set mac->sband to wiphy->sband */ | 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 | } else if (rtlhal->current_bandtype == BAND_ON_5G) { | 375 | } else if (rtlhal->current_bandtype == BAND_ON_5G) { |
| 376 | /* <1> use mac->bands as mem for hw->wiphy->bands */ | 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 | * to default value(1T1R) */ | 380 | * to default value(1T1R) */ |
| 381 | memcpy(&(rtlmac->bands[IEEE80211_BAND_5GHZ]), | 381 | memcpy(&(rtlmac->bands[NL80211_BAND_5GHZ]), |
| 382 | &rtl_band_5ghz, | 382 | &rtl_band_5ghz, |
| 383 | sizeof(struct ieee80211_supported_band)); | 383 | sizeof(struct ieee80211_supported_band)); |
| 384 | 384 | ||
| @@ -387,7 +387,7 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw) | |||
| 387 | 387 | ||
| 388 | _rtl_init_hw_vht_capab(hw, &sband->vht_cap); | 388 | _rtl_init_hw_vht_capab(hw, &sband->vht_cap); |
| 389 | /* <4> set mac->sband to wiphy->sband */ | 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 | } else { | 391 | } else { |
| 392 | RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n", | 392 | RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Err BAND %d\n", |
| 393 | rtlhal->current_bandtype); | 393 | rtlhal->current_bandtype); |
| @@ -861,7 +861,7 @@ static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw, | |||
| 861 | 861 | ||
| 862 | /* mac80211's rate_idx is like this: | 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 | * B/G rate: | 866 | * B/G rate: |
| 867 | * (rx_status->flag & RX_FLAG_HT) = 0, | 867 | * (rx_status->flag & RX_FLAG_HT) = 0, |
| @@ -871,7 +871,7 @@ static u8 _rtl_get_highest_n_rate(struct ieee80211_hw *hw, | |||
| 871 | * (rx_status->flag & RX_FLAG_HT) = 1, | 871 | * (rx_status->flag & RX_FLAG_HT) = 1, |
| 872 | * DESC_RATEMCS0-->DESC_RATEMCS15 ==> idx is 0-->15 | 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 | * A rate: | 875 | * A rate: |
| 876 | * (rx_status->flag & RX_FLAG_HT) = 0, | 876 | * (rx_status->flag & RX_FLAG_HT) = 0, |
| 877 | * DESC_RATE6M-->DESC_RATE54M ==> idx is 0-->7, | 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, | |||
| 958 | return rate_idx; | 958 | return rate_idx; |
| 959 | } | 959 | } |
| 960 | if (false == isht) { | 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 | switch (desc_rate) { | 962 | switch (desc_rate) { |
| 963 | case DESC_RATE1M: | 963 | case DESC_RATE1M: |
| 964 | rate_idx = 0; | 964 | rate_idx = 0; |
diff --git a/drivers/net/wireless/realtek/rtlwifi/regd.c b/drivers/net/wireless/realtek/rtlwifi/regd.c index 5be34118e0af..3524441fd516 100644 --- a/drivers/net/wireless/realtek/rtlwifi/regd.c +++ b/drivers/net/wireless/realtek/rtlwifi/regd.c | |||
| @@ -154,13 +154,13 @@ static bool _rtl_is_radar_freq(u16 center_freq) | |||
| 154 | static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, | 154 | static void _rtl_reg_apply_beaconing_flags(struct wiphy *wiphy, |
| 155 | enum nl80211_reg_initiator initiator) | 155 | enum nl80211_reg_initiator initiator) |
| 156 | { | 156 | { |
| 157 | enum ieee80211_band band; | 157 | enum nl80211_band band; |
| 158 | struct ieee80211_supported_band *sband; | 158 | struct ieee80211_supported_band *sband; |
| 159 | const struct ieee80211_reg_rule *reg_rule; | 159 | const struct ieee80211_reg_rule *reg_rule; |
| 160 | struct ieee80211_channel *ch; | 160 | struct ieee80211_channel *ch; |
| 161 | unsigned int i; | 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 | if (!wiphy->bands[band]) | 165 | if (!wiphy->bands[band]) |
| 166 | continue; | 166 | continue; |
| @@ -210,9 +210,9 @@ static void _rtl_reg_apply_active_scan_flags(struct wiphy *wiphy, | |||
| 210 | struct ieee80211_channel *ch; | 210 | struct ieee80211_channel *ch; |
| 211 | const struct ieee80211_reg_rule *reg_rule; | 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 | return; | 214 | return; |
| 215 | sband = wiphy->bands[IEEE80211_BAND_2GHZ]; | 215 | sband = wiphy->bands[NL80211_BAND_2GHZ]; |
| 216 | 216 | ||
| 217 | /* | 217 | /* |
| 218 | *If no country IE has been received always enable active scan | 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) | |||
| 262 | struct ieee80211_channel *ch; | 262 | struct ieee80211_channel *ch; |
| 263 | unsigned int i; | 263 | unsigned int i; |
| 264 | 264 | ||
| 265 | if (!wiphy->bands[IEEE80211_BAND_5GHZ]) | 265 | if (!wiphy->bands[NL80211_BAND_5GHZ]) |
| 266 | return; | 266 | return; |
| 267 | 267 | ||
| 268 | sband = wiphy->bands[IEEE80211_BAND_5GHZ]; | 268 | sband = wiphy->bands[NL80211_BAND_5GHZ]; |
| 269 | 269 | ||
| 270 | for (i = 0; i < sband->n_channels; i++) { | 270 | for (i = 0; i < sband->n_channels; i++) { |
| 271 | ch = &sband->channels[i]; | 271 | ch = &sband->channels[i]; |
| @@ -301,12 +301,12 @@ static void _rtl_reg_apply_world_flags(struct wiphy *wiphy, | |||
| 301 | 301 | ||
| 302 | static void _rtl_dump_channel_map(struct wiphy *wiphy) | 302 | static void _rtl_dump_channel_map(struct wiphy *wiphy) |
| 303 | { | 303 | { |
| 304 | enum ieee80211_band band; | 304 | enum nl80211_band band; |
| 305 | struct ieee80211_supported_band *sband; | 305 | struct ieee80211_supported_band *sband; |
| 306 | struct ieee80211_channel *ch; | 306 | struct ieee80211_channel *ch; |
| 307 | unsigned int i; | 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 | if (!wiphy->bands[band]) | 310 | if (!wiphy->bands[band]) |
| 311 | continue; | 311 | continue; |
| 312 | sband = wiphy->bands[band]; | 312 | sband = wiphy->bands[band]; |
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h index 389dc47776c0..11d9c2307e2f 100644 --- a/drivers/net/wireless/realtek/rtlwifi/wifi.h +++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h | |||
| @@ -1359,7 +1359,7 @@ struct rtl_mac { | |||
| 1359 | u32 tx_ss_num; | 1359 | u32 tx_ss_num; |
| 1360 | u32 rx_ss_num; | 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 | struct ieee80211_hw *hw; | 1363 | struct ieee80211_hw *hw; |
| 1364 | struct ieee80211_vif *vif; | 1364 | struct ieee80211_vif *vif; |
| 1365 | enum nl80211_iftype opmode; | 1365 | enum nl80211_iftype opmode; |
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index a13d1f2b5912..569918c485b4 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
| @@ -1291,7 +1291,7 @@ static int set_channel(struct usbnet *usbdev, int channel) | |||
| 1291 | return 0; | 1291 | return 0; |
| 1292 | 1292 | ||
| 1293 | dsconfig = 1000 * | 1293 | dsconfig = 1000 * |
| 1294 | ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); | 1294 | ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ); |
| 1295 | 1295 | ||
| 1296 | len = sizeof(config); | 1296 | len = sizeof(config); |
| 1297 | ret = rndis_query_oid(usbdev, | 1297 | ret = rndis_query_oid(usbdev, |
| @@ -3476,7 +3476,7 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) | |||
| 3476 | priv->band.n_channels = ARRAY_SIZE(rndis_channels); | 3476 | priv->band.n_channels = ARRAY_SIZE(rndis_channels); |
| 3477 | priv->band.bitrates = priv->rates; | 3477 | priv->band.bitrates = priv->rates; |
| 3478 | priv->band.n_bitrates = ARRAY_SIZE(rndis_rates); | 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 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; | 3480 | wiphy->signal_type = CFG80211_SIGNAL_TYPE_UNSPEC; |
| 3481 | 3481 | ||
| 3482 | memcpy(priv->cipher_suites, rndis_cipher_suites, | 3482 | memcpy(priv->cipher_suites, rndis_cipher_suites, |
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c index 4df992de7d07..dbb23899ddcb 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c | |||
| @@ -20,84 +20,84 @@ | |||
| 20 | #include "rsi_common.h" | 20 | #include "rsi_common.h" |
| 21 | 21 | ||
| 22 | static const struct ieee80211_channel rsi_2ghz_channels[] = { | 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 | .hw_value = 1 }, /* Channel 1 */ | 24 | .hw_value = 1 }, /* Channel 1 */ |
| 25 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, | 25 | { .band = NL80211_BAND_2GHZ, .center_freq = 2417, |
| 26 | .hw_value = 2 }, /* Channel 2 */ | 26 | .hw_value = 2 }, /* Channel 2 */ |
| 27 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, | 27 | { .band = NL80211_BAND_2GHZ, .center_freq = 2422, |
| 28 | .hw_value = 3 }, /* Channel 3 */ | 28 | .hw_value = 3 }, /* Channel 3 */ |
| 29 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, | 29 | { .band = NL80211_BAND_2GHZ, .center_freq = 2427, |
| 30 | .hw_value = 4 }, /* Channel 4 */ | 30 | .hw_value = 4 }, /* Channel 4 */ |
| 31 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, | 31 | { .band = NL80211_BAND_2GHZ, .center_freq = 2432, |
| 32 | .hw_value = 5 }, /* Channel 5 */ | 32 | .hw_value = 5 }, /* Channel 5 */ |
| 33 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, | 33 | { .band = NL80211_BAND_2GHZ, .center_freq = 2437, |
| 34 | .hw_value = 6 }, /* Channel 6 */ | 34 | .hw_value = 6 }, /* Channel 6 */ |
| 35 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, | 35 | { .band = NL80211_BAND_2GHZ, .center_freq = 2442, |
| 36 | .hw_value = 7 }, /* Channel 7 */ | 36 | .hw_value = 7 }, /* Channel 7 */ |
| 37 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, | 37 | { .band = NL80211_BAND_2GHZ, .center_freq = 2447, |
| 38 | .hw_value = 8 }, /* Channel 8 */ | 38 | .hw_value = 8 }, /* Channel 8 */ |
| 39 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, | 39 | { .band = NL80211_BAND_2GHZ, .center_freq = 2452, |
| 40 | .hw_value = 9 }, /* Channel 9 */ | 40 | .hw_value = 9 }, /* Channel 9 */ |
| 41 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, | 41 | { .band = NL80211_BAND_2GHZ, .center_freq = 2457, |
| 42 | .hw_value = 10 }, /* Channel 10 */ | 42 | .hw_value = 10 }, /* Channel 10 */ |
| 43 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, | 43 | { .band = NL80211_BAND_2GHZ, .center_freq = 2462, |
| 44 | .hw_value = 11 }, /* Channel 11 */ | 44 | .hw_value = 11 }, /* Channel 11 */ |
| 45 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, | 45 | { .band = NL80211_BAND_2GHZ, .center_freq = 2467, |
| 46 | .hw_value = 12 }, /* Channel 12 */ | 46 | .hw_value = 12 }, /* Channel 12 */ |
| 47 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, | 47 | { .band = NL80211_BAND_2GHZ, .center_freq = 2472, |
| 48 | .hw_value = 13 }, /* Channel 13 */ | 48 | .hw_value = 13 }, /* Channel 13 */ |
| 49 | { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, | 49 | { .band = NL80211_BAND_2GHZ, .center_freq = 2484, |
| 50 | .hw_value = 14 }, /* Channel 14 */ | 50 | .hw_value = 14 }, /* Channel 14 */ |
| 51 | }; | 51 | }; |
| 52 | 52 | ||
| 53 | static const struct ieee80211_channel rsi_5ghz_channels[] = { | 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 | .hw_value = 36, }, /* Channel 36 */ | 55 | .hw_value = 36, }, /* Channel 36 */ |
| 56 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5200, | 56 | { .band = NL80211_BAND_5GHZ, .center_freq = 5200, |
| 57 | .hw_value = 40, }, /* Channel 40 */ | 57 | .hw_value = 40, }, /* Channel 40 */ |
| 58 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5220, | 58 | { .band = NL80211_BAND_5GHZ, .center_freq = 5220, |
| 59 | .hw_value = 44, }, /* Channel 44 */ | 59 | .hw_value = 44, }, /* Channel 44 */ |
| 60 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5240, | 60 | { .band = NL80211_BAND_5GHZ, .center_freq = 5240, |
| 61 | .hw_value = 48, }, /* Channel 48 */ | 61 | .hw_value = 48, }, /* Channel 48 */ |
| 62 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5260, | 62 | { .band = NL80211_BAND_5GHZ, .center_freq = 5260, |
| 63 | .hw_value = 52, }, /* Channel 52 */ | 63 | .hw_value = 52, }, /* Channel 52 */ |
| 64 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5280, | 64 | { .band = NL80211_BAND_5GHZ, .center_freq = 5280, |
| 65 | .hw_value = 56, }, /* Channel 56 */ | 65 | .hw_value = 56, }, /* Channel 56 */ |
| 66 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5300, | 66 | { .band = NL80211_BAND_5GHZ, .center_freq = 5300, |
| 67 | .hw_value = 60, }, /* Channel 60 */ | 67 | .hw_value = 60, }, /* Channel 60 */ |
| 68 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5320, | 68 | { .band = NL80211_BAND_5GHZ, .center_freq = 5320, |
| 69 | .hw_value = 64, }, /* Channel 64 */ | 69 | .hw_value = 64, }, /* Channel 64 */ |
| 70 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5500, | 70 | { .band = NL80211_BAND_5GHZ, .center_freq = 5500, |
| 71 | .hw_value = 100, }, /* Channel 100 */ | 71 | .hw_value = 100, }, /* Channel 100 */ |
| 72 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5520, | 72 | { .band = NL80211_BAND_5GHZ, .center_freq = 5520, |
| 73 | .hw_value = 104, }, /* Channel 104 */ | 73 | .hw_value = 104, }, /* Channel 104 */ |
| 74 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5540, | 74 | { .band = NL80211_BAND_5GHZ, .center_freq = 5540, |
| 75 | .hw_value = 108, }, /* Channel 108 */ | 75 | .hw_value = 108, }, /* Channel 108 */ |
| 76 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5560, | 76 | { .band = NL80211_BAND_5GHZ, .center_freq = 5560, |
| 77 | .hw_value = 112, }, /* Channel 112 */ | 77 | .hw_value = 112, }, /* Channel 112 */ |
| 78 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5580, | 78 | { .band = NL80211_BAND_5GHZ, .center_freq = 5580, |
| 79 | .hw_value = 116, }, /* Channel 116 */ | 79 | .hw_value = 116, }, /* Channel 116 */ |
| 80 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5600, | 80 | { .band = NL80211_BAND_5GHZ, .center_freq = 5600, |
| 81 | .hw_value = 120, }, /* Channel 120 */ | 81 | .hw_value = 120, }, /* Channel 120 */ |
| 82 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5620, | 82 | { .band = NL80211_BAND_5GHZ, .center_freq = 5620, |
| 83 | .hw_value = 124, }, /* Channel 124 */ | 83 | .hw_value = 124, }, /* Channel 124 */ |
| 84 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5640, | 84 | { .band = NL80211_BAND_5GHZ, .center_freq = 5640, |
| 85 | .hw_value = 128, }, /* Channel 128 */ | 85 | .hw_value = 128, }, /* Channel 128 */ |
| 86 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5660, | 86 | { .band = NL80211_BAND_5GHZ, .center_freq = 5660, |
| 87 | .hw_value = 132, }, /* Channel 132 */ | 87 | .hw_value = 132, }, /* Channel 132 */ |
| 88 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5680, | 88 | { .band = NL80211_BAND_5GHZ, .center_freq = 5680, |
| 89 | .hw_value = 136, }, /* Channel 136 */ | 89 | .hw_value = 136, }, /* Channel 136 */ |
| 90 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5700, | 90 | { .band = NL80211_BAND_5GHZ, .center_freq = 5700, |
| 91 | .hw_value = 140, }, /* Channel 140 */ | 91 | .hw_value = 140, }, /* Channel 140 */ |
| 92 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5745, | 92 | { .band = NL80211_BAND_5GHZ, .center_freq = 5745, |
| 93 | .hw_value = 149, }, /* Channel 149 */ | 93 | .hw_value = 149, }, /* Channel 149 */ |
| 94 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5765, | 94 | { .band = NL80211_BAND_5GHZ, .center_freq = 5765, |
| 95 | .hw_value = 153, }, /* Channel 153 */ | 95 | .hw_value = 153, }, /* Channel 153 */ |
| 96 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5785, | 96 | { .band = NL80211_BAND_5GHZ, .center_freq = 5785, |
| 97 | .hw_value = 157, }, /* Channel 157 */ | 97 | .hw_value = 157, }, /* Channel 157 */ |
| 98 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5805, | 98 | { .band = NL80211_BAND_5GHZ, .center_freq = 5805, |
| 99 | .hw_value = 161, }, /* Channel 161 */ | 99 | .hw_value = 161, }, /* Channel 161 */ |
| 100 | { .band = IEEE80211_BAND_5GHZ, .center_freq = 5825, | 100 | { .band = NL80211_BAND_5GHZ, .center_freq = 5825, |
| 101 | .hw_value = 165, }, /* Channel 165 */ | 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) | |||
| 150 | struct ieee80211_supported_band *sbands = &adapter->sbands[band]; | 150 | struct ieee80211_supported_band *sbands = &adapter->sbands[band]; |
| 151 | void *channels = NULL; | 151 | void *channels = NULL; |
| 152 | 152 | ||
| 153 | if (band == IEEE80211_BAND_2GHZ) { | 153 | if (band == NL80211_BAND_2GHZ) { |
| 154 | channels = kmalloc(sizeof(rsi_2ghz_channels), GFP_KERNEL); | 154 | channels = kmalloc(sizeof(rsi_2ghz_channels), GFP_KERNEL); |
| 155 | memcpy(channels, | 155 | memcpy(channels, |
| 156 | rsi_2ghz_channels, | 156 | rsi_2ghz_channels, |
| 157 | sizeof(rsi_2ghz_channels)); | 157 | sizeof(rsi_2ghz_channels)); |
| 158 | sbands->band = IEEE80211_BAND_2GHZ; | 158 | sbands->band = NL80211_BAND_2GHZ; |
| 159 | sbands->n_channels = ARRAY_SIZE(rsi_2ghz_channels); | 159 | sbands->n_channels = ARRAY_SIZE(rsi_2ghz_channels); |
| 160 | sbands->bitrates = rsi_rates; | 160 | sbands->bitrates = rsi_rates; |
| 161 | sbands->n_bitrates = ARRAY_SIZE(rsi_rates); | 161 | sbands->n_bitrates = ARRAY_SIZE(rsi_rates); |
| @@ -164,7 +164,7 @@ static void rsi_register_rates_channels(struct rsi_hw *adapter, int band) | |||
| 164 | memcpy(channels, | 164 | memcpy(channels, |
| 165 | rsi_5ghz_channels, | 165 | rsi_5ghz_channels, |
| 166 | sizeof(rsi_5ghz_channels)); | 166 | sizeof(rsi_5ghz_channels)); |
| 167 | sbands->band = IEEE80211_BAND_5GHZ; | 167 | sbands->band = NL80211_BAND_5GHZ; |
| 168 | sbands->n_channels = ARRAY_SIZE(rsi_5ghz_channels); | 168 | sbands->n_channels = ARRAY_SIZE(rsi_5ghz_channels); |
| 169 | sbands->bitrates = &rsi_rates[4]; | 169 | sbands->bitrates = &rsi_rates[4]; |
| 170 | sbands->n_bitrates = ARRAY_SIZE(rsi_rates) - 4; | 170 | sbands->n_bitrates = ARRAY_SIZE(rsi_rates) - 4; |
| @@ -775,7 +775,7 @@ static int rsi_mac80211_set_rate_mask(struct ieee80211_hw *hw, | |||
| 775 | { | 775 | { |
| 776 | struct rsi_hw *adapter = hw->priv; | 776 | struct rsi_hw *adapter = hw->priv; |
| 777 | struct rsi_common *common = adapter->priv; | 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 | mutex_lock(&common->mutex); | 780 | mutex_lock(&common->mutex); |
| 781 | common->fixedrate_mask[band] = 0; | 781 | common->fixedrate_mask[band] = 0; |
| @@ -999,8 +999,8 @@ static int rsi_mac80211_sta_remove(struct ieee80211_hw *hw, | |||
| 999 | 999 | ||
| 1000 | mutex_lock(&common->mutex); | 1000 | mutex_lock(&common->mutex); |
| 1001 | /* Resetting all the fields to default values */ | 1001 | /* Resetting all the fields to default values */ |
| 1002 | common->bitrate_mask[IEEE80211_BAND_2GHZ] = 0; | 1002 | common->bitrate_mask[NL80211_BAND_2GHZ] = 0; |
| 1003 | common->bitrate_mask[IEEE80211_BAND_5GHZ] = 0; | 1003 | common->bitrate_mask[NL80211_BAND_5GHZ] = 0; |
| 1004 | common->min_rate = 0xffff; | 1004 | common->min_rate = 0xffff; |
| 1005 | common->vif_info[0].is_ht = false; | 1005 | common->vif_info[0].is_ht = false; |
| 1006 | common->vif_info[0].sgi = false; | 1006 | common->vif_info[0].sgi = false; |
| @@ -1070,8 +1070,8 @@ int rsi_mac80211_attach(struct rsi_common *common) | |||
| 1070 | hw->max_rate_tries = MAX_RETRIES; | 1070 | hw->max_rate_tries = MAX_RETRIES; |
| 1071 | 1071 | ||
| 1072 | hw->max_tx_aggregation_subframes = 6; | 1072 | hw->max_tx_aggregation_subframes = 6; |
| 1073 | rsi_register_rates_channels(adapter, IEEE80211_BAND_2GHZ); | 1073 | rsi_register_rates_channels(adapter, NL80211_BAND_2GHZ); |
| 1074 | rsi_register_rates_channels(adapter, IEEE80211_BAND_5GHZ); | 1074 | rsi_register_rates_channels(adapter, NL80211_BAND_5GHZ); |
| 1075 | hw->rate_control_algorithm = "AARF"; | 1075 | hw->rate_control_algorithm = "AARF"; |
| 1076 | 1076 | ||
| 1077 | SET_IEEE80211_PERM_ADDR(hw, common->mac_addr); | 1077 | SET_IEEE80211_PERM_ADDR(hw, common->mac_addr); |
| @@ -1087,10 +1087,10 @@ int rsi_mac80211_attach(struct rsi_common *common) | |||
| 1087 | 1087 | ||
| 1088 | wiphy->available_antennas_rx = 1; | 1088 | wiphy->available_antennas_rx = 1; |
| 1089 | wiphy->available_antennas_tx = 1; | 1089 | wiphy->available_antennas_tx = 1; |
| 1090 | wiphy->bands[IEEE80211_BAND_2GHZ] = | 1090 | wiphy->bands[NL80211_BAND_2GHZ] = |
| 1091 | &adapter->sbands[IEEE80211_BAND_2GHZ]; | 1091 | &adapter->sbands[NL80211_BAND_2GHZ]; |
| 1092 | wiphy->bands[IEEE80211_BAND_5GHZ] = | 1092 | wiphy->bands[NL80211_BAND_5GHZ] = |
| 1093 | &adapter->sbands[IEEE80211_BAND_5GHZ]; | 1093 | &adapter->sbands[NL80211_BAND_5GHZ]; |
| 1094 | 1094 | ||
| 1095 | status = ieee80211_register_hw(hw); | 1095 | status = ieee80211_register_hw(hw); |
| 1096 | if (status) | 1096 | if (status) |
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c index e43b59d5b53b..40658b62d077 100644 --- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c +++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c | |||
| @@ -210,7 +210,7 @@ static u16 mcs[] = {13, 26, 39, 52, 78, 104, 117, 130}; | |||
| 210 | */ | 210 | */ |
| 211 | static void rsi_set_default_parameters(struct rsi_common *common) | 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 | common->channel_width = BW_20MHZ; | 214 | common->channel_width = BW_20MHZ; |
| 215 | common->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; | 215 | common->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; |
| 216 | common->channel = 1; | 216 | common->channel = 1; |
| @@ -655,7 +655,7 @@ int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode) | |||
| 655 | vap_caps->rts_threshold = cpu_to_le16(common->rts_threshold); | 655 | vap_caps->rts_threshold = cpu_to_le16(common->rts_threshold); |
| 656 | vap_caps->default_mgmt_rate = cpu_to_le32(RSI_RATE_6); | 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 | vap_caps->default_ctrl_rate = cpu_to_le32(RSI_RATE_6); | 659 | vap_caps->default_ctrl_rate = cpu_to_le32(RSI_RATE_6); |
| 660 | if (conf_is_ht40(&common->priv->hw->conf)) { | 660 | if (conf_is_ht40(&common->priv->hw->conf)) { |
| 661 | vap_caps->default_ctrl_rate |= | 661 | vap_caps->default_ctrl_rate |= |
| @@ -872,7 +872,7 @@ int rsi_band_check(struct rsi_common *common) | |||
| 872 | else | 872 | else |
| 873 | common->channel_width = BW_40MHZ; | 873 | common->channel_width = BW_40MHZ; |
| 874 | 874 | ||
| 875 | if (common->band == IEEE80211_BAND_2GHZ) { | 875 | if (common->band == NL80211_BAND_2GHZ) { |
| 876 | if (common->channel_width) | 876 | if (common->channel_width) |
| 877 | common->endpoint = EP_2GHZ_40MHZ; | 877 | common->endpoint = EP_2GHZ_40MHZ; |
| 878 | else | 878 | else |
| @@ -1046,7 +1046,7 @@ static int rsi_send_auto_rate_request(struct rsi_common *common) | |||
| 1046 | if (common->channel_width == BW_40MHZ) | 1046 | if (common->channel_width == BW_40MHZ) |
| 1047 | auto_rate->desc_word[7] |= cpu_to_le16(1); | 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 | min_rate = RSI_RATE_1; | 1050 | min_rate = RSI_RATE_1; |
| 1051 | rate_table_offset = 0; | 1051 | rate_table_offset = 0; |
| 1052 | } else { | 1052 | } else { |
diff --git a/drivers/net/wireless/rsi/rsi_91x_pkt.c b/drivers/net/wireless/rsi/rsi_91x_pkt.c index a0b31c0cf25b..02920c93e82d 100644 --- a/drivers/net/wireless/rsi/rsi_91x_pkt.c +++ b/drivers/net/wireless/rsi/rsi_91x_pkt.c | |||
| @@ -184,7 +184,7 @@ int rsi_send_mgmt_pkt(struct rsi_common *common, | |||
| 184 | if (wh->addr1[0] & BIT(0)) | 184 | if (wh->addr1[0] & BIT(0)) |
| 185 | msg[3] |= cpu_to_le16(RSI_BROADCAST_PKT); | 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 | msg[4] = cpu_to_le16(RSI_11B_MODE); | 188 | msg[4] = cpu_to_le16(RSI_11B_MODE); |
| 189 | else | 189 | else |
| 190 | msg[4] = cpu_to_le16((RSI_RATE_6 & 0x0f) | RSI_11G_MODE); | 190 | msg[4] = cpu_to_le16((RSI_RATE_6 & 0x0f) | RSI_11G_MODE); |
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h index 5baed945f60e..dcd095787166 100644 --- a/drivers/net/wireless/rsi/rsi_main.h +++ b/drivers/net/wireless/rsi/rsi_main.h | |||
| @@ -211,7 +211,7 @@ struct rsi_hw { | |||
| 211 | struct ieee80211_hw *hw; | 211 | struct ieee80211_hw *hw; |
| 212 | struct ieee80211_vif *vifs[RSI_MAX_VIFS]; | 212 | struct ieee80211_vif *vifs[RSI_MAX_VIFS]; |
| 213 | struct ieee80211_tx_queue_params edca_params[NUM_EDCA_QUEUES]; | 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 | struct device *device; | 216 | struct device *device; |
| 217 | u8 sc_nvifs; | 217 | u8 sc_nvifs; |
diff --git a/drivers/net/wireless/st/cw1200/main.c b/drivers/net/wireless/st/cw1200/main.c index 0e51e27d2e3f..dc478cedbde0 100644 --- a/drivers/net/wireless/st/cw1200/main.c +++ b/drivers/net/wireless/st/cw1200/main.c | |||
| @@ -102,7 +102,7 @@ static struct ieee80211_rate cw1200_mcs_rates[] = { | |||
| 102 | 102 | ||
| 103 | 103 | ||
| 104 | #define CHAN2G(_channel, _freq, _flags) { \ | 104 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 105 | .band = IEEE80211_BAND_2GHZ, \ | 105 | .band = NL80211_BAND_2GHZ, \ |
| 106 | .center_freq = (_freq), \ | 106 | .center_freq = (_freq), \ |
| 107 | .hw_value = (_channel), \ | 107 | .hw_value = (_channel), \ |
| 108 | .flags = (_flags), \ | 108 | .flags = (_flags), \ |
| @@ -111,7 +111,7 @@ static struct ieee80211_rate cw1200_mcs_rates[] = { | |||
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | #define CHAN5G(_channel, _flags) { \ | 113 | #define CHAN5G(_channel, _flags) { \ |
| 114 | .band = IEEE80211_BAND_5GHZ, \ | 114 | .band = NL80211_BAND_5GHZ, \ |
| 115 | .center_freq = 5000 + (5 * (_channel)), \ | 115 | .center_freq = 5000 + (5 * (_channel)), \ |
| 116 | .hw_value = (_channel), \ | 116 | .hw_value = (_channel), \ |
| 117 | .flags = (_flags), \ | 117 | .flags = (_flags), \ |
| @@ -311,12 +311,12 @@ static struct ieee80211_hw *cw1200_init_common(const u8 *macaddr, | |||
| 311 | 311 | ||
| 312 | hw->sta_data_size = sizeof(struct cw1200_sta_priv); | 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 | if (have_5ghz) | 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 | /* Channel params have to be cleared before registering wiphy again */ | 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 | struct ieee80211_supported_band *sband = hw->wiphy->bands[band]; | 320 | struct ieee80211_supported_band *sband = hw->wiphy->bands[band]; |
| 321 | if (!sband) | 321 | if (!sband) |
| 322 | continue; | 322 | continue; |
diff --git a/drivers/net/wireless/st/cw1200/scan.c b/drivers/net/wireless/st/cw1200/scan.c index bff81b8d4164..983788156bb0 100644 --- a/drivers/net/wireless/st/cw1200/scan.c +++ b/drivers/net/wireless/st/cw1200/scan.c | |||
| @@ -402,7 +402,7 @@ void cw1200_probe_work(struct work_struct *work) | |||
| 402 | } | 402 | } |
| 403 | wsm = (struct wsm_tx *)frame.skb->data; | 403 | wsm = (struct wsm_tx *)frame.skb->data; |
| 404 | scan.max_tx_rate = wsm->max_tx_rate; | 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 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; | 406 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; |
| 407 | if (priv->join_status == CW1200_JOIN_STATUS_STA || | 407 | if (priv->join_status == CW1200_JOIN_STATUS_STA || |
| 408 | priv->join_status == CW1200_JOIN_STATUS_IBSS) { | 408 | priv->join_status == CW1200_JOIN_STATUS_IBSS) { |
diff --git a/drivers/net/wireless/st/cw1200/sta.c b/drivers/net/wireless/st/cw1200/sta.c index d0ddcde6c695..daf06a4f842e 100644 --- a/drivers/net/wireless/st/cw1200/sta.c +++ b/drivers/net/wireless/st/cw1200/sta.c | |||
| @@ -1278,7 +1278,7 @@ static void cw1200_do_join(struct cw1200_common *priv) | |||
| 1278 | join.dtim_period = priv->join_dtim_period; | 1278 | join.dtim_period = priv->join_dtim_period; |
| 1279 | 1279 | ||
| 1280 | join.channel_number = priv->channel->hw_value; | 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 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; | 1282 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; |
| 1283 | 1283 | ||
| 1284 | memcpy(join.bssid, bssid, sizeof(join.bssid)); | 1284 | memcpy(join.bssid, bssid, sizeof(join.bssid)); |
| @@ -1462,7 +1462,7 @@ int cw1200_enable_listening(struct cw1200_common *priv) | |||
| 1462 | }; | 1462 | }; |
| 1463 | 1463 | ||
| 1464 | if (priv->channel) { | 1464 | if (priv->channel) { |
| 1465 | start.band = priv->channel->band == IEEE80211_BAND_5GHZ ? | 1465 | start.band = priv->channel->band == NL80211_BAND_5GHZ ? |
| 1466 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; | 1466 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G; |
| 1467 | start.channel_number = priv->channel->hw_value; | 1467 | start.channel_number = priv->channel->hw_value; |
| 1468 | } else { | 1468 | } else { |
| @@ -2315,7 +2315,7 @@ static int cw1200_start_ap(struct cw1200_common *priv) | |||
| 2315 | struct wsm_start start = { | 2315 | struct wsm_start start = { |
| 2316 | .mode = priv->vif->p2p ? | 2316 | .mode = priv->vif->p2p ? |
| 2317 | WSM_START_MODE_P2P_GO : WSM_START_MODE_AP, | 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 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G, | 2319 | WSM_PHY_BAND_5G : WSM_PHY_BAND_2_4G, |
| 2320 | .channel_number = priv->channel->hw_value, | 2320 | .channel_number = priv->channel->hw_value, |
| 2321 | .beacon_interval = conf->beacon_int, | 2321 | .beacon_interval = conf->beacon_int, |
diff --git a/drivers/net/wireless/st/cw1200/txrx.c b/drivers/net/wireless/st/cw1200/txrx.c index d28bd49cb5fd..3d170287cd0b 100644 --- a/drivers/net/wireless/st/cw1200/txrx.c +++ b/drivers/net/wireless/st/cw1200/txrx.c | |||
| @@ -1079,7 +1079,7 @@ void cw1200_rx_cb(struct cw1200_common *priv, | |||
| 1079 | 1079 | ||
| 1080 | hdr->band = ((arg->channel_number & 0xff00) || | 1080 | hdr->band = ((arg->channel_number & 0xff00) || |
| 1081 | (arg->channel_number > 14)) ? | 1081 | (arg->channel_number > 14)) ? |
| 1082 | IEEE80211_BAND_5GHZ : IEEE80211_BAND_2GHZ; | 1082 | NL80211_BAND_5GHZ : NL80211_BAND_2GHZ; |
| 1083 | hdr->freq = ieee80211_channel_to_frequency( | 1083 | hdr->freq = ieee80211_channel_to_frequency( |
| 1084 | arg->channel_number, | 1084 | arg->channel_number, |
| 1085 | hdr->band); | 1085 | hdr->band); |
diff --git a/drivers/net/wireless/st/cw1200/wsm.c b/drivers/net/wireless/st/cw1200/wsm.c index 9e0ca3048657..680d60eabc75 100644 --- a/drivers/net/wireless/st/cw1200/wsm.c +++ b/drivers/net/wireless/st/cw1200/wsm.c | |||
| @@ -849,9 +849,9 @@ static int wsm_startup_indication(struct cw1200_common *priv, | |||
| 849 | 849 | ||
| 850 | /* Disable unsupported frequency bands */ | 850 | /* Disable unsupported frequency bands */ |
| 851 | if (!(priv->wsm_caps.fw_cap & 0x1)) | 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 | if (!(priv->wsm_caps.fw_cap & 0x2)) | 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 | priv->firmware_ready = 1; | 856 | priv->firmware_ready = 1; |
| 857 | wake_up(&priv->wsm_startup_done); | 857 | wake_up(&priv->wsm_startup_done); |
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c index cd4777954f87..56384a4e2a35 100644 --- a/drivers/net/wireless/ti/wl1251/main.c +++ b/drivers/net/wireless/ti/wl1251/main.c | |||
| @@ -1482,7 +1482,7 @@ int wl1251_init_ieee80211(struct wl1251 *wl) | |||
| 1482 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | | 1482 | wl->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | |
| 1483 | BIT(NL80211_IFTYPE_ADHOC); | 1483 | BIT(NL80211_IFTYPE_ADHOC); |
| 1484 | wl->hw->wiphy->max_scan_ssids = 1; | 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 | wl->hw->queues = 4; | 1487 | wl->hw->queues = 4; |
| 1488 | 1488 | ||
diff --git a/drivers/net/wireless/ti/wl1251/rx.c b/drivers/net/wireless/ti/wl1251/rx.c index cde0eaf99714..a27d4c22b6e8 100644 --- a/drivers/net/wireless/ti/wl1251/rx.c +++ b/drivers/net/wireless/ti/wl1251/rx.c | |||
| @@ -53,7 +53,7 @@ static void wl1251_rx_status(struct wl1251 *wl, | |||
| 53 | 53 | ||
| 54 | memset(status, 0, sizeof(struct ieee80211_rx_status)); | 54 | memset(status, 0, sizeof(struct ieee80211_rx_status)); |
| 55 | 55 | ||
| 56 | status->band = IEEE80211_BAND_2GHZ; | 56 | status->band = NL80211_BAND_2GHZ; |
| 57 | status->mactime = desc->timestamp; | 57 | status->mactime = desc->timestamp; |
| 58 | 58 | ||
| 59 | /* | 59 | /* |
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index a0d6cccc56f3..58b9d3c3a833 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c | |||
| @@ -469,8 +469,8 @@ static const u8 wl12xx_rate_to_idx_5ghz[] = { | |||
| 469 | }; | 469 | }; |
| 470 | 470 | ||
| 471 | static const u8 *wl12xx_band_rate_to_idx[] = { | 471 | static const u8 *wl12xx_band_rate_to_idx[] = { |
| 472 | [IEEE80211_BAND_2GHZ] = wl12xx_rate_to_idx_2ghz, | 472 | [NL80211_BAND_2GHZ] = wl12xx_rate_to_idx_2ghz, |
| 473 | [IEEE80211_BAND_5GHZ] = wl12xx_rate_to_idx_5ghz | 473 | [NL80211_BAND_5GHZ] = wl12xx_rate_to_idx_5ghz |
| 474 | }; | 474 | }; |
| 475 | 475 | ||
| 476 | enum wl12xx_hw_rates { | 476 | enum wl12xx_hw_rates { |
| @@ -1827,8 +1827,8 @@ static int wl12xx_setup(struct wl1271 *wl) | |||
| 1827 | wl->fw_status_priv_len = 0; | 1827 | wl->fw_status_priv_len = 0; |
| 1828 | wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); | 1828 | wl->stats.fw_stats_len = sizeof(struct wl12xx_acx_statistics); |
| 1829 | wl->ofdm_only_ap = true; | 1829 | wl->ofdm_only_ap = true; |
| 1830 | wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, &wl12xx_ht_cap); | 1830 | wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ, &wl12xx_ht_cap); |
| 1831 | wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, &wl12xx_ht_cap); | 1831 | wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ, &wl12xx_ht_cap); |
| 1832 | wl12xx_conf_init(wl); | 1832 | wl12xx_conf_init(wl); |
| 1833 | 1833 | ||
| 1834 | if (!fref_param) { | 1834 | if (!fref_param) { |
diff --git a/drivers/net/wireless/ti/wl12xx/scan.c b/drivers/net/wireless/ti/wl12xx/scan.c index a0dfc59e9644..8d475393f9e3 100644 --- a/drivers/net/wireless/ti/wl12xx/scan.c +++ b/drivers/net/wireless/ti/wl12xx/scan.c | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | static int wl1271_get_scan_channels(struct wl1271 *wl, | 27 | static int wl1271_get_scan_channels(struct wl1271 *wl, |
| 28 | struct cfg80211_scan_request *req, | 28 | struct cfg80211_scan_request *req, |
| 29 | struct basic_scan_channel_params *channels, | 29 | struct basic_scan_channel_params *channels, |
| 30 | enum ieee80211_band band, bool passive) | 30 | enum nl80211_band band, bool passive) |
| 31 | { | 31 | { |
| 32 | struct conf_scan_settings *c = &wl->conf.scan; | 32 | struct conf_scan_settings *c = &wl->conf.scan; |
| 33 | int i, j; | 33 | int i, j; |
| @@ -92,7 +92,7 @@ static int wl1271_get_scan_channels(struct wl1271 *wl, | |||
| 92 | #define WL1271_NOTHING_TO_SCAN 1 | 92 | #define WL1271_NOTHING_TO_SCAN 1 |
| 93 | 93 | ||
| 94 | static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 94 | static int wl1271_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 95 | enum ieee80211_band band, | 95 | enum nl80211_band band, |
| 96 | bool passive, u32 basic_rate) | 96 | bool passive, u32 basic_rate) |
| 97 | { | 97 | { |
| 98 | struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); | 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, | |||
| 144 | cmd->params.tid_trigger = CONF_TX_AC_ANY_TID; | 144 | cmd->params.tid_trigger = CONF_TX_AC_ANY_TID; |
| 145 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; | 145 | cmd->params.scan_tag = WL1271_SCAN_DEFAULT_TAG; |
| 146 | 146 | ||
| 147 | if (band == IEEE80211_BAND_2GHZ) | 147 | if (band == NL80211_BAND_2GHZ) |
| 148 | cmd->params.band = WL1271_SCAN_BAND_2_4_GHZ; | 148 | cmd->params.band = WL1271_SCAN_BAND_2_4_GHZ; |
| 149 | else | 149 | else |
| 150 | cmd->params.band = WL1271_SCAN_BAND_5_GHZ; | 150 | cmd->params.band = WL1271_SCAN_BAND_5_GHZ; |
| @@ -218,7 +218,7 @@ out: | |||
| 218 | void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) | 218 | void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) |
| 219 | { | 219 | { |
| 220 | int ret = 0; | 220 | int ret = 0; |
| 221 | enum ieee80211_band band; | 221 | enum nl80211_band band; |
| 222 | u32 rate, mask; | 222 | u32 rate, mask; |
| 223 | 223 | ||
| 224 | switch (wl->scan.state) { | 224 | switch (wl->scan.state) { |
| @@ -226,7 +226,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
| 226 | break; | 226 | break; |
| 227 | 227 | ||
| 228 | case WL1271_SCAN_STATE_2GHZ_ACTIVE: | 228 | case WL1271_SCAN_STATE_2GHZ_ACTIVE: |
| 229 | band = IEEE80211_BAND_2GHZ; | 229 | band = NL80211_BAND_2GHZ; |
| 230 | mask = wlvif->bitrate_masks[band]; | 230 | mask = wlvif->bitrate_masks[band]; |
| 231 | if (wl->scan.req->no_cck) { | 231 | if (wl->scan.req->no_cck) { |
| 232 | mask &= ~CONF_TX_CCK_RATES; | 232 | mask &= ~CONF_TX_CCK_RATES; |
| @@ -243,7 +243,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
| 243 | break; | 243 | break; |
| 244 | 244 | ||
| 245 | case WL1271_SCAN_STATE_2GHZ_PASSIVE: | 245 | case WL1271_SCAN_STATE_2GHZ_PASSIVE: |
| 246 | band = IEEE80211_BAND_2GHZ; | 246 | band = NL80211_BAND_2GHZ; |
| 247 | mask = wlvif->bitrate_masks[band]; | 247 | mask = wlvif->bitrate_masks[band]; |
| 248 | if (wl->scan.req->no_cck) { | 248 | if (wl->scan.req->no_cck) { |
| 249 | mask &= ~CONF_TX_CCK_RATES; | 249 | mask &= ~CONF_TX_CCK_RATES; |
| @@ -263,7 +263,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
| 263 | break; | 263 | break; |
| 264 | 264 | ||
| 265 | case WL1271_SCAN_STATE_5GHZ_ACTIVE: | 265 | case WL1271_SCAN_STATE_5GHZ_ACTIVE: |
| 266 | band = IEEE80211_BAND_5GHZ; | 266 | band = NL80211_BAND_5GHZ; |
| 267 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); | 267 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); |
| 268 | ret = wl1271_scan_send(wl, wlvif, band, false, rate); | 268 | ret = wl1271_scan_send(wl, wlvif, band, false, rate); |
| 269 | if (ret == WL1271_NOTHING_TO_SCAN) { | 269 | if (ret == WL1271_NOTHING_TO_SCAN) { |
| @@ -274,7 +274,7 @@ void wl1271_scan_stm(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
| 274 | break; | 274 | break; |
| 275 | 275 | ||
| 276 | case WL1271_SCAN_STATE_5GHZ_PASSIVE: | 276 | case WL1271_SCAN_STATE_5GHZ_PASSIVE: |
| 277 | band = IEEE80211_BAND_5GHZ; | 277 | band = NL80211_BAND_5GHZ; |
| 278 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); | 278 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); |
| 279 | ret = wl1271_scan_send(wl, wlvif, band, true, rate); | 279 | ret = wl1271_scan_send(wl, wlvif, band, true, rate); |
| 280 | if (ret == WL1271_NOTHING_TO_SCAN) { | 280 | if (ret == WL1271_NOTHING_TO_SCAN) { |
| @@ -378,7 +378,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
| 378 | wl12xx_adjust_channels(cfg, cfg_channels); | 378 | wl12xx_adjust_channels(cfg, cfg_channels); |
| 379 | 379 | ||
| 380 | if (!force_passive && cfg->active[0]) { | 380 | if (!force_passive && cfg->active[0]) { |
| 381 | u8 band = IEEE80211_BAND_2GHZ; | 381 | u8 band = NL80211_BAND_2GHZ; |
| 382 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, | 382 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 383 | wlvif->role_id, band, | 383 | wlvif->role_id, band, |
| 384 | req->ssids[0].ssid, | 384 | req->ssids[0].ssid, |
| @@ -395,7 +395,7 @@ int wl1271_scan_sched_scan_config(struct wl1271 *wl, | |||
| 395 | } | 395 | } |
| 396 | 396 | ||
| 397 | if (!force_passive && cfg->active[1]) { | 397 | if (!force_passive && cfg->active[1]) { |
| 398 | u8 band = IEEE80211_BAND_5GHZ; | 398 | u8 band = NL80211_BAND_5GHZ; |
| 399 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, | 399 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 400 | wlvif->role_id, band, | 400 | wlvif->role_id, band, |
| 401 | req->ssids[0].ssid, | 401 | req->ssids[0].ssid, |
diff --git a/drivers/net/wireless/ti/wl18xx/cmd.c b/drivers/net/wireless/ti/wl18xx/cmd.c index a8d176ddc73c..63e95ba744fd 100644 --- a/drivers/net/wireless/ti/wl18xx/cmd.c +++ b/drivers/net/wireless/ti/wl18xx/cmd.c | |||
| @@ -48,10 +48,10 @@ int wl18xx_cmd_channel_switch(struct wl1271 *wl, | |||
| 48 | cmd->stop_tx = ch_switch->block_tx; | 48 | cmd->stop_tx = ch_switch->block_tx; |
| 49 | 49 | ||
| 50 | switch (ch_switch->chandef.chan->band) { | 50 | switch (ch_switch->chandef.chan->band) { |
| 51 | case IEEE80211_BAND_2GHZ: | 51 | case NL80211_BAND_2GHZ: |
| 52 | cmd->band = WLCORE_BAND_2_4GHZ; | 52 | cmd->band = WLCORE_BAND_2_4GHZ; |
| 53 | break; | 53 | break; |
| 54 | case IEEE80211_BAND_5GHZ: | 54 | case NL80211_BAND_5GHZ: |
| 55 | cmd->band = WLCORE_BAND_5GHZ; | 55 | cmd->band = WLCORE_BAND_5GHZ; |
| 56 | break; | 56 | break; |
| 57 | default: | 57 | default: |
| @@ -187,7 +187,7 @@ int wl18xx_cmd_set_cac(struct wl1271 *wl, struct wl12xx_vif *wlvif, bool start) | |||
| 187 | 187 | ||
| 188 | cmd->role_id = wlvif->role_id; | 188 | cmd->role_id = wlvif->role_id; |
| 189 | cmd->channel = wlvif->channel; | 189 | cmd->channel = wlvif->channel; |
| 190 | if (wlvif->band == IEEE80211_BAND_5GHZ) | 190 | if (wlvif->band == NL80211_BAND_5GHZ) |
| 191 | cmd->band = WLCORE_BAND_5GHZ; | 191 | cmd->band = WLCORE_BAND_5GHZ; |
| 192 | cmd->bandwidth = wlcore_get_native_channel_type(wlvif->channel_type); | 192 | cmd->bandwidth = wlcore_get_native_channel_type(wlvif->channel_type); |
| 193 | 193 | ||
diff --git a/drivers/net/wireless/ti/wl18xx/event.c b/drivers/net/wireless/ti/wl18xx/event.c index ff6e46dd61f8..ef811848d141 100644 --- a/drivers/net/wireless/ti/wl18xx/event.c +++ b/drivers/net/wireless/ti/wl18xx/event.c | |||
| @@ -64,13 +64,13 @@ static int wlcore_smart_config_sync_event(struct wl1271 *wl, u8 sync_channel, | |||
| 64 | u8 sync_band) | 64 | u8 sync_band) |
| 65 | { | 65 | { |
| 66 | struct sk_buff *skb; | 66 | struct sk_buff *skb; |
| 67 | enum ieee80211_band band; | 67 | enum nl80211_band band; |
| 68 | int freq; | 68 | int freq; |
| 69 | 69 | ||
| 70 | if (sync_band == WLCORE_BAND_5GHZ) | 70 | if (sync_band == WLCORE_BAND_5GHZ) |
| 71 | band = IEEE80211_BAND_5GHZ; | 71 | band = NL80211_BAND_5GHZ; |
| 72 | else | 72 | else |
| 73 | band = IEEE80211_BAND_2GHZ; | 73 | band = NL80211_BAND_2GHZ; |
| 74 | 74 | ||
| 75 | freq = ieee80211_channel_to_frequency(sync_channel, band); | 75 | freq = ieee80211_channel_to_frequency(sync_channel, band); |
| 76 | 76 | ||
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 1bf26cc7374e..ae47c79cb9b6 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
| @@ -137,8 +137,8 @@ static const u8 wl18xx_rate_to_idx_5ghz[] = { | |||
| 137 | }; | 137 | }; |
| 138 | 138 | ||
| 139 | static const u8 *wl18xx_band_rate_to_idx[] = { | 139 | static const u8 *wl18xx_band_rate_to_idx[] = { |
| 140 | [IEEE80211_BAND_2GHZ] = wl18xx_rate_to_idx_2ghz, | 140 | [NL80211_BAND_2GHZ] = wl18xx_rate_to_idx_2ghz, |
| 141 | [IEEE80211_BAND_5GHZ] = wl18xx_rate_to_idx_5ghz | 141 | [NL80211_BAND_5GHZ] = wl18xx_rate_to_idx_5ghz |
| 142 | }; | 142 | }; |
| 143 | 143 | ||
| 144 | enum wl18xx_hw_rates { | 144 | enum wl18xx_hw_rates { |
| @@ -1302,12 +1302,12 @@ static u32 wl18xx_ap_get_mimo_wide_rate_mask(struct wl1271 *wl, | |||
| 1302 | wl1271_debug(DEBUG_ACX, "using wide channel rate mask"); | 1302 | wl1271_debug(DEBUG_ACX, "using wide channel rate mask"); |
| 1303 | 1303 | ||
| 1304 | /* sanity check - we don't support this */ | 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 | return 0; | 1306 | return 0; |
| 1307 | 1307 | ||
| 1308 | return CONF_TX_RATE_USE_WIDE_CHAN; | 1308 | return CONF_TX_RATE_USE_WIDE_CHAN; |
| 1309 | } else if (wl18xx_is_mimo_supported(wl) && | 1309 | } else if (wl18xx_is_mimo_supported(wl) && |
| 1310 | wlvif->band == IEEE80211_BAND_2GHZ) { | 1310 | wlvif->band == NL80211_BAND_2GHZ) { |
| 1311 | wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); | 1311 | wl1271_debug(DEBUG_ACX, "using MIMO rate mask"); |
| 1312 | /* | 1312 | /* |
| 1313 | * we don't care about HT channel here - if a peer doesn't | 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) | |||
| 1996 | * siso40. | 1996 | * siso40. |
| 1997 | */ | 1997 | */ |
| 1998 | if (wl18xx_is_mimo_supported(wl)) | 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 | &wl18xx_mimo_ht_cap_2ghz); | 2000 | &wl18xx_mimo_ht_cap_2ghz); |
| 2001 | else | 2001 | else |
| 2002 | wlcore_set_ht_cap(wl, IEEE80211_BAND_2GHZ, | 2002 | wlcore_set_ht_cap(wl, NL80211_BAND_2GHZ, |
| 2003 | &wl18xx_siso40_ht_cap_2ghz); | 2003 | &wl18xx_siso40_ht_cap_2ghz); |
| 2004 | 2004 | ||
| 2005 | /* 5Ghz is always wide */ | 2005 | /* 5Ghz is always wide */ |
| 2006 | wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | 2006 | wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ, |
| 2007 | &wl18xx_siso40_ht_cap_5ghz); | 2007 | &wl18xx_siso40_ht_cap_5ghz); |
| 2008 | } else if (priv->conf.ht.mode == HT_MODE_WIDE) { | 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 | &wl18xx_siso40_ht_cap_2ghz); | 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 | &wl18xx_siso40_ht_cap_5ghz); | 2012 | &wl18xx_siso40_ht_cap_5ghz); |
| 2013 | } else if (priv->conf.ht.mode == HT_MODE_SISO20) { | 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 | &wl18xx_siso20_ht_cap); | 2015 | &wl18xx_siso20_ht_cap); |
| 2016 | wlcore_set_ht_cap(wl, IEEE80211_BAND_5GHZ, | 2016 | wlcore_set_ht_cap(wl, NL80211_BAND_5GHZ, |
| 2017 | &wl18xx_siso20_ht_cap); | 2017 | &wl18xx_siso20_ht_cap); |
| 2018 | } | 2018 | } |
| 2019 | 2019 | ||
diff --git a/drivers/net/wireless/ti/wl18xx/scan.c b/drivers/net/wireless/ti/wl18xx/scan.c index bc15aa2c3efa..4e5221544354 100644 --- a/drivers/net/wireless/ti/wl18xx/scan.c +++ b/drivers/net/wireless/ti/wl18xx/scan.c | |||
| @@ -110,7 +110,7 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
| 110 | 110 | ||
| 111 | /* TODO: per-band ies? */ | 111 | /* TODO: per-band ies? */ |
| 112 | if (cmd->active[0]) { | 112 | if (cmd->active[0]) { |
| 113 | u8 band = IEEE80211_BAND_2GHZ; | 113 | u8 band = NL80211_BAND_2GHZ; |
| 114 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, | 114 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 115 | cmd->role_id, band, | 115 | cmd->role_id, band, |
| 116 | req->ssids ? req->ssids[0].ssid : NULL, | 116 | req->ssids ? req->ssids[0].ssid : NULL, |
| @@ -127,7 +127,7 @@ static int wl18xx_scan_send(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | if (cmd->active[1] || cmd->dfs) { | 129 | if (cmd->active[1] || cmd->dfs) { |
| 130 | u8 band = IEEE80211_BAND_5GHZ; | 130 | u8 band = NL80211_BAND_5GHZ; |
| 131 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, | 131 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 132 | cmd->role_id, band, | 132 | cmd->role_id, band, |
| 133 | req->ssids ? req->ssids[0].ssid : NULL, | 133 | req->ssids ? req->ssids[0].ssid : NULL, |
| @@ -253,7 +253,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, | |||
| 253 | cmd->terminate_on_report = 0; | 253 | cmd->terminate_on_report = 0; |
| 254 | 254 | ||
| 255 | if (cmd->active[0]) { | 255 | if (cmd->active[0]) { |
| 256 | u8 band = IEEE80211_BAND_2GHZ; | 256 | u8 band = NL80211_BAND_2GHZ; |
| 257 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, | 257 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 258 | cmd->role_id, band, | 258 | cmd->role_id, band, |
| 259 | req->ssids ? req->ssids[0].ssid : NULL, | 259 | req->ssids ? req->ssids[0].ssid : NULL, |
| @@ -270,7 +270,7 @@ int wl18xx_scan_sched_scan_config(struct wl1271 *wl, | |||
| 270 | } | 270 | } |
| 271 | 271 | ||
| 272 | if (cmd->active[1] || cmd->dfs) { | 272 | if (cmd->active[1] || cmd->dfs) { |
| 273 | u8 band = IEEE80211_BAND_5GHZ; | 273 | u8 band = NL80211_BAND_5GHZ; |
| 274 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, | 274 | ret = wl12xx_cmd_build_probe_req(wl, wlvif, |
| 275 | cmd->role_id, band, | 275 | cmd->role_id, band, |
| 276 | req->ssids ? req->ssids[0].ssid : NULL, | 276 | req->ssids ? req->ssids[0].ssid : NULL, |
diff --git a/drivers/net/wireless/ti/wl18xx/tx.c b/drivers/net/wireless/ti/wl18xx/tx.c index 3406ffb53325..ebaf66ef3f84 100644 --- a/drivers/net/wireless/ti/wl18xx/tx.c +++ b/drivers/net/wireless/ti/wl18xx/tx.c | |||
| @@ -43,7 +43,7 @@ void wl18xx_get_last_tx_rate(struct wl1271 *wl, struct ieee80211_vif *vif, | |||
| 43 | 43 | ||
| 44 | if (fw_rate <= CONF_HW_RATE_INDEX_54MBPS) { | 44 | if (fw_rate <= CONF_HW_RATE_INDEX_54MBPS) { |
| 45 | rate->idx = fw_rate; | 45 | rate->idx = fw_rate; |
| 46 | if (band == IEEE80211_BAND_5GHZ) | 46 | if (band == NL80211_BAND_5GHZ) |
| 47 | rate->idx -= CONF_HW_RATE_INDEX_6MBPS; | 47 | rate->idx -= CONF_HW_RATE_INDEX_6MBPS; |
| 48 | rate->flags = 0; | 48 | rate->flags = 0; |
| 49 | } else { | 49 | } else { |
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c index f01d24baff7c..33153565ad62 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.c +++ b/drivers/net/wireless/ti/wlcore/cmd.c | |||
| @@ -423,7 +423,7 @@ EXPORT_SYMBOL_GPL(wlcore_get_native_channel_type); | |||
| 423 | 423 | ||
| 424 | static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, | 424 | static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, |
| 425 | struct wl12xx_vif *wlvif, | 425 | struct wl12xx_vif *wlvif, |
| 426 | enum ieee80211_band band, | 426 | enum nl80211_band band, |
| 427 | int channel) | 427 | int channel) |
| 428 | { | 428 | { |
| 429 | struct wl12xx_cmd_role_start *cmd; | 429 | struct wl12xx_cmd_role_start *cmd; |
| @@ -438,7 +438,7 @@ static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, | |||
| 438 | wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id); | 438 | wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id); |
| 439 | 439 | ||
| 440 | cmd->role_id = wlvif->dev_role_id; | 440 | cmd->role_id = wlvif->dev_role_id; |
| 441 | if (band == IEEE80211_BAND_5GHZ) | 441 | if (band == NL80211_BAND_5GHZ) |
| 442 | cmd->band = WLCORE_BAND_5GHZ; | 442 | cmd->band = WLCORE_BAND_5GHZ; |
| 443 | cmd->channel = channel; | 443 | cmd->channel = channel; |
| 444 | 444 | ||
| @@ -524,7 +524,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
| 524 | wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id); | 524 | wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id); |
| 525 | 525 | ||
| 526 | cmd->role_id = wlvif->role_id; | 526 | cmd->role_id = wlvif->role_id; |
| 527 | if (wlvif->band == IEEE80211_BAND_5GHZ) | 527 | if (wlvif->band == NL80211_BAND_5GHZ) |
| 528 | cmd->band = WLCORE_BAND_5GHZ; | 528 | cmd->band = WLCORE_BAND_5GHZ; |
| 529 | cmd->channel = wlvif->channel; | 529 | cmd->channel = wlvif->channel; |
| 530 | cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); | 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) | |||
| 693 | cmd->ap.local_rates = cpu_to_le32(supported_rates); | 693 | cmd->ap.local_rates = cpu_to_le32(supported_rates); |
| 694 | 694 | ||
| 695 | switch (wlvif->band) { | 695 | switch (wlvif->band) { |
| 696 | case IEEE80211_BAND_2GHZ: | 696 | case NL80211_BAND_2GHZ: |
| 697 | cmd->band = WLCORE_BAND_2_4GHZ; | 697 | cmd->band = WLCORE_BAND_2_4GHZ; |
| 698 | break; | 698 | break; |
| 699 | case IEEE80211_BAND_5GHZ: | 699 | case NL80211_BAND_5GHZ: |
| 700 | cmd->band = WLCORE_BAND_5GHZ; | 700 | cmd->band = WLCORE_BAND_5GHZ; |
| 701 | break; | 701 | break; |
| 702 | default: | 702 | default: |
| @@ -773,7 +773,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif) | |||
| 773 | wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id); | 773 | wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id); |
| 774 | 774 | ||
| 775 | cmd->role_id = wlvif->role_id; | 775 | cmd->role_id = wlvif->role_id; |
| 776 | if (wlvif->band == IEEE80211_BAND_5GHZ) | 776 | if (wlvif->band == NL80211_BAND_5GHZ) |
| 777 | cmd->band = WLCORE_BAND_5GHZ; | 777 | cmd->band = WLCORE_BAND_5GHZ; |
| 778 | cmd->channel = wlvif->channel; | 778 | cmd->channel = wlvif->channel; |
| 779 | cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); | 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, | |||
| 1164 | } | 1164 | } |
| 1165 | 1165 | ||
| 1166 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); | 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 | ret = wl1271_cmd_template_set(wl, role_id, | 1168 | ret = wl1271_cmd_template_set(wl, role_id, |
| 1169 | template_id_2_4, | 1169 | template_id_2_4, |
| 1170 | skb->data, skb->len, 0, rate); | 1170 | skb->data, skb->len, 0, rate); |
| @@ -1195,7 +1195,7 @@ struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl, | |||
| 1195 | wl1271_debug(DEBUG_SCAN, "set ap probe request template"); | 1195 | wl1271_debug(DEBUG_SCAN, "set ap probe request template"); |
| 1196 | 1196 | ||
| 1197 | rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[wlvif->band]); | 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 | ret = wl1271_cmd_template_set(wl, wlvif->role_id, | 1199 | ret = wl1271_cmd_template_set(wl, wlvif->role_id, |
| 1200 | CMD_TEMPL_CFG_PROBE_REQ_2_4, | 1200 | CMD_TEMPL_CFG_PROBE_REQ_2_4, |
| 1201 | skb->data, skb->len, 0, rate); | 1201 | skb->data, skb->len, 0, rate); |
| @@ -1628,19 +1628,19 @@ out: | |||
| 1628 | return ret; | 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 | * map the given band/channel to the respective predefined | 1634 | * map the given band/channel to the respective predefined |
| 1635 | * bit expected by the fw | 1635 | * bit expected by the fw |
| 1636 | */ | 1636 | */ |
| 1637 | switch (band) { | 1637 | switch (band) { |
| 1638 | case IEEE80211_BAND_2GHZ: | 1638 | case NL80211_BAND_2GHZ: |
| 1639 | /* channels 1..14 are mapped to 0..13 */ | 1639 | /* channels 1..14 are mapped to 0..13 */ |
| 1640 | if (ch >= 1 && ch <= 14) | 1640 | if (ch >= 1 && ch <= 14) |
| 1641 | return ch - 1; | 1641 | return ch - 1; |
| 1642 | break; | 1642 | break; |
| 1643 | case IEEE80211_BAND_5GHZ: | 1643 | case NL80211_BAND_5GHZ: |
| 1644 | switch (ch) { | 1644 | switch (ch) { |
| 1645 | case 8 ... 16: | 1645 | case 8 ... 16: |
| 1646 | /* channels 8,12,16 are mapped to 18,19,20 */ | 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) | |||
| 1670 | } | 1670 | } |
| 1671 | 1671 | ||
| 1672 | void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, | 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 | int ch_bit_idx = 0; | 1675 | int ch_bit_idx = 0; |
| 1676 | 1676 | ||
| @@ -1699,7 +1699,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) | |||
| 1699 | 1699 | ||
| 1700 | memset(tmp_ch_bitmap, 0, sizeof(tmp_ch_bitmap)); | 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 | band = wiphy->bands[b]; | 1703 | band = wiphy->bands[b]; |
| 1704 | for (i = 0; i < band->n_channels; i++) { | 1704 | for (i = 0; i < band->n_channels; i++) { |
| 1705 | struct ieee80211_channel *channel = &band->channels[i]; | 1705 | struct ieee80211_channel *channel = &band->channels[i]; |
| @@ -1851,7 +1851,7 @@ out: | |||
| 1851 | } | 1851 | } |
| 1852 | 1852 | ||
| 1853 | static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 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 | struct wl12xx_cmd_roc *cmd; | 1856 | struct wl12xx_cmd_roc *cmd; |
| 1857 | int ret = 0; | 1857 | int ret = 0; |
| @@ -1870,10 +1870,10 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
| 1870 | cmd->role_id = role_id; | 1870 | cmd->role_id = role_id; |
| 1871 | cmd->channel = channel; | 1871 | cmd->channel = channel; |
| 1872 | switch (band) { | 1872 | switch (band) { |
| 1873 | case IEEE80211_BAND_2GHZ: | 1873 | case NL80211_BAND_2GHZ: |
| 1874 | cmd->band = WLCORE_BAND_2_4GHZ; | 1874 | cmd->band = WLCORE_BAND_2_4GHZ; |
| 1875 | break; | 1875 | break; |
| 1876 | case IEEE80211_BAND_5GHZ: | 1876 | case NL80211_BAND_5GHZ: |
| 1877 | cmd->band = WLCORE_BAND_5GHZ; | 1877 | cmd->band = WLCORE_BAND_5GHZ; |
| 1878 | break; | 1878 | break; |
| 1879 | default: | 1879 | default: |
| @@ -1925,7 +1925,7 @@ out: | |||
| 1925 | } | 1925 | } |
| 1926 | 1926 | ||
| 1927 | int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id, | 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 | int ret = 0; | 1930 | int ret = 0; |
| 1931 | 1931 | ||
| @@ -1995,7 +1995,7 @@ out: | |||
| 1995 | 1995 | ||
| 1996 | /* start dev role and roc on its channel */ | 1996 | /* start dev role and roc on its channel */ |
| 1997 | int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 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 | int ret; | 2000 | int ret; |
| 2001 | 2001 | ||
diff --git a/drivers/net/wireless/ti/wlcore/cmd.h b/drivers/net/wireless/ti/wlcore/cmd.h index e28e2f2303ce..52c3b4860461 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.h +++ b/drivers/net/wireless/ti/wlcore/cmd.h | |||
| @@ -40,7 +40,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); | |||
| 40 | int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 40 | int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 41 | int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 41 | int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 42 | int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 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 | int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 44 | int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 45 | int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); | 45 | int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); |
| 46 | int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, | 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, | |||
| 83 | int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 83 | int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 84 | u8 hlid); | 84 | u8 hlid); |
| 85 | int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id, | 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 | int wl12xx_croc(struct wl1271 *wl, u8 role_id); | 87 | int wl12xx_croc(struct wl1271 *wl, u8 role_id); |
| 88 | int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 88 | int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 89 | struct ieee80211_sta *sta, u8 hlid); | 89 | struct ieee80211_sta *sta, u8 hlid); |
| 90 | int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 90 | int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 91 | u8 hlid); | 91 | u8 hlid); |
| 92 | void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, | 92 | void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, |
| 93 | enum ieee80211_band band); | 93 | enum nl80211_band band); |
| 94 | int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl); | 94 | int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl); |
| 95 | int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 95 | int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 96 | u8 feature, u8 enable, u8 value); | 96 | u8 feature, u8 enable, u8 value); |
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index a872a07a484c..10fd24c28ece 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c | |||
| @@ -1930,7 +1930,7 @@ static void wlcore_op_stop_locked(struct wl1271 *wl) | |||
| 1930 | if (test_and_clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags)) | 1930 | if (test_and_clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags)) |
| 1931 | wlcore_enable_interrupts(wl); | 1931 | wlcore_enable_interrupts(wl); |
| 1932 | 1932 | ||
| 1933 | wl->band = IEEE80211_BAND_2GHZ; | 1933 | wl->band = NL80211_BAND_2GHZ; |
| 1934 | 1934 | ||
| 1935 | wl->rx_counter = 0; | 1935 | wl->rx_counter = 0; |
| 1936 | wl->power_level = WL1271_DEFAULT_POWER_LEVEL; | 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) | |||
| 2240 | wlvif->rate_set = CONF_TX_ENABLED_RATES; | 2240 | wlvif->rate_set = CONF_TX_ENABLED_RATES; |
| 2241 | } | 2241 | } |
| 2242 | 2242 | ||
| 2243 | wlvif->bitrate_masks[IEEE80211_BAND_2GHZ] = wl->conf.tx.basic_rate; | 2243 | wlvif->bitrate_masks[NL80211_BAND_2GHZ] = wl->conf.tx.basic_rate; |
| 2244 | wlvif->bitrate_masks[IEEE80211_BAND_5GHZ] = wl->conf.tx.basic_rate_5; | 2244 | wlvif->bitrate_masks[NL80211_BAND_5GHZ] = wl->conf.tx.basic_rate_5; |
| 2245 | wlvif->beacon_int = WL1271_DEFAULT_BEACON_INT; | 2245 | wlvif->beacon_int = WL1271_DEFAULT_BEACON_INT; |
| 2246 | 2246 | ||
| 2247 | /* | 2247 | /* |
| @@ -2330,7 +2330,7 @@ power_off: | |||
| 2330 | * 11a channels if not supported | 2330 | * 11a channels if not supported |
| 2331 | */ | 2331 | */ |
| 2332 | if (!wl->enable_11a) | 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 | wl1271_debug(DEBUG_MAC80211, "11a is %ssupported", | 2335 | wl1271_debug(DEBUG_MAC80211, "11a is %ssupported", |
| 2336 | wl->enable_11a ? "" : "not "); | 2336 | wl->enable_11a ? "" : "not "); |
| @@ -5871,7 +5871,7 @@ static const struct ieee80211_ops wl1271_ops = { | |||
| 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 | u8 idx; | 5876 | u8 idx; |
| 5877 | 5877 | ||
| @@ -6096,21 +6096,21 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) | |||
| 6096 | * We keep local copies of the band structs because we need to | 6096 | * We keep local copies of the band structs because we need to |
| 6097 | * modify them on a per-device basis. | 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 | sizeof(wl1271_band_2ghz)); | 6100 | sizeof(wl1271_band_2ghz)); |
| 6101 | memcpy(&wl->bands[IEEE80211_BAND_2GHZ].ht_cap, | 6101 | memcpy(&wl->bands[NL80211_BAND_2GHZ].ht_cap, |
| 6102 | &wl->ht_cap[IEEE80211_BAND_2GHZ], | 6102 | &wl->ht_cap[NL80211_BAND_2GHZ], |
| 6103 | sizeof(*wl->ht_cap)); | 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 | sizeof(wl1271_band_5ghz)); | 6105 | sizeof(wl1271_band_5ghz)); |
| 6106 | memcpy(&wl->bands[IEEE80211_BAND_5GHZ].ht_cap, | 6106 | memcpy(&wl->bands[NL80211_BAND_5GHZ].ht_cap, |
| 6107 | &wl->ht_cap[IEEE80211_BAND_5GHZ], | 6107 | &wl->ht_cap[NL80211_BAND_5GHZ], |
| 6108 | sizeof(*wl->ht_cap)); | 6108 | sizeof(*wl->ht_cap)); |
| 6109 | 6109 | ||
| 6110 | wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 6110 | wl->hw->wiphy->bands[NL80211_BAND_2GHZ] = |
| 6111 | &wl->bands[IEEE80211_BAND_2GHZ]; | 6111 | &wl->bands[NL80211_BAND_2GHZ]; |
| 6112 | wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = | 6112 | wl->hw->wiphy->bands[NL80211_BAND_5GHZ] = |
| 6113 | &wl->bands[IEEE80211_BAND_5GHZ]; | 6113 | &wl->bands[NL80211_BAND_5GHZ]; |
| 6114 | 6114 | ||
| 6115 | /* | 6115 | /* |
| 6116 | * allow 4 queues per mac address we support + | 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, | |||
| 6205 | wl->channel = 0; | 6205 | wl->channel = 0; |
| 6206 | wl->rx_counter = 0; | 6206 | wl->rx_counter = 0; |
| 6207 | wl->power_level = WL1271_DEFAULT_POWER_LEVEL; | 6207 | wl->power_level = WL1271_DEFAULT_POWER_LEVEL; |
| 6208 | wl->band = IEEE80211_BAND_2GHZ; | 6208 | wl->band = NL80211_BAND_2GHZ; |
| 6209 | wl->channel_type = NL80211_CHAN_NO_HT; | 6209 | wl->channel_type = NL80211_CHAN_NO_HT; |
| 6210 | wl->flags = 0; | 6210 | wl->flags = 0; |
| 6211 | wl->sg_enabled = true; | 6211 | wl->sg_enabled = true; |
diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c index d4420da637d8..b36133b739cb 100644 --- a/drivers/net/wireless/ti/wlcore/ps.c +++ b/drivers/net/wireless/ti/wlcore/ps.c | |||
| @@ -202,7 +202,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
| 202 | * enable beacon early termination. | 202 | * enable beacon early termination. |
| 203 | * Not relevant for 5GHz and for high rates. | 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 | (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { | 206 | (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { |
| 207 | ret = wl1271_acx_bet_enable(wl, wlvif, true); | 207 | ret = wl1271_acx_bet_enable(wl, wlvif, true); |
| 208 | if (ret < 0) | 208 | if (ret < 0) |
| @@ -213,7 +213,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
| 213 | wl1271_debug(DEBUG_PSM, "leaving psm"); | 213 | wl1271_debug(DEBUG_PSM, "leaving psm"); |
| 214 | 214 | ||
| 215 | /* disable beacon early termination */ | 215 | /* disable beacon early termination */ |
| 216 | if ((wlvif->band == IEEE80211_BAND_2GHZ) && | 216 | if ((wlvif->band == NL80211_BAND_2GHZ) && |
| 217 | (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { | 217 | (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { |
| 218 | ret = wl1271_acx_bet_enable(wl, wlvif, false); | 218 | ret = wl1271_acx_bet_enable(wl, wlvif, false); |
| 219 | if (ret < 0) | 219 | if (ret < 0) |
diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c index 34e7e938ede4..c9bd294a0aa6 100644 --- a/drivers/net/wireless/ti/wlcore/rx.c +++ b/drivers/net/wireless/ti/wlcore/rx.c | |||
| @@ -64,9 +64,9 @@ static void wl1271_rx_status(struct wl1271 *wl, | |||
| 64 | memset(status, 0, sizeof(struct ieee80211_rx_status)); | 64 | memset(status, 0, sizeof(struct ieee80211_rx_status)); |
| 65 | 65 | ||
| 66 | if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG) | 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 | else | 68 | else |
| 69 | status->band = IEEE80211_BAND_5GHZ; | 69 | status->band = NL80211_BAND_5GHZ; |
| 70 | 70 | ||
| 71 | status->rate_idx = wlcore_rate_to_idx(wl, desc->rate, status->band); | 71 | status->rate_idx = wlcore_rate_to_idx(wl, desc->rate, status->band); |
| 72 | 72 | ||
diff --git a/drivers/net/wireless/ti/wlcore/rx.h b/drivers/net/wireless/ti/wlcore/rx.h index f5a7087cfb97..57c0565637d6 100644 --- a/drivers/net/wireless/ti/wlcore/rx.h +++ b/drivers/net/wireless/ti/wlcore/rx.h | |||
| @@ -146,7 +146,7 @@ struct wl1271_rx_descriptor { | |||
| 146 | } __packed; | 146 | } __packed; |
| 147 | 147 | ||
| 148 | int wlcore_rx(struct wl1271 *wl, struct wl_fw_status *status); | 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 | int wl1271_rx_filter_enable(struct wl1271 *wl, | 150 | int wl1271_rx_filter_enable(struct wl1271 *wl, |
| 151 | int index, bool enable, | 151 | int index, bool enable, |
| 152 | struct wl12xx_rx_filter *filter); | 152 | struct wl12xx_rx_filter *filter); |
diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c index a384f3f83099..23343643207a 100644 --- a/drivers/net/wireless/ti/wlcore/scan.c +++ b/drivers/net/wireless/ti/wlcore/scan.c | |||
| @@ -164,7 +164,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, | |||
| 164 | struct conf_sched_scan_settings *c = &wl->conf.sched_scan; | 164 | struct conf_sched_scan_settings *c = &wl->conf.sched_scan; |
| 165 | u32 delta_per_probe; | 165 | u32 delta_per_probe; |
| 166 | 166 | ||
| 167 | if (band == IEEE80211_BAND_5GHZ) | 167 | if (band == NL80211_BAND_5GHZ) |
| 168 | delta_per_probe = c->dwell_time_delta_per_probe_5; | 168 | delta_per_probe = c->dwell_time_delta_per_probe_5; |
| 169 | else | 169 | else |
| 170 | delta_per_probe = c->dwell_time_delta_per_probe; | 170 | delta_per_probe = c->dwell_time_delta_per_probe; |
| @@ -215,7 +215,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, | |||
| 215 | channels[j].channel = req_channels[i]->hw_value; | 215 | channels[j].channel = req_channels[i]->hw_value; |
| 216 | 216 | ||
| 217 | if (n_pactive_ch && | 217 | if (n_pactive_ch && |
| 218 | (band == IEEE80211_BAND_2GHZ) && | 218 | (band == NL80211_BAND_2GHZ) && |
| 219 | (channels[j].channel >= 12) && | 219 | (channels[j].channel >= 12) && |
| 220 | (channels[j].channel <= 14) && | 220 | (channels[j].channel <= 14) && |
| 221 | (flags & IEEE80211_CHAN_NO_IR) && | 221 | (flags & IEEE80211_CHAN_NO_IR) && |
| @@ -266,7 +266,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
| 266 | n_channels, | 266 | n_channels, |
| 267 | n_ssids, | 267 | n_ssids, |
| 268 | cfg->channels_2, | 268 | cfg->channels_2, |
| 269 | IEEE80211_BAND_2GHZ, | 269 | NL80211_BAND_2GHZ, |
| 270 | false, true, 0, | 270 | false, true, 0, |
| 271 | MAX_CHANNELS_2GHZ, | 271 | MAX_CHANNELS_2GHZ, |
| 272 | &n_pactive_ch, | 272 | &n_pactive_ch, |
| @@ -277,7 +277,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
| 277 | n_channels, | 277 | n_channels, |
| 278 | n_ssids, | 278 | n_ssids, |
| 279 | cfg->channels_2, | 279 | cfg->channels_2, |
| 280 | IEEE80211_BAND_2GHZ, | 280 | NL80211_BAND_2GHZ, |
| 281 | false, false, | 281 | false, false, |
| 282 | cfg->passive[0], | 282 | cfg->passive[0], |
| 283 | MAX_CHANNELS_2GHZ, | 283 | MAX_CHANNELS_2GHZ, |
| @@ -289,7 +289,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
| 289 | n_channels, | 289 | n_channels, |
| 290 | n_ssids, | 290 | n_ssids, |
| 291 | cfg->channels_5, | 291 | cfg->channels_5, |
| 292 | IEEE80211_BAND_5GHZ, | 292 | NL80211_BAND_5GHZ, |
| 293 | false, true, 0, | 293 | false, true, 0, |
| 294 | wl->max_channels_5, | 294 | wl->max_channels_5, |
| 295 | &n_pactive_ch, | 295 | &n_pactive_ch, |
| @@ -300,7 +300,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
| 300 | n_channels, | 300 | n_channels, |
| 301 | n_ssids, | 301 | n_ssids, |
| 302 | cfg->channels_5, | 302 | cfg->channels_5, |
| 303 | IEEE80211_BAND_5GHZ, | 303 | NL80211_BAND_5GHZ, |
| 304 | true, true, | 304 | true, true, |
| 305 | cfg->passive[1], | 305 | cfg->passive[1], |
| 306 | wl->max_channels_5, | 306 | wl->max_channels_5, |
| @@ -312,7 +312,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, | |||
| 312 | n_channels, | 312 | n_channels, |
| 313 | n_ssids, | 313 | n_ssids, |
| 314 | cfg->channels_5, | 314 | cfg->channels_5, |
| 315 | IEEE80211_BAND_5GHZ, | 315 | NL80211_BAND_5GHZ, |
| 316 | false, false, | 316 | false, false, |
| 317 | cfg->passive[1] + cfg->dfs, | 317 | cfg->passive[1] + cfg->dfs, |
| 318 | wl->max_channels_5, | 318 | wl->max_channels_5, |
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index f0ac36139bcc..c1b8e4e9d70b 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c | |||
| @@ -453,7 +453,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
| 453 | } | 453 | } |
| 454 | 454 | ||
| 455 | u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, | 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 | struct ieee80211_supported_band *band; | 458 | struct ieee80211_supported_band *band; |
| 459 | u32 enabled_rates = 0; | 459 | u32 enabled_rates = 0; |
diff --git a/drivers/net/wireless/ti/wlcore/tx.h b/drivers/net/wireless/ti/wlcore/tx.h index 79cb3ff8b71f..e2ba62d92d7a 100644 --- a/drivers/net/wireless/ti/wlcore/tx.h +++ b/drivers/net/wireless/ti/wlcore/tx.h | |||
| @@ -246,9 +246,9 @@ int wlcore_tx_complete(struct wl1271 *wl); | |||
| 246 | void wl12xx_tx_reset_wlvif(struct wl1271 *wl, struct wl12xx_vif *wlvif); | 246 | void wl12xx_tx_reset_wlvif(struct wl1271 *wl, struct wl12xx_vif *wlvif); |
| 247 | void wl12xx_tx_reset(struct wl1271 *wl); | 247 | void wl12xx_tx_reset(struct wl1271 *wl); |
| 248 | void wl1271_tx_flush(struct wl1271 *wl); | 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 | u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, | 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 | u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set); | 252 | u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set); |
| 253 | u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 253 | u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
| 254 | struct sk_buff *skb, struct ieee80211_sta *sta); | 254 | struct sk_buff *skb, struct ieee80211_sta *sta); |
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index 72c31a8edcfb..8f28aa02230c 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h | |||
| @@ -342,7 +342,7 @@ struct wl1271 { | |||
| 342 | struct wl12xx_vif *sched_vif; | 342 | struct wl12xx_vif *sched_vif; |
| 343 | 343 | ||
| 344 | /* The current band */ | 344 | /* The current band */ |
| 345 | enum ieee80211_band band; | 345 | enum nl80211_band band; |
| 346 | 346 | ||
| 347 | struct completion *elp_compl; | 347 | struct completion *elp_compl; |
| 348 | struct delayed_work elp_work; | 348 | struct delayed_work elp_work; |
| @@ -517,7 +517,7 @@ void wlcore_update_inconn_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
| 517 | struct wl1271_station *wl_sta, bool in_conn); | 517 | struct wl1271_station *wl_sta, bool in_conn); |
| 518 | 518 | ||
| 519 | static inline void | 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 | struct ieee80211_sta_ht_cap *ht_cap) | 521 | struct ieee80211_sta_ht_cap *ht_cap) |
| 522 | { | 522 | { |
| 523 | memcpy(&wl->ht_cap[band], ht_cap, sizeof(*ht_cap)); | 523 | memcpy(&wl->ht_cap[band], ht_cap, sizeof(*ht_cap)); |
diff --git a/drivers/net/wireless/ti/wlcore/wlcore_i.h b/drivers/net/wireless/ti/wlcore/wlcore_i.h index 27c56876b2c1..5c4199f3a19a 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore_i.h +++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h | |||
| @@ -392,7 +392,7 @@ struct wl12xx_vif { | |||
| 392 | u8 ssid_len; | 392 | u8 ssid_len; |
| 393 | 393 | ||
| 394 | /* The current band */ | 394 | /* The current band */ |
| 395 | enum ieee80211_band band; | 395 | enum nl80211_band band; |
| 396 | int channel; | 396 | int channel; |
| 397 | enum nl80211_channel_type channel_type; | 397 | enum nl80211_channel_type channel_type; |
| 398 | 398 | ||
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index d5c371d77ddf..99de07d14939 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
| @@ -1454,7 +1454,7 @@ static int wl3501_get_freq(struct net_device *dev, struct iw_request_info *info, | |||
| 1454 | struct wl3501_card *this = netdev_priv(dev); | 1454 | struct wl3501_card *this = netdev_priv(dev); |
| 1455 | 1455 | ||
| 1456 | wrqu->freq.m = 100000 * | 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 | wrqu->freq.e = 1; | 1458 | wrqu->freq.e = 1; |
| 1459 | return 0; | 1459 | return 0; |
| 1460 | } | 1460 | } |
diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c index e539d9b1b562..3e37a045f702 100644 --- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c +++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c | |||
| @@ -1068,7 +1068,7 @@ int zd_mac_rx(struct ieee80211_hw *hw, const u8 *buffer, unsigned int length) | |||
| 1068 | } | 1068 | } |
| 1069 | 1069 | ||
| 1070 | stats.freq = zd_channels[_zd_chip_get_channel(&mac->chip) - 1].center_freq; | 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 | stats.signal = zd_check_signal(hw, status->signal_strength); | 1072 | stats.signal = zd_check_signal(hw, status->signal_strength); |
| 1073 | 1073 | ||
| 1074 | rate = zd_rx_rate(buffer, status); | 1074 | rate = zd_rx_rate(buffer, status); |
| @@ -1395,7 +1395,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf) | |||
| 1395 | mac->band.n_channels = ARRAY_SIZE(zd_channels); | 1395 | mac->band.n_channels = ARRAY_SIZE(zd_channels); |
| 1396 | mac->band.channels = mac->channels; | 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 | ieee80211_hw_set(hw, MFP_CAPABLE); | 1400 | ieee80211_hw_set(hw, MFP_CAPABLE); |
| 1401 | ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); | 1401 | ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); |
diff --git a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c index f4fff385aeb2..7dd1540ebedd 100644 --- a/drivers/staging/rtl8723au/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723au/core/rtw_mlme_ext.c | |||
| @@ -2113,10 +2113,10 @@ static int on_action_public23a(struct rtw_adapter *padapter, | |||
| 2113 | 2113 | ||
| 2114 | if (channel <= RTW_CH_MAX_2G_CHANNEL) | 2114 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 2115 | freq = ieee80211_channel_to_frequency(channel, | 2115 | freq = ieee80211_channel_to_frequency(channel, |
| 2116 | IEEE80211_BAND_2GHZ); | 2116 | NL80211_BAND_2GHZ); |
| 2117 | else | 2117 | else |
| 2118 | freq = ieee80211_channel_to_frequency(channel, | 2118 | freq = ieee80211_channel_to_frequency(channel, |
| 2119 | IEEE80211_BAND_5GHZ); | 2119 | NL80211_BAND_5GHZ); |
| 2120 | 2120 | ||
| 2121 | if (cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pframe, | 2121 | if (cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pframe, |
| 2122 | skb->len, 0)) | 2122 | skb->len, 0)) |
diff --git a/drivers/staging/rtl8723au/include/ieee80211.h b/drivers/staging/rtl8723au/include/ieee80211.h index 3aa40a32555e..634102e1bda6 100644 --- a/drivers/staging/rtl8723au/include/ieee80211.h +++ b/drivers/staging/rtl8723au/include/ieee80211.h | |||
| @@ -266,7 +266,7 @@ join_res: | |||
| 266 | 266 | ||
| 267 | /* Represent channel details, subset of ieee80211_channel */ | 267 | /* Represent channel details, subset of ieee80211_channel */ |
| 268 | struct rtw_ieee80211_channel { | 268 | struct rtw_ieee80211_channel { |
| 269 | /* enum ieee80211_band band; */ | 269 | /* enum nl80211_band band; */ |
| 270 | /* u16 center_freq; */ | 270 | /* u16 center_freq; */ |
| 271 | u16 hw_value; | 271 | u16 hw_value; |
| 272 | u32 flags; | 272 | u32 flags; |
diff --git a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c index 12d18440e824..0da559d929bc 100644 --- a/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c +++ b/drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | |||
| @@ -39,7 +39,7 @@ static const u32 rtw_cipher_suites[] = { | |||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | #define CHAN2G(_channel, _freq, _flags) { \ | 41 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 42 | .band = IEEE80211_BAND_2GHZ, \ | 42 | .band = NL80211_BAND_2GHZ, \ |
| 43 | .center_freq = (_freq), \ | 43 | .center_freq = (_freq), \ |
| 44 | .hw_value = (_channel), \ | 44 | .hw_value = (_channel), \ |
| 45 | .flags = (_flags), \ | 45 | .flags = (_flags), \ |
| @@ -48,7 +48,7 @@ static const u32 rtw_cipher_suites[] = { | |||
| 48 | } | 48 | } |
| 49 | 49 | ||
| 50 | #define CHAN5G(_channel, _flags) { \ | 50 | #define CHAN5G(_channel, _flags) { \ |
| 51 | .band = IEEE80211_BAND_5GHZ, \ | 51 | .band = NL80211_BAND_5GHZ, \ |
| 52 | .center_freq = 5000 + (5 * (_channel)), \ | 52 | .center_freq = 5000 + (5 * (_channel)), \ |
| 53 | .hw_value = (_channel), \ | 53 | .hw_value = (_channel), \ |
| 54 | .flags = (_flags), \ | 54 | .flags = (_flags), \ |
| @@ -143,15 +143,15 @@ static void rtw_5g_rates_init(struct ieee80211_rate *rates) | |||
| 143 | } | 143 | } |
| 144 | 144 | ||
| 145 | static struct ieee80211_supported_band * | 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 | struct ieee80211_supported_band *spt_band = NULL; | 148 | struct ieee80211_supported_band *spt_band = NULL; |
| 149 | int n_channels, n_bitrates; | 149 | int n_channels, n_bitrates; |
| 150 | 150 | ||
| 151 | if (band == IEEE80211_BAND_2GHZ) { | 151 | if (band == NL80211_BAND_2GHZ) { |
| 152 | n_channels = RTW_2G_CHANNELS_NUM; | 152 | n_channels = RTW_2G_CHANNELS_NUM; |
| 153 | n_bitrates = RTW_G_RATES_NUM; | 153 | n_bitrates = RTW_G_RATES_NUM; |
| 154 | } else if (band == IEEE80211_BAND_5GHZ) { | 154 | } else if (band == NL80211_BAND_5GHZ) { |
| 155 | n_channels = RTW_5G_CHANNELS_NUM; | 155 | n_channels = RTW_5G_CHANNELS_NUM; |
| 156 | n_bitrates = RTW_A_RATES_NUM; | 156 | n_bitrates = RTW_A_RATES_NUM; |
| 157 | } else { | 157 | } else { |
| @@ -176,10 +176,10 @@ rtw_spt_band_alloc(enum ieee80211_band band) | |||
| 176 | spt_band->n_channels = n_channels; | 176 | spt_band->n_channels = n_channels; |
| 177 | spt_band->n_bitrates = n_bitrates; | 177 | spt_band->n_bitrates = n_bitrates; |
| 178 | 178 | ||
| 179 | if (band == IEEE80211_BAND_2GHZ) { | 179 | if (band == NL80211_BAND_2GHZ) { |
| 180 | rtw_2g_channels_init(spt_band->channels); | 180 | rtw_2g_channels_init(spt_band->channels); |
| 181 | rtw_2g_rates_init(spt_band->bitrates); | 181 | rtw_2g_rates_init(spt_band->bitrates); |
| 182 | } else if (band == IEEE80211_BAND_5GHZ) { | 182 | } else if (band == NL80211_BAND_5GHZ) { |
| 183 | rtw_5g_channels_init(spt_band->channels); | 183 | rtw_5g_channels_init(spt_band->channels); |
| 184 | rtw_5g_rates_init(spt_band->bitrates); | 184 | rtw_5g_rates_init(spt_band->bitrates); |
| 185 | } | 185 | } |
| @@ -257,10 +257,10 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, | |||
| 257 | channel = pnetwork->network.DSConfig; | 257 | channel = pnetwork->network.DSConfig; |
| 258 | if (channel <= RTW_CH_MAX_2G_CHANNEL) | 258 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 259 | freq = ieee80211_channel_to_frequency(channel, | 259 | freq = ieee80211_channel_to_frequency(channel, |
| 260 | IEEE80211_BAND_2GHZ); | 260 | NL80211_BAND_2GHZ); |
| 261 | else | 261 | else |
| 262 | freq = ieee80211_channel_to_frequency(channel, | 262 | freq = ieee80211_channel_to_frequency(channel, |
| 263 | IEEE80211_BAND_5GHZ); | 263 | NL80211_BAND_5GHZ); |
| 264 | 264 | ||
| 265 | notify_channel = ieee80211_get_channel(wiphy, freq); | 265 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| 266 | 266 | ||
| @@ -322,11 +322,11 @@ void rtw_cfg80211_indicate_connect(struct rtw_adapter *padapter) | |||
| 322 | if (channel <= RTW_CH_MAX_2G_CHANNEL) | 322 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 323 | freq = | 323 | freq = |
| 324 | ieee80211_channel_to_frequency(channel, | 324 | ieee80211_channel_to_frequency(channel, |
| 325 | IEEE80211_BAND_2GHZ); | 325 | NL80211_BAND_2GHZ); |
| 326 | else | 326 | else |
| 327 | freq = | 327 | freq = |
| 328 | ieee80211_channel_to_frequency(channel, | 328 | ieee80211_channel_to_frequency(channel, |
| 329 | IEEE80211_BAND_5GHZ); | 329 | NL80211_BAND_5GHZ); |
| 330 | 330 | ||
| 331 | notify_channel = ieee80211_get_channel(wiphy, freq); | 331 | notify_channel = ieee80211_get_channel(wiphy, freq); |
| 332 | 332 | ||
| @@ -2360,10 +2360,10 @@ void rtw_cfg80211_indicate_sta_assoc(struct rtw_adapter *padapter, | |||
| 2360 | channel = pmlmeext->cur_channel; | 2360 | channel = pmlmeext->cur_channel; |
| 2361 | if (channel <= RTW_CH_MAX_2G_CHANNEL) | 2361 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 2362 | freq = ieee80211_channel_to_frequency(channel, | 2362 | freq = ieee80211_channel_to_frequency(channel, |
| 2363 | IEEE80211_BAND_2GHZ); | 2363 | NL80211_BAND_2GHZ); |
| 2364 | else | 2364 | else |
| 2365 | freq = ieee80211_channel_to_frequency(channel, | 2365 | freq = ieee80211_channel_to_frequency(channel, |
| 2366 | IEEE80211_BAND_5GHZ); | 2366 | NL80211_BAND_5GHZ); |
| 2367 | 2367 | ||
| 2368 | cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pmgmt_frame, frame_len, | 2368 | cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pmgmt_frame, frame_len, |
| 2369 | 0); | 2369 | 0); |
| @@ -2392,10 +2392,10 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, | |||
| 2392 | channel = pmlmeext->cur_channel; | 2392 | channel = pmlmeext->cur_channel; |
| 2393 | if (channel <= RTW_CH_MAX_2G_CHANNEL) | 2393 | if (channel <= RTW_CH_MAX_2G_CHANNEL) |
| 2394 | freq = ieee80211_channel_to_frequency(channel, | 2394 | freq = ieee80211_channel_to_frequency(channel, |
| 2395 | IEEE80211_BAND_2GHZ); | 2395 | NL80211_BAND_2GHZ); |
| 2396 | else | 2396 | else |
| 2397 | freq = ieee80211_channel_to_frequency(channel, | 2397 | freq = ieee80211_channel_to_frequency(channel, |
| 2398 | IEEE80211_BAND_5GHZ); | 2398 | NL80211_BAND_5GHZ); |
| 2399 | 2399 | ||
| 2400 | mgmt.frame_control = | 2400 | mgmt.frame_control = |
| 2401 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH); | 2401 | cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH); |
| @@ -3109,7 +3109,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = { | |||
| 3109 | }; | 3109 | }; |
| 3110 | 3110 | ||
| 3111 | static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, | 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 | #define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */ | 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, | |||
| 3133 | ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED; | 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 | *base on ant_num | 3137 | *base on ant_num |
| 3138 | *rx_mask: RX mask | 3138 | *rx_mask: RX mask |
| 3139 | *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7 | 3139 | *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7 |
| @@ -3173,19 +3173,19 @@ void rtw_cfg80211_init_wiphy(struct rtw_adapter *padapter) | |||
| 3173 | 3173 | ||
| 3174 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */ | 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 | if (bands) | 3177 | if (bands) |
| 3178 | rtw_cfg80211_init_ht_capab(&bands->ht_cap, | 3178 | rtw_cfg80211_init_ht_capab(&bands->ht_cap, |
| 3179 | IEEE80211_BAND_2GHZ, | 3179 | NL80211_BAND_2GHZ, |
| 3180 | rf_type); | 3180 | rf_type); |
| 3181 | } | 3181 | } |
| 3182 | 3182 | ||
| 3183 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */ | 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 | if (bands) | 3186 | if (bands) |
| 3187 | rtw_cfg80211_init_ht_capab(&bands->ht_cap, | 3187 | rtw_cfg80211_init_ht_capab(&bands->ht_cap, |
| 3188 | IEEE80211_BAND_5GHZ, | 3188 | NL80211_BAND_5GHZ, |
| 3189 | rf_type); | 3189 | rf_type); |
| 3190 | } | 3190 | } |
| 3191 | } | 3191 | } |
| @@ -3224,11 +3224,11 @@ static void rtw_cfg80211_preinit_wiphy(struct rtw_adapter *padapter, | |||
| 3224 | wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites); | 3224 | wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites); |
| 3225 | 3225 | ||
| 3226 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */ | 3226 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */ |
| 3227 | wiphy->bands[IEEE80211_BAND_2GHZ] = | 3227 | wiphy->bands[NL80211_BAND_2GHZ] = |
| 3228 | rtw_spt_band_alloc(IEEE80211_BAND_2GHZ); | 3228 | rtw_spt_band_alloc(NL80211_BAND_2GHZ); |
| 3229 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */ | 3229 | /* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */ |
| 3230 | wiphy->bands[IEEE80211_BAND_5GHZ] = | 3230 | wiphy->bands[NL80211_BAND_5GHZ] = |
| 3231 | rtw_spt_band_alloc(IEEE80211_BAND_5GHZ); | 3231 | rtw_spt_band_alloc(NL80211_BAND_5GHZ); |
| 3232 | 3232 | ||
| 3233 | wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; | 3233 | wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; |
| 3234 | wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME; | 3234 | wiphy->flags |= WIPHY_FLAG_OFFCHAN_TX | WIPHY_FLAG_HAVE_AP_SME; |
| @@ -3313,8 +3313,8 @@ void rtw_wdev_free(struct wireless_dev *wdev) | |||
| 3313 | if (!wdev) | 3313 | if (!wdev) |
| 3314 | return; | 3314 | return; |
| 3315 | 3315 | ||
| 3316 | kfree(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]); | 3316 | kfree(wdev->wiphy->bands[NL80211_BAND_2GHZ]); |
| 3317 | kfree(wdev->wiphy->bands[IEEE80211_BAND_5GHZ]); | 3317 | kfree(wdev->wiphy->bands[NL80211_BAND_5GHZ]); |
| 3318 | 3318 | ||
| 3319 | wiphy_free(wdev->wiphy); | 3319 | wiphy_free(wdev->wiphy); |
| 3320 | 3320 | ||
diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c index 9ac1ef9d0d51..b7d43a5622ba 100644 --- a/drivers/staging/vt6655/channel.c +++ b/drivers/staging/vt6655/channel.c | |||
| @@ -144,7 +144,7 @@ void vnt_init_bands(struct vnt_private *priv) | |||
| 144 | ch[i].flags = IEEE80211_CHAN_NO_HT40; | 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 | &vnt_supported_5ghz_band; | 148 | &vnt_supported_5ghz_band; |
| 149 | /* fallthrough */ | 149 | /* fallthrough */ |
| 150 | case RF_RFMD2959: | 150 | case RF_RFMD2959: |
| @@ -159,7 +159,7 @@ void vnt_init_bands(struct vnt_private *priv) | |||
| 159 | ch[i].flags = IEEE80211_CHAN_NO_HT40; | 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 | &vnt_supported_2ghz_band; | 163 | &vnt_supported_2ghz_band; |
| 164 | break; | 164 | break; |
| 165 | } | 165 | } |
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index c3eea07ca97e..494164045a0f 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c | |||
| @@ -812,7 +812,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, | |||
| 812 | else if (fb_option & FIFOCTL_AUTO_FB_1) | 812 | else if (fb_option & FIFOCTL_AUTO_FB_1) |
| 813 | tx_rate = fallback_rate1[tx_rate][retry]; | 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 | idx = tx_rate - RATE_6M; | 816 | idx = tx_rate - RATE_6M; |
| 817 | else | 817 | else |
| 818 | idx = tx_rate; | 818 | idx = tx_rate; |
| @@ -1290,7 +1290,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) | |||
| 1290 | (conf->flags & IEEE80211_CONF_OFFCHANNEL)) { | 1290 | (conf->flags & IEEE80211_CONF_OFFCHANNEL)) { |
| 1291 | set_channel(priv, conf->chandef.chan); | 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 | bb_type = BB_TYPE_11A; | 1294 | bb_type = BB_TYPE_11A; |
| 1295 | else | 1295 | else |
| 1296 | bb_type = BB_TYPE_11G; | 1296 | bb_type = BB_TYPE_11G; |
diff --git a/drivers/staging/vt6655/rxtx.c b/drivers/staging/vt6655/rxtx.c index 1a2dda09b69d..e4c3165ae027 100644 --- a/drivers/staging/vt6655/rxtx.c +++ b/drivers/staging/vt6655/rxtx.c | |||
| @@ -1307,7 +1307,7 @@ int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx, | |||
| 1307 | } | 1307 | } |
| 1308 | 1308 | ||
| 1309 | if (current_rate > RATE_11M) { | 1309 | if (current_rate > RATE_11M) { |
| 1310 | if (info->band == IEEE80211_BAND_5GHZ) { | 1310 | if (info->band == NL80211_BAND_5GHZ) { |
| 1311 | pkt_type = PK_TYPE_11A; | 1311 | pkt_type = PK_TYPE_11A; |
| 1312 | } else { | 1312 | } else { |
| 1313 | if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) | 1313 | if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) |
diff --git a/drivers/staging/vt6656/channel.c b/drivers/staging/vt6656/channel.c index a0fe288c1322..a4299f405d7f 100644 --- a/drivers/staging/vt6656/channel.c +++ b/drivers/staging/vt6656/channel.c | |||
| @@ -153,7 +153,7 @@ void vnt_init_bands(struct vnt_private *priv) | |||
| 153 | ch[i].flags = IEEE80211_CHAN_NO_HT40; | 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 | &vnt_supported_5ghz_band; | 157 | &vnt_supported_5ghz_band; |
| 158 | /* fallthrough */ | 158 | /* fallthrough */ |
| 159 | case RF_AL2230: | 159 | case RF_AL2230: |
| @@ -167,7 +167,7 @@ void vnt_init_bands(struct vnt_private *priv) | |||
| 167 | ch[i].flags = IEEE80211_CHAN_NO_HT40; | 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 | &vnt_supported_2ghz_band; | 171 | &vnt_supported_2ghz_band; |
| 172 | break; | 172 | break; |
| 173 | } | 173 | } |
diff --git a/drivers/staging/vt6656/int.c b/drivers/staging/vt6656/int.c index 8d05acbc0e23..73538fb4e4e2 100644 --- a/drivers/staging/vt6656/int.c +++ b/drivers/staging/vt6656/int.c | |||
| @@ -97,7 +97,7 @@ static int vnt_int_report_rate(struct vnt_private *priv, u8 pkt_no, u8 tsr) | |||
| 97 | else if (context->fb_option == AUTO_FB_1) | 97 | else if (context->fb_option == AUTO_FB_1) |
| 98 | tx_rate = fallback_rate1[tx_rate][retry]; | 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 | idx = tx_rate - RATE_6M; | 101 | idx = tx_rate - RATE_6M; |
| 102 | else | 102 | else |
| 103 | idx = tx_rate; | 103 | idx = tx_rate; |
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c index f9afab77b79f..fc5fe4ec6d05 100644 --- a/drivers/staging/vt6656/main_usb.c +++ b/drivers/staging/vt6656/main_usb.c | |||
| @@ -662,7 +662,7 @@ static int vnt_config(struct ieee80211_hw *hw, u32 changed) | |||
| 662 | (conf->flags & IEEE80211_CONF_OFFCHANNEL)) { | 662 | (conf->flags & IEEE80211_CONF_OFFCHANNEL)) { |
| 663 | vnt_set_channel(priv, conf->chandef.chan->hw_value); | 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 | bb_type = BB_TYPE_11A; | 666 | bb_type = BB_TYPE_11A; |
| 667 | else | 667 | else |
| 668 | bb_type = BB_TYPE_11G; | 668 | bb_type = BB_TYPE_11G; |
diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c index b74e32001318..aa59e7f14ab3 100644 --- a/drivers/staging/vt6656/rxtx.c +++ b/drivers/staging/vt6656/rxtx.c | |||
| @@ -813,7 +813,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb) | |||
| 813 | } | 813 | } |
| 814 | 814 | ||
| 815 | if (current_rate > RATE_11M) { | 815 | if (current_rate > RATE_11M) { |
| 816 | if (info->band == IEEE80211_BAND_5GHZ) { | 816 | if (info->band == NL80211_BAND_5GHZ) { |
| 817 | pkt_type = PK_TYPE_11A; | 817 | pkt_type = PK_TYPE_11A; |
| 818 | } else { | 818 | } else { |
| 819 | if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) | 819 | if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT) |
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 448a5c8c4514..544917d8b2df 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | |||
| @@ -102,7 +102,7 @@ static u8 op_ifcs; | |||
| 102 | u8 wilc_initialized = 1; | 102 | u8 wilc_initialized = 1; |
| 103 | 103 | ||
| 104 | #define CHAN2G(_channel, _freq, _flags) { \ | 104 | #define CHAN2G(_channel, _freq, _flags) { \ |
| 105 | .band = IEEE80211_BAND_2GHZ, \ | 105 | .band = NL80211_BAND_2GHZ, \ |
| 106 | .center_freq = (_freq), \ | 106 | .center_freq = (_freq), \ |
| 107 | .hw_value = (_channel), \ | 107 | .hw_value = (_channel), \ |
| 108 | .flags = (_flags), \ | 108 | .flags = (_flags), \ |
| @@ -241,7 +241,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan) | |||
| 241 | struct ieee80211_channel *channel; | 241 | struct ieee80211_channel *channel; |
| 242 | 242 | ||
| 243 | if (network_info) { | 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 | channel = ieee80211_get_channel(wiphy, freq); | 245 | channel = ieee80211_get_channel(wiphy, freq); |
| 246 | 246 | ||
| 247 | rssi = get_rssi_avg(network_info); | 247 | rssi = get_rssi_avg(network_info); |
| @@ -409,7 +409,7 @@ static void CfgScanResult(enum scan_event scan_event, | |||
| 409 | return; | 409 | return; |
| 410 | 410 | ||
| 411 | if (network_info) { | 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 | channel = ieee80211_get_channel(wiphy, s32Freq); | 413 | channel = ieee80211_get_channel(wiphy, s32Freq); |
| 414 | 414 | ||
| 415 | if (!channel) | 415 | if (!channel) |
| @@ -1451,7 +1451,7 @@ void WILC_WFI_p2p_rx(struct net_device *dev, u8 *buff, u32 size) | |||
| 1451 | return; | 1451 | return; |
| 1452 | } | 1452 | } |
| 1453 | } else { | 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 | if (ieee80211_is_action(buff[FRAME_TYPE_ID])) { | 1456 | if (ieee80211_is_action(buff[FRAME_TYPE_ID])) { |
| 1457 | if (priv->bCfgScanning && time_after_eq(jiffies, (unsigned long)pstrWFIDrv->p2p_timeout)) { | 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) | |||
| 2246 | WILC_WFI_band_2ghz.ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_8K; | 2246 | WILC_WFI_band_2ghz.ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_8K; |
| 2247 | WILC_WFI_band_2ghz.ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_NONE; | 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 | return wdev; | 2251 | return wdev; |
| 2252 | 2252 | ||
diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 8bad018eda47..2438cf7cc695 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c | |||
| @@ -415,7 +415,7 @@ static int prism2_scan(struct wiphy *wiphy, | |||
| 415 | ie_len = ie_buf[1] + 2; | 415 | ie_len = ie_buf[1] + 2; |
| 416 | memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len); | 416 | memcpy(&ie_buf[2], &(msg2.ssid.data.data), msg2.ssid.data.len); |
| 417 | freq = ieee80211_channel_to_frequency(msg2.dschannel.data, | 417 | freq = ieee80211_channel_to_frequency(msg2.dschannel.data, |
| 418 | IEEE80211_BAND_2GHZ); | 418 | NL80211_BAND_2GHZ); |
| 419 | bss = cfg80211_inform_bss(wiphy, | 419 | bss = cfg80211_inform_bss(wiphy, |
| 420 | ieee80211_get_channel(wiphy, freq), | 420 | ieee80211_get_channel(wiphy, freq), |
| 421 | CFG80211_BSS_FTYPE_UNKNOWN, | 421 | CFG80211_BSS_FTYPE_UNKNOWN, |
| @@ -758,9 +758,9 @@ static struct wiphy *wlan_create_wiphy(struct device *dev, wlandevice_t *wlandev | |||
| 758 | priv->band.n_channels = ARRAY_SIZE(prism2_channels); | 758 | priv->band.n_channels = ARRAY_SIZE(prism2_channels); |
| 759 | priv->band.bitrates = priv->rates; | 759 | priv->band.bitrates = priv->rates; |
| 760 | priv->band.n_bitrates = ARRAY_SIZE(prism2_rates); | 760 | priv->band.n_bitrates = ARRAY_SIZE(prism2_rates); |
| 761 | priv->band.band = IEEE80211_BAND_2GHZ; | 761 | priv->band.band = NL80211_BAND_2GHZ; |
| 762 | priv->band.ht_cap.ht_supported = false; | 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 | set_wiphy_dev(wiphy, dev); | 765 | set_wiphy_dev(wiphy, dev); |
| 766 | wiphy->privid = prism2_wiphy_privid; | 766 | wiphy->privid = prism2_wiphy_privid; |
