linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aloka Dixit <quic_alokad@quicinc.com>
To: <johannes@sipsolutions.net>, <linux-wireless@vger.kernel.org>
Subject: [PATCH v3 3/4] wifi: mac80211_hwsim: Multiple BSSID support
Date: Mon, 5 Dec 2022 16:50:39 -0800	[thread overview]
Message-ID: <20221206005040.3177-4-quic_alokad@quicinc.com> (raw)
In-Reply-To: <20221206005040.3177-1-quic_alokad@quicinc.com>

Advertise multiple BSSID support for up to 8 interfaces.
Do not send beacons from the non-transmitting interfaces.

Signed-off-by: Aloka Dixit <quic_alokad@quicinc.com>
---
Correposponding hostapd tests:
he_ap_mbssid_open, test_he_ap_mbssid_same_security,
test_he_ap_mbssid_mixed_security1, test_he_ap_mbssid_mixed_security2.

drivers/net/wireless/mac80211_hwsim.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index b18f992b6276..7cf9a7a364be 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -2121,6 +2121,9 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
 	    vif->type != NL80211_IFTYPE_OCB)
 		return;
 
+	if (vif->mbssid_tx_vif && vif->mbssid_tx_vif != vif)
+		return;
+
 	skb = ieee80211_beacon_get(hw, vif, link_id);
 	if (!skb)
 		return;
@@ -4404,6 +4407,8 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
 		hw->wiphy->n_cipher_suites = param->n_ciphers;
 	}
 
+	hw->wiphy->mbssid_max_interfaces = 8;
+
 	data->rx_rssi = DEFAULT_RX_RSSI;
 
 	INIT_DELAYED_WORK(&data->roc_start, hw_roc_start);
-- 
2.34.1


  parent reply	other threads:[~2022-12-06  0:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06  0:50 [PATCH v3 0/4] v3: EMA and HWSIM support in AP mode Aloka Dixit
2022-12-06  0:50 ` [PATCH v3 1/4] wifi: mac80211: generate EMA beacons " Aloka Dixit
2022-12-06  0:50 ` [PATCH v3 2/4] wifi: mac80211_hwsim: move beacon transmission to a separate function Aloka Dixit
2022-12-06  0:50 ` Aloka Dixit [this message]
2022-12-06  0:50 ` [PATCH v3 4/4] wifi: mac80211_hwsim: EMA support Aloka Dixit
2023-02-21  3:55 ` [PATCH v3 0/4] v3: EMA and HWSIM support in AP mode Aloka Dixit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221206005040.3177-4-quic_alokad@quicinc.com \
    --to=quic_alokad@quicinc.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).