2022-12-01 03:05:36

by Aloka Dixit

[permalink] [raw]
Subject: [PATCH 0/3] wifi: mac80211_hwsim: MBSSID and EMA support

Add support to test MBSSID and EMA beacon generation.

Patch #3 depends on following:
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

Aloka Dixit (3):
wifi: mac80211_hwsim: move beacon transmission to a separate function
wifi: mac80211_hwsim: Multiple BSSID support
wifi: mac80211_hwsim: EMA support

drivers/net/wireless/mac80211_hwsim.c | 83 +++++++++++++++++++--------
1 file changed, 58 insertions(+), 25 deletions(-)


base-commit: eceb024ee3eed1bacb5c32a4847269f2685e2ea4
prerequisite-patch-id: fcf54cc59b71b15010a88a080ee2b5f91d815d51
--
2.25.1


2022-12-01 03:05:47

by Aloka Dixit

[permalink] [raw]
Subject: [PATCH 3/3] wifi: mac80211_hwsim: EMA support

Add support enhanced multi-BSS advertisements (EMA)
for profile periodicity up to 3 beacons.

Signed-off-by: Aloka Dixit <[email protected]>
---
v1: depends on following
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

drivers/net/wireless/mac80211_hwsim.c | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 7cf9a7a364be..00b92d2936de 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2124,11 +2124,27 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
if (vif->mbssid_tx_vif && vif->mbssid_tx_vif != vif)
return;

- skb = ieee80211_beacon_get(hw, vif, link_id);
- if (!skb)
- return;
+ if (vif->bss_conf.ema_ap) {
+ struct ieee80211_ema_beacons *ema;
+ u8 i = 0;
+
+ ema = ieee80211_beacon_get_template_ema_list(hw, vif, link_id);
+ if (!ema || !ema->cnt)
+ return;
+
+ for (i = 0; i < ema->cnt; i++) {
+ __mac80211_hwsim_beacon_tx(link_conf, data, hw, vif,
+ ema->bcn[i].skb);
+ ema->bcn[i].skb = NULL; /* Already freed */
+ }
+ ieee80211_beacon_free_ema_list(ema);
+ } else {
+ skb = ieee80211_beacon_get(hw, vif, link_id);
+ if (!skb)
+ return;

- __mac80211_hwsim_beacon_tx(link_conf, data, hw, vif, skb);
+ __mac80211_hwsim_beacon_tx(link_conf, data, hw, vif, skb);
+ }

while ((skb = ieee80211_get_buffered_bc(hw, vif)) != NULL) {
mac80211_hwsim_tx_frame(hw, skb,
@@ -4408,6 +4424,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
}

hw->wiphy->mbssid_max_interfaces = 8;
+ hw->wiphy->ema_max_profile_periodicity = 3;

data->rx_rssi = DEFAULT_RX_RSSI;

--
2.25.1