Commit c37ab22b authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: use correct iftype HE cap

We already check that the right iftype capa exists,
but then don't use it. Assign it to a variable so we
can actually use it, and then do that.

Fixes: bac2fd3d ("mac80211: remove use of ieee80211_get_he_sta_cap()")
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/20230604120651.0e908e5c5fdd.Iac142549a6144ac949ebd116b921a59ae5282735@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent ead44902
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* HE handling * HE handling
* *
* Copyright(c) 2017 Intel Deutschland GmbH * Copyright(c) 2017 Intel Deutschland GmbH
* Copyright(c) 2019 - 2022 Intel Corporation * Copyright(c) 2019 - 2023 Intel Corporation
*/ */
#include "ieee80211_i.h" #include "ieee80211_i.h"
...@@ -114,6 +114,7 @@ ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata, ...@@ -114,6 +114,7 @@ ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
struct link_sta_info *link_sta) struct link_sta_info *link_sta)
{ {
struct ieee80211_sta_he_cap *he_cap = &link_sta->pub->he_cap; struct ieee80211_sta_he_cap *he_cap = &link_sta->pub->he_cap;
const struct ieee80211_sta_he_cap *own_he_cap_ptr;
struct ieee80211_sta_he_cap own_he_cap; struct ieee80211_sta_he_cap own_he_cap;
struct ieee80211_he_cap_elem *he_cap_ie_elem = (void *)he_cap_ie; struct ieee80211_he_cap_elem *he_cap_ie_elem = (void *)he_cap_ie;
u8 he_ppe_size; u8 he_ppe_size;
...@@ -123,12 +124,16 @@ ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata, ...@@ -123,12 +124,16 @@ ieee80211_he_cap_ie_to_sta_he_cap(struct ieee80211_sub_if_data *sdata,
memset(he_cap, 0, sizeof(*he_cap)); memset(he_cap, 0, sizeof(*he_cap));
if (!he_cap_ie || if (!he_cap_ie)
!ieee80211_get_he_iftype_cap(sband,
ieee80211_vif_type_p2p(&sdata->vif)))
return; return;
own_he_cap = sband->iftype_data->he_cap; own_he_cap_ptr =
ieee80211_get_he_iftype_cap(sband,
ieee80211_vif_type_p2p(&sdata->vif));
if (!own_he_cap_ptr)
return;
own_he_cap = *own_he_cap_ptr;
/* Make sure size is OK */ /* Make sure size is OK */
mcs_nss_size = ieee80211_he_mcs_nss_size(he_cap_ie_elem); mcs_nss_size = ieee80211_he_mcs_nss_size(he_cap_ie_elem);
......
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