Commit e8edb346 authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: simplify reasoning about EHT capa handling

Given the code in cfg80211, EHT capa cannot be non-NULL when
HE capa is NULL, but it's easier to reason about it if both
are checked and the compiler will likely integrate the check
with the previous one for HE capa anyway.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230301115906.7413d50d23bc.I6fef7484721be9bd5364f64921fc5e9168495f62@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 15f9b3ef
...@@ -1788,7 +1788,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local, ...@@ -1788,7 +1788,7 @@ static int sta_link_apply_parameters(struct ieee80211_local *local,
(void *)params->he_6ghz_capa, (void *)params->he_6ghz_capa,
link_sta); link_sta);
if (params->eht_capa) if (params->he_capa && params->eht_capa)
ieee80211_eht_cap_ie_to_sta_eht_cap(sdata, sband, ieee80211_eht_cap_ie_to_sta_eht_cap(sdata, sband,
(u8 *)params->he_capa, (u8 *)params->he_capa,
params->he_capa_len, params->he_capa_len,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment