diff options
author | Johannes Berg <johannes.berg@intel.com> | 2022-06-30 14:48:22 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-07-15 12:43:24 +0300 |
commit | 425f4b5fce7cdaaddbc9a9be9e6d1915679d63f9 (patch) | |
tree | a1d070b8e645ecdde3600a82f8157d9d8a452836 /net | |
parent | af4f2aa35a4429f75e87c876e05fba84920a152e (diff) | |
download | linux-425f4b5fce7cdaaddbc9a9be9e6d1915679d63f9.tar.xz |
wifi: mac80211: add API to parse multi-link element
Add the necessary API to parse the multi-link element in
the future. For now, link only to the element when found
so we can use it in the client-side code later.
Later, we'll need to fill this in to deal with element
fragmentation, parse the STA profile, etc.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 5 | ||||
-rw-r--r-- | net/mac80211/util.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index baaff4c7a79c..cb5b3f9a7d06 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -1658,6 +1658,7 @@ struct ieee802_11_elems { const struct ieee80211_aid_response_ie *aid_resp; const struct ieee80211_eht_cap_elem *eht_cap; const struct ieee80211_eht_operation *eht_operation; + const struct ieee80211_multi_link_elem *multi_link; /* length of them, respectively */ u8 ext_capab_len; @@ -2161,6 +2162,8 @@ static inline void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, * @bss: the BSS to parse this as, for multi-BSSID cases this can * represent a non-transmitting BSS in which case the data * for that non-transmitting BSS is returned + * @link_id: the link ID to parse elements for, if a STA profile + * is present in the multi-link element, or -1 to ignore */ struct ieee80211_elems_parse_params { const u8 *start; @@ -2169,6 +2172,7 @@ struct ieee80211_elems_parse_params { u64 filter; u32 crc; struct cfg80211_bss *bss; + int link_id; }; struct ieee802_11_elems * @@ -2186,6 +2190,7 @@ ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action, .filter = filter, .crc = crc, .bss = bss, + .link_id = -1, }; return ieee802_11_parse_elems_full(¶ms); diff --git a/net/mac80211/util.c b/net/mac80211/util.c index fc66b292b1c0..53826c663723 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1022,6 +1022,10 @@ static void ieee80211_parse_extension_element(u32 *crc, if (ieee80211_eht_oper_size_ok(data, len)) elems->eht_operation = data; break; + case WLAN_EID_EXT_EHT_MULTI_LINK: + if (ieee80211_mle_size_ok(data, len)) + elems->multi_link = (void *)data; + break; } } @@ -1524,6 +1528,7 @@ ieee802_11_parse_elems_full(struct ieee80211_elems_parse_params *params) .start = nontransmitted_profile, .len = nontransmitted_profile_len, .action = params->action, + .link_id = params->link_id, }; _ieee802_11_parse_elems_full(&sub, elems, NULL); |