Store 6 GHz capability on channel list update for wpa_supplicant use.
This will be used in the next commit to extend scanning behavior based
on changes to 6 GHz channel availability.
Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
}
-#ifdef CONFIG_P2P
-static bool is_6ghz_supported(struct wpa_supplicant *wpa_s)
-{
- struct hostapd_channel_data *chnl;
- int i, j;
-
- for (i = 0; i < wpa_s->hw.num_modes; i++) {
- if (wpa_s->hw.modes[i].mode == HOSTAPD_MODE_IEEE80211A) {
- chnl = wpa_s->hw.modes[i].channels;
- for (j = 0; j < wpa_s->hw.modes[i].num_channels; j++) {
- if (chnl[j].flag & HOSTAPD_CHAN_DISABLED)
- continue;
- if (is_6ghz_freq(chnl[j].freq))
- return true;
- }
- }
- }
-
- return false;
-}
-#endif /* CONFIG_P2P */
-
-
static void wpa_supplicant_optimize_freqs(
struct wpa_supplicant *wpa_s, struct wpa_driver_scan_params *params)
{
}
}
- if (!params.freqs && is_6ghz_supported(wpa_s) &&
+ if (!params.freqs && wpas_is_6ghz_supported(wpa_s, true) &&
(wpa_s->p2p_in_invitation || wpa_s->p2p_in_provisioning))
wpas_p2p_scan_freqs(wpa_s, ¶ms, true);
#endif /* CONFIG_P2P */
wpa_s->hw_capab == CAPAB_NO_HT_VHT)
wpa_s->hw_capab = CAPAB_HT;
}
+ wpa_s->support_6ghz = wpas_is_6ghz_supported(wpa_s, false);
}
capa_res = wpa_drv_get_capa(wpa_s, &capa);
return wpa_s->driver->send_action(wpa_s->drv_priv, freq, wait, dst, src,
bssid, data, data_len, no_cck);
}
+
+
+bool wpas_is_6ghz_supported(struct wpa_supplicant *wpa_s, bool only_enabled)
+{
+ struct hostapd_channel_data *chnl;
+ int i, j;
+
+ for (i = 0; i < wpa_s->hw.num_modes; i++) {
+ if (wpa_s->hw.modes[i].mode == HOSTAPD_MODE_IEEE80211A) {
+ chnl = wpa_s->hw.modes[i].channels;
+ for (j = 0; j < wpa_s->hw.modes[i].num_channels; j++) {
+ if (only_enabled &&
+ (chnl[j].flag & HOSTAPD_CHAN_DISABLED))
+ continue;
+ if (is_6ghz_freq(chnl[j].freq))
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
unsigned int enable_dscp_policy_capa:1;
unsigned int connection_dscp:1;
unsigned int wait_for_dscp_req:1;
+ bool support_6ghz;
struct wpa_signal_info last_signal_info;
void wpas_pasn_auth_trigger(struct wpa_supplicant *wpa_s,
struct pasn_auth *pasn_auth);
void wpas_pasn_auth_work_done(struct wpa_supplicant *wpa_s, int status);
+bool wpas_is_6ghz_supported(struct wpa_supplicant *wpa_s, bool only_enabled);
bool wpa_is_non_eht_scs_traffic_desc_supported(struct wpa_bss *bss);