mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
station: anqp: add more debug logging
This commit is contained in:
parent
7286a12240
commit
b406a57ca4
@ -381,6 +381,8 @@ static void anqp_response_frame_event(uint32_t ifindex,
|
||||
|
||||
l_queue_remove(anqp_requests, request);
|
||||
|
||||
l_debug("ANQP response received from "MAC, MAC_STR(hdr->address_2));
|
||||
|
||||
if (request->anqp_cb)
|
||||
request->anqp_cb(ANQP_SUCCESS, ptr, qrlen,
|
||||
request->anqp_data);
|
||||
@ -528,11 +530,14 @@ uint32_t anqp_request(uint32_t ifindex, const uint8_t *addr,
|
||||
request, NULL);
|
||||
|
||||
if (!id) {
|
||||
l_debug("Failed to send ANQP request");
|
||||
l_genl_msg_unref(msg);
|
||||
l_free(request);
|
||||
return 0;
|
||||
}
|
||||
|
||||
l_debug("ANQP request sent to "MAC, MAC_STR(bss->addr));
|
||||
|
||||
l_queue_push_head(anqp_requests, request);
|
||||
|
||||
return id;
|
||||
|
@ -245,24 +245,30 @@ const char *hs20_find_settings_file(struct network *network)
|
||||
char **nai_realms = network_get_nai_realms(network);
|
||||
const uint8_t *rc_ie = network_get_roaming_consortium(network);
|
||||
|
||||
if (!hessid || util_mem_is_zero(hessid, 6))
|
||||
if (!hessid || util_mem_is_zero(hessid, 6)) {
|
||||
l_debug("Network has no HESSID, trying NAI realms");
|
||||
goto try_nai_realms;
|
||||
}
|
||||
|
||||
config = l_queue_find(hs20_settings, match_hessid, hessid);
|
||||
if (config)
|
||||
return config->filename;
|
||||
|
||||
try_nai_realms:
|
||||
if (!nai_realms)
|
||||
if (!nai_realms) {
|
||||
l_debug("Network has no NAI Realms, trying roaming consortium");
|
||||
goto try_roaming_consortium;
|
||||
}
|
||||
|
||||
config = l_queue_find(hs20_settings, match_nai_realm, nai_realms);
|
||||
if (config)
|
||||
return config->filename;
|
||||
|
||||
try_roaming_consortium:
|
||||
if (!rc_ie)
|
||||
if (!rc_ie) {
|
||||
l_debug("Network has no roaming consortium IE");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
config = l_queue_find(hs20_settings, match_rc, rc_ie);
|
||||
if (config)
|
||||
|
@ -455,18 +455,19 @@ static bool station_start_anqp(struct station *station, struct network *network,
|
||||
uint8_t anqp[256];
|
||||
uint8_t *ptr = anqp;
|
||||
struct anqp_entry *entry;
|
||||
bool anqp_disabled;
|
||||
bool anqp_disabled = true;
|
||||
|
||||
/* Network already has ANQP data/HESSID */
|
||||
if (hs20_find_settings_file(network))
|
||||
return false;
|
||||
|
||||
if (!l_settings_get_bool(iwd_get_config(), "General", "disable_anqp",
|
||||
&anqp_disabled))
|
||||
return false;
|
||||
l_settings_get_bool(iwd_get_config(), "General", "disable_anqp",
|
||||
&anqp_disabled);
|
||||
|
||||
if (anqp_disabled)
|
||||
if (anqp_disabled) {
|
||||
l_debug("Not querying AP for ANQP data (disabled)");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!bss->hs20_capable)
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user