Move pmf_in_use() into a more generic file
This function is not specific to GAS, so make it available throughout wpa_supplicant without requiring CONFIG_GAS. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
41ec97cd09
commit
8471d940e3
4 changed files with 11 additions and 11 deletions
|
@ -273,16 +273,6 @@ static void gas_query_tx_status(struct wpa_supplicant *wpa_s,
|
|||
}
|
||||
|
||||
|
||||
int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr)
|
||||
{
|
||||
if (wpa_s->current_ssid == NULL ||
|
||||
wpa_s->wpa_state < WPA_4WAY_HANDSHAKE ||
|
||||
os_memcmp(addr, wpa_s->bssid, ETH_ALEN) != 0)
|
||||
return 0;
|
||||
return wpa_sm_pmf_enabled(wpa_s->wpa);
|
||||
}
|
||||
|
||||
|
||||
static int gas_query_tx(struct gas_query *gas, struct gas_query_pending *query,
|
||||
struct wpabuf *req, unsigned int wait_time)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,6 @@ void gas_query_deinit(struct gas_query *gas);
|
|||
int gas_query_rx(struct gas_query *gas, const u8 *da, const u8 *sa,
|
||||
const u8 *bssid, u8 categ, const u8 *data, size_t len,
|
||||
int freq);
|
||||
int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr);
|
||||
|
||||
/**
|
||||
* enum gas_query_result - GAS query result
|
||||
|
|
|
@ -7812,6 +7812,16 @@ int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid)
|
|||
}
|
||||
|
||||
|
||||
int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr)
|
||||
{
|
||||
if (wpa_s->current_ssid == NULL ||
|
||||
wpa_s->wpa_state < WPA_4WAY_HANDSHAKE ||
|
||||
os_memcmp(addr, wpa_s->bssid, ETH_ALEN) != 0)
|
||||
return 0;
|
||||
return wpa_sm_pmf_enabled(wpa_s->wpa);
|
||||
}
|
||||
|
||||
|
||||
int wpas_is_p2p_prioritized(struct wpa_supplicant *wpa_s)
|
||||
{
|
||||
if (wpa_s->global->conc_pref == WPA_CONC_PREF_P2P)
|
||||
|
|
|
@ -1763,6 +1763,7 @@ static inline int wpas_mode_to_ieee80211_mode(enum wpas_mode mode)
|
|||
|
||||
int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
|
||||
int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
|
||||
int pmf_in_use(struct wpa_supplicant *wpa_s, const u8 *addr);
|
||||
|
||||
int wpas_init_ext_pw(struct wpa_supplicant *wpa_s);
|
||||
|
||||
|
|
Loading…
Reference in a new issue