mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-11 15:49:56 +00:00
ieee80211: rename CCFS1/CCFS2 to CCFS0/CCFS1
This matches the spec, and otherwise things are really confusing with the next patch adding CCFS2. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
68506e9af1
commit
2fb51c3581
@ -349,7 +349,7 @@ static int mwifiex_tdls_add_vht_oper(struct mwifiex_private *priv,
|
|||||||
chan_bw = IEEE80211_VHT_CHANWIDTH_USE_HT;
|
chan_bw = IEEE80211_VHT_CHANWIDTH_USE_HT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
vht_oper->center_freq_seg1_idx =
|
vht_oper->center_freq_seg0_idx =
|
||||||
mwifiex_get_center_freq_index(priv, BAND_AAC,
|
mwifiex_get_center_freq_index(priv, BAND_AAC,
|
||||||
bss_desc->channel,
|
bss_desc->channel,
|
||||||
chan_bw);
|
chan_bw);
|
||||||
|
@ -1525,14 +1525,14 @@ enum ieee80211_vht_chanwidth {
|
|||||||
* This structure is the "VHT operation element" as
|
* This structure is the "VHT operation element" as
|
||||||
* described in 802.11ac D3.0 8.4.2.161
|
* described in 802.11ac D3.0 8.4.2.161
|
||||||
* @chan_width: Operating channel width
|
* @chan_width: Operating channel width
|
||||||
|
* @center_freq_seg0_idx: center freq segment 0 index
|
||||||
* @center_freq_seg1_idx: center freq segment 1 index
|
* @center_freq_seg1_idx: center freq segment 1 index
|
||||||
* @center_freq_seg2_idx: center freq segment 2 index
|
|
||||||
* @basic_mcs_set: VHT Basic MCS rate set
|
* @basic_mcs_set: VHT Basic MCS rate set
|
||||||
*/
|
*/
|
||||||
struct ieee80211_vht_operation {
|
struct ieee80211_vht_operation {
|
||||||
u8 chan_width;
|
u8 chan_width;
|
||||||
|
u8 center_freq_seg0_idx;
|
||||||
u8 center_freq_seg1_idx;
|
u8 center_freq_seg1_idx;
|
||||||
u8 center_freq_seg2_idx;
|
|
||||||
__le16 basic_mcs_set;
|
__le16 basic_mcs_set;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
|
@ -132,9 +132,9 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
|
|||||||
struct ieee80211_vht_operation vht_oper = {
|
struct ieee80211_vht_operation vht_oper = {
|
||||||
.chan_width =
|
.chan_width =
|
||||||
wide_bw_chansw_ie->new_channel_width,
|
wide_bw_chansw_ie->new_channel_width,
|
||||||
.center_freq_seg1_idx =
|
.center_freq_seg0_idx =
|
||||||
wide_bw_chansw_ie->new_center_freq_seg0,
|
wide_bw_chansw_ie->new_center_freq_seg0,
|
||||||
.center_freq_seg2_idx =
|
.center_freq_seg1_idx =
|
||||||
wide_bw_chansw_ie->new_center_freq_seg1,
|
wide_bw_chansw_ie->new_center_freq_seg1,
|
||||||
/* .basic_mcs_set doesn't matter */
|
/* .basic_mcs_set doesn't matter */
|
||||||
};
|
};
|
||||||
|
@ -2413,13 +2413,13 @@ u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
|
|||||||
*pos++ = WLAN_EID_VHT_OPERATION;
|
*pos++ = WLAN_EID_VHT_OPERATION;
|
||||||
*pos++ = sizeof(struct ieee80211_vht_operation);
|
*pos++ = sizeof(struct ieee80211_vht_operation);
|
||||||
vht_oper = (struct ieee80211_vht_operation *)pos;
|
vht_oper = (struct ieee80211_vht_operation *)pos;
|
||||||
vht_oper->center_freq_seg1_idx = ieee80211_frequency_to_channel(
|
vht_oper->center_freq_seg0_idx = ieee80211_frequency_to_channel(
|
||||||
chandef->center_freq1);
|
chandef->center_freq1);
|
||||||
if (chandef->center_freq2)
|
if (chandef->center_freq2)
|
||||||
vht_oper->center_freq_seg2_idx =
|
vht_oper->center_freq_seg1_idx =
|
||||||
ieee80211_frequency_to_channel(chandef->center_freq2);
|
ieee80211_frequency_to_channel(chandef->center_freq2);
|
||||||
else
|
else
|
||||||
vht_oper->center_freq_seg2_idx = 0x00;
|
vht_oper->center_freq_seg1_idx = 0x00;
|
||||||
|
|
||||||
switch (chandef->width) {
|
switch (chandef->width) {
|
||||||
case NL80211_CHAN_WIDTH_160:
|
case NL80211_CHAN_WIDTH_160:
|
||||||
@ -2428,11 +2428,11 @@ u8 *ieee80211_ie_build_vht_oper(u8 *pos, struct ieee80211_sta_vht_cap *vht_cap,
|
|||||||
* workaround.
|
* workaround.
|
||||||
*/
|
*/
|
||||||
vht_oper->chan_width = IEEE80211_VHT_CHANWIDTH_80MHZ;
|
vht_oper->chan_width = IEEE80211_VHT_CHANWIDTH_80MHZ;
|
||||||
vht_oper->center_freq_seg2_idx = vht_oper->center_freq_seg1_idx;
|
vht_oper->center_freq_seg1_idx = vht_oper->center_freq_seg0_idx;
|
||||||
if (chandef->chan->center_freq < chandef->center_freq1)
|
if (chandef->chan->center_freq < chandef->center_freq1)
|
||||||
vht_oper->center_freq_seg1_idx -= 8;
|
vht_oper->center_freq_seg0_idx -= 8;
|
||||||
else
|
else
|
||||||
vht_oper->center_freq_seg1_idx += 8;
|
vht_oper->center_freq_seg0_idx += 8;
|
||||||
break;
|
break;
|
||||||
case NL80211_CHAN_WIDTH_80P80:
|
case NL80211_CHAN_WIDTH_80P80:
|
||||||
/*
|
/*
|
||||||
@ -2491,9 +2491,9 @@ bool ieee80211_chandef_vht_oper(const struct ieee80211_vht_operation *oper,
|
|||||||
if (!oper)
|
if (!oper)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
cf1 = ieee80211_channel_to_frequency(oper->center_freq_seg1_idx,
|
cf1 = ieee80211_channel_to_frequency(oper->center_freq_seg0_idx,
|
||||||
chandef->chan->band);
|
chandef->chan->band);
|
||||||
cf2 = ieee80211_channel_to_frequency(oper->center_freq_seg2_idx,
|
cf2 = ieee80211_channel_to_frequency(oper->center_freq_seg1_idx,
|
||||||
chandef->chan->band);
|
chandef->chan->band);
|
||||||
|
|
||||||
switch (oper->chan_width) {
|
switch (oper->chan_width) {
|
||||||
@ -2503,11 +2503,11 @@ bool ieee80211_chandef_vht_oper(const struct ieee80211_vht_operation *oper,
|
|||||||
new.width = NL80211_CHAN_WIDTH_80;
|
new.width = NL80211_CHAN_WIDTH_80;
|
||||||
new.center_freq1 = cf1;
|
new.center_freq1 = cf1;
|
||||||
/* If needed, adjust based on the newer interop workaround. */
|
/* If needed, adjust based on the newer interop workaround. */
|
||||||
if (oper->center_freq_seg2_idx) {
|
if (oper->center_freq_seg1_idx) {
|
||||||
unsigned int diff;
|
unsigned int diff;
|
||||||
|
|
||||||
diff = abs(oper->center_freq_seg2_idx -
|
diff = abs(oper->center_freq_seg1_idx -
|
||||||
oper->center_freq_seg1_idx);
|
oper->center_freq_seg0_idx);
|
||||||
if (diff == 8) {
|
if (diff == 8) {
|
||||||
new.width = NL80211_CHAN_WIDTH_160;
|
new.width = NL80211_CHAN_WIDTH_160;
|
||||||
new.center_freq1 = cf2;
|
new.center_freq1 = cf2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user