Skip to content

Conversation

@MaochenWang1
Copy link
Contributor

Should support setting band for both STA and SAP mode.

Should support setting band for both STA and SAP mode.

Signed-off-by: Maochen Wang <[email protected]>
@MaochenWang1 MaochenWang1 changed the title net: L2: wifi: fix AP sets band failed with channel 0 net: l2: wifi: fix AP sets band failed with channel 0 Oct 16, 2024
@jukkar
Copy link
Member

jukkar commented Oct 16, 2024

Perhaps the commit subject
fix AP sets band failed with channel 0
should be clarified, it does not seem to reflect what is being changed.
The change is to support both SAP and STA mode for this command, why there is mention to "channel 0" in the first place.

@MaochenWang1
Copy link
Contributor Author

Perhaps the commit subject fix AP sets band failed with channel 0 should be clarified, it does not seem to reflect what is being changed. The change is to support both SAP and STA mode for this command, why there is mention to "channel 0" in the first place.

Hi @jukkar , as there is following check below, and this commit can fix the issue that AP sets band failed with channel 0
if (params->channel == 0 && params->band == WIFI_FREQ_BAND_UNKNOWN) {
PR_ERROR("Band not provided when channel is 0\n");
return -EINVAL;
}

@krish2718
Copy link
Contributor

Perhaps the commit subject fix AP sets band failed with channel 0 should be clarified, it does not seem to reflect what is being changed. The change is to support both SAP and STA mode for this command, why there is mention to "channel 0" in the first place.

Hi @jukkar , as there is following check below, and this commit can fix the issue that AP sets band failed with channel 0 if (params->channel == 0 && params->band == WIFI_FREQ_BAND_UNKNOWN) { PR_ERROR("Band not provided when channel is 0\n"); return -EINVAL; }

BTW, to convery any channel, there is already a macro in use WIFI_CHANNEL_ANY please switch to that, a non-zero is used to convey explicit intention than default value of 0 (memset or static etc).

@dleach02 dleach02 added the Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. label Oct 16, 2024
@carlescufi carlescufi merged commit 4af697a into zephyrproject-rtos:main Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking area: Wi-Fi Wi-Fi Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants