@LoneTheReal

0 Followers
3 Following
32 Posts
wifi: rtw88: sdio: call rtw_sdio_indicate_tx_status unconditionally · pkshih/rtw@fc5f5a0

The rtw88-sdio do not work in AP mode due to the lack of TX status report for management frames. Make the invocation of rtw_sdio_indicate_tx_status unconditional and cover all packet queues Teste...

GitHub
Making sure you're not a bot!

Openwrt boots on Lichee Pi 4A

Openwrt riscv64 Licheepi 4a rtl8723ds wifi router

asciinema.org
The first #openwrt that turns #licheepi Pi 4A to a wireless router. Build it https://github.com/lone0/target-th1520-openwrt with version 24.10, kernel 6.6.83
GitHub - lone0/target-th1520-openwrt: Build and run Openwrt on Lichee Pi 4A

Build and run Openwrt on Lichee Pi 4A. Contribute to lone0/target-th1520-openwrt development by creating an account on GitHub.

GitHub
rtw_8822cs : no AP mode ? · Issue #245 · lwfinger/rtw88

Hi, Context : Armbian bookworm 24.11 6.6.58-current-rockchip64 After make/make install of current version of the driver (and reboot) iw list gives only managed and monitor modes available. Under An...

GitHub
rtw_8822cs : no AP mode ? · Issue #245 · lwfinger/rtw88

Hi, Context : Armbian bookworm 24.11 6.6.58-current-rockchip64 After make/make install of current version of the driver (and reboot) iw list gives only managed and monitor modes available. Under An...

GitHub

将上述限制放宽,让5号队列的management frame也得到执行 rtw_tx_report_enqueue,加入硬件报告队列。结果你猜怎样,打印:

[ 23.298425] rtw_8723ds mmc2:0001:1: failed to get tx report from firmware

看来硬件是真的不支持对management frame进行tx status report呀

rtw88的发包函数rtw_sdio_process_tx_queue()里有这样的逻辑:

if (queue <= RTW_TX_QUEUE_VO)
rtw_sdio_indicate_tx_status(rtwdev, skb);
else
dev_kfree_skb_any(skb);

RTW_TX_QUEUE_VO为常量3,只有队列编号<=3的包能得到tx_status报告。

然而像auth, association, ack等包,算management,队列号是5, 因而一概发完即弃,从不执行进入rtw_sdio_indicate_tx_status()

hostapd在调用send_assoc_resp()向STA发送response后,期待有一个发送成功通知回来,触发handle_assoc_cb(),进而在这里set_authorized.

在rtw88驱动中是这样实现的,当报文发送出去后,rtw_sdio_indicate_tx_status()会被调用。它会把一个TX_STAT_ACK skb加入一个队列中,并schedule一个tasklet来处理队列。

tasklet来了以后,通过ieee80211_tx_status_ext() -> ieee80211_report_used_skb() -> ieee80211_report_ack_skb() -> cfg80211_mgmt_tx_status_ext(),通过netlink把tx status发送到用户态,触发hostapd的ieee802_11_mgmt_cb().

而在8723ds这个情况中,调用到ieee80211_report_used_skb()后就直接退了,再也没有往下走,也从未去到hostapd,导致STA没有authorized。

在hostapd中,设置authorized的地方位于函数
static void handle_assoc_cb(struct hostapd_data *hapd,
const struct ieee80211_mgmt *mgmt,
size_t len, int reassoc, int ok)
中:

/*
* Open, static WEP, FT protocol, or FILS; no separate
* authorization step.
*/
ap_sta_set_authorized(hapd, sta, 1);

可是不管我怎么加打印,这个函数都没有执行到,连带着整个ieee802_11_mgmt_cb()都没有执行到。难道这个WIFI不向用户态报告management frame TX status?