-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
RPI4: WiFi station's signal always is 0 #4574
Comments
Fill out the Bug template with the required information or you will get no assistance. |
@pelwell thank you for your reply。 I use the Raspberry Pi 4B as an AP, and use the create_ap tool to create the AP.
Connect to wireless via mobile phone, ssid: rpi-4b, password: raspberry
Now the wireless connection is complete
When obtaining all client information through hostapd_cli, the signal is always 0,which is good in the 2021-05-07 raspbian firmware version (Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux). |
[ Upstream commit 9a15909 ] The rx_lastpkt_rssi field provided by the firmware is suitable for NL80211_STA_INFO_{SIGNAL,CHAIN_SIGNAL}, while the rssi field is an average. Fix up the assignments and set the correct STA_INFO bits. This lets userspace know that the average RSSI is part of the station info. Fixes: cae355d ("brcmfmac: Add RSSI information to get_station.") Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210506132010.3964484-2-alsi@bang-olufsen.dk Signed-off-by: Sasha Levin <sashal@kernel.org>
[ Reopening this issue because comments on commits are easily lost ]
What happens if you change the code from:
to:
? |
I tried to modify the above code, but still can't get the value of sinfo->signal, the value of sinfo->signal_avg exists, and the value of rssi should be sinfo->signal, not sinfo->signal_avg
|
All the Broadcom-based chips and firmwares I tried return 0 in the rx_lastpkt_rssi field, i.e. it is only reporting an average value. In the unmodified rpi-5.10.y version of the code, count_rssi ends up as 0 because of the test for both rssi and rx_lastpkt_rssi being non-zero, which means it falls back to use this bit of code:
Can you confirm that it is getting as far as |
@pelwell The code did not execute this branch.
Output:
|
I was assuming, but failed to state, that the other patch (removing the |
@pelwell |
No. |
After commit 9a15909 ("brcmfmac: correctly report average RSSI in station info") it is required from firmware to provide rx_lastpkt_rssi. If this field is not provided brcmfmac doesn't report any RSSI at all. Unfortunately some firmwares doesn't provide it. One example is firmware for BCM43455 found in Raspbberry Pi. See raspberrypi/linux#4574 Fix it by falling back to rssi field if rx_lastpkt_rssi is not provided (like it was before 9a15909). Fixes: 9a15909 ("brcmfmac: correctly report average RSSI in station info") Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
I upgraded the Raspberry Pi to the latest kernel. When I get all the client information through the command "hostapd_cli all_sta", the signal is always 0, which is good in the 2021-05-07 version.
The text was updated successfully, but these errors were encountered: