Commit 0dd45ebc authored by Aloka Dixit's avatar Aloka Dixit Committed by Johannes Berg

wifi: mac80211_hwsim: EMA support

Add support enhanced multi-BSS advertisements (EMA)
for profile periodicity up to 3 beacons.
Signed-off-by: default avatarAloka Dixit <quic_alokad@quicinc.com>
Link: https://lore.kernel.org/r/20221206005040.3177-5-quic_alokad@quicinc.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c4f4d9f7
...@@ -2125,11 +2125,27 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac, ...@@ -2125,11 +2125,27 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
if (vif->mbssid_tx_vif && vif->mbssid_tx_vif != vif) if (vif->mbssid_tx_vif && vif->mbssid_tx_vif != vif)
return; return;
skb = ieee80211_beacon_get(hw, vif, link_id); if (vif->bss_conf.ema_ap) {
if (!skb) struct ieee80211_ema_beacons *ema;
return; 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) { while ((skb = ieee80211_get_buffered_bc(hw, vif)) != NULL) {
mac80211_hwsim_tx_frame(hw, skb, mac80211_hwsim_tx_frame(hw, skb,
...@@ -4409,6 +4425,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info, ...@@ -4409,6 +4425,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
} }
hw->wiphy->mbssid_max_interfaces = 8; hw->wiphy->mbssid_max_interfaces = 8;
hw->wiphy->ema_max_profile_periodicity = 3;
data->rx_rssi = DEFAULT_RX_RSSI; data->rx_rssi = DEFAULT_RX_RSSI;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment