Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
@ 2026-03-12 14:21 Georg Müller
  2026-03-12 14:29 ` Georg Müller
  2026-03-12 15:58 ` Bitterblue Smith
  0 siblings, 2 replies; 9+ messages in thread
From: Georg Müller @ 2026-03-12 14:21 UTC (permalink / raw)
  To: Jes.Sorensen; +Cc: linux-wireless, linux-kernel, Georg Müller

Allow devices with this driver to be used as a wireless access point.

I successfully tested this with a TP-Link TP-Link TL-WN725N adapter.

Experiments two years ago failed, but some other improvements to the
driver seemed to have resolved theses issues.

The max_macid_num is conservative. The old driver used 32 [1], some
other sources said 64. I have not enough adapters to test any of the
higher values. Given the usage of this chipset in nano dongles, I think
the 16 might be high enough.

Signed-off-by: Georg Müller <georgmueller@gmx.net>
---
 drivers/net/wireless/realtek/rtl8xxxu/8188e.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
index 766a7a7c7d28..c6aecb28d28b 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
@@ -1867,6 +1867,8 @@ struct rtl8xxxu_fileops rtl8188eu_fops = {
 	.init_reg_pkt_life_time = 1,
 	.gen2_thermal_meter = 1,
 	.max_sec_cam_num = 32,
+	.supports_ap = 1,
+	.max_macid_num = 16,
 	.adda_1t_init = 0x0b1b25a0,
 	.adda_1t_path_on = 0x0bdb25a0,
 	/*
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
  2026-03-12 14:21 Georg Müller
@ 2026-03-12 14:29 ` Georg Müller
  2026-03-12 15:58 ` Bitterblue Smith
  1 sibling, 0 replies; 9+ messages in thread
From: Georg Müller @ 2026-03-12 14:29 UTC (permalink / raw)
  To: Jes.Sorensen; +Cc: linux-wireless, linux-kernel

Sorry, I missed the link:

Am 12.03.26 um 15:21 schrieb Georg Müller:
> The max_macid_num is conservative. The old driver used 32 [1], some
> other sources said 64. I have not enough adapters to test any of the
> higher values. Given the usage of this chipset in nano dongles, I think
> the 16 might be high enough.
> 

[1] https://github.com/lwfinger/rtl8188eu/blob/f5d1c8df2e2d8b217ea0113bf2cf3e37df8cb716/include/sta_info.h#L28

Link for max_macid_num = 64:
https://lore.kernel.org/linux-wireless/27e83382-4c84-1841-c428-d1e5143ea20c@gmail.com/


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
  2026-03-12 14:21 Georg Müller
  2026-03-12 14:29 ` Georg Müller
@ 2026-03-12 15:58 ` Bitterblue Smith
  2026-03-12 16:08   ` Georg Müller
  1 sibling, 1 reply; 9+ messages in thread
From: Bitterblue Smith @ 2026-03-12 15:58 UTC (permalink / raw)
  To: Georg Müller, Jes.Sorensen; +Cc: linux-wireless, linux-kernel

On 12/03/2026 16:21, Georg Müller wrote:
> Allow devices with this driver to be used as a wireless access point.
> 
> I successfully tested this with a TP-Link TP-Link TL-WN725N adapter.
> 
> Experiments two years ago failed, but some other improvements to the
> driver seemed to have resolved theses issues.
> 

The rate control code still doesn't handle more than one station.
It's not going to work right.

It shouldn't be too complicated. The ra_info member of rtl8xxxu_priv
needs to become an array.

> The max_macid_num is conservative. The old driver used 32 [1], some
> other sources said 64. I have not enough adapters to test any of the
> higher values. Given the usage of this chipset in nano dongles, I think
> the 16 might be high enough.
> 
> Signed-off-by: Georg Müller <georgmueller@gmx.net>
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/8188e.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
> index 766a7a7c7d28..c6aecb28d28b 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
> @@ -1867,6 +1867,8 @@ struct rtl8xxxu_fileops rtl8188eu_fops = {
>  	.init_reg_pkt_life_time = 1,
>  	.gen2_thermal_meter = 1,
>  	.max_sec_cam_num = 32,
> +	.supports_ap = 1,
> +	.max_macid_num = 16,
>  	.adda_1t_init = 0x0b1b25a0,
>  	.adda_1t_path_on = 0x0bdb25a0,
>  	/*


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
  2026-03-12 15:58 ` Bitterblue Smith
@ 2026-03-12 16:08   ` Georg Müller
  2026-03-12 17:06     ` Bitterblue Smith
  0 siblings, 1 reply; 9+ messages in thread
From: Georg Müller @ 2026-03-12 16:08 UTC (permalink / raw)
  To: Bitterblue Smith, Jes.Sorensen; +Cc: linux-wireless, linux-kernel


Am 12.03.26 um 16:58 schrieb Bitterblue Smith:
> On 12/03/2026 16:21, Georg Müller wrote:
>> Allow devices with this driver to be used as a wireless access point.
>>
>> I successfully tested this with a TP-Link TP-Link TL-WN725N adapter.
>>
>> Experiments two years ago failed, but some other improvements to the
>> driver seemed to have resolved theses issues.
>>
> 
> The rate control code still doesn't handle more than one station.
> It's not going to work right.
> 
> It shouldn't be too complicated. The ra_info member of rtl8xxxu_priv
> needs to become an array.

Ok, I have only tested it with one client in my setup.

So the ra_info array needs to of size max_macid_num?
Dynamically allocated or hard-coded in struct rtl8xxxu_priv (8188e seems
to be the only user of struct rtl8xxxu_ra_info)?

Best regards,
Georg


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
  2026-03-12 16:08   ` Georg Müller
@ 2026-03-12 17:06     ` Bitterblue Smith
  2026-03-12 22:20       ` Bitterblue Smith
  0 siblings, 1 reply; 9+ messages in thread
From: Bitterblue Smith @ 2026-03-12 17:06 UTC (permalink / raw)
  To: Georg Müller, Jes.Sorensen; +Cc: linux-wireless, linux-kernel

On 12/03/2026 18:08, Georg Müller wrote:
> 
> Am 12.03.26 um 16:58 schrieb Bitterblue Smith:
>> On 12/03/2026 16:21, Georg Müller wrote:
>>> Allow devices with this driver to be used as a wireless access point.
>>>
>>> I successfully tested this with a TP-Link TP-Link TL-WN725N adapter.
>>>
>>> Experiments two years ago failed, but some other improvements to the
>>> driver seemed to have resolved theses issues.
>>>
>>
>> The rate control code still doesn't handle more than one station.
>> It's not going to work right.
>>
>> It shouldn't be too complicated. The ra_info member of rtl8xxxu_priv
>> needs to become an array.
> 
> Ok, I have only tested it with one client in my setup.
> 
> So the ra_info array needs to of size max_macid_num?
> Dynamically allocated or hard-coded in struct rtl8xxxu_priv (8188e seems
> to be the only user of struct rtl8xxxu_ra_info)?
> 

Yes. :)

Also, if I remember correctly, there was a member of rtl8xxxu_ra_info
that needs to be moved to rtl8xxxu_priv, because it's a global thing,
not per macid.

> Best regards,
> Georg
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
  2026-03-12 17:06     ` Bitterblue Smith
@ 2026-03-12 22:20       ` Bitterblue Smith
  2026-03-12 23:52         ` Georg Müller
  0 siblings, 1 reply; 9+ messages in thread
From: Bitterblue Smith @ 2026-03-12 22:20 UTC (permalink / raw)
  To: Georg Müller, Jes.Sorensen; +Cc: linux-wireless, linux-kernel

On 12/03/2026 19:06, Bitterblue Smith wrote:
> On 12/03/2026 18:08, Georg Müller wrote:
>>
>> Am 12.03.26 um 16:58 schrieb Bitterblue Smith:
>>> On 12/03/2026 16:21, Georg Müller wrote:
>>>> Allow devices with this driver to be used as a wireless access point.
>>>>
>>>> I successfully tested this with a TP-Link TP-Link TL-WN725N adapter.
>>>>
>>>> Experiments two years ago failed, but some other improvements to the
>>>> driver seemed to have resolved theses issues.
>>>>
>>>
>>> The rate control code still doesn't handle more than one station.
>>> It's not going to work right.
>>>
>>> It shouldn't be too complicated. The ra_info member of rtl8xxxu_priv
>>> needs to become an array.
>>
>> Ok, I have only tested it with one client in my setup.
>>
>> So the ra_info array needs to of size max_macid_num?
>> Dynamically allocated or hard-coded in struct rtl8xxxu_priv (8188e seems
>> to be the only user of struct rtl8xxxu_ra_info)?
>>
> 
> Yes. :)
> 
> Also, if I remember correctly, there was a member of rtl8xxxu_ra_info
> that needs to be moved to rtl8xxxu_priv, because it's a global thing,
> not per macid.
> 

Ah, we talked about it before:
https://lore.kernel.org/linux-wireless/938ae608-a865-4056-06de-c230d74e1847@gmail.com/

>> Best regards,
>> Georg
>>
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
  2026-03-12 22:20       ` Bitterblue Smith
@ 2026-03-12 23:52         ` Georg Müller
  0 siblings, 0 replies; 9+ messages in thread
From: Georg Müller @ 2026-03-12 23:52 UTC (permalink / raw)
  To: Bitterblue Smith, Jes.Sorensen; +Cc: linux-wireless, linux-kernel


Am 12.03.26 um 23:20 schrieb Bitterblue Smith:
> On 12/03/2026 19:06, Bitterblue Smith wrote:
>> On 12/03/2026 18:08, Georg Müller wrote:
>>>
>>> Am 12.03.26 um 16:58 schrieb Bitterblue Smith:
>>>> On 12/03/2026 16:21, Georg Müller wrote:
>>>>> Allow devices with this driver to be used as a wireless access point.
>>>>>
>>>>> I successfully tested this with a TP-Link TP-Link TL-WN725N adapter.
>>>>>
>>>>> Experiments two years ago failed, but some other improvements to the
>>>>> driver seemed to have resolved theses issues.
>>>>>
>>>>
>>>> The rate control code still doesn't handle more than one station.
>>>> It's not going to work right.
>>>>
>>>> It shouldn't be too complicated. The ra_info member of rtl8xxxu_priv
>>>> needs to become an array.
>>>
>>> Ok, I have only tested it with one client in my setup.
>>>
>>> So the ra_info array needs to of size max_macid_num?
>>> Dynamically allocated or hard-coded in struct rtl8xxxu_priv (8188e seems
>>> to be the only user of struct rtl8xxxu_ra_info)?
>>>
>>
>> Yes. :)
>>
>> Also, if I remember correctly, there was a member of rtl8xxxu_ra_info
>> that needs to be moved to rtl8xxxu_priv, because it's a global thing,
>> not per macid.
>>
> 
> Ah, we talked about it before:
> https://lore.kernel.org/linux-wireless/938ae608-a865-4056-06de-c230d74e1847@gmail.com/

Oh, yes, I didn't remember all the details from then and only checked an earlier response.

I will try to integrate the suggestions into the RFC patch and will send a v2.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
@ 2026-10-30  7:35 hi
  2026-11-01  4:10 ` Ping-Ke Shih
  0 siblings, 1 reply; 9+ messages in thread
From: hi @ 2026-10-30  7:35 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-wireless, Ping-Ke Shih

From 0a3cdd4c6cc416804e49c935516a22e854a87483 Mon Sep 17 00:00:00 2001
From: Shreyansh Khajanchi <hi@shreyan.sh>
Date: Fri, 30 Oct 2026 12:34:44 +0530
Subject: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU

The RTL8188EU shares the AP mode implementation in core.c with the
other chips supported by this driver, so advertising
NL80211_IFTYPE_AP is enough to make it usable as an access point.

Set max_macid_num to 32 as well, so that max_ap_assoc_sta is
initialised. The vendor driver defines NUM_STA as 32, and starts
station MAC IDs at 2 because 0 and 1 are reserved for
broadcast/multicast. This matches RTL8192CU, which also sets
max_macid_num to 32.

Tested with an RTL8188EUS (0bda:8179) on a Raspberry Pi Zero running
6.12 (armv6): hostapd serves a 2.4 GHz WPA2 network, clients associate
and pass traffic.

Signed-off-by: Shreyansh Khajanchi <hi@shreyan.sh>
---
 drivers/net/wireless/realtek/rtl8xxxu/8188e.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
index fea5aec..0c3ab32 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/8188e.c
@@ -1867,6 +1867,8 @@ struct rtl8xxxu_fileops rtl8188eu_fops = {
 	.init_reg_pkt_life_time = 1,
 	.gen2_thermal_meter = 1,
 	.hw_feature_report = 0,
+	.supports_ap = 1,
+	.max_macid_num = 32,
 	.max_sec_cam_num = 32,
 	.adda_1t_init = 0x0b1b25a0,
 	.adda_1t_path_on = 0x0bdb25a0,
-- 
2.56.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* RE: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
  2026-10-30  7:35 [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU hi
@ 2026-11-01  4:10 ` Ping-Ke Shih
  0 siblings, 0 replies; 9+ messages in thread
From: Ping-Ke Shih @ 2026-11-01  4:10 UTC (permalink / raw)
  To: hi@shreyan.sh, Jes Sorensen; +Cc: linux-wireless@vger.kernel.org

hi@shreyan.sh <hi@shreyan.sh> wrote:
> From 0a3cdd4c6cc416804e49c935516a22e854a87483 Mon Sep 17 00:00:00 2001
> From: Shreyansh Khajanchi <hi@shreyan.sh>
> Date: Fri, 30 Oct 2026 12:34:44 +0530
> Subject: [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU
> 
> The RTL8188EU shares the AP mode implementation in core.c with the
> other chips supported by this driver, so advertising
> NL80211_IFTYPE_AP is enough to make it usable as an access point.
> 
> Set max_macid_num to 32 as well, so that max_ap_assoc_sta is
> initialised. The vendor driver defines NUM_STA as 32, and starts
> station MAC IDs at 2 because 0 and 1 are reserved for
> broadcast/multicast. This matches RTL8192CU, which also sets
> max_macid_num to 32.

Do you have a sniffer to have air capture to check beacon?

If so, please check TIM for unicast packets if station goes
sleepy, and TIM for broadcast/multicast packets (for example,
send a broadcast ARP by ping a non-existing IP).

> 
> Tested with an RTL8188EUS (0bda:8179) on a Raspberry Pi Zero running
> 6.12 (armv6): hostapd serves a 2.4 GHz WPA2 network, clients associate
> and pass traffic.
> 
> Signed-off-by: Shreyansh Khajanchi <hi@shreyan.sh>

I give my reviewed-by, but still want test results of TIM.

Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-01  4:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30  7:35 [PATCH] wifi: rtl8xxxu: Enable AP mode for RTL8188EU hi
2026-11-01  4:10 ` Ping-Ke Shih
  -- strict thread matches above, loose matches on Subject: below --
2026-03-12 14:21 Georg Müller
2026-03-12 14:29 ` Georg Müller
2026-03-12 15:58 ` Bitterblue Smith
2026-03-12 16:08   ` Georg Müller
2026-03-12 17:06     ` Bitterblue Smith
2026-03-12 22:20       ` Bitterblue Smith
2026-03-12 23:52         ` Georg Müller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox