summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2024-01-29 20:19:35 +0100
committerJohannes Berg <johannes.berg@intel.com>2024-02-08 15:00:44 +0100
commit28aa895bb0b324ed4a0cb441e5fbb882befb5e1c (patch)
treedebb16d61415fa26733ea5942250209de733fc01 /net/mac80211/mesh.c
parentwifi: mac80211: move element parsing to a new file (diff)
downloadlinux-28aa895bb0b324ed4a0cb441e5fbb882befb5e1c.tar.xz
linux-28aa895bb0b324ed4a0cb441e5fbb882befb5e1c.zip
wifi: mac80211: convert ieee80211_ie_build_he_cap() to SKB use
Convert ieee80211_ie_build_he_cap() to the SKB-put function style, renaming it to ieee80211_put_he_cap(). Link: https://msgid.link/20240129202041.e6ef888980d9.Ied9e014314b5d27611e693e3d4cb63bdc8d7de17@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r--net/mac80211/mesh.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 7e860486c6bc..cb217657c42e 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -567,29 +567,18 @@ int mesh_add_vht_oper_ie(struct ieee80211_sub_if_data *sdata,
int mesh_add_he_cap_ie(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, u8 ie_len)
{
- const struct ieee80211_sta_he_cap *he_cap;
struct ieee80211_supported_band *sband;
- u8 *pos;
sband = ieee80211_get_sband(sdata);
if (!sband)
return -EINVAL;
- he_cap = ieee80211_get_he_iftype_cap(sband, NL80211_IFTYPE_MESH_POINT);
-
- if (!he_cap ||
- sdata->vif.bss_conf.chanreq.oper.width == NL80211_CHAN_WIDTH_20_NOHT ||
+ if (sdata->vif.bss_conf.chanreq.oper.width == NL80211_CHAN_WIDTH_20_NOHT ||
sdata->vif.bss_conf.chanreq.oper.width == NL80211_CHAN_WIDTH_5 ||
sdata->vif.bss_conf.chanreq.oper.width == NL80211_CHAN_WIDTH_10)
return 0;
- if (skb_tailroom(skb) < ie_len)
- return -ENOMEM;
-
- pos = skb_put(skb, ie_len);
- ieee80211_ie_build_he_cap(NULL, he_cap, pos, pos + ie_len);
-
- return 0;
+ return ieee80211_put_he_cap(skb, sdata, sband, NULL);
}
int mesh_add_he_oper_ie(struct ieee80211_sub_if_data *sdata,