morrownr / USB-WiFi

USB WiFi Adapter Information for Linux
2.75k stars 178 forks source link

"could not add STA to kernel driver" mt7921u , ALFA AWUS036AXML #369

Open Simon566 opened 10 months ago

Simon566 commented 10 months ago

Hi,

im on kernel 6.6.12 and running hostapd on the mt7921u device

Is this a hardware limit ? i didnt count the exact number of connected clients , its around 12 only

Jan 19 07:24:59 odroid-h3 hostapd[213153]: wlx00c0cab38118: STA 94:e2:3c:f2:29:f7 IEEE 802.11: Could not add STA to kernel driver Jan 19 07:24:59 odroid-h3 hostapd[213153]: wlx00c0cab38118: STA 94:e2:3c:f2:29:f7 IEEE 802.11: Could not add STA to kernel driver Jan 19 07:24:59 odroid-h3 hostapd[213153]: wlx00c0cab38118: STA 94:e2:3c:f2:29:f7 IEEE 802.11: Could not add STA to kernel driver Jan 19 07:24:59 odroid-h3 hostapd[213153]: wlx00c0cab38118: STA 94:e2:3c:f2:29:f7 IEEE 802.11: Could not add STA to kernel driver Jan 19 07:25:01 odroid-h3 hostapd[213153]: wlx00c0cab38118: STA 94:e2:3c:f2:29:f7 IEEE 802.11: Could not add STA to kernel driver Jan 19 07:25:02 odroid-h3 hostapd[213153]: wlx00c0cab38118: STA 94:e2:3c:f2:29:f7 IEEE 802.11: Could not add STA to kernel driver

regards, Simon

Simon566 commented 10 months ago

i can --PARTLY-- answer that myself.

It looks like the mt7921u driver has a very low limit for associated stations, something like 16 or so -> mt792x.h

define MT792x_WTBL_SIZE 20

define MT792x_WTBL_RESERVED (MT792x_WTBL_SIZE - 1)

define MT792x_WTBL_STA (MT792x_WTBL_RESERVED - MT792x_MAX_INTERFACES)

the "worktable" aka WTBL seems to be pretty small , no idea why.

Can we ramp up that limit ?

morrownr commented 10 months ago

Hi @Simon566

It helps me understand if I know what hardward and software is involved. You mentioned hostapd but nothing else. Please provide some details.

Can you post your hostapd.conf file? What AP guide did you use?

I use my ALFA AXML in AP mode but this report is a new one on me.

@morrownr

Simon566 commented 10 months ago

hostapd_alfa2.txt Hi,

im running:

i didnt use any specific guideline but the sample hostapd,conf from the SW maintainer website and adapted it, see attachment

regards, Simon

Simon566 commented 9 months ago

The MT792x_WTBL_SIZE as seen above has something to do with the RAM which is available inside the USB device or not ?

The ALFA device is able to load the BT firmware assoiated with the chipset, but hasnt got any bluetooth in real. -> there should be plenty of RAM available to ramp up that limit in case bluetooth isnt needed !!

is this a limitation by the firmware or can we just happily increase the #define, recompile and give it a go ?

Simon566 commented 8 months ago

Hi @morrownr ,

is there any chance that a mediatek dev might look at this ? fixing/increasing the max conntected client amount (to maybe 64?) shouldnt be a big issue if there is enough RAM ( which i really suspect for this device)

see here a related OpenWRT ticket: https://forum.openwrt.org/t/reference-for-number-of-supported-stations-in-different-wifi-hardware/156535

regards, Simon

morrownr commented 8 months ago

is there any chance that a mediatek dev might look at this ?

Ask them:

https://wireless.wiki.kernel.org/en/users/drivers/mediatek

Simon566 commented 2 months ago

i repeatedly contacted Felix Fietkau , lets see . i havent got any reply