Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422710AbbEUPy2 (ORCPT ); Thu, 21 May 2015 11:54:28 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:36020 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422661AbbEUPyU (ORCPT ); Thu, 21 May 2015 11:54:20 -0400 From: Mateusz Kulikowski To: gregkh@linuxfoundation.org Cc: Mateusz Kulikowski , dan.carpenter@oracle.com, joe@perches.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 14/35] staging: rtl8192e: Remove RTLLIB_DEBUG_QOS() Date: Thu, 21 May 2015 17:53:27 +0200 Message-Id: <1432223628-1664-15-git-send-email-mateusz.kulikowski@gmail.com> X-Mailer: git-send-email 1.8.4.1 In-Reply-To: <1432223628-1664-1-git-send-email-mateusz.kulikowski@gmail.com> References: <1432223628-1664-1-git-send-email-mateusz.kulikowski@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4332 Lines: 112 - Pass extra argument (rtllib_device) to rtllib_parse_qos_info_param_IE() and update_network() - Replace RTLLIB_DEBUG_QOS() with netdev_dbg() - Remove RTLLIB_DEBUG_QOS() Signed-off-by: Mateusz Kulikowski --- drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_rx.c | 26 ++++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 12a4b1f..a9b9cb9 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -704,7 +704,6 @@ do { \ #define RTLLIB_DEBUG_INFO(f, a...) RTLLIB_DEBUG(RTLLIB_DL_INFO, f, ## a) #define RTLLIB_DEBUG_MGMT(f, a...) RTLLIB_DEBUG(RTLLIB_DL_MGMT, f, ## a) -#define RTLLIB_DEBUG_QOS(f, a...) RTLLIB_DEBUG(RTLLIB_DL_QOS, f, ## a) #ifndef ETH_P_PAE #define ETH_P_PAE 0x888E /* Port Access Entity (IEEE 802.1X) */ diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index c3f7bdb..6aa6e61 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1661,9 +1661,10 @@ static int rtllib_qos_convert_ac_to_parameters(struct rtllib_qos_parameter_info * parameters element. check the information element length to decide * which type to read */ -static int rtllib_parse_qos_info_param_IE(struct rtllib_info_element +static int rtllib_parse_qos_info_param_IE(struct rtllib_device *ieee, + struct rtllib_info_element *info_element, - struct rtllib_network *network) + struct rtllib_network *network) { int rc = 0; struct rtllib_qos_information_element qos_info_element; @@ -1688,7 +1689,7 @@ static int rtllib_parse_qos_info_param_IE(struct rtllib_info_element } if (rc == 0) { - RTLLIB_DEBUG_QOS("QoS is supported\n"); + netdev_dbg(ieee->dev, "QoS is supported\n"); network->qos_data.supported = 1; } return rc; @@ -1765,7 +1766,7 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee, u16 ht_realtek_agg_len = 0; u8 ht_realtek_agg_buf[MAX_IE_LEN]; - if (!rtllib_parse_qos_info_param_IE(info_element, network)) + if (!rtllib_parse_qos_info_param_IE(ieee, info_element, network)) return; if (info_element->len >= 4 && info_element->data[0] == 0x00 && @@ -2356,7 +2357,8 @@ static inline int is_same_network(struct rtllib_network *src, } -static inline void update_network(struct rtllib_network *dst, +static inline void update_network(struct rtllib_device *ieee, + struct rtllib_network *dst, struct rtllib_network *src) { int qos_active; @@ -2430,12 +2432,12 @@ static inline void update_network(struct rtllib_network *dst, sizeof(struct rtllib_qos_data)); if (dst->qos_data.supported == 1) { if (dst->ssid_len) - RTLLIB_DEBUG_QOS - ("QoS the network %s is QoS supported\n", - dst->ssid); + netdev_dbg(ieee->dev, + "QoS the network %s is QoS supported\n", + dst->ssid); else - RTLLIB_DEBUG_QOS - ("QoS the network is QoS supported\n"); + netdev_dbg(ieee->dev, + "QoS the network is QoS supported\n"); } dst->qos_data.active = qos_active; dst->qos_data.old_param_count = old_param; @@ -2571,7 +2573,7 @@ static inline void rtllib_process_probe_response( spin_lock_irqsave(&ieee->lock, flags); if (is_same_network(&ieee->current_network, network, (network->ssid_len ? 1 : 0))) { - update_network(&ieee->current_network, network); + update_network(ieee, &ieee->current_network, network); if ((ieee->current_network.mode == IEEE_N_24G || ieee->current_network.mode == IEEE_G) && ieee->current_network.berp_info_valid) { @@ -2641,7 +2643,7 @@ static inline void rtllib_process_probe_response( network->ssid_len) == 0) && (ieee->state == RTLLIB_NOLINK)))) renew = 1; - update_network(target, network); + update_network(ieee, target, network); if (renew && (ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE)) rtllib_softmac_new_net(ieee, network); } -- 1.8.4.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/