From patchwork Fri Mar 15 15:46:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 1057121 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=candelatech.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="L7KRl8Wc"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=candelatech.com header.i=@candelatech.com header.b="Crw+5u9K"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44LVLl1lYnz9s00 for ; Sat, 16 Mar 2019 02:46:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=GEkiOh9ddgp+1s1Mk3gyEh7hjtNqJ+GfhzaMl1Ift88=; b=L7K Rl8WcQRSl0t/8eCyz8IwpvNtUy+XsnM0b1K6NeIgTKBf633tlZcmcUYmeO9FnAffKf3ALFWgZGWJ8 bA0/G1yy7oP3u/6hzf5h6HFrL2fkwehllCKBDwrTs4RvUOWJLSpvjywNfTLhboXGinQKU9cvMDejD /GPeIx4LfrAeECTnq3H/sEnUxs8lAHVoSMLxJBHzbXG4tn4KLvRKKTjpWAgdwSlDAV853LoK6McmN 6/BJgAE1xKIlw1e77AHhHrIhwxETg3O7K1zzjB2CwKr8eSlnO6JTIDAxFeDAaWJ7BOoPDWIO1WE0M cJaRntTyRD/QJHmWOvJnAxKBfUxMteQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4p2d-0005X3-6o; Fri, 15 Mar 2019 15:46:39 +0000 Received: from [208.74.158.174] (helo=mail3.candelatech.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4p2a-0005W3-VZ for hostap@lists.infradead.org; Fri, 15 Mar 2019 15:46:38 +0000 Received: from v-f24-64.candelatech.com (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id 06C38114B4F; Fri, 15 Mar 2019 08:46:36 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 06C38114B4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1552664796; bh=J18TDhqNC5xKhbZUCraMlt5/QSrhdJxhFnH0hvch/sk=; h=From:To:Cc:Subject:Date:From; b=Crw+5u9KX+bfkdgX76neJeHZi5dUdo9kgOX1GL38eP/wWb3is+gX5i+j0drNl8PJW gK4XCqAzKCK2Y8Ocd0caSGSwKoqMZfMO5C3xvcQT6VDPu/7FslUR14xizN2X3lBWp5 tbP77kurWOLHnpAHBdnGJbQclZ7qx15UwhHy2LW8= From: greearb@candelatech.com To: hostap@lists.infradead.org Subject: [PATCH v2] supplicant: Change some wpa_printf to wpa_dbg Date: Fri, 15 Mar 2019 08:46:33 -0700 Message-Id: <1552664793-3570-1-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 2.7.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190315_084637_092819_F0000FAB X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.1 (+) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ben Greear MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Ben Greear This gives us the network device name in logging messages, which can be helpful when having one supplicant handle multiple devices. Signed-off-by: Ben Greear --- v2: Fix bad whitespace change. wpa_supplicant/ctrl_iface.c | 16 ++++++++-------- wpa_supplicant/rrm.c | 32 ++++++++++++++++---------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 16ae0f5..829233d 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -9387,16 +9387,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; @@ -9466,8 +9466,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_dbg(wpa_s, MSG_ERROR, + "CTRL: Send Neighbor Report: bad SSID"); return -1; } diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c index ab5e6db..6817848 100644 --- a/wpa_supplicant/rrm.c +++ b/wpa_supplicant/rrm.c @@ -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_dbg(wpa_s, MSG_ERROR, "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; @@ -142,12 +142,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; } @@ -155,15 +155,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; } @@ -172,14 +172,14 @@ 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); @@ -261,8 +261,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; }