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:

committato da
Johannes Berg

parent
219c38674c
commit
675a0b049a
@@ -691,7 +691,7 @@ int rtlwifi_rate_mapping(struct ieee80211_hw *hw,
|
||||
int rate_idx;
|
||||
|
||||
if (false == isht) {
|
||||
if (IEEE80211_BAND_2GHZ == hw->conf.channel->band) {
|
||||
if (IEEE80211_BAND_2GHZ == hw->conf.chandef.chan->band) {
|
||||
switch (desc_rate) {
|
||||
case DESC92_RATE1M:
|
||||
rate_idx = 0;
|
||||
@@ -1365,7 +1365,7 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
|
||||
rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
|
||||
|
||||
info->control.rates[0].idx = 0;
|
||||
info->band = hw->conf.channel->band;
|
||||
info->band = hw->conf.chandef.chan->band;
|
||||
rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc);
|
||||
}
|
||||
err_free:
|
||||
|
@@ -320,7 +320,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
}
|
||||
|
||||
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
|
||||
struct ieee80211_channel *channel = hw->conf.channel;
|
||||
struct ieee80211_channel *channel = hw->conf.chandef.chan;
|
||||
u8 wide_chan = (u8) channel->hw_value;
|
||||
|
||||
/*
|
||||
@@ -332,7 +332,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
*info for cisco1253 bw20, so we modify
|
||||
*it here based on UPPER & LOWER
|
||||
*/
|
||||
switch (hw->conf.channel_type) {
|
||||
switch (cfg80211_get_chandef_type(&hw->conf.chandef)) {
|
||||
case NL80211_CHAN_HT20:
|
||||
case NL80211_CHAN_NO_HT:
|
||||
/* SC */
|
||||
@@ -390,7 +390,7 @@ static int rtl_op_config(struct ieee80211_hw *hw, u32 changed)
|
||||
rtlpriv->cfg->ops->switch_channel(hw);
|
||||
rtlpriv->cfg->ops->set_channel_access(hw);
|
||||
rtlpriv->cfg->ops->set_bw_mode(hw,
|
||||
hw->conf.channel_type);
|
||||
cfg80211_get_chandef_type(&hw->conf.chandef));
|
||||
}
|
||||
|
||||
mutex_unlock(&rtlpriv->locks.conf_mutex);
|
||||
|
@@ -544,8 +544,8 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
|
||||
stats->timestamp_low = GET_RX_DESC_TSFL(pdesc);
|
||||
stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc);
|
||||
|
||||
rx_status->freq = hw->conf.channel->center_freq;
|
||||
rx_status->band = hw->conf.channel->band;
|
||||
rx_status->freq = hw->conf.chandef.chan->center_freq;
|
||||
rx_status->band = hw->conf.chandef.chan->band;
|
||||
|
||||
if (GET_RX_DESC_CRC32(pdesc))
|
||||
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
|
@@ -324,8 +324,8 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,
|
||||
&& (GET_RX_DESC_FAGGR(pdesc) == 1));
|
||||
stats->timestamp_low = GET_RX_DESC_TSFL(pdesc);
|
||||
stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc);
|
||||
rx_status->freq = hw->conf.channel->center_freq;
|
||||
rx_status->band = hw->conf.channel->band;
|
||||
rx_status->freq = hw->conf.chandef.chan->center_freq;
|
||||
rx_status->band = hw->conf.chandef.chan->band;
|
||||
if (GET_RX_DESC_CRC32(pdesc))
|
||||
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
if (!GET_RX_DESC_SWDEC(pdesc))
|
||||
@@ -395,8 +395,8 @@ static void _rtl_rx_process(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
stats.rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(rxdesc);
|
||||
/* TODO: is center_freq changed when doing scan? */
|
||||
/* TODO: Shall we add protection or just skip those two step? */
|
||||
rx_status->freq = hw->conf.channel->center_freq;
|
||||
rx_status->band = hw->conf.channel->band;
|
||||
rx_status->freq = hw->conf.chandef.chan->center_freq;
|
||||
rx_status->band = hw->conf.chandef.chan->band;
|
||||
if (GET_RX_DESC_CRC32(rxdesc))
|
||||
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
if (!GET_RX_DESC_SWDEC(rxdesc))
|
||||
|
@@ -499,8 +499,8 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
&& (GET_RX_DESC_FAGGR(pdesc) == 1));
|
||||
stats->timestamp_low = GET_RX_DESC_TSFL(pdesc);
|
||||
stats->rx_is40Mhzpacket = (bool) GET_RX_DESC_BW(pdesc);
|
||||
rx_status->freq = hw->conf.channel->center_freq;
|
||||
rx_status->band = hw->conf.channel->band;
|
||||
rx_status->freq = hw->conf.chandef.chan->center_freq;
|
||||
rx_status->band = hw->conf.chandef.chan->band;
|
||||
if (GET_RX_DESC_CRC32(pdesc))
|
||||
rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
|
||||
if (!GET_RX_DESC_SWDEC(pdesc))
|
||||
|
@@ -538,8 +538,8 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
|
||||
if (stats->hwerror)
|
||||
return false;
|
||||
|
||||
rx_status->freq = hw->conf.channel->center_freq;
|
||||
rx_status->band = hw->conf.channel->band;
|
||||
rx_status->freq = hw->conf.chandef.chan->center_freq;
|
||||
rx_status->band = hw->conf.chandef.chan->band;
|
||||
|
||||
hdr = (struct ieee80211_hdr *)(skb->data + stats->rx_drvinfo_size
|
||||
+ stats->rx_bufshift);
|
||||
|
@@ -304,8 +304,8 @@ bool rtl8723ae_rx_query_desc(struct ieee80211_hw *hw,
|
||||
|
||||
status->is_cck = RTL8723E_RX_HAL_IS_CCK_RATE(status->rate);
|
||||
|
||||
rx_status->freq = hw->conf.channel->center_freq;
|
||||
rx_status->band = hw->conf.channel->band;
|
||||
rx_status->freq = hw->conf.chandef.chan->center_freq;
|
||||
rx_status->band = hw->conf.chandef.chan->band;
|
||||
|
||||
hdr = (struct ieee80211_hdr *)(skb->data + status->rx_drvinfo_size
|
||||
+ status->rx_bufshift);
|
||||
|
Fai riferimento in un nuovo problema
Block a user