From: Martin Kaistra <martin.kaistra@linutronix.de>
To: linux-wireless@vger.kernel.org
Cc: Jes Sorensen <Jes.Sorensen@gmail.com>,
	Kalle Valo <kvalo@kernel.org>, Ping-Ke Shih <pkshih@realtek.com>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: [PATCH v4 17/18] wifi: rtl8xxxu: Declare AP mode support for 8188f
Date: Fri, 28 Apr 2023 17:08:32 +0200	[thread overview]
Message-ID: <20230428150833.218605-18-martin.kaistra@linutronix.de> (raw)
In-Reply-To: <20230428150833.218605-1-martin.kaistra@linutronix.de>

Everything is in place now for AP mode, we can tell the system that we
support it. Put the feature behind a flag in priv->fops, because it is
not (yet) implemented for all chips.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h       | 1 +
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c | 1 +
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c  | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index 1cf2ea4b02655..296f345784682 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1943,6 +1943,7 @@ struct rtl8xxxu_fileops {
 	u8 init_reg_hmtfr:1;
 	u8 ampdu_max_time;
 	u8 ustime_tsf_edca;
+	u8 supports_ap:1;
 	u32 adda_1t_init;
 	u32 adda_1t_path_on;
 	u32 adda_2t_path_on_a;
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
index dbdfd77874655..7fd258bf65e36 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8188f.c
@@ -1748,6 +1748,7 @@ struct rtl8xxxu_fileops rtl8188fu_fops = {
 	.init_reg_hmtfr = 1,
 	.ampdu_max_time = 0x70,
 	.ustime_tsf_edca = 0x28,
+	.supports_ap = 1,
 	.adda_1t_init = 0x03c00014,
 	.adda_1t_path_on = 0x03c00014,
 	.trxff_boundary = 0x3f7f,
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index aa430a912d822..71c715ec5608d 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -7533,6 +7533,8 @@ static int rtl8xxxu_probe(struct usb_interface *interface,
 	hw->wiphy->max_scan_ssids = 1;
 	hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;
 	hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
+	if (priv->fops->supports_ap)
+		hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
 	hw->queues = 4;
 
 	sband = &rtl8xxxu_supported_band;
-- 
2.30.2


  parent reply	other threads:[~2023-04-28 15:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28 15:08 [PATCH v4 00/18] wifi: rtl8xxxu: Add AP mode support for 8188f Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 01/18] wifi: rtl8xxxu: Add start_ap() callback Martin Kaistra
2023-05-05  7:32   ` Kalle Valo
2023-04-28 15:08 ` [PATCH v4 02/18] wifi: rtl8xxxu: Select correct queue for beacon frames Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 03/18] wifi: rtl8xxxu: Add beacon functions Martin Kaistra
2023-05-02  1:24   ` Ping-Ke Shih
2023-04-28 15:08 ` [PATCH v4 04/18] wifi: rtl8xxxu: Add set_tim() callback Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 05/18] wifi: rtl8xxxu: Allow setting rts threshold to -1 Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 06/18] wifi: rtl8xxxu: Allow creating interface in AP mode Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 07/18] wifi: rtl8xxxu: Actually use macid in rtl8xxxu_gen2_report_connect Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 08/18] wifi: rtl8xxxu: Add parameter role to report_connect Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 09/18] wifi: rtl8xxxu: Add parameter force to rtl8xxxu_refresh_rate_mask Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 10/18] wifi: rtl8xxxu: Add sta_add() and sta_remove() callbacks Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 11/18] wifi: rtl8xxxu: Put the macid in txdesc Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 12/18] wifi: rtl8xxxu: Add parameter macid to update_rate_mask Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 13/18] wifi: rtl8xxxu: Enable hw seq for mgmt/non-QoS data frames Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 14/18] wifi: rtl8xxxu: Clean up filter configuration Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 15/18] wifi: rtl8xxxu: Remove usage of ieee80211_get_tx_rate() Martin Kaistra
2023-04-28 15:08 ` [PATCH v4 16/18] wifi: rtl8xxxu: Remove usage of tx_info->control.rates[0].flags Martin Kaistra
2023-04-28 15:08 ` Martin Kaistra [this message]
2023-04-28 15:08 ` [PATCH v4 18/18] wifi: rtl8xxxu: Set maximum number of supported stations Martin Kaistra
2023-05-07 23:09 ` [PATCH v4 00/18] wifi: rtl8xxxu: Add AP mode support for 8188f Reto Schneider
2023-07-05  9:00 ` Georg Müller
2023-07-07  7:23   ` Martin Kaistra
2023-07-07 17:55     ` Bitterblue Smith

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=20230428150833.218605-18-martin.kaistra@linutronix.de \
    --to=martin.kaistra@linutronix.de \
    --cc=Jes.Sorensen@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    --cc=rtl8821cerfe2@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.