Commit 57fbcce3 authored by Johannes Berg's avatar Johannes Berg
Browse files

cfg80211: remove enum ieee80211_band



This enum is already perfectly aliased to enum nl80211_band, and
the only reason for it is that we get IEEE80211_NUM_BANDS out of
it. There's no really good reason to not declare the number of
bands in nl80211 though, so do that and remove the cfg80211 one.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 35eb8f7b
...@@ -75,7 +75,6 @@ ...@@ -75,7 +75,6 @@
<chapter> <chapter>
<title>Device registration</title> <title>Device registration</title>
!Pinclude/net/cfg80211.h Device registration !Pinclude/net/cfg80211.h Device registration
!Finclude/net/cfg80211.h ieee80211_band
!Finclude/net/cfg80211.h ieee80211_channel_flags !Finclude/net/cfg80211.h ieee80211_channel_flags
!Finclude/net/cfg80211.h ieee80211_channel !Finclude/net/cfg80211.h ieee80211_channel
!Finclude/net/cfg80211.h ieee80211_rate_flags !Finclude/net/cfg80211.h ieee80211_rate_flags
......
...@@ -440,7 +440,7 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev) ...@@ -440,7 +440,7 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
rx_status.rate_idx = rate; rx_status.rate_idx = rate;
rx_status.freq = adm8211_channels[priv->channel - 1].center_freq; rx_status.freq = adm8211_channels[priv->channel - 1].center_freq;
rx_status.band = IEEE80211_BAND_2GHZ; rx_status.band = NL80211_BAND_2GHZ;
memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
ieee80211_rx_irqsafe(dev, skb); ieee80211_rx_irqsafe(dev, skb);
...@@ -1894,7 +1894,7 @@ static int adm8211_probe(struct pci_dev *pdev, ...@@ -1894,7 +1894,7 @@ static int adm8211_probe(struct pci_dev *pdev,
priv->channel = 1; priv->channel = 1;
dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
err = ieee80211_register_hw(dev); err = ieee80211_register_hw(dev);
if (err) { if (err) {
......
...@@ -1471,12 +1471,12 @@ static int ar5523_init_modes(struct ar5523 *ar) ...@@ -1471,12 +1471,12 @@ static int ar5523_init_modes(struct ar5523 *ar)
memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels)); memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels));
memcpy(ar->rates, ar5523_rates, sizeof(ar5523_rates)); memcpy(ar->rates, ar5523_rates, sizeof(ar5523_rates));
ar->band.band = IEEE80211_BAND_2GHZ; ar->band.band = NL80211_BAND_2GHZ;
ar->band.channels = ar->channels; ar->band.channels = ar->channels;
ar->band.n_channels = ARRAY_SIZE(ar5523_channels); ar->band.n_channels = ARRAY_SIZE(ar5523_channels);
ar->band.bitrates = ar->rates; ar->band.bitrates = ar->rates;
ar->band.n_bitrates = ARRAY_SIZE(ar5523_rates); ar->band.n_bitrates = ARRAY_SIZE(ar5523_rates);
ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &ar->band; ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = &ar->band;
return 0; return 0;
} }
......
...@@ -185,7 +185,7 @@ struct ath_common { ...@@ -185,7 +185,7 @@ struct ath_common {
bool bt_ant_diversity; bool bt_ant_diversity;
int last_rssi; int last_rssi;
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
}; };
static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common) static inline const struct ath_ps_ops *ath_ps_ops(struct ath_common *common)
......
...@@ -765,7 +765,7 @@ struct ath10k { ...@@ -765,7 +765,7 @@ struct ath10k {
} scan; } scan;
struct { struct {
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
} mac; } mac;
/* should never be NULL; needed for regular htt rx */ /* should never be NULL; needed for regular htt rx */
......
...@@ -2182,9 +2182,9 @@ static void ath10k_htt_rx_tx_mode_switch_ind(struct ath10k *ar, ...@@ -2182,9 +2182,9 @@ static void ath10k_htt_rx_tx_mode_switch_ind(struct ath10k *ar,
ath10k_mac_tx_push_pending(ar); ath10k_mac_tx_push_pending(ar);
} }
static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) static inline enum nl80211_band phy_mode_to_band(u32 phy_mode)
{ {
enum ieee80211_band band; enum nl80211_band band;
switch (phy_mode) { switch (phy_mode) {
case MODE_11A: case MODE_11A:
...@@ -2193,7 +2193,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) ...@@ -2193,7 +2193,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode)
case MODE_11AC_VHT20: case MODE_11AC_VHT20:
case MODE_11AC_VHT40: case MODE_11AC_VHT40:
case MODE_11AC_VHT80: case MODE_11AC_VHT80:
band = IEEE80211_BAND_5GHZ; band = NL80211_BAND_5GHZ;
break; break;
case MODE_11G: case MODE_11G:
case MODE_11B: case MODE_11B:
...@@ -2204,7 +2204,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode) ...@@ -2204,7 +2204,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode)
case MODE_11AC_VHT40_2G: case MODE_11AC_VHT40_2G:
case MODE_11AC_VHT80_2G: case MODE_11AC_VHT80_2G:
default: default:
band = IEEE80211_BAND_2GHZ; band = NL80211_BAND_2GHZ;
} }
return band; return band;
......
...@@ -482,7 +482,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) ...@@ -482,7 +482,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
enum wmi_phy_mode phymode = MODE_UNKNOWN; enum wmi_phy_mode phymode = MODE_UNKNOWN;
switch (chandef->chan->band) { switch (chandef->chan->band) {
case IEEE80211_BAND_2GHZ: case NL80211_BAND_2GHZ:
switch (chandef->width) { switch (chandef->width) {
case NL80211_CHAN_WIDTH_20_NOHT: case NL80211_CHAN_WIDTH_20_NOHT:
if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM) if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM)
...@@ -505,7 +505,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) ...@@ -505,7 +505,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
break; break;
} }
break; break;
case IEEE80211_BAND_5GHZ: case NL80211_BAND_5GHZ:
switch (chandef->width) { switch (chandef->width) {
case NL80211_CHAN_WIDTH_20_NOHT: case NL80211_CHAN_WIDTH_20_NOHT:
phymode = MODE_11A; phymode = MODE_11A;
...@@ -2055,7 +2055,7 @@ static void ath10k_peer_assoc_h_rates(struct ath10k *ar, ...@@ -2055,7 +2055,7 @@ static void ath10k_peer_assoc_h_rates(struct ath10k *ar,
struct cfg80211_chan_def def; struct cfg80211_chan_def def;
const struct ieee80211_supported_band *sband; const struct ieee80211_supported_band *sband;
const struct ieee80211_rate *rates; const struct ieee80211_rate *rates;
enum ieee80211_band band; enum nl80211_band band;
u32 ratemask; u32 ratemask;
u8 rate; u8 rate;
int i; int i;
...@@ -2115,7 +2115,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, ...@@ -2115,7 +2115,7 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar,
const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap; const struct ieee80211_sta_ht_cap *ht_cap = &sta->ht_cap;
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
struct cfg80211_chan_def def; struct cfg80211_chan_def def;
enum ieee80211_band band; enum nl80211_band band;
const u8 *ht_mcs_mask; const u8 *ht_mcs_mask;
const u16 *vht_mcs_mask; const u16 *vht_mcs_mask;
int i, n; int i, n;
...@@ -2339,7 +2339,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, ...@@ -2339,7 +2339,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar,
const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap;
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
struct cfg80211_chan_def def; struct cfg80211_chan_def def;
enum ieee80211_band band; enum nl80211_band band;
const u16 *vht_mcs_mask; const u16 *vht_mcs_mask;
u8 ampdu_factor; u8 ampdu_factor;
...@@ -2357,7 +2357,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar, ...@@ -2357,7 +2357,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar,
arg->peer_flags |= ar->wmi.peer_flags->vht; arg->peer_flags |= ar->wmi.peer_flags->vht;
if (def.chan->band == IEEE80211_BAND_2GHZ) if (def.chan->band == NL80211_BAND_2GHZ)
arg->peer_flags |= ar->wmi.peer_flags->vht_2g; arg->peer_flags |= ar->wmi.peer_flags->vht_2g;
arg->peer_vht_caps = vht_cap->cap; arg->peer_vht_caps = vht_cap->cap;
...@@ -2426,7 +2426,7 @@ static void ath10k_peer_assoc_h_qos(struct ath10k *ar, ...@@ -2426,7 +2426,7 @@ static void ath10k_peer_assoc_h_qos(struct ath10k *ar,
static bool ath10k_mac_sta_has_ofdm_only(struct ieee80211_sta *sta) static bool ath10k_mac_sta_has_ofdm_only(struct ieee80211_sta *sta)
{ {
return sta->supp_rates[IEEE80211_BAND_2GHZ] >> return sta->supp_rates[NL80211_BAND_2GHZ] >>
ATH10K_MAC_FIRST_OFDM_RATE_IDX; ATH10K_MAC_FIRST_OFDM_RATE_IDX;
} }
...@@ -2437,7 +2437,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, ...@@ -2437,7 +2437,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
{ {
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
struct cfg80211_chan_def def; struct cfg80211_chan_def def;
enum ieee80211_band band; enum nl80211_band band;
const u8 *ht_mcs_mask; const u8 *ht_mcs_mask;
const u16 *vht_mcs_mask; const u16 *vht_mcs_mask;
enum wmi_phy_mode phymode = MODE_UNKNOWN; enum wmi_phy_mode phymode = MODE_UNKNOWN;
...@@ -2450,7 +2450,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, ...@@ -2450,7 +2450,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs; vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs;
switch (band) { switch (band) {
case IEEE80211_BAND_2GHZ: case NL80211_BAND_2GHZ:
if (sta->vht_cap.vht_supported && if (sta->vht_cap.vht_supported &&
!ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) { !ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
if (sta->bandwidth == IEEE80211_STA_RX_BW_40) if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
...@@ -2470,7 +2470,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, ...@@ -2470,7 +2470,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
} }
break; break;
case IEEE80211_BAND_5GHZ: case NL80211_BAND_5GHZ:
/* /*
* Check VHT first. * Check VHT first.
*/ */
...@@ -2848,7 +2848,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) ...@@ -2848,7 +2848,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
{ {
struct ieee80211_hw *hw = ar->hw; struct ieee80211_hw *hw = ar->hw;
struct ieee80211_supported_band **bands; struct ieee80211_supported_band **bands;
enum ieee80211_band band; enum nl80211_band band;
struct ieee80211_channel *channel; struct ieee80211_channel *channel;
struct wmi_scan_chan_list_arg arg = {0}; struct wmi_scan_chan_list_arg arg = {0};
struct wmi_channel_arg *ch; struct wmi_channel_arg *ch;
...@@ -2860,7 +2860,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) ...@@ -2860,7 +2860,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
lockdep_assert_held(&ar->conf_mutex); lockdep_assert_held(&ar->conf_mutex);
bands = hw->wiphy->bands; bands = hw->wiphy->bands;
for (band = 0; band < IEEE80211_NUM_BANDS; band++) { for (band = 0; band < NUM_NL80211_BANDS; band++) {
if (!bands[band]) if (!bands[band])
continue; continue;
...@@ -2879,7 +2879,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) ...@@ -2879,7 +2879,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
return -ENOMEM; return -ENOMEM;
ch = arg.channels; ch = arg.channels;
for (band = 0; band < IEEE80211_NUM_BANDS; band++) { for (band = 0; band < NUM_NL80211_BANDS; band++) {
if (!bands[band]) if (!bands[band])
continue; continue;
...@@ -2917,7 +2917,7 @@ static int ath10k_update_channel_list(struct ath10k *ar) ...@@ -2917,7 +2917,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
/* FIXME: why use only legacy modes, why not any /* FIXME: why use only legacy modes, why not any
* HT/VHT modes? Would that even make any * HT/VHT modes? Would that even make any
* difference? */ * difference? */
if (channel->band == IEEE80211_BAND_2GHZ) if (channel->band == NL80211_BAND_2GHZ)
ch->mode = MODE_11G; ch->mode = MODE_11G;
else else
ch->mode = MODE_11A; ch->mode = MODE_11A;
...@@ -4254,14 +4254,14 @@ static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar) ...@@ -4254,14 +4254,14 @@ static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar)
vht_cap = ath10k_create_vht_cap(ar); vht_cap = ath10k_create_vht_cap(ar);
if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
band = &ar->mac.sbands[IEEE80211_BAND_2GHZ]; band = &ar->mac.sbands[NL80211_BAND_2GHZ];
band->ht_cap = ht_cap; band->ht_cap = ht_cap;
/* Enable the VHT support at 2.4 GHz */ /* Enable the VHT support at 2.4 GHz */
band->vht_cap = vht_cap; band->vht_cap = vht_cap;
} }
if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) {
band = &ar->mac.sbands[IEEE80211_BAND_5GHZ]; band = &ar->mac.sbands[NL80211_BAND_5GHZ];
band->ht_cap = ht_cap; band->ht_cap = ht_cap;
band->vht_cap = vht_cap; band->vht_cap = vht_cap;
} }
...@@ -5595,7 +5595,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk) ...@@ -5595,7 +5595,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk)
struct ath10k_sta *arsta; struct ath10k_sta *arsta;
struct ieee80211_sta *sta; struct ieee80211_sta *sta;
struct cfg80211_chan_def def; struct cfg80211_chan_def def;
enum ieee80211_band band; enum nl80211_band band;
const u8 *ht_mcs_mask; const u8 *ht_mcs_mask;
const u16 *vht_mcs_mask; const u16 *vht_mcs_mask;
u32 changed, bw, nss, smps; u32 changed, bw, nss, smps;
...@@ -6394,14 +6394,14 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx, ...@@ -6394,14 +6394,14 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
mutex_lock(&ar->conf_mutex); mutex_lock(&ar->conf_mutex);
sband = hw->wiphy->bands[IEEE80211_BAND_2GHZ]; sband = hw->wiphy->bands[NL80211_BAND_2GHZ];
if (sband && idx >= sband->n_channels) { if (sband && idx >= sband->n_channels) {
idx -= sband->n_channels; idx -= sband->n_channels;
sband = NULL; sband = NULL;
} }
if (!sband) if (!sband)
sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ]; sband = hw->wiphy->bands[NL80211_BAND_5GHZ];
if (!sband || idx >= sband->n_channels) { if (!sband || idx >= sband->n_channels) {
ret = -ENOENT; ret = -ENOENT;
...@@ -6424,7 +6424,7 @@ exit: ...@@ -6424,7 +6424,7 @@ exit:
static bool static bool
ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar,
enum ieee80211_band band, enum nl80211_band band,
const struct cfg80211_bitrate_mask *mask) const struct cfg80211_bitrate_mask *mask)
{ {
int num_rates = 0; int num_rates = 0;
...@@ -6443,7 +6443,7 @@ ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar, ...@@ -6443,7 +6443,7 @@ ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar,
static bool static bool
ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar,
enum ieee80211_band band, enum nl80211_band band,
const struct cfg80211_bitrate_mask *mask, const struct cfg80211_bitrate_mask *mask,
int *nss) int *nss)
{ {
...@@ -6492,7 +6492,7 @@ ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar, ...@@ -6492,7 +6492,7 @@ ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar,
static int static int
ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar, ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar,
enum ieee80211_band band, enum nl80211_band band,
const struct cfg80211_bitrate_mask *mask, const struct cfg80211_bitrate_mask *mask,
u8 *rate, u8 *nss) u8 *rate, u8 *nss)
{ {
...@@ -6593,7 +6593,7 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif, ...@@ -6593,7 +6593,7 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif,
static bool static bool
ath10k_mac_can_set_bitrate_mask(struct ath10k *ar, ath10k_mac_can_set_bitrate_mask(struct ath10k *ar,
enum ieee80211_band band, enum nl80211_band band,
const struct cfg80211_bitrate_mask *mask) const struct cfg80211_bitrate_mask *mask)
{ {
int i; int i;
...@@ -6645,7 +6645,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw, ...@@ -6645,7 +6645,7 @@ static int ath10k_mac_op_set_bitrate_mask(struct ieee80211_hw *hw,
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif); struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
struct cfg80211_chan_def def; struct cfg80211_chan_def def;
struct ath10k *ar = arvif->ar; struct ath10k *ar = arvif->ar;
enum ieee80211_band band; enum nl80211_band band;
const u8 *ht_mcs_mask; const u8 *ht_mcs_mask;
const u16 *vht_mcs_mask; const u16 *vht_mcs_mask;
u8 rate; u8 rate;
...@@ -7275,7 +7275,7 @@ static const struct ieee80211_ops ath10k_ops = { ...@@ -7275,7 +7275,7 @@ static const struct ieee80211_ops ath10k_ops = {
}; };
#define CHAN2G(_channel, _freq, _flags) { \ #define CHAN2G(_channel, _freq, _flags) { \
.band = IEEE80211_BAND_2GHZ, \ .band = NL80211_BAND_2GHZ, \
.hw_value = (_channel), \ .hw_value = (_channel), \
.center_freq = (_freq), \ .center_freq = (_freq), \
.flags = (_flags), \ .flags = (_flags), \
...@@ -7284,7 +7284,7 @@ static const struct ieee80211_ops ath10k_ops = { ...@@ -7284,7 +7284,7 @@ static const struct ieee80211_ops ath10k_ops = {
} }
#define CHAN5G(_channel, _freq, _flags) { \ #define CHAN5G(_channel, _freq, _flags) { \
.band = IEEE80211_BAND_5GHZ, \ .band = NL80211_BAND_5GHZ, \
.hw_value = (_channel), \ .hw_value = (_channel), \
.center_freq = (_freq), \ .center_freq = (_freq), \
.flags = (_flags), \ .flags = (_flags), \
...@@ -7604,13 +7604,13 @@ int ath10k_mac_register(struct ath10k *ar) ...@@ -7604,13 +7604,13 @@ int ath10k_mac_register(struct ath10k *ar)
goto err_free; goto err_free;
} }
band = &ar->mac.sbands[IEEE80211_BAND_2GHZ]; band = &ar->mac.sbands[NL80211_BAND_2GHZ];
band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels); band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels);
band->channels = channels; band->channels = channels;
band->n_bitrates = ath10k_g_rates_size; band->n_bitrates = ath10k_g_rates_size;
band->bitrates = ath10k_g_rates; band->bitrates = ath10k_g_rates;
ar->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = band; ar->hw->wiphy->bands[NL80211_BAND_2GHZ] = band;
} }
if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) { if (ar->phy_capability & WHAL_WLAN_11A_CAPABILITY) {
...@@ -7622,12 +7622,12 @@ int ath10k_mac_register(struct ath10k *ar) ...@@ -7622,12 +7622,12 @@ int ath10k_mac_register(struct ath10k *ar)
goto err_free; goto err_free;
} }
band = &ar->mac.sbands[IEEE80211_BAND_5GHZ]; band = &ar->mac.sbands[NL80211_BAND_5GHZ];
band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels); band->n_channels = ARRAY_SIZE(ath10k_5ghz_channels);
band->channels = channels; band->channels = channels;
band->n_bitrates = ath10k_a_rates_size; band->n_bitrates = ath10k_a_rates_size;
band->bitrates = ath10k_a_rates; band->bitrates = ath10k_a_rates;
ar->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = band; ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
} }
ath10k_mac_setup_ht_vht_cap(ar); ath10k_mac_setup_ht_vht_cap(ar);
...@@ -7815,8 +7815,8 @@ err_dfs_detector_exit: ...@@ -7815,8 +7815,8 @@ err_dfs_detector_exit:
ar->dfs_detector->exit(ar->dfs_detector); ar->dfs_detector->exit(ar->dfs_detector);
err_free: err_free:
kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels); kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels); kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels);
SET_IEEE80211_DEV(ar->hw, NULL); SET_IEEE80211_DEV(ar->hw, NULL);
return ret; return ret;
...@@ -7829,8 +7829,8 @@ void ath10k_mac_unregister(struct ath10k *ar) ...@@ -7829,8 +7829,8 @@ void ath10k_mac_unregister(struct ath10k *ar)
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector) if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
ar->dfs_detector->exit(ar->dfs_detector); ar->dfs_detector->exit(ar->dfs_detector);
kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels); kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels); kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels);
SET_IEEE80211_DEV(ar->hw, NULL); SET_IEEE80211_DEV(ar->hw, NULL);
} }
...@@ -2281,9 +2281,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) ...@@ -2281,9 +2281,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)
* of mgmt rx. * of mgmt rx.
*/ */
if (channel >= 1 && channel <= 14) { if (channel >= 1 && channel <= 14) {
status->band = IEEE80211_BAND_2GHZ; status->band = NL80211_BAND_2GHZ;
} else if (channel >= 36 && channel <= 165) { } else if (channel >= 36 && channel <= 165) {
status->band = IEEE80211_BAND_5GHZ; status->band = NL80211_BAND_5GHZ;
} else { } else {
/* Shouldn't happen unless list of advertised channels to /* Shouldn't happen unless list of advertised channels to
* mac80211 has been changed. * mac80211 has been changed.
...@@ -2293,7 +2293,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) ...@@ -2293,7 +2293,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)
return 0; return 0;
} }
if (phy_mode == MODE_11B && status->band == IEEE80211_BAND_5GHZ) if (phy_mode == MODE_11B && status->band == NL80211_BAND_5GHZ)
ath10k_dbg(ar, ATH10K_DBG_MGMT, "wmi mgmt rx 11b (CCK) on 5GHz\n"); ath10k_dbg(ar, ATH10K_DBG_MGMT, "wmi mgmt rx 11b (CCK) on 5GHz\n");
sband = &ar->mac.sbands[status->band]; sband = &ar->mac.sbands[status->band];
...@@ -2352,7 +2352,7 @@ static int freq_to_idx(struct ath10k *ar, int freq) ...@@ -2352,7 +2352,7 @@ static int freq_to_idx(struct ath10k *ar, int freq)
struct ieee80211_supported_band *sband; struct ieee80211_supported_band *sband;
int band, ch, idx = 0; int band, ch, idx = 0;
for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {