From patchwork Mon Apr 21 04:52:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 4022291 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1EA599F44A for ; Mon, 21 Apr 2014 04:54:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2D8D02021B for ; Mon, 21 Apr 2014 04:54:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 335F720218 for ; Mon, 21 Apr 2014 04:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbaDUEyx (ORCPT ); Mon, 21 Apr 2014 00:54:53 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:56904 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751199AbaDUEyw (ORCPT ); Mon, 21 Apr 2014 00:54:52 -0400 Received: by mail-pb0-f54.google.com with SMTP id ma3so3358508pbc.13 for ; Sun, 20 Apr 2014 21:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=7i2Btz1pKK11Z+owi2iAFmnSD5t9j9oV86G0pR2rR6w=; b=YVgA5neEMi+PG7+pXbRhNq7/deGxS0OH1kCmg+NkZ1aJQhwpYk8AL8RNe9MqJEhYyy /oSHR5TKYqIVKFbWSt+nFSUjEf2uSUGOf5CiPsQs3g4qxbq1+W9EoSsKxTUhb1LS8lhN 5uFcA6dOW5u6UcZyf7TRDGjTdR1bgPcHjqlNEu0ooMscRfbKRx6MSUqXpaB9/Ex3sBg3 YbxJ2La+XkRI5nqfCfwrx3jQejYsnW/Eh2kXfecD0JjxKja8856qGNJ5t1dGd5jbAq0i HIVbyS8iVZALQ2xWFvAvgwHGNtHhScTV5o3k95RhaKEvgnLORpIA4zUH6GmsFiWjvqYc eoNA== X-Received: by 10.66.142.73 with SMTP id ru9mr35847024pab.41.1398056091259; Sun, 20 Apr 2014 21:54:51 -0700 (PDT) Received: from localhost.localdomain ([61.157.126.13]) by mx.google.com with ESMTPSA id gj9sm75124104pbc.7.2014.04.20.21.54.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2014 21:54:50 -0700 (PDT) From: "Zhao, Gang" To: Cc: Johannes Berg Subject: [PATCH 01/12] mac80211: unify debug function Date: Mon, 21 Apr 2014 12:52:56 +0800 Message-Id: <45c72e6eaa809929a39e4ea4c253877e761f0aa3.1398055853.git.gamerh2o@gmail.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both wiphy_debug() and wiphy_dbg() are used in mac80211. Change wiphy_debug() to wiphy_dbg() so all the debug messages can be dynamically controled whether to be generated or not. Signed-off-by: Zhao, Gang --- net/mac80211/cfg.c | 6 +++--- net/mac80211/main.c | 8 ++++---- net/mac80211/mlme.c | 10 +++++----- net/mac80211/rate.c | 4 ++-- net/mac80211/rx.c | 6 +++--- net/mac80211/tx.c | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index aa39381..83d9e0f 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2106,9 +2106,9 @@ static int ieee80211_set_txq_params(struct wiphy *wiphy, sdata->tx_conf[params->ac] = p; if (drv_conf_tx(local, sdata, params->ac, &p)) { - wiphy_debug(local->hw.wiphy, - "failed to set TX queue parameters for AC %d\n", - params->ac); + wiphy_dbg(local->hw.wiphy, + "failed to set TX queue parameters for AC %d\n", + params->ac); return -EINVAL; } diff --git a/net/mac80211/main.c b/net/mac80211/main.c index cfc24e9..b83a913 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -994,8 +994,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) result = ieee80211_wep_init(local); if (result < 0) - wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n", - result); + wiphy_dbg(local->hw.wiphy, "Failed to initialize wep: %d\n", + result); local->hw.conf.flags = IEEE80211_CONF_IDLE; @@ -1006,8 +1006,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) result = ieee80211_init_rate_ctrl_alg(local, hw->rate_control_algorithm); if (result < 0) { - wiphy_debug(local->hw.wiphy, - "Failed to initialize rate control algorithm\n"); + wiphy_dbg(local->hw.wiphy, + "Failed to initialize rate control algorithm\n"); goto fail_rate; } diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index dee50ae..1e1bdd2 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -3523,11 +3523,11 @@ void ieee80211_sta_work(struct ieee80211_sub_if_data *sdata) * We actually lost the connection ... or did we? * Let's make sure! */ - wiphy_debug(local->hw.wiphy, - "%s: No probe response from AP %pM" - " after %dms, disconnecting.\n", - sdata->name, - bssid, probe_wait_ms); + wiphy_dbg(local->hw.wiphy, + "%s: No probe response from AP %pM" + " after %dms, disconnecting.\n", + sdata->name, + bssid, probe_wait_ms); ieee80211_sta_connection_lost(sdata, bssid, WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY, false); diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c index 8fdadfd..b91be51 100644 --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c @@ -739,8 +739,8 @@ int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local, WARN_ON(local->rate_ctrl); local->rate_ctrl = ref; - wiphy_debug(local->hw.wiphy, "Selected rate control algorithm '%s'\n", - ref->ops->name); + wiphy_dbg(local->hw.wiphy, "Selected rate control algorithm '%s'\n", + ref->ops->name); return 0; } diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 216c45b..c86a4d6 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3176,9 +3176,9 @@ static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx, skb = skb_copy(skb, GFP_ATOMIC); if (!skb) { if (net_ratelimit()) - wiphy_debug(local->hw.wiphy, - "failed to copy skb for %s\n", - sdata->name); + wiphy_dbg(local->hw.wiphy, + "failed to copy skb for %s\n", + sdata->name); return true; } diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 19d36d4..48650da 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -1483,8 +1483,8 @@ static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, return 0; if (pskb_expand_head(skb, head_need, tail_need, GFP_ATOMIC)) { - wiphy_debug(local->hw.wiphy, - "failed to reallocate TX buffer\n"); + wiphy_dbg(local->hw.wiphy, + "failed to reallocate TX buffer\n"); return -ENOMEM; }