Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Other
11.17k
stars
5.01k
forks
source link
Pi3B+: brcmfmac sets scan frequencies incorrectly for regulatory domain KR. #2997
Describe the bug
When regulatory domain KR is set, it scans only a limited set of allowed frequency bands, "5745 5765 5785 5805", which is incorrect in terms of the wlan regulation here in Korea.
To reproduce
step 1. Open two consoles. On the first console, set regulatory domain to US by issuing "iw reg set US". On the second console, issue "iw event -t". And getting back to the first console, issue "iw dev wlan0 scan" and observe the scanning frequencies shown on the second console.
step 2. While preserving the two consoles, set regulatory domain to KR on the first console and observe the scanning frequencies shown on the second console.
step 3. Compare the result of step 2 from the one of step 1.
Actual behaviour
Only a limited set of frequency bands, "5745 5765 5785 5805", are scanned.
System
Which model of Raspberry Pi?
Pi3B+
Which OS and version (cat /etc/rpi-issue)?
Raspberry Pi reference 2019-04-08
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, e910bf55ac92e27c6e77043e8995bcb5e0a2d742, stage2
Which firmware version (vcgencmd version)?
Mar 27 2019 15:45:53
Copyright (c) 2012 Broadcom
version 2e98b31d18547962e564bdf88e57b3df7085c29b (clean) (release) (start)
Which kernel version (uname -a)?
Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
Logs
After issuing "iw reg set US"
1559488267.080153: regulatory domain change: set to US by a user request
1559488276.409103: wlan0 (phy #0): scan started
1559488280.481046: wlan0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 5180 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5720 5745 5765 5785 5805 5825, ""
After issuing "iw reg set KR"
1559488316.586612: regulatory domain change: set to KR by a user request
1559488322.861196: wlan0 (phy #0): scan started
1559488323.078740: wlan0 (phy #0): scan finished: 5745 5765 5785 5805, ""
Additional context
As the regulatory domain of Wi-Fi client seems to follow the one of the associated AP, simply changing Wi-Fi country setting could not resolve this issue. I strongly suspect this issue came from the incorrectly configured regulatory domain inside brcmfmac.
Describe the bug When regulatory domain KR is set, it scans only a limited set of allowed frequency bands, "5745 5765 5785 5805", which is incorrect in terms of the wlan regulation here in Korea.
To reproduce step 1. Open two consoles. On the first console, set regulatory domain to US by issuing "iw reg set US". On the second console, issue "iw event -t". And getting back to the first console, issue "iw dev wlan0 scan" and observe the scanning frequencies shown on the second console. step 2. While preserving the two consoles, set regulatory domain to KR on the first console and observe the scanning frequencies shown on the second console. step 3. Compare the result of step 2 from the one of step 1.
Expected behaviour All 2.4Ghz bands and 5Ghz bands should be able to be scanned for South Korea region as shown at the following wiki: https://en.wikipedia.org/wiki/List_of_WLAN_channels.
Actual behaviour Only a limited set of frequency bands, "5745 5765 5785 5805", are scanned.
System
Which model of Raspberry Pi? Pi3B+
Which OS and version (
cat /etc/rpi-issue
)? Raspberry Pi reference 2019-04-08 Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, e910bf55ac92e27c6e77043e8995bcb5e0a2d742, stage2Which firmware version (
vcgencmd version
)? Mar 27 2019 15:45:53 Copyright (c) 2012 Broadcom version 2e98b31d18547962e564bdf88e57b3df7085c29b (clean) (release) (start)Which kernel version (
uname -a
)? Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/LinuxLogs
After issuing "iw reg set US"
1559488267.080153: regulatory domain change: set to US by a user request 1559488276.409103: wlan0 (phy #0): scan started 1559488280.481046: wlan0 (phy #0): scan finished: 2412 2417 2422 2427 2432 2437 2442 2447 2452 2457 2462 5180 5200 5220 5240 5260 5280 5300 5320 5500 5520 5540 5560 5580 5600 5620 5640 5660 5680 5700 5720 5745 5765 5785 5805 5825, ""
After issuing "iw reg set KR"
1559488316.586612: regulatory domain change: set to KR by a user request 1559488322.861196: wlan0 (phy #0): scan started 1559488323.078740: wlan0 (phy #0): scan finished: 5745 5765 5785 5805, ""
Additional context As the regulatory domain of Wi-Fi client seems to follow the one of the associated AP, simply changing Wi-Fi country setting could not resolve this issue. I strongly suspect this issue came from the incorrectly configured regulatory domain inside brcmfmac.