summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorAloka Dixit <quic_alokad@quicinc.com>2023-03-23 04:38:01 -0700
committerJohannes Berg <johannes.berg@intel.com>2023-03-24 11:12:48 +0100
commit68b9bea267bfc1259e195dcac1bf69db0c0c28da (patch)
tree4fc2a398fc374b2ad667e935129223bba0b35353 /net/mac80211/ieee80211_i.h
parentdbbb27e183b1568d5a907ace1cd144b0709ea52a (diff)
downloadlinux-stable-68b9bea267bfc1259e195dcac1bf69db0c0c28da.tar.gz
linux-stable-68b9bea267bfc1259e195dcac1bf69db0c0c28da.tar.bz2
linux-stable-68b9bea267bfc1259e195dcac1bf69db0c0c28da.zip
mac80211: support RNR for EMA AP
Generate EMA beacons, each including MBSSID and RNR elements at a given index. If number of stored RNR elements is more than the number of MBSSID elements then add those in every EMA beacon. Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com> Link: https://lore.kernel.org/r/20230323113801.6903-3-quic_alokad@quicinc.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 84d10e993eca..85ecbf57d64e 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -270,6 +270,7 @@ struct beacon_data {
u16 cntdwn_counter_offsets[IEEE80211_MAX_CNTDWN_COUNTERS_NUM];
u8 cntdwn_current_counter;
struct cfg80211_mbssid_elems *mbssid_ies;
+ struct cfg80211_rnr_elems *rnr_ies;
struct rcu_head rcu_head;
};
@@ -1186,20 +1187,34 @@ ieee80211_vif_get_shift(struct ieee80211_vif *vif)
}
static inline int
-ieee80211_get_mbssid_beacon_len(struct cfg80211_mbssid_elems *elems, u8 i)
+ieee80211_get_mbssid_beacon_len(struct cfg80211_mbssid_elems *elems,
+ struct cfg80211_rnr_elems *rnr_elems,
+ u8 i)
{
int len = 0;
if (!elems || !elems->cnt || i > elems->cnt)
return 0;
- if (i < elems->cnt)
- return elems->elem[i].len;
+ if (i < elems->cnt) {
+ len = elems->elem[i].len;
+ if (rnr_elems) {
+ len += rnr_elems->elem[i].len;
+ for (i = elems->cnt; i < rnr_elems->cnt; i++)
+ len += rnr_elems->elem[i].len;
+ }
+ return len;
+ }
/* i == elems->cnt, calculate total length of all MBSSID elements */
for (i = 0; i < elems->cnt; i++)
len += elems->elem[i].len;
+ if (rnr_elems) {
+ for (i = 0; i < rnr_elems->cnt; i++)
+ len += rnr_elems->elem[i].len;
+ }
+
return len;
}