Change some RRM debug messages from wpa_printf() to wpa_dbg()
This gives us the network device name in logging messages, which can be helpful when having one wpa_supplicant process handle multiple devices. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
parent
a737e40b56
commit
bf3ab50f4f
2 changed files with 25 additions and 24 deletions
|
@ -9517,16 +9517,16 @@ static void wpas_ctrl_neighbor_rep_cb(void *ctx, struct wpabuf *neighbor_rep)
|
|||
|
||||
if (pos[0] != WLAN_EID_NEIGHBOR_REPORT ||
|
||||
nr_len < NR_IE_MIN_LEN) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"CTRL: Invalid Neighbor Report element: id=%u len=%u",
|
||||
data[0], nr_len);
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"CTRL: Invalid Neighbor Report element: id=%u len=%u",
|
||||
data[0], nr_len);
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (2U + nr_len > len) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"CTRL: Invalid Neighbor Report element: id=%u len=%zu nr_len=%u",
|
||||
data[0], len, nr_len);
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"CTRL: Invalid Neighbor Report element: id=%u len=%zu nr_len=%u",
|
||||
data[0], len, nr_len);
|
||||
goto out;
|
||||
}
|
||||
pos += 2;
|
||||
|
@ -9596,8 +9596,8 @@ static int wpas_ctrl_iface_send_neighbor_rep(struct wpa_supplicant *wpa_s,
|
|||
ssid_s = os_strstr(cmd, "ssid=");
|
||||
if (ssid_s) {
|
||||
if (ssid_parse(ssid_s + 5, &ssid)) {
|
||||
wpa_printf(MSG_ERROR,
|
||||
"CTRL: Send Neighbor Report: bad SSID");
|
||||
wpa_msg(wpa_s, MSG_INFO,
|
||||
"CTRL: Send Neighbor Report: bad SSID");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s,
|
|||
NULL);
|
||||
|
||||
if (!wpa_s->rrm.notify_neighbor_rep) {
|
||||
wpa_printf(MSG_ERROR, "RRM: Unexpected neighbor report");
|
||||
wpa_msg(wpa_s, MSG_INFO, "RRM: Unexpected neighbor report");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -90,8 +90,8 @@ void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s,
|
|||
return;
|
||||
}
|
||||
wpabuf_put_data(neighbor_rep, report + 1, report_len - 1);
|
||||
wpa_printf(MSG_DEBUG, "RRM: Notifying neighbor report (token = %d)",
|
||||
report[0]);
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "RRM: Notifying neighbor report (token = %d)",
|
||||
report[0]);
|
||||
wpa_s->rrm.notify_neighbor_rep(wpa_s->rrm.neighbor_rep_cb_ctx,
|
||||
neighbor_rep);
|
||||
wpa_s->rrm.notify_neighbor_rep = NULL;
|
||||
|
@ -148,12 +148,12 @@ int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
|
|||
const u8 *rrm_ie;
|
||||
|
||||
if (wpa_s->wpa_state != WPA_COMPLETED || wpa_s->current_ssid == NULL) {
|
||||
wpa_printf(MSG_DEBUG, "RRM: No connection, no RRM.");
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "RRM: No connection, no RRM.");
|
||||
return -ENOTCONN;
|
||||
}
|
||||
|
||||
if (!wpa_s->rrm.rrm_used) {
|
||||
wpa_printf(MSG_DEBUG, "RRM: No RRM in current connection.");
|
||||
wpa_dbg(wpa_s, MSG_DEBUG, "RRM: No RRM in current connection.");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
@ -161,15 +161,15 @@ int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
|
|||
WLAN_EID_RRM_ENABLED_CAPABILITIES);
|
||||
if (!rrm_ie || !(wpa_s->current_bss->caps & IEEE80211_CAP_RRM) ||
|
||||
!(rrm_ie[2] & WLAN_RRM_CAPS_NEIGHBOR_REPORT)) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"RRM: No network support for Neighbor Report.");
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"RRM: No network support for Neighbor Report.");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
/* Refuse if there's a live request */
|
||||
if (wpa_s->rrm.notify_neighbor_rep) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"RRM: Currently handling previous Neighbor Report.");
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"RRM: Currently handling previous Neighbor Report.");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
|
@ -178,14 +178,15 @@ int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
|
|||
(lci ? 2 + MEASURE_REQUEST_LCI_LEN : 0) +
|
||||
(civic ? 2 + MEASURE_REQUEST_CIVIC_LEN : 0));
|
||||
if (buf == NULL) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"RRM: Failed to allocate Neighbor Report Request");
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"RRM: Failed to allocate Neighbor Report Request");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
wpa_printf(MSG_DEBUG, "RRM: Neighbor report request (for %s), token=%d",
|
||||
(ssid ? wpa_ssid_txt(ssid->ssid, ssid->ssid_len) : ""),
|
||||
wpa_s->rrm.next_neighbor_rep_token);
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"RRM: Neighbor report request (for %s), token=%d",
|
||||
(ssid ? wpa_ssid_txt(ssid->ssid, ssid->ssid_len) : ""),
|
||||
wpa_s->rrm.next_neighbor_rep_token);
|
||||
|
||||
wpabuf_put_u8(buf, WLAN_ACTION_RADIO_MEASUREMENT);
|
||||
wpabuf_put_u8(buf, WLAN_RRM_NEIGHBOR_REPORT_REQUEST);
|
||||
|
@ -267,8 +268,8 @@ int wpas_rrm_send_neighbor_rep_request(struct wpa_supplicant *wpa_s,
|
|||
if (wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,
|
||||
wpa_s->own_addr, wpa_s->bssid,
|
||||
wpabuf_head(buf), wpabuf_len(buf), 0) < 0) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"RRM: Failed to send Neighbor Report Request");
|
||||
wpa_dbg(wpa_s, MSG_DEBUG,
|
||||
"RRM: Failed to send Neighbor Report Request");
|
||||
wpabuf_free(buf);
|
||||
return -ECANCELED;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue