Skip to content
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

hostap: fix VHT channel center segment0 #82113

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gangli02
Copy link
Contributor

No description provided.

Unless ACS is being used, both "channel" and "vht_oper_centr_freq_seg0_idx"
parameters must be set.
Fixed "channel center segment 0" not being set in VHT Operation IE.

Signed-off-by: Gang Li <[email protected]>
Add "bandwidth" parameter to "wifi ap enable" command.

Signed-off-by: Gang Li <[email protected]>
If using embedded supplicant, set bandwidth to driver.

Signed-off-by: Gang Li <[email protected]>
Copy link
Collaborator

@krish2718 krish2718 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall we need a lot more use inputs to do the freq-channel conversions e.g., HT40+/-, regulatory classes etc.

center_freq_seg0_idx = params->channel;
break;
case WIFI_FREQ_BANDWIDTH_40MHZ:
if (!hostapd_cli_cmd_v("set ht_capab [HT40+][SHORT-GI-40]")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHORT-GI should be set as per the underlying driver/chipset capablities

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the choice of HT40+/- should still be user configurable, no? 36-40MHz-HT40+ === 40-40MHz-HT40- == 38.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When starting soft AP, it cannot get the driver/chipset capabilities.
What do you think about putting these configurations in the "wifi ap config" command?
Before starting the AP, users can freely set it, similar to the hostapd.conf file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that should do.

Comment on lines +2124 to +2135
if (params->bandwidth != WIFI_FREQ_BANDWIDTH_20MHZ)
{
chan_idx = params->channel;
for (index = 0; index < index_max; index++)
{
if ((chan_idx >= (center_freq[index] - ch_offset)) && (chan_idx <= (center_freq[index] + ch_offset)))
{
center_freq_seg0_idx = center_freq[index];
break;
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we just do below?

	if (params->bandwidth != WIFI_FREQ_BANDWIDTH_20MHZ)
	{
		center_freq_seg0_idx = params->channel + ch_offset;
	}

We don't even need the static array of frequencies? Of course +/- depends on the HT40+/- user input.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will check it.

@@ -560,6 +560,8 @@ struct wifi_connect_req_params {
const uint8_t *identities[WIFI_ENT_IDENTITY_MAX_USERS];
/** User Passwords */
const uint8_t *passwords[WIFI_ENT_IDENTITY_MAX_USERS];
/** Parameter used for frequency band */
enum wifi_frequency_bandwidths bandwidth;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commit should be the first one as VHT seg0 frequency relies on the this param

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@MaochenWang1
Copy link
Collaborator

FYI @nxf58150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants