Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Simon566 opened this issue Jan 19, 2024 · 8 comments
Open

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

Simon566 opened this issue Jan 19, 2024 · 8 comments

Comments

@Simon566
Copy link

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
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

Simon566 commented Jan 20, 2024

hostapd_alfa2.txt
Hi,

im running:

  • Odroid H3 (X86-64), Intel 5105 cpu
  • debian bookworm
  • hostapd (latest git mainline)

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

regards,
Simon

@Simon566
Copy link
Author

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
Copy link
Author

Simon566 commented Mar 4, 2024

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
Copy link
Owner

morrownr commented Mar 4, 2024

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

Ask them:

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

@Simon566
Copy link
Author

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

@kbmetz
Copy link

kbmetz commented Jan 12, 2025

This is still an issue, is there any way to work around this? Or is is possible to try and recompile the module?

I have a AX3000 with the mt7921u module loaded running hostapd. I've tried this on Raspbian, Debian and Ubuntu 24.04. When I start hostapd everything runs fine. Anywhere between 16-20 clients I start getting the 'could not add STA to kernel driver'. This makes the USB stick unusable as an AP in my opinion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants