@@ -4744,12 +4744,17 @@ void ieee80211_report_low_ack(struct ieee80211_sta *sta, u32 num_packets);
* @csa_counter_offs: array of IEEE80211_MAX_CSA_COUNTERS_NUM offsets
* to CSA counters. This array can contain zero values which
* should be ignored.
+ * @mbssid_offset: position of mbssid_offset
+ * @mbssid_length: position of mbssid_offset
*/
struct ieee80211_mutable_offsets {
u16 tim_offset;
u16 tim_length;
u16 csa_counter_offs[IEEE80211_MAX_CSA_COUNTERS_NUM];
+
+ u16 multiple_bssid_offset;
+ u16 multiple_bssid_length;
};
/**
@@ -1523,6 +1523,7 @@ struct ieee802_11_elems {
u8 dtim_count;
u8 dtim_period;
const struct ieee80211_addba_ext_ie *addba_ext_ie;
+ u16 multiple_bssid_offset;
/* length of them, respectively */
u8 ext_capab_len;
@@ -1543,6 +1544,7 @@ struct ieee802_11_elems {
u8 perr_len;
u8 country_elem_len;
u8 bssid_index_len;
+ u8 multiple_bssid_len;
/* whether a parse error occurred while retrieving these elements */
bool parse_error;
@@ -4785,11 +4785,21 @@ __ieee80211_beacon_get(struct ieee80211_hw *hw,
is_template);
if (offs) {
+ struct ieee802_11_elems elems;
+
offs->tim_offset = beacon->head_len;
offs->tim_length = skb->len - beacon->head_len;
/* for AP the csa offsets are from tail */
csa_off_base = skb->len;
+
+ ieee802_11_parse_elems(skb->head, skb->len, true, &elems,
+ sdata->wdev.address, NULL);
+ if (!elems.parse_error)
+ goto out;
+
+ offs->multiple_bssid_offset = elems.multiple_bssid_offset;
+ offs->multiple_bssid_length = elems.multiple_bssid_len;
}
if (beacon->tail)
@@ -1315,6 +1315,10 @@ _ieee802_11_parse_elems_crc(const u8 *start, size_t len, bool action,
&crc : NULL,
elem, elems);
break;
+ case WLAN_EID_MULTIPLE_BSSID:
+ elems->multiple_bssid_offset = pos - start;
+ elems->multiple_bssid_len = elen;
+ break;
default:
break;
}
Drivers might need to know the offset and length of the IE. Add parsing code and propagate the values to the driver using the mutable struct. Signed-off-by: John Crispin <john@phrozen.org> --- include/net/mac80211.h | 5 +++++ net/mac80211/ieee80211_i.h | 2 ++ net/mac80211/tx.c | 10 ++++++++++ net/mac80211/util.c | 4 ++++ 4 files changed, 21 insertions(+)