From: John Crispin <john@phrozen.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
John Crispin <john@phrozen.org>
Subject: [PATCH V3 7/9] ath11k: add multiple bssid support to device creation
Date: Wed, 12 Aug 2020 17:00:48 +0200 [thread overview]
Message-ID: <20200812150050.2683396-8-john@phrozen.org> (raw)
In-Reply-To: <20200812150050.2683396-1-john@phrozen.org>
We need to pass info such as parent device, bssid count/index and
(non-)transmit mode information to the FW when we create a new vdev.
Signed-off-by: John Crispin <john@phrozen.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
index 2e4f1966da21..08e7f4ac8a26 100644
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -4269,17 +4269,30 @@ static void ath11k_mac_op_stop(struct ieee80211_hw *hw)
atomic_set(&ar->num_pending_mgmt_tx, 0);
}
-static void
+static int
ath11k_mac_setup_vdev_create_params(struct ath11k_vif *arvif,
struct vdev_create_params *params)
{
struct ath11k *ar = arvif->ar;
+ struct ieee80211_vif *parent;
struct ath11k_pdev *pdev = ar->pdev;
params->if_id = arvif->vdev_id;
params->type = arvif->vdev_type;
params->subtype = arvif->vdev_subtype;
params->pdev_id = pdev->pdev_id;
+ params->vdevid_trans = 0;
+ if (arvif->vif->multiple_bssid.non_transmitted) {
+ params->flags = WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP;
+ parent = arvif->vif->multiple_bssid.parent;
+ if (!parent)
+ return -ENOENT;
+ if (ar->hw->wiphy != ieee80211_vif_to_wdev(parent)->wiphy)
+ return -EINVAL;
+ params->vdevid_trans = ath11k_vif_to_arvif(parent)->vdev_id;
+ } else {
+ params->flags = WMI_HOST_VDEV_FLAGS_TRANSMIT_AP;
+ }
if (pdev->cap.supported_bands & WMI_HOST_WLAN_2G_CAP) {
params->chains[NL80211_BAND_2GHZ].tx = ar->num_tx_chains;
@@ -4294,6 +4307,7 @@ ath11k_mac_setup_vdev_create_params(struct ath11k_vif *arvif,
params->chains[NL80211_BAND_6GHZ].tx = ar->num_tx_chains;
params->chains[NL80211_BAND_6GHZ].rx = ar->num_rx_chains;
}
+ return 0;
}
static u32
@@ -4443,7 +4457,11 @@ static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw,
for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++)
vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES - 1);
- ath11k_mac_setup_vdev_create_params(arvif, &vdev_param);
+ ret = ath11k_mac_setup_vdev_create_params(arvif, &vdev_param);
+ if (ret) {
+ ath11k_warn(ab, "failed to prepare vdev %d\n", ret);
+ goto err;
+ }
ret = ath11k_wmi_vdev_create(ar, vif->addr, &vdev_param);
if (ret) {
--
2.25.1
next prev parent reply other threads:[~2020-08-12 15:01 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 15:00 [PATCH V3 0/9] mac80211: add multiple bssid / EMA John Crispin
2020-08-12 15:00 ` [PATCH V3 1/9] nl80211: add basic multiple bssid support John Crispin
2020-08-19 2:48 ` Aloka Dixit
2020-08-27 12:58 ` Johannes Berg
2020-08-12 15:00 ` [PATCH V3 2/9] mac80211: add multiple bssid support to interface handling John Crispin
2020-08-27 13:03 ` Johannes Berg
2020-08-27 13:08 ` Johannes Berg
2020-10-08 0:33 ` Pradeep Kumar Chitrapu
2020-10-08 8:06 ` John Crispin
2020-10-08 17:21 ` Pradeep Kumar Chitrapu
2020-10-08 19:42 ` John Crispin
2020-08-12 15:00 ` [PATCH V3 3/9] mac80211: add multiple bssid support to beacon handling John Crispin
2020-08-12 15:00 ` [PATCH V3 4/9] mac80211: add multiple bssid/ema support to bcn templating John Crispin
2020-08-27 13:10 ` Johannes Berg
2020-08-28 3:20 ` Aloka Dixit
2020-08-12 15:00 ` [PATCH V3 5/9] ath11k: add a struct to pass parameters into ath11k_wmi_vdev_up John Crispin
2020-08-12 15:00 ` [PATCH V3 6/9] ath11k: add the multiple bssid WMI commands John Crispin
2020-08-12 15:00 ` John Crispin [this message]
2020-08-12 15:00 ` [PATCH V3 8/9] ath11k: add EMA beacon support John Crispin
2020-08-12 15:00 ` [PATCH V3 9/9] ath11k: set the multiple bssid hw flags and capabilities John Crispin
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=20200812150050.2683396-8-john@phrozen.org \
--to=john@phrozen.org \
--cc=ath11k@lists.infradead.org \
--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).