mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan
Drivers that don't use chanctxes cannot perform VHT association because they still use a "backward compatibility" pair of {ieee80211_channel, nl80211_channel_type} in ieee80211_conf and ieee80211_local. Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com> [fix kernel-doc] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
219c38674c
commit
675a0b049a
@@ -654,8 +654,9 @@ static ssize_t carl9170_debugfs_bug_write(struct ar9170 *ar, const char *buf,
|
||||
goto out;
|
||||
|
||||
case 'P':
|
||||
err = carl9170_set_channel(ar, ar->hw->conf.channel,
|
||||
ar->hw->conf.channel_type, CARL9170_RFI_COLD);
|
||||
err = carl9170_set_channel(ar, ar->hw->conf.chandef.chan,
|
||||
cfg80211_get_chandef_type(&ar->hw->conf.chandef),
|
||||
CARL9170_RFI_COLD);
|
||||
if (err < 0)
|
||||
count = err;
|
||||
|
||||
|
@@ -48,7 +48,7 @@ int carl9170_set_dyn_sifs_ack(struct ar9170 *ar)
|
||||
if (conf_is_ht40(&ar->hw->conf))
|
||||
val = 0x010a;
|
||||
else {
|
||||
if (ar->hw->conf.channel->band == IEEE80211_BAND_2GHZ)
|
||||
if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
|
||||
val = 0x105;
|
||||
else
|
||||
val = 0x104;
|
||||
@@ -66,7 +66,7 @@ int carl9170_set_rts_cts_rate(struct ar9170 *ar)
|
||||
rts_rate = 0x1da;
|
||||
cts_rate = 0x10a;
|
||||
} else {
|
||||
if (ar->hw->conf.channel->band == IEEE80211_BAND_2GHZ) {
|
||||
if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) {
|
||||
/* 11 mbit CCK */
|
||||
rts_rate = 033;
|
||||
cts_rate = 003;
|
||||
@@ -93,7 +93,7 @@ int carl9170_set_slot_time(struct ar9170 *ar)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((ar->hw->conf.channel->band == IEEE80211_BAND_5GHZ) ||
|
||||
if ((ar->hw->conf.chandef.chan->band == IEEE80211_BAND_5GHZ) ||
|
||||
vif->bss_conf.use_short_slot)
|
||||
slottime = 9;
|
||||
|
||||
@@ -120,7 +120,7 @@ int carl9170_set_mac_rates(struct ar9170 *ar)
|
||||
basic |= (vif->bss_conf.basic_rates & 0xff0) << 4;
|
||||
rcu_read_unlock();
|
||||
|
||||
if (ar->hw->conf.channel->band == IEEE80211_BAND_5GHZ)
|
||||
if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_5GHZ)
|
||||
mandatory = 0xff00; /* OFDM 6/9/12/18/24/36/48/54 */
|
||||
else
|
||||
mandatory = 0xff0f; /* OFDM (6/9../54) + CCK (1/2/5.5/11) */
|
||||
|
@@ -929,6 +929,9 @@ static int carl9170_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
|
||||
enum nl80211_channel_type channel_type =
|
||||
cfg80211_get_chandef_type(&hw->conf.chandef);
|
||||
|
||||
/* adjust slot time for 5 GHz */
|
||||
err = carl9170_set_slot_time(ar);
|
||||
if (err)
|
||||
@@ -938,8 +941,8 @@ static int carl9170_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = carl9170_set_channel(ar, hw->conf.channel,
|
||||
hw->conf.channel_type, CARL9170_RFI_NONE);
|
||||
err = carl9170_set_channel(ar, hw->conf.chandef.chan,
|
||||
channel_type, CARL9170_RFI_NONE);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
@@ -957,7 +960,7 @@ static int carl9170_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_POWER) {
|
||||
err = carl9170_set_mac_tpc(ar, ar->hw->conf.channel);
|
||||
err = carl9170_set_mac_tpc(ar, ar->hw->conf.chandef.chan);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
|
@@ -1331,7 +1331,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw)
|
||||
* CTL_ETSI for 2GHz and CTL_FCC for 5GHz.
|
||||
*/
|
||||
ctl_grp = ath_regd_get_band_ctl(&ar->common.regulatory,
|
||||
ar->hw->conf.channel->band);
|
||||
ar->hw->conf.chandef.chan->band);
|
||||
|
||||
/* ctl group not found - either invalid band (NO_CTL) or ww roaming */
|
||||
if (ctl_grp == NO_CTL || ctl_grp == SD_NO_CTL)
|
||||
@@ -1341,7 +1341,7 @@ static void carl9170_calc_ctl(struct ar9170 *ar, u32 freq, enum carl9170_bw bw)
|
||||
/* skip CTL and heavy clip for CTL_MKK and CTL_ETSI */
|
||||
return;
|
||||
|
||||
if (ar->hw->conf.channel->band == IEEE80211_BAND_2GHZ) {
|
||||
if (ar->hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ) {
|
||||
modes = mode_list_2ghz;
|
||||
nr_modes = ARRAY_SIZE(mode_list_2ghz);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user