mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/2g_5g_wnm_scan' into 'master'
fix(esp_wifi): Add changes to enable 5ghz scan Closes WIFIBUG-773 See merge request espressif/esp-idf!33657
This commit is contained in:
commit
0c9d7c9dd0
@ -167,22 +167,31 @@ int esp_handle_beacon_probe(u8 type, u8 *frame, size_t len, u8 *sender,
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WNM
|
||||
void get_scan_channel_bitmap(struct wpa_supplicant *wpa_s, wifi_scan_config_t *params)
|
||||
static void get_scan_channel_bitmap(struct wpa_supplicant *wpa_s, wifi_scan_config_t *params)
|
||||
{
|
||||
const int MAX_2GHZ_CHANNEL = 14;
|
||||
|
||||
if (!wpa_s->wnm_num_neighbor_report) {
|
||||
wpa_printf(MSG_DEBUG, "No Neighbor Report to gather scan channel list");
|
||||
return;
|
||||
}
|
||||
params->channel_bitmap.ghz_2_channels = 0;
|
||||
params->channel_bitmap.ghz_5_channels = 0;
|
||||
|
||||
for (int i = 0; i < wpa_s->wnm_num_neighbor_report; i++) {
|
||||
struct neighbor_report *nei;
|
||||
nei = &wpa_s->wnm_neighbor_report_elements[i];
|
||||
params->channel_bitmap.ghz_2_channels |= (1 << nei->channel_number);
|
||||
struct neighbor_report *nei = &wpa_s->wnm_neighbor_report_elements[i];
|
||||
|
||||
if (nei->channel_number <= MAX_2GHZ_CHANNEL) {
|
||||
params->channel_bitmap.ghz_2_channels |= CHANNEL_TO_BIT(nei->channel_number);
|
||||
} else {
|
||||
params->channel_bitmap.ghz_5_channels |= CHANNEL_TO_BIT(nei->channel_number);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /*CONFIG_WNM*/
|
||||
|
||||
static int issue_scan(struct wpa_supplicant *wpa_s,
|
||||
struct wpa_driver_scan_params *scan_params)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user