You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -75,7 +75,6 @@
|
||||
<chapter>
|
||||
<title>Device registration</title>
|
||||
!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
|
||||
!Finclude/net/cfg80211.h ieee80211_rate_flags
|
||||
|
||||
@@ -440,7 +440,7 @@ static void adm8211_interrupt_rci(struct ieee80211_hw *dev)
|
||||
rx_status.rate_idx = rate;
|
||||
|
||||
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));
|
||||
ieee80211_rx_irqsafe(dev, skb);
|
||||
@@ -1894,7 +1894,7 @@ static int adm8211_probe(struct pci_dev *pdev,
|
||||
|
||||
priv->channel = 1;
|
||||
|
||||
dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
|
||||
dev->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band;
|
||||
|
||||
err = ieee80211_register_hw(dev);
|
||||
if (err) {
|
||||
|
||||
@@ -1471,12 +1471,12 @@ static int ar5523_init_modes(struct ar5523 *ar)
|
||||
memcpy(ar->channels, ar5523_channels, sizeof(ar5523_channels));
|
||||
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.n_channels = ARRAY_SIZE(ar5523_channels);
|
||||
ar->band.bitrates = ar->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;
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ struct ath_common {
|
||||
bool bt_ant_diversity;
|
||||
|
||||
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)
|
||||
|
||||
@@ -765,7 +765,7 @@ struct ath10k {
|
||||
} scan;
|
||||
|
||||
struct {
|
||||
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
|
||||
struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
|
||||
} mac;
|
||||
|
||||
/* 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,
|
||||
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) {
|
||||
case MODE_11A:
|
||||
@@ -2193,7 +2193,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode)
|
||||
case MODE_11AC_VHT20:
|
||||
case MODE_11AC_VHT40:
|
||||
case MODE_11AC_VHT80:
|
||||
band = IEEE80211_BAND_5GHZ;
|
||||
band = NL80211_BAND_5GHZ;
|
||||
break;
|
||||
case MODE_11G:
|
||||
case MODE_11B:
|
||||
@@ -2204,7 +2204,7 @@ static inline enum ieee80211_band phy_mode_to_band(u32 phy_mode)
|
||||
case MODE_11AC_VHT40_2G:
|
||||
case MODE_11AC_VHT80_2G:
|
||||
default:
|
||||
band = IEEE80211_BAND_2GHZ;
|
||||
band = NL80211_BAND_2GHZ;
|
||||
}
|
||||
|
||||
return band;
|
||||
|
||||
@@ -482,7 +482,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
|
||||
enum wmi_phy_mode phymode = MODE_UNKNOWN;
|
||||
|
||||
switch (chandef->chan->band) {
|
||||
case IEEE80211_BAND_2GHZ:
|
||||
case NL80211_BAND_2GHZ:
|
||||
switch (chandef->width) {
|
||||
case NL80211_CHAN_WIDTH_20_NOHT:
|
||||
if (chandef->chan->flags & IEEE80211_CHAN_NO_OFDM)
|
||||
@@ -505,7 +505,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case IEEE80211_BAND_5GHZ:
|
||||
case NL80211_BAND_5GHZ:
|
||||
switch (chandef->width) {
|
||||
case NL80211_CHAN_WIDTH_20_NOHT:
|
||||
phymode = MODE_11A;
|
||||
@@ -2055,7 +2055,7 @@ static void ath10k_peer_assoc_h_rates(struct ath10k *ar,
|
||||
struct cfg80211_chan_def def;
|
||||
const struct ieee80211_supported_band *sband;
|
||||
const struct ieee80211_rate *rates;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
u32 ratemask;
|
||||
u8 rate;
|
||||
int i;
|
||||
@@ -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;
|
||||
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
|
||||
struct cfg80211_chan_def def;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
int i, n;
|
||||
@@ -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;
|
||||
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
|
||||
struct cfg80211_chan_def def;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
const u16 *vht_mcs_mask;
|
||||
u8 ampdu_factor;
|
||||
|
||||
@@ -2357,7 +2357,7 @@ static void ath10k_peer_assoc_h_vht(struct ath10k *ar,
|
||||
|
||||
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_vht_caps = vht_cap->cap;
|
||||
@@ -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)
|
||||
{
|
||||
return sta->supp_rates[IEEE80211_BAND_2GHZ] >>
|
||||
return sta->supp_rates[NL80211_BAND_2GHZ] >>
|
||||
ATH10K_MAC_FIRST_OFDM_RATE_IDX;
|
||||
}
|
||||
|
||||
@@ -2437,7 +2437,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
|
||||
{
|
||||
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
|
||||
struct cfg80211_chan_def def;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
enum wmi_phy_mode phymode = MODE_UNKNOWN;
|
||||
@@ -2450,7 +2450,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
|
||||
vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs;
|
||||
|
||||
switch (band) {
|
||||
case IEEE80211_BAND_2GHZ:
|
||||
case NL80211_BAND_2GHZ:
|
||||
if (sta->vht_cap.vht_supported &&
|
||||
!ath10k_peer_assoc_h_vht_masked(vht_mcs_mask)) {
|
||||
if (sta->bandwidth == IEEE80211_STA_RX_BW_40)
|
||||
@@ -2470,7 +2470,7 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar,
|
||||
}
|
||||
|
||||
break;
|
||||
case IEEE80211_BAND_5GHZ:
|
||||
case NL80211_BAND_5GHZ:
|
||||
/*
|
||||
* Check VHT first.
|
||||
*/
|
||||
@@ -2848,7 +2848,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
{
|
||||
struct ieee80211_hw *hw = ar->hw;
|
||||
struct ieee80211_supported_band **bands;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
struct ieee80211_channel *channel;
|
||||
struct wmi_scan_chan_list_arg arg = {0};
|
||||
struct wmi_channel_arg *ch;
|
||||
@@ -2860,7 +2860,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
lockdep_assert_held(&ar->conf_mutex);
|
||||
|
||||
bands = hw->wiphy->bands;
|
||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||
if (!bands[band])
|
||||
continue;
|
||||
|
||||
@@ -2879,7 +2879,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
return -ENOMEM;
|
||||
|
||||
ch = arg.channels;
|
||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||
if (!bands[band])
|
||||
continue;
|
||||
|
||||
@@ -2917,7 +2917,7 @@ static int ath10k_update_channel_list(struct ath10k *ar)
|
||||
/* FIXME: why use only legacy modes, why not any
|
||||
* HT/VHT modes? Would that even make any
|
||||
* difference? */
|
||||
if (channel->band == IEEE80211_BAND_2GHZ)
|
||||
if (channel->band == NL80211_BAND_2GHZ)
|
||||
ch->mode = MODE_11G;
|
||||
else
|
||||
ch->mode = MODE_11A;
|
||||
@@ -4254,14 +4254,14 @@ static void ath10k_mac_setup_ht_vht_cap(struct ath10k *ar)
|
||||
vht_cap = ath10k_create_vht_cap(ar);
|
||||
|
||||
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;
|
||||
|
||||
/* Enable the VHT support at 2.4 GHz */
|
||||
band->vht_cap = vht_cap;
|
||||
}
|
||||
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->vht_cap = vht_cap;
|
||||
}
|
||||
@@ -5595,7 +5595,7 @@ static void ath10k_sta_rc_update_wk(struct work_struct *wk)
|
||||
struct ath10k_sta *arsta;
|
||||
struct ieee80211_sta *sta;
|
||||
struct cfg80211_chan_def def;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
u32 changed, bw, nss, smps;
|
||||
@@ -6394,14 +6394,14 @@ static int ath10k_get_survey(struct ieee80211_hw *hw, int idx,
|
||||
|
||||
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) {
|
||||
idx -= sband->n_channels;
|
||||
sband = NULL;
|
||||
}
|
||||
|
||||
if (!sband)
|
||||
sband = hw->wiphy->bands[IEEE80211_BAND_5GHZ];
|
||||
sband = hw->wiphy->bands[NL80211_BAND_5GHZ];
|
||||
|
||||
if (!sband || idx >= sband->n_channels) {
|
||||
ret = -ENOENT;
|
||||
@@ -6424,7 +6424,7 @@ exit:
|
||||
|
||||
static bool
|
||||
ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar,
|
||||
enum ieee80211_band band,
|
||||
enum nl80211_band band,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
{
|
||||
int num_rates = 0;
|
||||
@@ -6443,7 +6443,7 @@ ath10k_mac_bitrate_mask_has_single_rate(struct ath10k *ar,
|
||||
|
||||
static bool
|
||||
ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar,
|
||||
enum ieee80211_band band,
|
||||
enum nl80211_band band,
|
||||
const struct cfg80211_bitrate_mask *mask,
|
||||
int *nss)
|
||||
{
|
||||
@@ -6492,7 +6492,7 @@ ath10k_mac_bitrate_mask_get_single_nss(struct ath10k *ar,
|
||||
|
||||
static int
|
||||
ath10k_mac_bitrate_mask_get_single_rate(struct ath10k *ar,
|
||||
enum ieee80211_band band,
|
||||
enum nl80211_band band,
|
||||
const struct cfg80211_bitrate_mask *mask,
|
||||
u8 *rate, u8 *nss)
|
||||
{
|
||||
@@ -6593,7 +6593,7 @@ static int ath10k_mac_set_fixed_rate_params(struct ath10k_vif *arvif,
|
||||
|
||||
static bool
|
||||
ath10k_mac_can_set_bitrate_mask(struct ath10k *ar,
|
||||
enum ieee80211_band band,
|
||||
enum nl80211_band band,
|
||||
const struct cfg80211_bitrate_mask *mask)
|
||||
{
|
||||
int i;
|
||||
@@ -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 cfg80211_chan_def def;
|
||||
struct ath10k *ar = arvif->ar;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
const u8 *ht_mcs_mask;
|
||||
const u16 *vht_mcs_mask;
|
||||
u8 rate;
|
||||
@@ -7275,7 +7275,7 @@ static const struct ieee80211_ops ath10k_ops = {
|
||||
};
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
.band = IEEE80211_BAND_2GHZ, \
|
||||
.band = NL80211_BAND_2GHZ, \
|
||||
.hw_value = (_channel), \
|
||||
.center_freq = (_freq), \
|
||||
.flags = (_flags), \
|
||||
@@ -7284,7 +7284,7 @@ static const struct ieee80211_ops ath10k_ops = {
|
||||
}
|
||||
|
||||
#define CHAN5G(_channel, _freq, _flags) { \
|
||||
.band = IEEE80211_BAND_5GHZ, \
|
||||
.band = NL80211_BAND_5GHZ, \
|
||||
.hw_value = (_channel), \
|
||||
.center_freq = (_freq), \
|
||||
.flags = (_flags), \
|
||||
@@ -7604,13 +7604,13 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
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->channels = channels;
|
||||
band->n_bitrates = ath10k_g_rates_size;
|
||||
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) {
|
||||
@@ -7622,12 +7622,12 @@ int ath10k_mac_register(struct ath10k *ar)
|
||||
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->channels = channels;
|
||||
band->n_bitrates = ath10k_a_rates_size;
|
||||
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);
|
||||
@@ -7815,8 +7815,8 @@ err_dfs_detector_exit:
|
||||
ar->dfs_detector->exit(ar->dfs_detector);
|
||||
|
||||
err_free:
|
||||
kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
|
||||
kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
|
||||
kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
|
||||
kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels);
|
||||
|
||||
SET_IEEE80211_DEV(ar->hw, NULL);
|
||||
return ret;
|
||||
@@ -7829,8 +7829,8 @@ void ath10k_mac_unregister(struct ath10k *ar)
|
||||
if (config_enabled(CONFIG_ATH10K_DFS_CERTIFIED) && ar->dfs_detector)
|
||||
ar->dfs_detector->exit(ar->dfs_detector);
|
||||
|
||||
kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
|
||||
kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
|
||||
kfree(ar->mac.sbands[NL80211_BAND_2GHZ].channels);
|
||||
kfree(ar->mac.sbands[NL80211_BAND_5GHZ].channels);
|
||||
|
||||
SET_IEEE80211_DEV(ar->hw, NULL);
|
||||
}
|
||||
|
||||
@@ -2281,9 +2281,9 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)
|
||||
* of mgmt rx.
|
||||
*/
|
||||
if (channel >= 1 && channel <= 14) {
|
||||
status->band = IEEE80211_BAND_2GHZ;
|
||||
status->band = NL80211_BAND_2GHZ;
|
||||
} else if (channel >= 36 && channel <= 165) {
|
||||
status->band = IEEE80211_BAND_5GHZ;
|
||||
status->band = NL80211_BAND_5GHZ;
|
||||
} else {
|
||||
/* Shouldn't happen unless list of advertised channels to
|
||||
* mac80211 has been changed.
|
||||
@@ -2293,7 +2293,7 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)
|
||||
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");
|
||||
|
||||
sband = &ar->mac.sbands[status->band];
|
||||
@@ -2352,7 +2352,7 @@ static int freq_to_idx(struct ath10k *ar, int freq)
|
||||
struct ieee80211_supported_band *sband;
|
||||
int band, ch, idx = 0;
|
||||
|
||||
for (band = IEEE80211_BAND_2GHZ; band < IEEE80211_NUM_BANDS; band++) {
|
||||
for (band = NL80211_BAND_2GHZ; band < NUM_NL80211_BANDS; band++) {
|
||||
sband = ar->hw->wiphy->bands[band];
|
||||
if (!sband)
|
||||
continue;
|
||||
|
||||
@@ -279,7 +279,7 @@ ath5k_ani_raise_immunity(struct ath5k_hw *ah, struct ath5k_ani_state *as,
|
||||
if (as->firstep_level < ATH5K_ANI_MAX_FIRSTEP_LVL)
|
||||
ath5k_ani_set_firstep_level(ah, as->firstep_level + 1);
|
||||
return;
|
||||
} else if (ah->ah_current_channel->band == IEEE80211_BAND_2GHZ) {
|
||||
} else if (ah->ah_current_channel->band == NL80211_BAND_2GHZ) {
|
||||
/* beacon RSSI is low. in B/G mode turn of OFDM weak signal
|
||||
* detect and zero firstep level to maximize CCK sensitivity */
|
||||
ATH5K_DBG_UNLIMIT(ah, ATH5K_DEBUG_ANI,
|
||||
|
||||
@@ -1265,10 +1265,10 @@ struct ath5k_hw {
|
||||
void __iomem *iobase; /* address of the device */
|
||||
struct mutex lock; /* dev-level lock */
|
||||
struct ieee80211_hw *hw; /* IEEE 802.11 common */
|
||||
struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
|
||||
struct ieee80211_supported_band sbands[NUM_NL80211_BANDS];
|
||||
struct ieee80211_channel channels[ATH_CHAN_MAX];
|
||||
struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
|
||||
s8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
|
||||
struct ieee80211_rate rates[NUM_NL80211_BANDS][AR5K_MAX_RATES];
|
||||
s8 rate_idx[NUM_NL80211_BANDS][AR5K_MAX_RATES];
|
||||
enum nl80211_iftype opmode;
|
||||
|
||||
#ifdef CONFIG_ATH5K_DEBUG
|
||||
@@ -1532,7 +1532,7 @@ int ath5k_eeprom_mode_from_channel(struct ath5k_hw *ah,
|
||||
|
||||
/* Protocol Control Unit Functions */
|
||||
/* Helpers */
|
||||
int ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum ieee80211_band band,
|
||||
int ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum nl80211_band band,
|
||||
int len, struct ieee80211_rate *rate, bool shortpre);
|
||||
unsigned int ath5k_hw_get_default_slottime(struct ath5k_hw *ah);
|
||||
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);
|
||||
|
||||
/* PHY functions */
|
||||
/* Misc PHY functions */
|
||||
u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band);
|
||||
u16 ath5k_hw_radio_revision(struct ath5k_hw *ah, enum nl80211_band band);
|
||||
int ath5k_hw_phy_disable(struct ath5k_hw *ah);
|
||||
/* Gain_F optimization */
|
||||
enum ath5k_rfgain ath5k_hw_gainf_calibrate(struct ath5k_hw *ah);
|
||||
|
||||
@@ -152,7 +152,7 @@ int ath5k_hw_init(struct ath5k_hw *ah)
|
||||
ah->ah_phy_revision = ath5k_hw_reg_read(ah, AR5K_PHY_CHIP_ID) &
|
||||
0xffffffff;
|
||||
ah->ah_radio_5ghz_revision = ath5k_hw_radio_revision(ah,
|
||||
IEEE80211_BAND_5GHZ);
|
||||
NL80211_BAND_5GHZ);
|
||||
|
||||
/* Try to identify radio chip based on its srev */
|
||||
switch (ah->ah_radio_5ghz_revision & 0xf0) {
|
||||
@@ -160,14 +160,14 @@ int ath5k_hw_init(struct ath5k_hw *ah)
|
||||
ah->ah_radio = AR5K_RF5111;
|
||||
ah->ah_single_chip = false;
|
||||
ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah,
|
||||
IEEE80211_BAND_2GHZ);
|
||||
NL80211_BAND_2GHZ);
|
||||
break;
|
||||
case AR5K_SREV_RAD_5112:
|
||||
case AR5K_SREV_RAD_2112:
|
||||
ah->ah_radio = AR5K_RF5112;
|
||||
ah->ah_single_chip = false;
|
||||
ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah,
|
||||
IEEE80211_BAND_2GHZ);
|
||||
NL80211_BAND_2GHZ);
|
||||
break;
|
||||
case AR5K_SREV_RAD_2413:
|
||||
ah->ah_radio = AR5K_RF2413;
|
||||
@@ -204,7 +204,7 @@ int ath5k_hw_init(struct ath5k_hw *ah)
|
||||
ah->ah_radio = AR5K_RF5111;
|
||||
ah->ah_single_chip = false;
|
||||
ah->ah_radio_2ghz_revision = ath5k_hw_radio_revision(ah,
|
||||
IEEE80211_BAND_2GHZ);
|
||||
NL80211_BAND_2GHZ);
|
||||
} else if (ah->ah_mac_version == (AR5K_SREV_AR2425 >> 4) ||
|
||||
ah->ah_mac_version == (AR5K_SREV_AR2417 >> 4) ||
|
||||
ah->ah_phy_revision == AR5K_SREV_PHY_2425) {
|
||||
|
||||
@@ -268,15 +268,15 @@ static void ath5k_reg_notifier(struct wiphy *wiphy,
|
||||
* Returns true for the channel numbers used.
|
||||
*/
|
||||
#ifdef CONFIG_ATH5K_TEST_CHANNELS
|
||||
static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
|
||||
static bool ath5k_is_standard_channel(short chan, enum nl80211_band band)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#else
|
||||
static bool ath5k_is_standard_channel(short chan, enum ieee80211_band band)
|
||||
static bool ath5k_is_standard_channel(short chan, enum nl80211_band band)
|
||||
{
|
||||
if (band == IEEE80211_BAND_2GHZ && chan <= 14)
|
||||
if (band == NL80211_BAND_2GHZ && chan <= 14)
|
||||
return true;
|
||||
|
||||
return /* UNII 1,2 */
|
||||
@@ -297,18 +297,18 @@ ath5k_setup_channels(struct ath5k_hw *ah, struct ieee80211_channel *channels,
|
||||
unsigned int mode, unsigned int max)
|
||||
{
|
||||
unsigned int count, size, freq, ch;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
|
||||
switch (mode) {
|
||||
case AR5K_MODE_11A:
|
||||
/* 1..220, but 2GHz frequencies are filtered by check_channel */
|
||||
size = 220;
|
||||
band = IEEE80211_BAND_5GHZ;
|
||||
band = NL80211_BAND_5GHZ;
|
||||
break;
|
||||
case AR5K_MODE_11B:
|
||||
case AR5K_MODE_11G:
|
||||
size = 26;
|
||||
band = IEEE80211_BAND_2GHZ;
|
||||
band = NL80211_BAND_2GHZ;
|
||||
break;
|
||||
default:
|
||||
ATH5K_WARN(ah, "bad mode, not copying channels\n");
|
||||
@@ -363,13 +363,13 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
|
||||
int max_c, count_c = 0;
|
||||
int i;
|
||||
|
||||
BUILD_BUG_ON(ARRAY_SIZE(ah->sbands) < IEEE80211_NUM_BANDS);
|
||||
BUILD_BUG_ON(ARRAY_SIZE(ah->sbands) < NUM_NL80211_BANDS);
|
||||
max_c = ARRAY_SIZE(ah->channels);
|
||||
|
||||
/* 2GHz band */
|
||||
sband = &ah->sbands[IEEE80211_BAND_2GHZ];
|
||||
sband->band = IEEE80211_BAND_2GHZ;
|
||||
sband->bitrates = &ah->rates[IEEE80211_BAND_2GHZ][0];
|
||||
sband = &ah->sbands[NL80211_BAND_2GHZ];
|
||||
sband->band = NL80211_BAND_2GHZ;
|
||||
sband->bitrates = &ah->rates[NL80211_BAND_2GHZ][0];
|
||||
|
||||
if (test_bit(AR5K_MODE_11G, ah->ah_capabilities.cap_mode)) {
|
||||
/* G mode */
|
||||
@@ -381,7 +381,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
|
||||
sband->n_channels = ath5k_setup_channels(ah, sband->channels,
|
||||
AR5K_MODE_11G, max_c);
|
||||
|
||||
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
|
||||
hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
|
||||
count_c = sband->n_channels;
|
||||
max_c -= count_c;
|
||||
} else if (test_bit(AR5K_MODE_11B, ah->ah_capabilities.cap_mode)) {
|
||||
@@ -407,7 +407,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
|
||||
sband->n_channels = ath5k_setup_channels(ah, sband->channels,
|
||||
AR5K_MODE_11B, max_c);
|
||||
|
||||
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = sband;
|
||||
hw->wiphy->bands[NL80211_BAND_2GHZ] = sband;
|
||||
count_c = sband->n_channels;
|
||||
max_c -= count_c;
|
||||
}
|
||||
@@ -415,9 +415,9 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
|
||||
|
||||
/* 5GHz band, A mode */
|
||||
if (test_bit(AR5K_MODE_11A, ah->ah_capabilities.cap_mode)) {
|
||||
sband = &ah->sbands[IEEE80211_BAND_5GHZ];
|
||||
sband->band = IEEE80211_BAND_5GHZ;
|
||||
sband->bitrates = &ah->rates[IEEE80211_BAND_5GHZ][0];
|
||||
sband = &ah->sbands[NL80211_BAND_5GHZ];
|
||||
sband->band = NL80211_BAND_5GHZ;
|
||||
sband->bitrates = &ah->rates[NL80211_BAND_5GHZ][0];
|
||||
|
||||
memcpy(sband->bitrates, &ath5k_rates[4],
|
||||
sizeof(struct ieee80211_rate) * 8);
|
||||
@@ -427,7 +427,7 @@ ath5k_setup_bands(struct ieee80211_hw *hw)
|
||||
sband->n_channels = ath5k_setup_channels(ah, sband->channels,
|
||||
AR5K_MODE_11A, max_c);
|
||||
|
||||
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = sband;
|
||||
hw->wiphy->bands[NL80211_BAND_5GHZ] = sband;
|
||||
}
|
||||
ath5k_setup_rate_idx(ah, sband);
|
||||
|
||||
|
||||
@@ -1043,14 +1043,14 @@ ath5k_debug_dump_bands(struct ath5k_hw *ah)
|
||||
|
||||
BUG_ON(!ah->sbands);
|
||||
|
||||
for (b = 0; b < IEEE80211_NUM_BANDS; b++) {
|
||||
for (b = 0; b < NUM_NL80211_BANDS; b++) {
|
||||
struct ieee80211_supported_band *band = &ah->sbands[b];
|
||||
char bname[6];
|
||||
switch (band->band) {
|
||||
case IEEE80211_BAND_2GHZ:
|
||||
case NL80211_BAND_2GHZ:
|
||||
strcpy(bname, "2 GHz");
|
||||
break;
|
||||
case IEEE80211_BAND_5GHZ:
|
||||
case NL80211_BAND_5GHZ:
|
||||
strcpy(bname, "5 GHz");
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -110,7 +110,7 @@ static const unsigned int ack_rates_high[] =
|
||||
* bwmodes.
|
||||
*/
|
||||
int
|
||||
ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum ieee80211_band band,
|
||||
ath5k_hw_get_frame_duration(struct ath5k_hw *ah, enum nl80211_band band,
|
||||
int len, struct ieee80211_rate *rate, bool shortpre)
|
||||
{
|
||||
int sifs, preamble, plcp_bits, sym_time;
|
||||
@@ -221,7 +221,7 @@ ath5k_hw_get_default_sifs(struct ath5k_hw *ah)
|
||||
case AR5K_BWMODE_DEFAULT:
|
||||
sifs = AR5K_INIT_SIFS_DEFAULT_BG;
|
||||
default:
|
||||
if (channel->band == IEEE80211_BAND_5GHZ)
|
||||
if (channel->band == NL80211_BAND_5GHZ)
|
||||
sifs = AR5K_INIT_SIFS_DEFAULT_A;
|
||||
break;
|
||||
}
|
||||
@@ -279,7 +279,7 @@ ath5k_hw_write_rate_duration(struct ath5k_hw *ah)
|
||||
struct ieee80211_rate *rate;
|
||||
unsigned int i;
|
||||
/* 802.11g covers both OFDM and CCK */
|
||||
u8 band = IEEE80211_BAND_2GHZ;
|
||||
u8 band = NL80211_BAND_2GHZ;
|
||||
|
||||
/* Write rate duration table */
|
||||
for (i = 0; i < ah->sbands[band].n_bitrates; i++) {
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
/**
|
||||
* ath5k_hw_radio_revision() - Get the PHY Chip revision
|
||||
* @ah: The &struct ath5k_hw
|
||||
* @band: One of enum ieee80211_band
|
||||
* @band: One of enum nl80211_band
|
||||
*
|
||||
* Returns the revision number of a 2GHz, 5GHz or single chip
|
||||
* radio.
|
||||
*/
|
||||
u16
|
||||
ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band)
|
||||
ath5k_hw_radio_revision(struct ath5k_hw *ah, enum nl80211_band band)
|
||||
{
|
||||
unsigned int i;
|
||||
u32 srev;
|
||||
@@ -91,10 +91,10 @@ ath5k_hw_radio_revision(struct ath5k_hw *ah, enum ieee80211_band band)
|
||||
* Set the radio chip access register
|
||||
*/
|
||||
switch (band) {
|
||||
case IEEE80211_BAND_2GHZ:
|
||||
case NL80211_BAND_2GHZ:
|
||||
ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_2GHZ, AR5K_PHY(0));
|
||||
break;
|
||||
case IEEE80211_BAND_5GHZ:
|
||||
case NL80211_BAND_5GHZ:
|
||||
ath5k_hw_reg_write(ah, AR5K_PHY_SHIFT_5GHZ, AR5K_PHY(0));
|
||||
break;
|
||||
default:
|
||||
@@ -138,11 +138,11 @@ ath5k_channel_ok(struct ath5k_hw *ah, struct ieee80211_channel *channel)
|
||||
u16 freq = channel->center_freq;
|
||||
|
||||
/* Check if the channel is in our supported range */
|
||||
if (channel->band == IEEE80211_BAND_2GHZ) {
|
||||
if (channel->band == NL80211_BAND_2GHZ) {
|
||||
if ((freq >= ah->ah_capabilities.cap_range.range_2ghz_min) &&
|
||||
(freq <= ah->ah_capabilities.cap_range.range_2ghz_max))
|
||||
return true;
|
||||
} else if (channel->band == IEEE80211_BAND_5GHZ)
|
||||
} else if (channel->band == NL80211_BAND_5GHZ)
|
||||
if ((freq >= ah->ah_capabilities.cap_range.range_5ghz_min) &&
|
||||
(freq <= ah->ah_capabilities.cap_range.range_5ghz_max))
|
||||
return true;
|
||||
@@ -743,7 +743,7 @@ done:
|
||||
/**
|
||||
* ath5k_hw_rfgain_init() - Write initial RF gain settings to hw
|
||||
* @ah: The &struct ath5k_hw
|
||||
* @band: One of enum ieee80211_band
|
||||
* @band: One of enum nl80211_band
|
||||
*
|
||||
* Write initial RF gain table to set the RF sensitivity.
|
||||
*
|
||||
@@ -751,7 +751,7 @@ done:
|
||||
* with Gain_F calibration
|
||||
*/
|
||||
static int
|
||||
ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum ieee80211_band band)
|
||||
ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum nl80211_band band)
|
||||
{
|
||||
const struct ath5k_ini_rfgain *ath5k_rfg;
|
||||
unsigned int i, size, index;
|
||||
@@ -786,7 +786,7 @@ ath5k_hw_rfgain_init(struct ath5k_hw *ah, enum ieee80211_band band)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
index = (band == IEEE80211_BAND_2GHZ) ? 1 : 0;
|
||||
index = (band == NL80211_BAND_2GHZ) ? 1 : 0;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
AR5K_REG_WAIT(i);
|
||||
@@ -917,7 +917,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah,
|
||||
}
|
||||
|
||||
/* Set Output and Driver bias current (OB/DB) */
|
||||
if (channel->band == IEEE80211_BAND_2GHZ) {
|
||||
if (channel->band == NL80211_BAND_2GHZ) {
|
||||
|
||||
if (channel->hw_value == AR5K_MODE_11B)
|
||||
ee_mode = AR5K_EEPROM_MODE_11B;
|
||||
@@ -944,7 +944,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah,
|
||||
AR5K_RF_DB_2GHZ, true);
|
||||
|
||||
/* RF5111 always needs OB/DB for 5GHz, even if we use 2GHz */
|
||||
} else if ((channel->band == IEEE80211_BAND_5GHZ) ||
|
||||
} else if ((channel->band == NL80211_BAND_5GHZ) ||
|
||||
(ah->ah_radio == AR5K_RF5111)) {
|
||||
|
||||
/* For 11a, Turbo and XR we need to choose
|
||||
@@ -1145,7 +1145,7 @@ ath5k_hw_rfregs_init(struct ath5k_hw *ah,
|
||||
}
|
||||
|
||||
if (ah->ah_radio == AR5K_RF5413 &&
|
||||
channel->band == IEEE80211_BAND_2GHZ) {
|
||||
channel->band == NL80211_BAND_2GHZ) {
|
||||
|
||||
ath5k_hw_rfb_op(ah, rf_regs, 1, AR5K_RF_DERBY_CHAN_SEL_MODE,
|
||||
true);
|
||||
@@ -1270,7 +1270,7 @@ ath5k_hw_rf5111_channel(struct ath5k_hw *ah,
|
||||
*/
|
||||
data0 = data1 = 0;
|
||||
|
||||
if (channel->band == IEEE80211_BAND_2GHZ) {
|
||||
if (channel->band == NL80211_BAND_2GHZ) {
|
||||
/* Map 2GHz channel to 5GHz Atheros channel ID */
|
||||
ret = ath5k_hw_rf5111_chan2athchan(
|
||||
ieee80211_frequency_to_channel(channel->center_freq),
|
||||
@@ -1919,7 +1919,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah,
|
||||
/* Convert current frequency to fbin value (the same way channels
|
||||
* are stored on EEPROM, check out ath5k_eeprom_bin2freq) and scale
|
||||
* up by 2 so we can compare it later */
|
||||
if (channel->band == IEEE80211_BAND_2GHZ) {
|
||||
if (channel->band == NL80211_BAND_2GHZ) {
|
||||
chan_fbin = (channel->center_freq - 2300) * 10;
|
||||
freq_band = AR5K_EEPROM_BAND_2GHZ;
|
||||
} else {
|
||||
@@ -1983,7 +1983,7 @@ ath5k_hw_set_spur_mitigation_filter(struct ath5k_hw *ah,
|
||||
symbol_width = AR5K_SPUR_SYMBOL_WIDTH_BASE_100Hz / 4;
|
||||
break;
|
||||
default:
|
||||
if (channel->band == IEEE80211_BAND_5GHZ) {
|
||||
if (channel->band == NL80211_BAND_5GHZ) {
|
||||
/* Both sample_freq and chip_freq are 40MHz */
|
||||
spur_delta_phase = (spur_offset << 17) / 25;
|
||||
spur_freq_sigma_delta =
|
||||
|
||||
@@ -559,7 +559,7 @@ ath5k_hw_reset_tx_queue(struct ath5k_hw *ah, unsigned int queue)
|
||||
int ath5k_hw_set_ifs_intervals(struct ath5k_hw *ah, unsigned int slot_time)
|
||||
{
|
||||
struct ieee80211_channel *channel = ah->ah_current_channel;
|
||||
enum ieee80211_band band;
|
||||
enum nl80211_band band;
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct ieee80211_rate *rate;
|
||||
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)
|
||||
*
|
||||
* Also we have different lowest rate for 802.11a
|
||||
*/
|
||||
if (channel->band == IEEE80211_BAND_5GHZ)
|
||||
band = IEEE80211_BAND_5GHZ;
|
||||
if (channel->band == NL80211_BAND_5GHZ)
|
||||
band = NL80211_BAND_5GHZ;
|
||||
else
|
||||
band = IEEE80211_BAND_2GHZ;
|
||||
band = NL80211_BAND_2GHZ;
|
||||
|
||||
switch (ah->ah_bwmode) {
|
||||
case AR5K_BWMODE_5MHZ:
|
||||
|
||||
@@ -752,7 +752,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel)
|
||||
clock = AR5K_PHY_PLL_RF5111; /*Zero*/
|
||||
}
|
||||
|
||||
if (channel->band == IEEE80211_BAND_2GHZ) {
|
||||
if (channel->band == NL80211_BAND_2GHZ) {
|
||||
mode |= AR5K_PHY_MODE_FREQ_2GHZ;
|
||||
clock |= AR5K_PHY_PLL_44MHZ;
|
||||
|
||||
@@ -771,7 +771,7 @@ ath5k_hw_nic_wakeup(struct ath5k_hw *ah, struct ieee80211_channel *channel)
|
||||
else
|
||||
mode |= AR5K_PHY_MODE_MOD_DYN;
|
||||
}
|
||||
} else if (channel->band == IEEE80211_BAND_5GHZ) {
|
||||
} else if (channel->band == NL80211_BAND_5GHZ) {
|
||||
mode |= (AR5K_PHY_MODE_FREQ_5GHZ |
|
||||
AR5K_PHY_MODE_MOD_OFDM);
|
||||
|
||||
@@ -906,7 +906,7 @@ ath5k_hw_tweak_initval_settings(struct ath5k_hw *ah,
|
||||
u32 data;
|
||||
ath5k_hw_reg_write(ah, AR5K_PHY_CCKTXCTL_WORLD,
|
||||
AR5K_PHY_CCKTXCTL);
|
||||
if (channel->band == IEEE80211_BAND_5GHZ)
|
||||
if (channel->band == NL80211_BAND_5GHZ)
|
||||
data = 0xffb81020;
|
||||
else
|
||||
data = 0xffb80d20;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
.band = IEEE80211_BAND_2GHZ, \
|
||||
.band = NL80211_BAND_2GHZ, \
|
||||
.hw_value = (_channel), \
|
||||
.center_freq = (_freq), \
|
||||
.flags = (_flags), \
|
||||
@@ -43,7 +43,7 @@
|
||||
}
|
||||
|
||||
#define CHAN5G(_channel, _flags) { \
|
||||
.band = IEEE80211_BAND_5GHZ, \
|
||||
.band = NL80211_BAND_5GHZ, \
|
||||
.hw_value = (_channel), \
|
||||
.center_freq = 5000 + (5 * (_channel)), \
|
||||
.flags = (_flags), \
|
||||
@@ -2583,7 +2583,7 @@ void ath6kl_check_wow_status(struct ath6kl *ar)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum ieee80211_band band,
|
||||
static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum nl80211_band band,
|
||||
bool ht_enable)
|
||||
{
|
||||
struct ath6kl_htcap *htcap = &vif->htcap[band];
|
||||
@@ -2594,7 +2594,7 @@ static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum ieee80211_band band,
|
||||
if (ht_enable) {
|
||||
/* Set default ht capabilities */
|
||||
htcap->ht_enable = true;
|
||||
htcap->cap_info = (band == IEEE80211_BAND_2GHZ) ?
|
||||
htcap->cap_info = (band == NL80211_BAND_2GHZ) ?
|
||||
ath6kl_g_htcap : ath6kl_a_htcap;
|
||||
htcap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_16K;
|
||||
} else /* Disable ht */
|
||||
@@ -2609,7 +2609,7 @@ static int ath6kl_restore_htcap(struct ath6kl_vif *vif)
|
||||
struct wiphy *wiphy = vif->ar->wiphy;
|
||||
int band, ret = 0;
|
||||
|
||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||
if (!wiphy->bands[band])
|
||||
continue;
|
||||
|
||||
@@ -3530,7 +3530,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
|
||||
struct regulatory_request *request)
|
||||
{
|
||||
struct ath6kl *ar = wiphy_priv(wiphy);
|
||||
u32 rates[IEEE80211_NUM_BANDS];
|
||||
u32 rates[NUM_NL80211_BANDS];
|
||||
int ret, i;
|
||||
|
||||
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
|
||||
@@ -3555,7 +3555,7 @@ static void ath6kl_cfg80211_reg_notify(struct wiphy *wiphy,
|
||||
* changed.
|
||||
*/
|
||||
|
||||
for (i = 0; i < IEEE80211_NUM_BANDS; i++)
|
||||
for (i = 0; i < NUM_NL80211_BANDS; i++)
|
||||
if (wiphy->bands[i])
|
||||
rates[i] = (1 << wiphy->bands[i]->n_bitrates) - 1;
|
||||
|
||||
@@ -3791,8 +3791,8 @@ struct wireless_dev *ath6kl_interface_add(struct ath6kl *ar, const char *name,
|
||||
vif->listen_intvl_t = ATH6KL_DEFAULT_LISTEN_INTVAL;
|
||||
vif->bmiss_time_t = ATH6KL_DEFAULT_BMISS_TIME;
|
||||
vif->bg_scan_period = 0;
|
||||
vif->htcap[IEEE80211_BAND_2GHZ].ht_enable = true;
|
||||
vif->htcap[IEEE80211_BAND_5GHZ].ht_enable = true;
|
||||
vif->htcap[NL80211_BAND_2GHZ].ht_enable = true;
|
||||
vif->htcap[NL80211_BAND_5GHZ].ht_enable = true;
|
||||
|
||||
memcpy(ndev->dev_addr, ar->mac_addr, ETH_ALEN);
|
||||
if (fw_vif_idx != 0) {
|
||||
@@ -3943,9 +3943,9 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
|
||||
wiphy->available_antennas_rx = ar->hw.rx_ant;
|
||||
|
||||
if (band_2gig)
|
||||
wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz;
|
||||
wiphy->bands[NL80211_BAND_2GHZ] = &ath6kl_band_2ghz;
|
||||
if (band_5gig)
|
||||
wiphy->bands[IEEE80211_BAND_5GHZ] = &ath6kl_band_5ghz;
|
||||
wiphy->bands[NL80211_BAND_5GHZ] = &ath6kl_band_5ghz;
|
||||
|
||||
wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
|
||||
|
||||
|
||||
@@ -623,7 +623,7 @@ struct ath6kl_vif {
|
||||
struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
|
||||
struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1];
|
||||
struct aggr_info *aggr_cntxt;
|
||||
struct ath6kl_htcap htcap[IEEE80211_NUM_BANDS];
|
||||
struct ath6kl_htcap htcap[NUM_NL80211_BANDS];
|
||||
|
||||
struct timer_list disconnect_timer;
|
||||
struct timer_list sched_scan_timer;
|
||||
|
||||
@@ -2048,7 +2048,7 @@ int ath6kl_wmi_beginscan_cmd(struct wmi *wmi, u8 if_idx,
|
||||
sc->no_cck = cpu_to_le32(no_cck);
|
||||
sc->num_ch = num_chan;
|
||||
|
||||
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
|
||||
for (band = 0; band < NUM_NL80211_BANDS; band++) {
|
||||
sband = ar->wiphy->bands[band];
|
||||
|
||||
if (!sband)
|
||||
@@ -2770,10 +2770,10 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx,
|
||||
memset(&ratemask, 0, sizeof(ratemask));
|
||||
|
||||
/* only check 2.4 and 5 GHz bands, skip the rest */
|
||||
for (band = 0; band <= IEEE80211_BAND_5GHZ; band++) {
|
||||
for (band = 0; band <= NL80211_BAND_5GHZ; band++) {
|
||||
/* copy legacy rate mask */
|
||||
ratemask[band] = mask->control[band].legacy;
|
||||
if (band == IEEE80211_BAND_5GHZ)
|
||||
if (band == NL80211_BAND_5GHZ)
|
||||
ratemask[band] =
|
||||
mask->control[band].legacy << 4;
|
||||
|
||||
@@ -2799,9 +2799,9 @@ static int ath6kl_set_bitrate_mask64(struct wmi *wmi, u8 if_idx,
|
||||
if (mode == WMI_RATES_MODE_11A ||
|
||||
mode == WMI_RATES_MODE_11A_HT20 ||
|
||||
mode == WMI_RATES_MODE_11A_HT40)
|
||||
band = IEEE80211_BAND_5GHZ;
|
||||
band = NL80211_BAND_5GHZ;
|
||||
else
|
||||
band = IEEE80211_BAND_2GHZ;
|
||||
band = NL80211_BAND_2GHZ;
|
||||
cmd->ratemask[mode] = cpu_to_le64(ratemask[band]);
|
||||
}
|
||||
|
||||
@@ -2822,10 +2822,10 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx,
|
||||
memset(&ratemask, 0, sizeof(ratemask));
|
||||
|
||||
/* only check 2.4 and 5 GHz bands, skip the rest */
|
||||
for (band = 0; band <= IEEE80211_BAND_5GHZ; band++) {
|
||||
for (band = 0; band <= NL80211_BAND_5GHZ; band++) {
|
||||
/* copy legacy rate mask */
|
||||
ratemask[band] = mask->control[band].legacy;
|
||||
if (band == IEEE80211_BAND_5GHZ)
|
||||
if (band == NL80211_BAND_5GHZ)
|
||||
ratemask[band] =
|
||||
mask->control[band].legacy << 4;
|
||||
|
||||
@@ -2849,9 +2849,9 @@ static int ath6kl_set_bitrate_mask32(struct wmi *wmi, u8 if_idx,
|
||||
if (mode == WMI_RATES_MODE_11A ||
|
||||
mode == WMI_RATES_MODE_11A_HT20 ||
|
||||
mode == WMI_RATES_MODE_11A_HT40)
|
||||
band = IEEE80211_BAND_5GHZ;
|
||||
band = NL80211_BAND_5GHZ;
|
||||
else
|
||||
band = IEEE80211_BAND_2GHZ;
|
||||
band = NL80211_BAND_2GHZ;
|
||||
cmd->ratemask[mode] = cpu_to_le32(ratemask[band]);
|
||||
}
|
||||
|
||||
@@ -3174,7 +3174,7 @@ int ath6kl_wmi_set_keepalive_cmd(struct wmi *wmi, u8 if_idx,
|
||||
}
|
||||
|
||||
int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx,
|
||||
enum ieee80211_band band,
|
||||
enum nl80211_band band,
|
||||
struct ath6kl_htcap *htcap)
|
||||
{
|
||||
struct sk_buff *skb;
|
||||
@@ -3187,7 +3187,7 @@ int ath6kl_wmi_set_htcap_cmd(struct wmi *wmi, u8 if_idx,
|
||||
cmd = (struct wmi_set_htcap_cmd *) skb->data;
|
||||
|
||||
/*
|
||||
* NOTE: Band in firmware matches enum ieee80211_band, it is unlikely
|
||||
* NOTE: Band in firmware matches enum nl80211_band, it is unlikely
|
||||
* this will be changed in firmware. If at all there is any change in
|
||||
* band value, the host needs to be fixed.
|
||||
*/
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user