From: Kang Yang <quic_kangyang@quicinc.com>
To: <ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>, <quic_kangyang@quicinc.com>
Subject: [PATCH v4 01/11] wifi: ath12k: change interface combination for P2P mode
Date: Fri, 26 Jan 2024 19:52:21 +0800 [thread overview]
Message-ID: <20240126115231.356658-2-quic_kangyang@quicinc.com> (raw)
In-Reply-To: <20240126115231.356658-1-quic_kangyang@quicinc.com>
Current interface combination doesn't support P2P mode. Change the
combination for P2P mode.
Also, there is a bug that when mesh is enabled but ap is not enabled.
In this situation, the mesh's max_interface of interface combination
won't be set.
So assign the max_interfaces for mesh directly.
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
---
v4: no change.
v3: no change.
v2:
1. add Tested-on tag of QCN9274.
2. update copyright.
---
drivers/net/wireless/ath/ath12k/mac.c | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index a27480a69b27..d1d2e83dfa37 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -7479,9 +7479,10 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah)
struct ieee80211_iface_combination *combinations;
struct ieee80211_iface_limit *limits;
int n_limits, max_interfaces;
- bool ap, mesh;
+ bool ap, mesh, p2p;
ap = ath12k_mac_is_iface_mode_enable(ah, NL80211_IFTYPE_AP);
+ p2p = ath12k_mac_is_iface_mode_enable(ah, NL80211_IFTYPE_P2P_DEVICE);
mesh = IS_ENABLED(CONFIG_MAC80211_MESH) &&
ath12k_mac_is_iface_mode_enable(ah, NL80211_IFTYPE_MESH_POINT);
@@ -7490,9 +7491,15 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah)
if (!combinations)
return -ENOMEM;
- if (ap || mesh) {
+ if ((ap || mesh) && !p2p) {
n_limits = 2;
max_interfaces = 16;
+ } else if (p2p) {
+ n_limits = 3;
+ if (ap || mesh)
+ max_interfaces = 16;
+ else
+ max_interfaces = 3;
} else {
n_limits = 1;
max_interfaces = 1;
@@ -7507,14 +7514,22 @@ static int ath12k_mac_setup_iface_combinations(struct ath12k_hw *ah)
limits[0].max = 1;
limits[0].types |= BIT(NL80211_IFTYPE_STATION);
- if (ap) {
+ if (ap || mesh || p2p)
limits[1].max = max_interfaces;
+
+ if (ap)
limits[1].types |= BIT(NL80211_IFTYPE_AP);
- }
if (mesh)
limits[1].types |= BIT(NL80211_IFTYPE_MESH_POINT);
+ if (p2p) {
+ limits[1].types |= BIT(NL80211_IFTYPE_P2P_CLIENT) |
+ BIT(NL80211_IFTYPE_P2P_GO);
+ limits[2].max = 1;
+ limits[2].types |= BIT(NL80211_IFTYPE_P2P_DEVICE);
+ }
+
combinations[0].limits = limits;
combinations[0].n_limits = n_limits;
combinations[0].max_interfaces = max_interfaces;
--
2.34.1
next prev parent reply other threads:[~2024-01-26 11:53 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-26 11:52 [PATCH v4 00/11] wifi: ath12k: P2P support for WCN7850 Kang Yang
2024-01-26 11:52 ` Kang Yang [this message]
2024-01-27 0:13 ` [PATCH v4 01/11] wifi: ath12k: change interface combination for P2P mode Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 02/11] wifi: ath12k: add P2P IE in beacon template Kang Yang
2024-01-27 0:14 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 03/11] wifi: ath12k: implement handling of P2P NoA event Kang Yang
2024-01-27 0:15 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 04/11] wifi: ath12k: implement remain on channel for P2P mode Kang Yang
2024-01-27 0:16 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 05/11] wifi: ath12k: change WLAN_SCAN_PARAMS_MAX_IE_LEN from 256 to 512 Kang Yang
2024-01-27 0:17 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 06/11] wifi: ath12k: allow specific mgmt frame tx while vdev is not up Kang Yang
2024-01-27 0:20 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 07/11] wifi: ath12k: fix broken structure wmi_vdev_create_cmd Kang Yang
2024-01-27 0:23 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 08/11] wifi: ath12k: move peer delete after vdev stop of station for WCN7850 Kang Yang
2024-01-27 0:25 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 09/11] wifi: ath12k: designating channel frequency for ROC scan Kang Yang
2024-01-27 0:26 ` Jeff Johnson
2024-01-26 11:52 ` [PATCH v4 10/11] wifi: ath12k: fix incorrect logic of calculating vdev_stats_id Kang Yang
2024-01-26 16:56 ` Jeff Johnson
2024-01-26 18:23 ` Jeff Johnson
2024-01-26 23:05 ` Jeff Johnson
2024-01-29 2:25 ` Kang Yang
2024-01-26 11:52 ` [PATCH v4 11/11] wifi: ath12k: advertise P2P dev support for WCN7850 Kang Yang
2024-01-27 0:27 ` Jeff Johnson
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=20240126115231.356658-2-quic_kangyang@quicinc.com \
--to=quic_kangyang@quicinc.com \
--cc=ath12k@lists.infradead.org \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).