mirror of
https://github.com/torvalds/linux.git
synced 2024-09-20 23:13:00 +00:00
wifi: mac80211: spectmgmt: simplify 6 GHz HE/EHT handling
Clean up the code here a bit to have only a single call to ieee80211_chandef_he_6ghz_oper() by using a local pointer variable for the difference. Link: https://msgid.link/20240312112048.94c421d767f9.Ia7ca2f315b392c74d39b44fa9eb872a2e62e75c1@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
b919099eba
commit
5930a9967c
|
@ -155,6 +155,7 @@ validate_chandef_by_6ghz_he_eht_oper(struct ieee80211_sub_if_data *sdata,
|
||||||
struct ieee80211_eht_operation _oper;
|
struct ieee80211_eht_operation _oper;
|
||||||
struct ieee80211_eht_operation_info _oper_info;
|
struct ieee80211_eht_operation_info _oper_info;
|
||||||
} __packed eht;
|
} __packed eht;
|
||||||
|
const struct ieee80211_eht_operation *eht_oper;
|
||||||
|
|
||||||
if (conn->mode < IEEE80211_CONN_MODE_HE) {
|
if (conn->mode < IEEE80211_CONN_MODE_HE) {
|
||||||
chandef->chan = NULL;
|
chandef->chan = NULL;
|
||||||
|
@ -203,20 +204,19 @@ validate_chandef_by_6ghz_he_eht_oper(struct ieee80211_sub_if_data *sdata,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conn->mode < IEEE80211_CONN_MODE_EHT) {
|
if (conn->mode < IEEE80211_CONN_MODE_EHT) {
|
||||||
if (!ieee80211_chandef_he_6ghz_oper(local, &he._oper,
|
eht_oper = NULL;
|
||||||
NULL, chandef))
|
|
||||||
chandef->chan = NULL;
|
|
||||||
} else {
|
} else {
|
||||||
eht._oper.params = IEEE80211_EHT_OPER_INFO_PRESENT;
|
eht._oper.params = IEEE80211_EHT_OPER_INFO_PRESENT;
|
||||||
eht._oper_info.control = he._6ghz_oper.control;
|
eht._oper_info.control = he._6ghz_oper.control;
|
||||||
eht._oper_info.ccfs0 = he._6ghz_oper.ccfs0;
|
eht._oper_info.ccfs0 = he._6ghz_oper.ccfs0;
|
||||||
eht._oper_info.ccfs1 = he._6ghz_oper.ccfs1;
|
eht._oper_info.ccfs1 = he._6ghz_oper.ccfs1;
|
||||||
|
eht_oper = &eht._oper;
|
||||||
|
}
|
||||||
|
|
||||||
if (!ieee80211_chandef_he_6ghz_oper(local, &he._oper,
|
if (!ieee80211_chandef_he_6ghz_oper(local, &he._oper,
|
||||||
&eht._oper, chandef))
|
eht_oper, chandef))
|
||||||
chandef->chan = NULL;
|
chandef->chan = NULL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
|
int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
|
||||||
struct ieee802_11_elems *elems,
|
struct ieee802_11_elems *elems,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user