[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1432223628-1664-11-git-send-email-mateusz.kulikowski@gmail.com>
Date: Thu, 21 May 2015 17:53:23 +0200
From: Mateusz Kulikowski <mateusz.kulikowski@...il.com>
To: gregkh@...uxfoundation.org
Cc: Mateusz Kulikowski <mateusz.kulikowski@...il.com>,
dan.carpenter@...cle.com, joe@...ches.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH v4 10/35] staging: rtl8192e: Remove RTLLIB_DEBUG_WX()
Use netdev_dbg() instead of RTLLIB_DEBUG_WX().
Rewrite some messages to be more readable.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@...il.com>
---
drivers/staging/rtl8192e/rtllib.h | 1 -
drivers/staging/rtl8192e/rtllib_wx.c | 33 ++++++++++++++++-----------------
2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 5f47d75..4edbc87 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -703,7 +703,6 @@ do { \
#define RTLLIB_DL_ERR (1<<31)
#define RTLLIB_DEBUG_INFO(f, a...) RTLLIB_DEBUG(RTLLIB_DL_INFO, f, ## a)
-#define RTLLIB_DEBUG_WX(f, a...) RTLLIB_DEBUG(RTLLIB_DL_WX, f, ## a)
#define RTLLIB_DEBUG_SCAN(f, a...) RTLLIB_DEBUG(RTLLIB_DL_SCAN, f, ## a)
#define RTLLIB_DEBUG_STATE(f, a...) RTLLIB_DEBUG(RTLLIB_DL_STATE, f, ## a)
#define RTLLIB_DEBUG_MGMT(f, a...) RTLLIB_DEBUG(RTLLIB_DL_MGMT, f, ## a)
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index 6234aae..c2c5f0d 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -266,7 +266,7 @@ int rtllib_wx_get_scan(struct rtllib_device *ieee,
int i = 0;
int err = 0;
- RTLLIB_DEBUG_WX("Getting scan\n");
+ netdev_dbg(ieee->dev, "Getting scan\n");
down(&ieee->wx_sem);
spin_lock_irqsave(&ieee->lock, flags);
@@ -293,7 +293,7 @@ int rtllib_wx_get_scan(struct rtllib_device *ieee,
wrqu->data.length = ev - extra;
wrqu->data.flags = 0;
- RTLLIB_DEBUG_WX("exit: %d networks returned.\n", i);
+ netdev_dbg(ieee->dev, "%s(): %d networks returned.\n", __func__, i);
return err;
}
@@ -311,7 +311,7 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
int i, key, key_provided, len;
struct lib80211_crypt_data **crypt;
- RTLLIB_DEBUG_WX("SET_ENCODE\n");
+ netdev_dbg(ieee->dev, "%s()\n", __func__);
key = erq->flags & IW_ENCODE_INDEX;
if (key) {
@@ -324,16 +324,16 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
key = ieee->crypt_info.tx_keyidx;
}
- RTLLIB_DEBUG_WX("Key: %d [%s]\n", key, key_provided ?
+ netdev_dbg(ieee->dev, "Key: %d [%s]\n", key, key_provided ?
"provided" : "default");
crypt = &ieee->crypt_info.crypt[key];
if (erq->flags & IW_ENCODE_DISABLED) {
if (key_provided && *crypt) {
- RTLLIB_DEBUG_WX("Disabling encryption on key %d.\n",
- key);
+ netdev_dbg(ieee->dev,
+ "Disabling encryption on key %d.\n", key);
lib80211_crypt_delayed_deinit(&ieee->crypt_info, crypt);
} else
- RTLLIB_DEBUG_WX("Disabling encryption.\n");
+ netdev_dbg(ieee->dev, "Disabling encryption.\n");
/* Check all the keys to see if any are still configured,
* and if no key index was provided, de-init them all
@@ -405,9 +405,9 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
if (len > erq->length)
memset(sec.keys[key] + erq->length, 0,
len - erq->length);
- RTLLIB_DEBUG_WX("Setting key %d to '%s' (%d:%d bytes)\n",
- key, escape_essid(sec.keys[key], len),
- erq->length, len);
+ netdev_dbg(ieee->dev, "Setting key %d to '%s' (%d:%d bytes)\n",
+ key, escape_essid(sec.keys[key], len), erq->length,
+ len);
sec.key_sizes[key] = len;
(*crypt)->ops->set_key(sec.keys[key], len, NULL,
(*crypt)->priv);
@@ -436,8 +436,8 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
/* No key data - just set the default TX key index */
if (key_provided) {
- RTLLIB_DEBUG_WX("Setting key %d to default Tx key.\n",
- key);
+ netdev_dbg(ieee->dev,
+ "Setting key %d as default Tx key.\n", key);
ieee->crypt_info.tx_keyidx = key;
sec.active_key = key;
sec.flags |= SEC_ACTIVE_KEY;
@@ -449,7 +449,7 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
WLAN_AUTH_SHARED_KEY;
sec.auth_mode = ieee->open_wep ? WLAN_AUTH_OPEN : WLAN_AUTH_SHARED_KEY;
sec.flags |= SEC_AUTH_MODE;
- RTLLIB_DEBUG_WX("Auth: %s\n", sec.auth_mode == WLAN_AUTH_OPEN ?
+ netdev_dbg(ieee->dev, "Auth: %s\n", sec.auth_mode == WLAN_AUTH_OPEN ?
"OPEN" : "SHARED KEY");
/* For now we just support WEP, so only set that security level...
@@ -485,7 +485,7 @@ int rtllib_wx_get_encode(struct rtllib_device *ieee,
int len, key;
struct lib80211_crypt_data *crypt;
- RTLLIB_DEBUG_WX("GET_ENCODE\n");
+ netdev_dbg(ieee->dev, "%s()\n", __func__);
if (ieee->iw_mode == IW_MODE_MONITOR)
return -1;
@@ -592,8 +592,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
module = "rtllib_crypt_ccmp";
break;
default:
- RTLLIB_DEBUG_WX("%s: unknown crypto alg %d\n",
- dev->name, ext->alg);
+ netdev_dbg(ieee->dev, "Unknown crypto alg %d\n", ext->alg);
ret = -EINVAL;
goto done;
}
@@ -673,7 +672,7 @@ done:
if (ieee->reset_on_keychange &&
ieee->iw_mode != IW_MODE_INFRA &&
ieee->reset_port && ieee->reset_port(dev)) {
- RTLLIB_DEBUG_WX("%s: reset_port failed\n", dev->name);
+ netdev_dbg(ieee->dev, "Port reset failed\n");
return -EINVAL;
}
return ret;
--
1.8.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists