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