Open kapbh opened 5 days ago
Hi @kapbh! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
Thanks @kapbh, I have triaged the issue:
CONFIG_WPA_CLI
, set
is treated as set_network
and command fails, this was already found in WPA3 debug, should be fixed by https://github.com/zephyrproject-rtos/zephyr/pull/79739 (fix is part of hostap)set_country
ops in https://github.com/zephyrproject-rtos/zephyr/commit/5a195001e393fcfbb48111f8376e45b2bb63b233 which broke the regulatory in nrf70, but this design is still incorrect and has below issues
get_country
is unused in WPA supplicant and is unusedsupp_api.c
uses wifi_mgmt_api->reg_domain
for GET
and wpa_cli set country
for SET
which is incorrect because
SET
ignores the force
flagRegulatory
and country
are not interchangeable, country
is a subset of regulatory
information.reg_domain
cannot be removed because it is still used by GET
But as SET
is the main operation here and is same for both regulatory
and country
, so, we can live with the current design, just need to see how to fix force
flag and also maybe remove get_country
. @Rex-Chen-NXP
We also should start enforcing fixes for all drivers when making such changes to avoid breakages.
Thanks @kapbh, I have triaged the issue:
- Due to missing , is treated as and command fails, this was already found in WPA3 debug, should be fixed by
CONFIG_WPA_CLI``set``set_network
modules: hostap: Fix memory leak of network #79739 (fix is part of hostap)- nRF70 should implement the newly added ops in 5a19500 which broke the regulatory in nrf70, but this design is still incorrect and has below issues
set_country
get_country
is unused in WPA supplicant and is unusedsupp_api.c
uses for and for which is incorrect becausewifi_mgmt_api->reg_domain``GET``wpa_cli set country``SET
- the ignores the flag
SET``force
Regulatory
and are not interchangeable, is a subset of information.country``country``regulatory
- the cannot be removed because it is still used by
reg_domain``GET
But as is the main operation here and is same for both and , so, we can live with the current design, just need to see how to fix flag and also maybe remove . @Rex-Chen-NXP
SET``regulatory``country``force``get_country
Yes, the previous changes of country
from my side with below reasons:
-f
means, so I didn't deal it.If any suggestion or need fix pls ping me.
I don't know what option -f means, so I didn't deal it.
If you see the shell help, this basically means that disable any regulatory hints (e.g., beacon) and use the reg_domain from user as a only hint.
Problem is, supplicant doesn't have this concept, so, we cannot implement this using set country
. This can only be implemented using vendor implementation, so, may be we just add a note to this effect and leave it? @jukkar WDYT?
Describe the bug
The wifi command
wifi reg_domain
is not setting the regulatory domain. To Reproducewest build -p -b nrf7002dk/nrf5340/cpuapp
wifi reg_domain IN -f
Cannot set Regulatory domain: -1
Expected behavior
It should set the regulatory domain:
Wi-Fi Regulatory domain set to: IN
Logs and console output
wifi reg_domain IN -f
Cannot set Regulatory domain: -1
Environment (please complete the following information):0fb63c05d1b9ed17cca3d8138a6844d2c125d08b