All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4 00/24] staging: wilc1000: Resend V4
@ 2016-02-22 10:14 Leo Kim
  2016-02-22 10:14 ` [PATCH V4 01/24] staging: wilc1000: wilc_wlan.c: removes PRINT_ER Leo Kim
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

Dear Greg

This is the 4th fix patch about the mistake merging.
Mistake merging is revert the below commit when rebase V3 patches.
(already applied commit) - 6c2ab2398b88 ("staging: wilc1000: remove spaces around '->'")
(V3 mistake patch) - [PATCH V3 09/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages

I'll resend 4th patches after modified this mistake.
We apologize for the inconvenience.

Thank you and Best Regards.
Leo

Chris Park (19):
  staging: wilc1000: host_interface.c: removes unnecessary log message
  staging: wilc1000: linux_mon.c: removes unnecessary log message
  staging: wilc1000: linux_mon.c: removes comments
  staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log
    messages
  staging: wilc1000: removes unused HOSTAPD_DBG tag
  staging: wilc1000: host_interface.c: removes unnecessary log messages
  staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log
    messages
  staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log
    messages
  staging: wilc1000: removes unused CFG80211_DBG tag
  staging: wilc1000: coreconfigurator.c: removes unnecessary log
    messages
  staging: wilc1000: host_interface.c: removes unnecessary log messages
  staging: wilc1000: host_interface.c: replace PRINT_ER with netdev_err
  staging: wilc1000: linux_wlan.c: removes unnecessary log messages
  staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log
    messages
  staging: wilc1000: wilc_wlan.c: removes unnecessary log messages
  staging: wilc1000: removes unused region feature
  staging: wilc1000: removes usused PRINT_XX(region...)
  staging: wilc1000: moves to define values
  staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE

Leo Kim (5):
  staging: wilc1000: wilc_wlan.c: removes PRINT_ER
  staging: wilc1000: linux_mon.c: removes debug logs
  staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err
  staging: wilc1000: linux_mon.c: add to check routine
  staging: wilc1000: removes potential null dereference

 drivers/staging/wilc1000/coreconfigurator.c       |   4 +-
 drivers/staging/wilc1000/host_interface.c         | 332 ++++++++++-----------
 drivers/staging/wilc1000/linux_mon.c              |  74 +----
 drivers/staging/wilc1000/linux_wlan.c             |   1 -
 drivers/staging/wilc1000/linux_wlan_common.h      |  99 -------
 drivers/staging/wilc1000/wilc_debugfs.c           |  47 +--
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 339 ++--------------------
 drivers/staging/wilc1000/wilc_wlan.c              |   5 -
 drivers/staging/wilc1000/wilc_wlan.h              |   3 +
 9 files changed, 187 insertions(+), 717 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH V4 01/24] staging: wilc1000: wilc_wlan.c: removes PRINT_ER
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 02/24] staging: wilc1000: linux_mon.c: removes debug logs Leo Kim
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patches removes PRINT_ER that is unnecessary debug logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 391173b..c6d206d 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1468,7 +1468,6 @@ int wilc_wlan_init(struct net_device *dev)
 
 	if (!wilc->tx_buffer) {
 		ret = -ENOBUFS;
-		PRINT_ER("Can't allocate Tx Buffer");
 		goto _fail_;
 	}
 
@@ -1477,7 +1476,6 @@ int wilc_wlan_init(struct net_device *dev)
 
 	if (!wilc->rx_buffer) {
 		ret = -ENOBUFS;
-		PRINT_ER("Can't allocate Rx Buffer");
 		goto _fail_;
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 02/24] staging: wilc1000: linux_mon.c: removes debug logs
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
  2016-02-22 10:14 ` [PATCH V4 01/24] staging: wilc1000: wilc_wlan.c: removes PRINT_ER Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 03/24] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err Leo Kim
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patches removes unnecessary debug logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_mon.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 9fcb497..558fb50 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -157,10 +157,8 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
 {
 	struct tx_complete_mon_data *mgmt_tx = NULL;
 
-	if (!dev) {
-		PRINT_D(HOSTAPD_DBG, "ERROR: dev == NULL\n");
+	if (!dev)
 		return -EFAULT;
-	}
 
 	netif_stop_queue(dev);
 	mgmt_tx = kmalloc(sizeof(*mgmt_tx), GFP_ATOMIC);
@@ -205,17 +203,12 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 		return -EFAULT;
 
 	mon_priv = netdev_priv(wilc_wfi_mon);
-
-	if (!mon_priv) {
-		PRINT_ER("Monitor interface private structure is NULL\n");
+	if (!mon_priv)
 		return -EFAULT;
-	}
-
 	rtap_len = ieee80211_get_radiotap_len(skb->data);
-	if (skb->len < rtap_len) {
-		PRINT_ER("Error in radiotap header\n");
+	if (skb->len < rtap_len)
 		return -1;
-	}
+
 	/* skip the radiotap header */
 	PRINT_INFO(HOSTAPD_DBG, "Radiotap len: %d\n", rtap_len);
 
@@ -306,11 +299,8 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 		return wilc_wfi_mon;
 
 	wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv));
-	if (!wilc_wfi_mon) {
-		PRINT_ER("failed to allocate memory\n");
+	if (!wilc_wfi_mon)
 		return NULL;
-	}
-
 	wilc_wfi_mon->type = ARPHRD_IEEE80211_RADIOTAP;
 	strncpy(wilc_wfi_mon->name, name, IFNAMSIZ);
 	wilc_wfi_mon->name[IFNAMSIZ - 1] = 0;
@@ -322,10 +312,8 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 		return NULL;
 	}
 	priv = netdev_priv(wilc_wfi_mon);
-	if (!priv) {
-		PRINT_ER("private structure is NULL\n");
+	if (!priv)
 		return NULL;
-	}
 
 	priv->real_ndev = real_dev;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 03/24] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
  2016-02-22 10:14 ` [PATCH V4 01/24] staging: wilc1000: wilc_wlan.c: removes PRINT_ER Leo Kim
  2016-02-22 10:14 ` [PATCH V4 02/24] staging: wilc1000: linux_mon.c: removes debug logs Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 04/24] staging: wilc1000: linux_mon.c: add to check routine Leo Kim
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patches replaces PRINT_ER with netdev_err.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_mon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 558fb50..2b575d1 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -308,7 +308,7 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 
 	ret = register_netdevice(wilc_wfi_mon);
 	if (ret) {
-		PRINT_ER(" register_netdevice failed (%d)\n", ret);
+		netdev_err(real_dev, "register_netdevice failed\n");
 		return NULL;
 	}
 	priv = netdev_priv(wilc_wfi_mon);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 04/24] staging: wilc1000: linux_mon.c: add to check routine
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (2 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 03/24] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 05/24] staging: wilc1000: removes potential null dereference Leo Kim
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patch adds the return value which needs the check and
prints the error message when it fails.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_mon.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 2b575d1..dd9e4b2 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -266,7 +266,9 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 	/* if source address and bssid fields are equal>>Mac header */
 	/*send it to mgmt frames handler */
 	if (!(memcmp(srcAdd, bssid, 6))) {
-		mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
+		ret = mon_mgmt_tx(mon_priv->real_ndev, skb->data, skb->len);
+		if (ret)
+			netdev_err(dev, "fail to mgmt tx\n");
 		dev_kfree_skb(skb);
 	} else {
 		ret = wilc_mac_xmit(skb, mon_priv->real_ndev);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 05/24] staging: wilc1000: removes potential null dereference
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (3 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 04/24] staging: wilc1000: linux_mon.c: add to check routine Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 06/24] staging: wilc1000: host_interface.c: removes unnecessary log message Leo Kim
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE

This patch removes the error reported by smatch.
 - wilc_wfi_cfgoperations.c:674 scan() error:
   potential null dereference 'strHiddenNetwork.net_info'.  (kmalloc returns null)

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 76f4375..8a3da2d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -668,6 +668,8 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
 				kmalloc_array(request->n_ssids,
 					      sizeof(struct hidden_network),
 					      GFP_KERNEL);
+			if (!strHiddenNetwork.net_info)
+				return -ENOMEM;
 			strHiddenNetwork.n_ssids = request->n_ssids;
 
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 06/24] staging: wilc1000: host_interface.c: removes unnecessary log message
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (4 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 05/24] staging: wilc1000: removes potential null dereference Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 07/24] staging: wilc1000: linux_mon.c: " Leo Kim
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log message and relate variables.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 3de4f99..035f6f5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2999,7 +2999,6 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
 	int result = 0;
 	struct host_if_msg msg;
 	struct host_if_drv *hif_drv = vif->hif_drv;
-	int i;
 
 	if (!hif_drv) {
 		PRINT_ER("driver is null\n");
@@ -3008,10 +3007,6 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
 
 	memset(&msg, 0, sizeof(struct host_if_msg));
 
-	if (INFO) {
-		for (i = 0; i < len; i++)
-			PRINT_INFO(HOSTAPD_DBG, "KEY is %x\n", key[i]);
-	}
 	msg.id = HOST_IF_MSG_KEY;
 	msg.body.key_info.type = WEP;
 	msg.body.key_info.action = ADDKEY_AP;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 07/24] staging: wilc1000: linux_mon.c: removes unnecessary log message
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (5 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 06/24] staging: wilc1000: host_interface.c: removes unnecessary log message Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 08/24] staging: wilc1000: linux_mon.c: removes comments Leo Kim
                   ` (17 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log message and relate variables.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_mon.c | 42 ++++--------------------------------
 1 file changed, 4 insertions(+), 38 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index dd9e4b2..f6349e5 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -52,15 +52,11 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)
 	struct wilc_wfi_radiotap_hdr *hdr;
 	struct wilc_wfi_radiotap_cb_hdr *cb_hdr;
 
-	PRINT_INFO(HOSTAPD_DBG, "In monitor interface receive function\n");
-
 	if (!wilc_wfi_mon)
 		return;
 
-	if (!netif_running(wilc_wfi_mon)) {
-		PRINT_INFO(HOSTAPD_DBG, "Monitor interface already RUNNING\n");
+	if (!netif_running(wilc_wfi_mon))
 		return;
-	}
 
 	/* Get WILC header */
 	memcpy(&header, (buff - HOST_HDR_OFFSET), HOST_HDR_OFFSET);
@@ -73,10 +69,8 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)
 		/* hostapd callback mgmt frame */
 
 		skb = dev_alloc_skb(size + sizeof(struct wilc_wfi_radiotap_cb_hdr));
-		if (!skb) {
-			PRINT_INFO(HOSTAPD_DBG, "Monitor if : No memory to allocate skb");
+		if (!skb)
 			return;
-		}
 
 		memcpy(skb_put(skb, size), buff, size);
 
@@ -103,20 +97,16 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)
 	} else {
 		skb = dev_alloc_skb(size + sizeof(struct wilc_wfi_radiotap_hdr));
 
-		if (!skb) {
-			PRINT_INFO(HOSTAPD_DBG, "Monitor if : No memory to allocate skb");
+		if (!skb)
 			return;
-		}
 
 		memcpy(skb_put(skb, size), buff, size);
 		hdr = (struct wilc_wfi_radiotap_hdr *)skb_push(skb, sizeof(*hdr));
 		memset(hdr, 0, sizeof(struct wilc_wfi_radiotap_hdr));
 		hdr->hdr.it_version = 0; /* PKTHDR_RADIOTAP_VERSION; */
 		hdr->hdr.it_len = cpu_to_le16(sizeof(struct wilc_wfi_radiotap_hdr));
-		PRINT_INFO(HOSTAPD_DBG, "Radiotap len %d\n", hdr->hdr.it_len);
 		hdr->hdr.it_present = cpu_to_le32
 				(1 << IEEE80211_RADIOTAP_RATE);                   /* | */
-		PRINT_INFO(HOSTAPD_DBG, "Presentflags %d\n", hdr->hdr.it_present);
 		hdr->rate = 5; /* txrate->bitrate / 5; */
 	}
 
@@ -138,14 +128,6 @@ struct tx_complete_mon_data {
 static void mgmt_tx_complete(void *priv, int status)
 {
 	struct tx_complete_mon_data *pv_data = priv;
-	u8 *buf =  pv_data->buff;
-
-	if (status == 1) {
-		if (INFO || buf[0] == 0x10 || buf[0] == 0xb0)
-			PRINT_INFO(HOSTAPD_DBG, "Packet sent successfully - Size = %d - Address = %p.\n", pv_data->size, pv_data->buff);
-	} else {
-		PRINT_INFO(HOSTAPD_DBG, "Couldn't send packet - Size = %d - Address = %p.\n", pv_data->size, pv_data->buff);
-	}
 
 	/* incase of fully hosting mode, the freeing will be done in response to the cfg packet */
 	kfree(pv_data->buff);
@@ -193,7 +175,7 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
 static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 				     struct net_device *dev)
 {
-	u32 rtap_len, i, ret = 0;
+	u32 rtap_len, ret = 0;
 	struct WILC_WFI_mon_priv  *mon_priv;
 
 	struct sk_buff *skb2;
@@ -210,18 +192,9 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 		return -1;
 
 	/* skip the radiotap header */
-	PRINT_INFO(HOSTAPD_DBG, "Radiotap len: %d\n", rtap_len);
-
-	if (INFO) {
-		for (i = 0; i < rtap_len; i++)
-			PRINT_INFO(HOSTAPD_DBG, "Radiotap_hdr[%d] %02x\n", i, skb->data[i]);
-	}
 	/* Skip the ratio tap header */
 	skb_pull(skb, rtap_len);
 
-	if (skb->data[0] == 0xc0)
-		PRINT_INFO(HOSTAPD_DBG, "%x:%x:%x:%x:%x%x\n", skb->data[4], skb->data[5], skb->data[6], skb->data[7], skb->data[8], skb->data[9]);
-
 	if (skb->data[0] == 0xc0 && (!(memcmp(broadcast, &skb->data[4], 6)))) {
 		skb2 = dev_alloc_skb(skb->len + sizeof(struct wilc_wfi_radiotap_cb_hdr));
 
@@ -254,11 +227,7 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 	}
 	skb->dev = mon_priv->real_ndev;
 
-	PRINT_INFO(HOSTAPD_DBG, "Skipping the radiotap header\n");
-
 	/* actual deliver of data is device-specific, and not shown here */
-	PRINT_INFO(HOSTAPD_DBG, "SKB netdevice name = %s\n", skb->dev->name);
-	PRINT_INFO(HOSTAPD_DBG, "MONITOR real dev name = %s\n", mon_priv->real_ndev->name);
 
 	/* Identify if Ethernet or MAC header (data or mgmt) */
 	memcpy(srcAdd, &skb->data[10], 6);
@@ -336,13 +305,10 @@ int WILC_WFI_deinit_mon_interface(void)
 	bool rollback_lock = false;
 
 	if (wilc_wfi_mon) {
-		PRINT_D(HOSTAPD_DBG, "In Deinit monitor interface\n");
-		PRINT_D(HOSTAPD_DBG, "RTNL is being locked\n");
 		if (rtnl_is_locked()) {
 			rtnl_unlock();
 			rollback_lock = true;
 		}
-		PRINT_D(HOSTAPD_DBG, "Unregister netdev\n");
 		unregister_netdev(wilc_wfi_mon);
 
 		if (rollback_lock) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 08/24] staging: wilc1000: linux_mon.c: removes comments
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (6 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 07/24] staging: wilc1000: linux_mon.c: " Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 09/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages Leo Kim
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary comments.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_mon.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index f6349e5..6347471 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -191,8 +191,6 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 	if (skb->len < rtap_len)
 		return -1;
 
-	/* skip the radiotap header */
-	/* Skip the ratio tap header */
 	skb_pull(skb, rtap_len);
 
 	if (skb->data[0] == 0xc0 && (!(memcmp(broadcast, &skb->data[4], 6)))) {
@@ -227,8 +225,6 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 	}
 	skb->dev = mon_priv->real_ndev;
 
-	/* actual deliver of data is device-specific, and not shown here */
-
 	/* Identify if Ethernet or MAC header (data or mgmt) */
 	memcpy(srcAdd, &skb->data[10], 6);
 	memcpy(bssid, &skb->data[16], 6);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 09/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (7 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 08/24] staging: wilc1000: linux_mon.c: removes comments Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 10/24] staging: wilc1000: removes unused HOSTAPD_DBG tag Leo Kim
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes the unnecessary log messages which is used with
the HOSTAPD_DBG tag.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 88 +----------------------
 1 file changed, 1 insertion(+), 87 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 8a3da2d..0558518 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1361,10 +1361,6 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
 	vif = netdev_priv(dev);
 
 	if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) {
-		PRINT_D(HOSTAPD_DBG, "Getting station parameters\n");
-
-		PRINT_INFO(HOSTAPD_DBG, ": %x%x%x%x%x\n", mac[0], mac[1], mac[2], mac[3], mac[4]);
-
 		for (i = 0; i < NUM_STA_ASSOCIATED; i++) {
 			if (!(memcmp(mac, priv->assoc_stainfo.au8Sta_AssociatedBss[i], ETH_ALEN))) {
 				associatedsta = i;
@@ -2042,9 +2038,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
 	vif = netdev_priv(dev);
 	priv = wiphy_priv(wiphy);
 	wl = vif->wilc;
-
-	PRINT_D(HOSTAPD_DBG, "In Change virtual interface function\n");
-	PRINT_D(HOSTAPD_DBG, "Wireless interface name =%s\n", dev->name);
 	p2p_local_random = 0x01;
 	p2p_recv_random = 0x00;
 	wilc_ie = false;
@@ -2054,8 +2047,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
 	switch (type) {
 	case NL80211_IFTYPE_STATION:
 		wilc_connecting = 0;
-		PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_STATION\n");
-
 		dev->ieee80211_ptr->iftype = type;
 		priv->wdev->iftype = type;
 		vif->monitor_flag = 0;
@@ -2070,8 +2061,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
 
 	case NL80211_IFTYPE_P2P_CLIENT:
 		wilc_connecting = 0;
-		PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_P2P_CLIENT\n");
-
 		dev->ieee80211_ptr->iftype = type;
 		priv->wdev->iftype = type;
 		vif->monitor_flag = 0;
@@ -2084,7 +2073,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
 
 	case NL80211_IFTYPE_AP:
 		wilc_enable_ps = false;
-		PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_AP %d\n", type);
 		dev->ieee80211_ptr->iftype = type;
 		priv->wdev->iftype = type;
 		vif->iftype = AP_MODE;
@@ -2101,8 +2089,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
 		wilc_optaining_ip = true;
 		mod_timer(&wilc_during_ip_timer,
 			  jiffies + msecs_to_jiffies(during_ip_time));
-		PRINT_D(HOSTAPD_DBG, "Interface type = NL80211_IFTYPE_GO\n");
-
 		wilc_set_operation_mode(vif, AP_MODE);
 		dev->ieee80211_ptr->iftype = type;
 		priv->wdev->iftype = type;
@@ -2132,10 +2118,6 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,
 	priv = wiphy_priv(wiphy);
 	vif = netdev_priv(dev);
 	wl = vif->wilc;
-	PRINT_D(HOSTAPD_DBG, "Starting ap\n");
-
-	PRINT_D(HOSTAPD_DBG, "Interval = %d\n DTIM period = %d\n Head length = %zu Tail length = %zu\n",
-		settings->beacon_interval, settings->dtim_period, beacon->head_len, beacon->tail_len);
 
 	s32Error = set_channel(wiphy, &settings->chandef);
 
@@ -2162,8 +2144,6 @@ static int change_beacon(struct wiphy *wiphy, struct net_device *dev,
 
 	priv = wiphy_priv(wiphy);
 	vif = netdev_priv(priv->dev);
-	PRINT_D(HOSTAPD_DBG, "Setting beacon\n");
-
 
 	s32Error = wilc_add_beacon(vif, 0, 0, beacon->head_len,
 				   (u8 *)beacon->head, beacon->tail_len,
@@ -2185,8 +2165,6 @@ static int stop_ap(struct wiphy *wiphy, struct net_device *dev)
 	priv = wiphy_priv(wiphy);
 	vif = netdev_priv(priv->dev);
 
-	PRINT_D(HOSTAPD_DBG, "Deleting beacon\n");
-
 	wilc_wlan_set_bssid(dev, NullBssid, AP_MODE);
 
 	s32Error = wilc_del_beacon(vif);
@@ -2222,9 +2200,6 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
 
 		PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n", priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][0], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][1], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][2], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][3], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][4],
 			priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][5]);
-		PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.aid);
-		PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n",
-			strStaParams.rates_len);
 
 		if (!params->ht_capa) {
 			strStaParams.ht_supported = false;
@@ -2243,23 +2218,6 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
 		strStaParams.flags_mask = params->sta_flags_mask;
 		strStaParams.flags_set = params->sta_flags_set;
 
-		PRINT_D(HOSTAPD_DBG, "IS HT supported = %d\n",
-			strStaParams.ht_supported);
-		PRINT_D(HOSTAPD_DBG, "Capability Info = %d\n",
-			strStaParams.ht_capa_info);
-		PRINT_D(HOSTAPD_DBG, "AMPDU Params = %d\n",
-			strStaParams.ht_ampdu_params);
-		PRINT_D(HOSTAPD_DBG, "HT Extended params = %d\n",
-			strStaParams.ht_ext_params);
-		PRINT_D(HOSTAPD_DBG, "Tx Beamforming Cap = %d\n",
-			strStaParams.ht_tx_bf_cap);
-		PRINT_D(HOSTAPD_DBG, "Antenna selection info = %d\n",
-			strStaParams.ht_ante_sel);
-		PRINT_D(HOSTAPD_DBG, "Flag Mask = %d\n",
-			strStaParams.flags_mask);
-		PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n",
-			strStaParams.flags_set);
-
 		s32Error = wilc_add_station(vif, &strStaParams);
 		if (s32Error)
 			netdev_err(dev, "Host add station fail\n");
@@ -2283,16 +2241,9 @@ static int del_station(struct wiphy *wiphy, struct net_device *dev,
 	vif = netdev_priv(dev);
 
 	if (vif->iftype == AP_MODE || vif->iftype == GO_MODE) {
-		PRINT_D(HOSTAPD_DBG, "Deleting station\n");
-
-
-		if (!mac) {
-			PRINT_D(HOSTAPD_DBG, "All associated stations\n");
+		if (!mac)
 			s32Error = wilc_del_allstation(vif,
 				     priv->assoc_stainfo.au8Sta_AssociatedBss);
-		} else {
-			PRINT_D(HOSTAPD_DBG, "With mac address: %x%x%x%x%x%x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
-		}
 
 		s32Error = wilc_del_station(vif, mac);
 
@@ -2310,9 +2261,6 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
 	struct add_sta_param strStaParams = { {0} };
 	struct wilc_vif *vif;
 
-
-	PRINT_D(HOSTAPD_DBG, "Change station paramters\n");
-
 	if (!wiphy)
 		return -EFAULT;
 
@@ -2325,14 +2273,6 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
 		strStaParams.rates_len = params->supported_rates_len;
 		strStaParams.rates = params->supported_rates;
 
-		PRINT_D(HOSTAPD_DBG, "BSSID = %x%x%x%x%x%x\n",
-			strStaParams.bssid[0], strStaParams.bssid[1],
-			strStaParams.bssid[2], strStaParams.bssid[3],
-			strStaParams.bssid[4], strStaParams.bssid[5]);
-		PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.aid);
-		PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n",
-			strStaParams.rates_len);
-
 		if (!params->ht_capa) {
 			strStaParams.ht_supported = false;
 		} else {
@@ -2350,23 +2290,6 @@ static int change_station(struct wiphy *wiphy, struct net_device *dev,
 		strStaParams.flags_mask = params->sta_flags_mask;
 		strStaParams.flags_set = params->sta_flags_set;
 
-		PRINT_D(HOSTAPD_DBG, "IS HT supported = %d\n",
-			strStaParams.ht_supported);
-		PRINT_D(HOSTAPD_DBG, "Capability Info = %d\n",
-			strStaParams.ht_capa_info);
-		PRINT_D(HOSTAPD_DBG, "AMPDU Params = %d\n",
-			strStaParams.ht_ampdu_params);
-		PRINT_D(HOSTAPD_DBG, "HT Extended params = %d\n",
-			strStaParams.ht_ext_params);
-		PRINT_D(HOSTAPD_DBG, "Tx Beamforming Cap = %d\n",
-			strStaParams.ht_tx_bf_cap);
-		PRINT_D(HOSTAPD_DBG, "Antenna selection info = %d\n",
-			strStaParams.ht_ante_sel);
-		PRINT_D(HOSTAPD_DBG, "Flag Mask = %d\n",
-			strStaParams.flags_mask);
-		PRINT_D(HOSTAPD_DBG, "Flag Set = %d\n",
-			strStaParams.flags_set);
-
 		s32Error = wilc_edit_station(vif, &strStaParams);
 		if (s32Error)
 			netdev_err(dev, "Host edit station fail\n");
@@ -2386,20 +2309,12 @@ static struct wireless_dev *add_virtual_intf(struct wiphy *wiphy,
 	struct net_device *new_ifc = NULL;
 
 	priv = wiphy_priv(wiphy);
-
-
-
-	PRINT_D(HOSTAPD_DBG, "Adding monitor interface[%p]\n", priv->wdev->netdev);
-
 	vif = netdev_priv(priv->wdev->netdev);
 
 
 	if (type == NL80211_IFTYPE_MONITOR) {
-		PRINT_D(HOSTAPD_DBG, "Monitor interface mode: Initializing mon interface virtual device driver\n");
-		PRINT_D(HOSTAPD_DBG, "Adding monitor interface[%p]\n", vif->ndev);
 		new_ifc = WILC_WFI_init_mon_interface(name, vif->ndev);
 		if (new_ifc) {
-			PRINT_D(HOSTAPD_DBG, "Setting monitor flag in private structure\n");
 			vif = netdev_priv(priv->wdev->netdev);
 			vif->monitor_flag = 1;
 		}
@@ -2409,7 +2324,6 @@ static struct wireless_dev *add_virtual_intf(struct wiphy *wiphy,
 
 static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)
 {
-	PRINT_D(HOSTAPD_DBG, "Deleting virtual interface\n");
 	return 0;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 10/24] staging: wilc1000: removes unused HOSTAPD_DBG tag
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (8 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 09/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 11/24] staging: wilc1000: host_interface.c: removes unnecessary log messages Leo Kim
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unused HOSTAPD_DBG tag.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan_common.h | 4 +---
 drivers/staging/wilc1000/wilc_debugfs.c      | 5 ++---
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 0d9a71f..1f7d806 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -2,13 +2,11 @@
 #define LINUX_WLAN_COMMON_H
 
 enum debug_region {
-	Hostapd_debug = 0,
-	CFG80211_debug,
+	CFG80211_debug = 0,
 	Init_debug,
 	COMP = 0xFFFFFFFF,
 };
 
-#define HOSTAPD_DBG             (1 << Hostapd_debug)
 #define CFG80211_DBG            (1 << CFG80211_debug)
 #define INIT_DBG                (1 << Init_debug)
 
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index a27b077..fafe7cc 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,10 +24,9 @@ static struct dentry *wilc_dir;
  * --------------------------------------------------------------------------------
  */
 
-#define DBG_REGION_ALL	(HOSTAPD_DBG | CFG80211_DBG | INIT_DBG)
+#define DBG_REGION_ALL	(CFG80211_DBG | INIT_DBG)
 #define DBG_LEVEL_ALL	(DEBUG | INFO | WRN | ERR)
-atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | CFG80211_DBG |
-				   HOSTAPD_DBG);
+atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | CFG80211_DBG);
 EXPORT_SYMBOL_GPL(WILC_REGION);
 atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
 EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 11/24] staging: wilc1000: host_interface.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (9 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 10/24] staging: wilc1000: removes unused HOSTAPD_DBG tag Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 12/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
                   ` (13 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log message and relate variables.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 31 ++++---------------------------
 1 file changed, 4 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 035f6f5..eddc0d6 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2095,8 +2095,6 @@ static s32 Handle_Get_InActiveTime(struct wilc_vif *vif,
 	stamac = wid.val;
 	memcpy(stamac, strHostIfStaInactiveT->mac, ETH_ALEN);
 
-	PRINT_D(CFG80211_DBG, "SETING STA inactive time\n");
-
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 
@@ -2118,8 +2116,6 @@ static s32 Handle_Get_InActiveTime(struct wilc_vif *vif,
 		return -EFAULT;
 	}
 
-	PRINT_D(CFG80211_DBG, "Getting inactive time : %d\n", inactive_time);
-
 	up(&hif_drv->sem_inactive_time);
 
 	return result;
@@ -3037,7 +3033,6 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len,
 	struct host_if_msg msg;
 	struct host_if_drv *hif_drv = vif->hif_drv;
 	u8 key_len = ptk_key_len;
-	int i;
 
 	if (!hif_drv) {
 		PRINT_ER("driver is null\n");
@@ -3065,20 +3060,11 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len,
 	if (!msg.body.key_info.attr.wpa.key)
 		return -ENOMEM;
 
-	if (rx_mic) {
+	if (rx_mic)
 		memcpy(msg.body.key_info.attr.wpa.key + 16, rx_mic, RX_MIC_KEY_LEN);
-		if (INFO) {
-			for (i = 0; i < RX_MIC_KEY_LEN; i++)
-				PRINT_INFO(CFG80211_DBG, "PairwiseRx[%d] = %x\n", i, rx_mic[i]);
-		}
-	}
-	if (tx_mic) {
+
+	if (tx_mic)
 		memcpy(msg.body.key_info.attr.wpa.key + 24, tx_mic, TX_MIC_KEY_LEN);
-		if (INFO) {
-			for (i = 0; i < TX_MIC_KEY_LEN; i++)
-				PRINT_INFO(CFG80211_DBG, "PairwiseTx[%d] = %x\n", i, tx_mic[i]);
-		}
-	}
 
 	msg.body.key_info.attr.wpa.key_len = key_len;
 	msg.body.key_info.attr.wpa.mac_addr = mac_addr;
@@ -4083,20 +4069,11 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 	for (i = 0; i < MAX_NUM_STA; i++) {
 		if (memcmp(mac_addr[i], zero_addr, ETH_ALEN)) {
 			memcpy(del_all_sta_info->del_all_sta[i], mac_addr[i], ETH_ALEN);
-			PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n",
-				del_all_sta_info->del_all_sta[i][0],
-				del_all_sta_info->del_all_sta[i][1],
-				del_all_sta_info->del_all_sta[i][2],
-				del_all_sta_info->del_all_sta[i][3],
-				del_all_sta_info->del_all_sta[i][4],
-				del_all_sta_info->del_all_sta[i][5]);
 			assoc_sta++;
 		}
 	}
-	if (!assoc_sta) {
-		PRINT_D(CFG80211_DBG, "NO ASSOCIATED STAS\n");
+	if (!assoc_sta)
 		return result;
-	}
 
 	del_all_sta_info->assoc_sta = assoc_sta;
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 12/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (10 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 11/24] staging: wilc1000: host_interface.c: removes unnecessary log messages Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 13/24] " Leo Kim
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log messages and relate variables.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 233 +---------------------
 1 file changed, 11 insertions(+), 222 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 0558518..9912739 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -290,9 +290,6 @@ static void remove_network_from_shadow(unsigned long arg)
 	for (i = 0; i < last_scanned_cnt; i++) {
 		if (time_after(now, last_scanned_shadow[i].time_scan +
 			       (unsigned long)(SCAN_RESULT_EXPIRE))) {
-			PRINT_D(CFG80211_DBG, "Network expired ScanShadow:%s\n",
-				last_scanned_shadow[i].ssid);
-
 			kfree(last_scanned_shadow[i].ies);
 			last_scanned_shadow[i].ies = NULL;
 
@@ -305,13 +302,9 @@ static void remove_network_from_shadow(unsigned long arg)
 		}
 	}
 
-	PRINT_D(CFG80211_DBG, "Number of cached networks: %d\n",
-		last_scanned_cnt);
 	if (last_scanned_cnt != 0) {
 		hAgingTimer.data = arg;
 		mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
-	} else {
-		PRINT_D(CFG80211_DBG, "No need to restart Aging timer\n");
 	}
 }
 
@@ -327,7 +320,6 @@ static int is_network_in_shadow(struct network_info *pstrNetworkInfo,
 	int i;
 
 	if (last_scanned_cnt == 0) {
-		PRINT_D(CFG80211_DBG, "Starting Aging timer\n");
 		hAgingTimer.data = (unsigned long)user_void;
 		mod_timer(&hAgingTimer, jiffies + msecs_to_jiffies(AGING_TIME));
 		state = -1;
@@ -350,10 +342,9 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
 	u32 ap_index = 0;
 	u8 rssi_index = 0;
 
-	if (last_scanned_cnt >= MAX_NUM_SCANNED_NETWORKS_SHADOW) {
-		PRINT_D(CFG80211_DBG, "Shadow network reached its maximum limit\n");
+	if (last_scanned_cnt >= MAX_NUM_SCANNED_NETWORKS_SHADOW)
 		return;
-	}
+
 	if (ap_found == -1) {
 		ap_index = last_scanned_cnt;
 		last_scanned_cnt++;
@@ -424,21 +415,8 @@ static void CfgScanResult(enum scan_event scan_event,
 				if (!channel)
 					return;
 
-				PRINT_INFO(CFG80211_DBG, "Network Info::"
-					   "CHANNEL Frequency: %d,"
-					   "RSSI: %d,"
-					   "Capability Info: %d,"
-					   "Beacon Period: %d\n",
-					   channel->center_freq,
-					   (s32)network_info->rssi * 100,
-					   network_info->cap_info,
-					   network_info->beacon_period);
-
 				if (network_info->new_network) {
 					if (priv->u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) {
-						PRINT_D(CFG80211_DBG,
-							"Network %s found\n",
-							network_info->ssid);
 						priv->u32RcvdChCount++;
 
 						add_network_to_shadow(network_info, priv, join_params);
@@ -463,8 +441,6 @@ static void CfgScanResult(enum scan_event scan_event,
 
 					for (i = 0; i < priv->u32RcvdChCount; i++) {
 						if (memcmp(last_scanned_shadow[i].bssid, network_info->bssid, 6) == 0) {
-							PRINT_D(CFG80211_DBG, "Update RSSI of %s\n", last_scanned_shadow[i].ssid);
-
 							last_scanned_shadow[i].rssi = network_info->rssi;
 							last_scanned_shadow[i].time_scan = jiffies;
 							break;
@@ -473,15 +449,8 @@ static void CfgScanResult(enum scan_event scan_event,
 				}
 			}
 		} else if (scan_event == SCAN_EVENT_DONE) {
-			PRINT_D(CFG80211_DBG, "Scan Done[%p]\n", priv->dev);
-			PRINT_D(CFG80211_DBG, "Refreshing Scan ...\n");
 			refresh_scan(priv, 1, false);
 
-			if (priv->u32RcvdChCount > 0)
-				PRINT_D(CFG80211_DBG, "%d Network(s) found\n", priv->u32RcvdChCount);
-			else
-				PRINT_D(CFG80211_DBG, "No networks found\n");
-
 			down(&(priv->hSemScanReq));
 
 			if (priv->pstrScanReq) {
@@ -494,7 +463,6 @@ static void CfgScanResult(enum scan_event scan_event,
 		} else if (scan_event == SCAN_EVENT_ABORTED) {
 			down(&(priv->hSemScanReq));
 
-			PRINT_D(CFG80211_DBG, "Scan Aborted\n");
 			if (priv->pstrScanReq) {
 				update_scan_time();
 				refresh_scan(priv, 1, false);
@@ -536,8 +504,6 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent,
 
 		u16ConnectStatus = pstrConnectInfo->u16ConnectStatus;
 
-		PRINT_D(CFG80211_DBG, " Connection response received = %d\n", u8MacStatus);
-
 		if ((u8MacStatus == MAC_DISCONNECTED) &&
 		    (pstrConnectInfo->u16ConnectStatus == SUCCESSFUL_STATUSCODE)) {
 			u16ConnectStatus = WLAN_STATUS_UNSPECIFIED_FAILURE;
@@ -555,8 +521,6 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent,
 			bool bNeedScanRefresh = false;
 			u32 i;
 
-			PRINT_INFO(CFG80211_DBG, "Connection Successful:: BSSID: %x%x%x%x%x%x\n", pstrConnectInfo->au8bssid[0],
-				   pstrConnectInfo->au8bssid[1], pstrConnectInfo->au8bssid[2], pstrConnectInfo->au8bssid[3], pstrConnectInfo->au8bssid[4], pstrConnectInfo->au8bssid[5]);
 			memcpy(priv->au8AssociatedBss, pstrConnectInfo->au8bssid, ETH_ALEN);
 
 
@@ -579,11 +543,6 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent,
 				refresh_scan(priv, 1, true);
 		}
 
-
-		PRINT_D(CFG80211_DBG, "Association request info elements length = %zu\n", pstrConnectInfo->ReqIEsLen);
-
-		PRINT_D(CFG80211_DBG, "Association response info elements length = %d\n", pstrConnectInfo->u16RespIEsLen);
-
 		cfg80211_connect_result(dev, pstrConnectInfo->au8bssid,
 					pstrConnectInfo->pu8ReqIEs, pstrConnectInfo->ReqIEsLen,
 					pstrConnectInfo->pu8RespIEs, pstrConnectInfo->u16RespIEsLen,
@@ -622,7 +581,6 @@ static int set_channel(struct wiphy *wiphy,
 	vif = netdev_priv(priv->dev);
 
 	channelnum = ieee80211_frequency_to_channel(chandef->chan->center_freq);
-	PRINT_D(CFG80211_DBG, "Setting channel %d with frequency %d\n", channelnum, chandef->chan->center_freq);
 
 	curr_channel = channelnum;
 	result = wilc_set_mac_chnl_num(vif, channelnum);
@@ -653,15 +611,8 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
 
 	priv->bCfgScanning = true;
 	if (request->n_channels <= MAX_NUM_SCANNED_NETWORKS) {
-		for (i = 0; i < request->n_channels; i++) {
+		for (i = 0; i < request->n_channels; i++)
 			au8ScanChanList[i] = (u8)ieee80211_frequency_to_channel(request->channels[i]->center_freq);
-			PRINT_INFO(CFG80211_DBG, "ScanChannel List[%d] = %d,", i, au8ScanChanList[i]);
-		}
-
-		PRINT_D(CFG80211_DBG, "Requested num of scan channel %d\n", request->n_channels);
-		PRINT_D(CFG80211_DBG, "Scan Request IE len =  %zu\n", request->ie_len);
-
-		PRINT_D(CFG80211_DBG, "Number of SSIDs %d\n", request->n_ssids);
 
 		if (request->n_ssids >= 1) {
 			strHiddenNetwork.net_info =
@@ -680,11 +631,9 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
 					memcpy(strHiddenNetwork.net_info[i].ssid, request->ssids[i].ssid, request->ssids[i].ssid_len);
 					strHiddenNetwork.net_info[i].ssid_len = request->ssids[i].ssid_len;
 				} else {
-					PRINT_D(CFG80211_DBG, "Received one NULL SSID\n");
 					strHiddenNetwork.n_ssids -= 1;
 				}
 			}
-			PRINT_D(CFG80211_DBG, "Trigger Scan Request\n");
 			s32Error = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
 					     au8ScanChanList,
 					     request->n_channels,
@@ -692,7 +641,6 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
 					     request->ie_len, CfgScanResult,
 					     (void *)priv, &strHiddenNetwork);
 		} else {
-			PRINT_D(CFG80211_DBG, "Trigger Scan Request\n");
 			s32Error = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN,
 					     au8ScanChanList,
 					     request->n_channels,
@@ -704,10 +652,8 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
 		netdev_err(priv->dev, "Requested scanned channels over\n");
 	}
 
-	if (s32Error != 0) {
+	if (s32Error != 0)
 		s32Error = -EBUSY;
-		PRINT_WRN(CFG80211_DBG, "Device is busy: Error(%d)\n", s32Error);
-	}
 
 	return s32Error;
 }
@@ -733,53 +679,30 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
 	vif = netdev_priv(priv->dev);
 	pstrWFIDrv = (struct host_if_drv *)priv->hif_drv;
 
-	PRINT_D(CFG80211_DBG,
-		"Connecting to SSID [%s] on netdev [%p] host if [%p]\n",
-		sme->ssid, dev, priv->hif_drv);
-	if (!(strncmp(sme->ssid, "DIRECT-", 7))) {
-		PRINT_D(CFG80211_DBG, "Connected to Direct network,OBSS disabled\n");
+	if (!(strncmp(sme->ssid, "DIRECT-", 7)))
 		pstrWFIDrv->p2p_connect = 1;
-	} else {
+	else
 		pstrWFIDrv->p2p_connect = 0;
-	}
-	PRINT_INFO(CFG80211_DBG, "Required SSID = %s\n , AuthType = %d\n", sme->ssid, sme->auth_type);
 
 	for (i = 0; i < last_scanned_cnt; i++) {
 		if ((sme->ssid_len == last_scanned_shadow[i].ssid_len) &&
 		    memcmp(last_scanned_shadow[i].ssid,
 			   sme->ssid,
 			   sme->ssid_len) == 0) {
-			PRINT_INFO(CFG80211_DBG, "Network with required SSID is found %s\n", sme->ssid);
-			if (!sme->bssid) {
-				PRINT_INFO(CFG80211_DBG, "BSSID is not passed from the user\n");
+			if (!sme->bssid)
 				break;
-			} else {
+			else
 				if (memcmp(last_scanned_shadow[i].bssid,
 					   sme->bssid,
-					   ETH_ALEN) == 0) {
-					PRINT_INFO(CFG80211_DBG, "BSSID is passed from the user and matched\n");
+					   ETH_ALEN) == 0)
 					break;
-				}
-			}
 		}
 	}
 
 	if (i < last_scanned_cnt) {
-		PRINT_D(CFG80211_DBG, "Required bss is in scan results\n");
-
 		pstrNetworkInfo = &last_scanned_shadow[i];
-
-		PRINT_INFO(CFG80211_DBG, "network BSSID to be associated:"
-			   "%x%x%x%x%x%x\n",
-			   pstrNetworkInfo->bssid[0], pstrNetworkInfo->bssid[1],
-			   pstrNetworkInfo->bssid[2], pstrNetworkInfo->bssid[3],
-			   pstrNetworkInfo->bssid[4], pstrNetworkInfo->bssid[5]);
 	} else {
 		s32Error = -ENOENT;
-		if (last_scanned_cnt == 0)
-			PRINT_D(CFG80211_DBG, "No Scan results yet\n");
-		else
-			PRINT_D(CFG80211_DBG, "Required bss not in scan results: Error(%d)\n", s32Error);
 		wilc_connecting = 0;
 		return s32Error;
 	}
@@ -787,18 +710,12 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
 	memset(priv->WILC_WFI_wep_key, 0, sizeof(priv->WILC_WFI_wep_key));
 	memset(priv->WILC_WFI_wep_key_len, 0, sizeof(priv->WILC_WFI_wep_key_len));
 
-	PRINT_INFO(CFG80211_DBG, "sme->crypto.wpa_versions=%x\n", sme->crypto.wpa_versions);
-	PRINT_INFO(CFG80211_DBG, "sme->crypto.cipher_group=%x\n", sme->crypto.cipher_group);
-
-	PRINT_INFO(CFG80211_DBG, "sme->crypto.n_ciphers_pairwise=%d\n", sme->crypto.n_ciphers_pairwise);
-
 	if (sme->crypto.cipher_group != NO_ENCRYPT) {
 		pcwpa_version = "Default";
 		if (sme->crypto.cipher_group == WLAN_CIPHER_SUITE_WEP40) {
 			u8security = ENCRYPT_ENABLED | WEP;
 			pcgroup_encrypt_val = "WEP40";
 			pccipher_group = "WLAN_CIPHER_SUITE_WEP40";
-			PRINT_INFO(CFG80211_DBG, "WEP Default Key Idx = %d\n", sme->key_idx);
 
 			priv->WILC_WFI_wep_key_len[sme->key_idx] = sme->key_len;
 			memcpy(priv->WILC_WFI_wep_key[sme->key_idx], sme->key, sme->key_len);
@@ -871,18 +788,13 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
 		}
 	}
 
-	PRINT_D(CFG80211_DBG, "Adding key with cipher group = %x\n", sme->crypto.cipher_group);
-
-	PRINT_D(CFG80211_DBG, "Authentication Type = %d\n", sme->auth_type);
 	switch (sme->auth_type)	{
 	case NL80211_AUTHTYPE_OPEN_SYSTEM:
-		PRINT_D(CFG80211_DBG, "In OPEN SYSTEM\n");
 		tenuAuth_type = OPEN_SYSTEM;
 		break;
 
 	case NL80211_AUTHTYPE_SHARED_KEY:
 		tenuAuth_type = SHARED_KEY;
-		PRINT_D(CFG80211_DBG, "In SHARED KEY\n");
 		break;
 
 	default:
@@ -900,12 +812,6 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
 		}
 	}
 
-
-	PRINT_INFO(CFG80211_DBG, "Required Ch = %d\n", pstrNetworkInfo->ch);
-
-	PRINT_INFO(CFG80211_DBG, "Group encryption value = %s\n Cipher Group = %s\n WPA version = %s\n",
-		   pcgroup_encrypt_val, pccipher_group, pcwpa_version);
-
 	curr_channel = pstrNetworkInfo->ch;
 
 	if (!pstrWFIDrv->p2p_connect)
@@ -946,8 +852,6 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_co
 		wlan_channel = INVALID_CHANNEL;
 	wilc_wlan_set_bssid(priv->dev, NullBssid, STATION_MODE);
 
-	PRINT_D(CFG80211_DBG, "Disconnecting with reason code(%d)\n", reason_code);
-
 	p2p_local_random = 0x01;
 	p2p_recv_random = 0x00;
 	wilc_ie = false;
@@ -968,7 +872,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 
 {
 	s32 s32Error = 0, KeyLen = params->key_len;
-	u32 i;
 	struct wilc_priv *priv;
 	const u8 *pu8RxMic = NULL;
 	const u8 *pu8TxMic = NULL;
@@ -983,15 +886,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 	vif = netdev_priv(netdev);
 	wl = vif->wilc;
 
-	PRINT_D(CFG80211_DBG, "Adding key with cipher suite = %x\n", params->cipher);
-
-	PRINT_D(CFG80211_DBG, "%p %p %d\n", wiphy, netdev, key_index);
-
-	PRINT_D(CFG80211_DBG, "key %x %x %x\n", params->key[0],
-		params->key[1],
-		params->key[2]);
-
-
 	switch (params->cipher)	{
 	case WLAN_CIPHER_SUITE_WEP40:
 	case WLAN_CIPHER_SUITE_WEP104:
@@ -999,12 +893,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 			priv->WILC_WFI_wep_key_len[key_index] = params->key_len;
 			memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len);
 
-			PRINT_D(CFG80211_DBG, "Adding AP WEP Default key Idx = %d\n", key_index);
-			PRINT_D(CFG80211_DBG, "Adding AP WEP Key len= %d\n", params->key_len);
-
-			for (i = 0; i < params->key_len; i++)
-				PRINT_D(CFG80211_DBG, "WEP AP key val[%d] = %x\n", i, params->key[i]);
-
 			tenuAuth_type = OPEN_SYSTEM;
 
 			if (params->cipher == WLAN_CIPHER_SUITE_WEP40)
@@ -1021,12 +909,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 			priv->WILC_WFI_wep_key_len[key_index] = params->key_len;
 			memcpy(priv->WILC_WFI_wep_key[key_index], params->key, params->key_len);
 
-			PRINT_D(CFG80211_DBG, "Adding WEP Default key Idx = %d\n", key_index);
-			PRINT_D(CFG80211_DBG, "Adding WEP Key length = %d\n", params->key_len);
-			if (INFO) {
-				for (i = 0; i < params->key_len; i++)
-					PRINT_INFO(CFG80211_DBG, "WEP key value[%d] = %d\n", i, params->key[i]);
-			}
 			wilc_add_wep_key_bss_sta(vif, params->key,
 						 params->key_len, key_index);
 		}
@@ -1077,22 +959,12 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 				priv->wilc_gtk[key_index]->key_len = params->key_len;
 				priv->wilc_gtk[key_index]->seq_len = params->seq_len;
 
-				if (INFO) {
-					for (i = 0; i < params->key_len; i++)
-						PRINT_INFO(CFG80211_DBG, "Adding group key value[%d] = %x\n", i, params->key[i]);
-					for (i = 0; i < params->seq_len; i++)
-						PRINT_INFO(CFG80211_DBG, "Adding group seq value[%d] = %x\n", i, params->seq[i]);
-				}
-
-
 				wilc_add_rx_gtk(vif, params->key, KeyLen,
 						key_index, params->seq_len,
 						params->seq, pu8RxMic,
 						pu8TxMic, AP_MODE, u8gmode);
 
 			} else {
-				PRINT_INFO(CFG80211_DBG, "STA Address: %x%x%x%x%x\n", mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4]);
-
 				if (params->cipher == WLAN_CIPHER_SUITE_TKIP)
 					u8pmode = ENCRYPT_ENABLED | WPA | TKIP;
 				else
@@ -1114,14 +986,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 				if ((params->seq_len) > 0)
 					priv->wilc_ptk[key_index]->seq = kmalloc(params->seq_len, GFP_KERNEL);
 
-				if (INFO) {
-					for (i = 0; i < params->key_len; i++)
-						PRINT_INFO(CFG80211_DBG, "Adding pairwise key value[%d] = %x\n", i, params->key[i]);
-
-					for (i = 0; i < params->seq_len; i++)
-						PRINT_INFO(CFG80211_DBG, "Adding group seq value[%d] = %x\n", i, params->seq[i]);
-				}
-
 				memcpy(priv->wilc_ptk[key_index]->key, params->key, params->key_len);
 
 				if ((params->seq_len) > 0)
@@ -1165,10 +1029,6 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 						memcpy(g_key_gtk_params.seq, params->seq, params->seq_len);
 					}
 					g_key_gtk_params.cipher = params->cipher;
-
-					PRINT_D(CFG80211_DBG, "key %x %x %x\n", g_key_gtk_params.key[0],
-						g_key_gtk_params.key[1],
-						g_key_gtk_params.key[2]);
 					g_gtk_keys_saved = true;
 				}
 
@@ -1202,21 +1062,12 @@ static int add_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 						memcpy(g_key_ptk_params.seq, params->seq, params->seq_len);
 					}
 					g_key_ptk_params.cipher = params->cipher;
-
-					PRINT_D(CFG80211_DBG, "key %x %x %x\n", g_key_ptk_params.key[0],
-						g_key_ptk_params.key[1],
-						g_key_ptk_params.key[2]);
 					g_ptk_keys_saved = true;
 				}
 
 				wilc_add_ptk(vif, params->key, KeyLen,
 					     mac_addr, pu8RxMic, pu8TxMic,
 					     STATION_MODE, u8mode, key_index);
-				PRINT_D(CFG80211_DBG, "Adding pairwise key\n");
-				if (INFO) {
-					for (i = 0; i < params->key_len; i++)
-						PRINT_INFO(CFG80211_DBG, "Adding pairwise key value[%d] = %d\n", i, params->key[i]);
-				}
 			}
 		}
 		break;
@@ -1284,11 +1135,8 @@ static int del_key(struct wiphy *wiphy, struct net_device *netdev,
 	if (key_index >= 0 && key_index <= 3) {
 		memset(priv->WILC_WFI_wep_key[key_index], 0, priv->WILC_WFI_wep_key_len[key_index]);
 		priv->WILC_WFI_wep_key_len[key_index] = 0;
-
-		PRINT_D(CFG80211_DBG, "Removing WEP key with index = %d\n", key_index);
 		wilc_remove_wep_key(vif, key_index);
 	} else {
-		PRINT_D(CFG80211_DBG, "Removing all installed keys\n");
 		wilc_remove_key(priv->hif_drv, mac_addr);
 	}
 
@@ -1301,26 +1149,17 @@ static int get_key(struct wiphy *wiphy, struct net_device *netdev, u8 key_index,
 {
 	struct wilc_priv *priv;
 	struct  key_params key_params;
-	u32 i;
 
 	priv = wiphy_priv(wiphy);
 
 
 	if (!pairwise) {
-		PRINT_D(CFG80211_DBG, "Getting group key idx: %x\n", key_index);
-
 		key_params.key = priv->wilc_gtk[key_index]->key;
 		key_params.cipher = priv->wilc_gtk[key_index]->cipher;
 		key_params.key_len = priv->wilc_gtk[key_index]->key_len;
 		key_params.seq = priv->wilc_gtk[key_index]->seq;
 		key_params.seq_len = priv->wilc_gtk[key_index]->seq_len;
-		if (INFO) {
-			for (i = 0; i < key_params.key_len; i++)
-				PRINT_INFO(CFG80211_DBG, "Retrieved key value %x\n", key_params.key[i]);
-		}
 	} else {
-		PRINT_D(CFG80211_DBG, "Getting pairwise  key\n");
-
 		key_params.key = priv->wilc_ptk[key_index]->key;
 		key_params.cipher = priv->wilc_ptk[key_index]->cipher;
 		key_params.key_len = priv->wilc_ptk[key_index]->key_len;
@@ -1342,8 +1181,6 @@ static int set_default_key(struct wiphy *wiphy, struct net_device *netdev, u8 ke
 	priv = wiphy_priv(wiphy);
 	vif = netdev_priv(priv->dev);
 
-	PRINT_D(CFG80211_DBG, "Setting default key with idx = %d\n", key_index);
-
 	wilc_set_wep_default_keyid(vif, key_index);
 
 	return 0;
@@ -1377,7 +1214,6 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
 
 		wilc_get_inactive_time(vif, mac, &inactive_time);
 		sinfo->inactive_time = 1000 * inactive_time;
-		PRINT_D(CFG80211_DBG, "Inactive time %d\n", sinfo->inactive_time);
 	}
 
 	if (vif->iftype == STATION_MODE) {
@@ -1409,7 +1245,6 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
 static int change_bss(struct wiphy *wiphy, struct net_device *dev,
 		      struct bss_parameters *params)
 {
-	PRINT_D(CFG80211_DBG, "Changing Bss parametrs\n");
 	return 0;
 }
 
@@ -1424,33 +1259,25 @@ static int set_wiphy_params(struct wiphy *wiphy, u32 changed)
 	vif = netdev_priv(priv->dev);
 
 	pstrCfgParamVal.flag = 0;
-	PRINT_D(CFG80211_DBG, "Setting Wiphy params\n");
 
 	if (changed & WIPHY_PARAM_RETRY_SHORT) {
-		PRINT_D(CFG80211_DBG, "Setting WIPHY_PARAM_RETRY_SHORT %d\n",
-			priv->dev->ieee80211_ptr->wiphy->retry_short);
 		pstrCfgParamVal.flag  |= RETRY_SHORT;
 		pstrCfgParamVal.short_retry_limit = priv->dev->ieee80211_ptr->wiphy->retry_short;
 	}
 	if (changed & WIPHY_PARAM_RETRY_LONG) {
-		PRINT_D(CFG80211_DBG, "Setting WIPHY_PARAM_RETRY_LONG %d\n", priv->dev->ieee80211_ptr->wiphy->retry_long);
 		pstrCfgParamVal.flag |= RETRY_LONG;
 		pstrCfgParamVal.long_retry_limit = priv->dev->ieee80211_ptr->wiphy->retry_long;
 	}
 	if (changed & WIPHY_PARAM_FRAG_THRESHOLD) {
-		PRINT_D(CFG80211_DBG, "Setting WIPHY_PARAM_FRAG_THRESHOLD %d\n", priv->dev->ieee80211_ptr->wiphy->frag_threshold);
 		pstrCfgParamVal.flag |= FRAG_THRESHOLD;
 		pstrCfgParamVal.frag_threshold = priv->dev->ieee80211_ptr->wiphy->frag_threshold;
 	}
 
 	if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
-		PRINT_D(CFG80211_DBG, "Setting WIPHY_PARAM_RTS_THRESHOLD %d\n", priv->dev->ieee80211_ptr->wiphy->rts_threshold);
-
 		pstrCfgParamVal.flag |= RTS_THRESHOLD;
 		pstrCfgParamVal.rts_threshold = priv->dev->ieee80211_ptr->wiphy->rts_threshold;
 	}
 
-	PRINT_D(CFG80211_DBG, "Setting CFG params in the host interface\n");
 	s32Error = wilc_hif_set_cfg(vif, &pstrCfgParamVal);
 	if (s32Error)
 		netdev_err(priv->dev, "Error in setting WIPHY PARAMS\n");
@@ -1468,19 +1295,16 @@ static int set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
 	struct wilc_priv *priv = wiphy_priv(wiphy);
 
 	vif = netdev_priv(priv->dev);
-	PRINT_D(CFG80211_DBG, "Setting PMKSA\n");
 
 
 	for (i = 0; i < priv->pmkid_list.numpmkid; i++)	{
 		if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid,
 				 ETH_ALEN)) {
 			flag = PMKID_FOUND;
-			PRINT_D(CFG80211_DBG, "PMKID already exists\n");
 			break;
 		}
 	}
 	if (i < WILC_MAX_NUM_PMKIDS) {
-		PRINT_D(CFG80211_DBG, "Setting PMKID in private structure\n");
 		memcpy(priv->pmkid_list.pmkidlist[i].bssid, pmksa->bssid,
 			    ETH_ALEN);
 		memcpy(priv->pmkid_list.pmkidlist[i].pmkid, pmksa->pmkid,
@@ -1492,10 +1316,9 @@ static int set_pmksa(struct wiphy *wiphy, struct net_device *netdev,
 		s32Error = -EINVAL;
 	}
 
-	if (!s32Error) {
-		PRINT_D(CFG80211_DBG, "Setting pmkid in the host interface\n");
+	if (!s32Error)
 		s32Error = wilc_set_pmkid_info(vif, &priv->pmkid_list);
-	}
+
 	return s32Error;
 }
 
@@ -1507,12 +1330,9 @@ static int del_pmksa(struct wiphy *wiphy, struct net_device *netdev,
 
 	struct wilc_priv *priv = wiphy_priv(wiphy);
 
-	PRINT_D(CFG80211_DBG, "Deleting PMKSA keys\n");
-
 	for (i = 0; i < priv->pmkid_list.numpmkid; i++)	{
 		if (!memcmp(pmksa->bssid, priv->pmkid_list.pmkidlist[i].bssid,
 				 ETH_ALEN)) {
-			PRINT_D(CFG80211_DBG, "Reseting PMKID values\n");
 			memset(&priv->pmkid_list.pmkidlist[i], 0, sizeof(struct host_if_pmkid));
 			break;
 		}
@@ -1539,8 +1359,6 @@ static int flush_pmksa(struct wiphy *wiphy, struct net_device *netdev)
 {
 	struct wilc_priv *priv = wiphy_priv(wiphy);
 
-	PRINT_D(CFG80211_DBG,  "Flushing  PMKID key values\n");
-
 	memset(&priv->pmkid_list, 0, sizeof(struct host_if_pmkid_attr));
 
 	return 0;
@@ -1796,8 +1614,6 @@ static int cancel_remain_on_channel(struct wiphy *wiphy,
 	priv = wiphy_priv(wiphy);
 	vif = netdev_priv(priv->dev);
 
-	PRINT_D(CFG80211_DBG, "Cancel remain on channel\n");
-
 	s32Error = wilc_listen_state_expired(vif, priv->strRemainOnChanParams.u32ListenSessionID);
 	return s32Error;
 }
@@ -1980,7 +1796,6 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
 static int set_cqm_rssi_config(struct wiphy *wiphy, struct net_device *dev,
 			       s32 rssi_thold, u32 rssi_hyst)
 {
-	PRINT_D(CFG80211_DBG, "Setting CQM RSSi Function\n");
 	return 0;
 }
 
@@ -1990,8 +1805,6 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,
 	struct wilc_priv *priv;
 	struct wilc_vif *vif;
 
-	PRINT_D(CFG80211_DBG, "Dumping station information\n");
-
 	if (idx != 0)
 		return -ENOENT;
 
@@ -2011,8 +1824,6 @@ static int set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
 	struct wilc_priv *priv;
 	struct wilc_vif *vif;
 
-	PRINT_D(CFG80211_DBG, " Power save Enabled= %d , TimeOut = %d\n", enabled, timeout);
-
 	if (!wiphy)
 		return -ENOENT;
 
@@ -2196,11 +2007,6 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
 		strStaParams.rates_len = params->supported_rates_len;
 		strStaParams.rates = params->supported_rates;
 
-		PRINT_D(CFG80211_DBG, "Adding station parameters %d\n", params->aid);
-
-		PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n", priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][0], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][1], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][2], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][3], priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][4],
-			priv->assoc_stainfo.au8Sta_AssociatedBss[params->aid][5]);
-
 		if (!params->ht_capa) {
 			strStaParams.ht_supported = false;
 		} else {
@@ -2437,9 +2243,6 @@ static struct wireless_dev *WILC_WFI_CfgAlloc(void)
 {
 	struct wireless_dev *wdev;
 
-
-	PRINT_D(CFG80211_DBG, "Allocating wireless device\n");
-
 	wdev = kzalloc(sizeof(struct wireless_dev), GFP_KERNEL);
 	if (!wdev)
 		goto _fail_;
@@ -2470,8 +2273,6 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de
 	struct wireless_dev *wdev;
 	s32 s32Error = 0;
 
-	PRINT_D(CFG80211_DBG, "Registering wifi device\n");
-
 	wdev = WILC_WFI_CfgAlloc();
 	if (!wdev) {
 		netdev_err(net, "wiphy new allocate failed\n");
@@ -2486,8 +2287,6 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de
 	wdev->wiphy->wowlan = &wowlan_support;
 #endif
 	wdev->wiphy->max_num_pmkids = WILC_MAX_NUM_PMKIDS;
-	PRINT_INFO(CFG80211_DBG, "Max number of PMKIDs = %d\n", wdev->wiphy->max_num_pmkids);
-
 	wdev->wiphy->max_scan_ie_len = 1000;
 	wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
 	wdev->wiphy->cipher_suites = cipher_suites;
@@ -2500,19 +2299,11 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net, struct device *de
 	wdev->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
 	wdev->iftype = NL80211_IFTYPE_STATION;
 
-
-
-	PRINT_INFO(CFG80211_DBG, "Max scan ids = %d,Max scan IE len = %d,Signal Type = %d,Interface Modes = %d,Interface Type = %d\n",
-		   wdev->wiphy->max_scan_ssids, wdev->wiphy->max_scan_ie_len, wdev->wiphy->signal_type,
-		   wdev->wiphy->interface_modes, wdev->iftype);
-
 	set_wiphy_dev(wdev->wiphy, dev);
 
 	s32Error = wiphy_register(wdev->wiphy);
 	if (s32Error)
 		netdev_err(net, "Cannot register wiphy device\n");
-	else
-		PRINT_D(CFG80211_DBG, "Successful Registering\n");
 
 	priv->dev = net;
 	return wdev;
@@ -2573,8 +2364,6 @@ int wilc_deinit_host_int(struct net_device *net)
 
 void wilc_free_wiphy(struct net_device *net)
 {
-	PRINT_D(CFG80211_DBG, "Unregistering wiphy\n");
-
 	if (!net) {
 		PRINT_D(INIT_DBG, "net_device is NULL\n");
 		return;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 13/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (11 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 12/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 14/24] staging: wilc1000: removes unused CFG80211_DBG tag Leo Kim
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log messages.
And, it adds a 'break' statement in accordance with the switch-case rule.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 9912739..a8107f1 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -798,7 +798,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
 		break;
 
 	default:
-		PRINT_D(CFG80211_DBG, "Automatic Authentation type = %d\n", sme->auth_type);
+		break;
 	}
 
 	if (sme->crypto.n_akm_suites) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 14/24] staging: wilc1000: removes unused CFG80211_DBG tag
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (12 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 13/24] " Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 15/24] staging: wilc1000: coreconfigurator.c: removes unnecessary log messages Leo Kim
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unused CFG80211_DBG tag.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan_common.h | 4 +---
 drivers/staging/wilc1000/wilc_debugfs.c      | 6 +++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 1f7d806..e408631 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -2,12 +2,10 @@
 #define LINUX_WLAN_COMMON_H
 
 enum debug_region {
-	CFG80211_debug = 0,
-	Init_debug,
+	Init_debug = 0,
 	COMP = 0xFFFFFFFF,
 };
 
-#define CFG80211_DBG            (1 << CFG80211_debug)
 #define INIT_DBG                (1 << Init_debug)
 
 #if defined(WILC_DEBUGFS)
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index fafe7cc..266d96b 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,9 +24,9 @@ static struct dentry *wilc_dir;
  * --------------------------------------------------------------------------------
  */
 
-#define DBG_REGION_ALL	(CFG80211_DBG | INIT_DBG)
+#define DBG_REGION_ALL	(INIT_DBG)
 #define DBG_LEVEL_ALL	(DEBUG | INFO | WRN | ERR)
-atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | CFG80211_DBG);
+atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG);
 EXPORT_SYMBOL_GPL(WILC_REGION);
 atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
 EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL);
@@ -134,7 +134,7 @@ struct wilc_debugfs_info_t {
 
 static struct wilc_debugfs_info_t debugfs_info[] = {
 	{ "wilc_debug_level",	0666,	(DEBUG | ERR), FOPS(NULL, wilc_debug_level_read, wilc_debug_level_write, NULL), },
-	{ "wilc_debug_region",	0666,	(INIT_DBG | CFG80211_DBG), FOPS(NULL, wilc_debug_region_read, wilc_debug_region_write, NULL), },
+	{ "wilc_debug_region",	0666,	(INIT_DBG), FOPS(NULL, wilc_debug_region_read, wilc_debug_region_write, NULL), },
 };
 
 static int __init wilc_debugfs_init(void)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 15/24] staging: wilc1000: coreconfigurator.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (13 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 14/24] staging: wilc1000: removes unused CFG80211_DBG tag Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 16/24] staging: wilc1000: host_interface.c: " Leo Kim
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/coreconfigurator.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 3a76586..25dc108 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -284,10 +284,8 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
 
 	msg_type = msg_buffer[0];
 
-	if ('N' != msg_type) {
-		PRINT_ER("Received Message format incorrect.\n");
+	if ('N' != msg_type)
 		return -EFAULT;
-	}
 
 	msg_id = msg_buffer[1];
 	msg_len = MAKE_WORD16(msg_buffer[2], msg_buffer[3]);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 16/24] staging: wilc1000: host_interface.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (14 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 15/24] staging: wilc1000: coreconfigurator.c: removes unnecessary log messages Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 17/24] staging: wilc1000: host_interface.c: replace PRINT_ER with netdev_err Leo Kim
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index eddc0d6..a827e06 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1637,11 +1637,8 @@ static int Handle_Key(struct wilc_vif *vif,
 
 			pu8keybuf = kmalloc(pstrHostIFkeyAttr->attr.wep.key_len + 2,
 					    GFP_KERNEL);
-
-			if (pu8keybuf == NULL) {
-				PRINT_ER("No buffer to send Key\n");
+			if (!pu8keybuf)
 				return -ENOMEM;
-			}
 
 			pu8keybuf[0] = pstrHostIFkeyAttr->attr.wep.index;
 			pu8keybuf[1] = pstrHostIFkeyAttr->attr.wep.key_len;
@@ -1662,10 +1659,8 @@ static int Handle_Key(struct wilc_vif *vif,
 			kfree(pu8keybuf);
 		} else if (pstrHostIFkeyAttr->action & ADDKEY) {
 			pu8keybuf = kmalloc(pstrHostIFkeyAttr->attr.wep.key_len + 2, GFP_KERNEL);
-			if (!pu8keybuf) {
-				PRINT_ER("No buffer to send Key\n");
+			if (!pu8keybuf)
 				return -ENOMEM;
-			}
 			pu8keybuf[0] = pstrHostIFkeyAttr->attr.wep.index;
 			memcpy(pu8keybuf + 1, &pstrHostIFkeyAttr->attr.wep.key_len, 1);
 			memcpy(pu8keybuf + 2, pstrHostIFkeyAttr->attr.wep.key,
@@ -1709,7 +1704,6 @@ static int Handle_Key(struct wilc_vif *vif,
 		if (pstrHostIFkeyAttr->action & ADDKEY_AP) {
 			pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
 			if (!pu8keybuf) {
-				PRINT_ER("No buffer to send RxGTK Key\n");
 				ret = -ENOMEM;
 				goto _WPARxGtk_end_case_;
 			}
@@ -1741,7 +1735,6 @@ static int Handle_Key(struct wilc_vif *vif,
 		} else if (pstrHostIFkeyAttr->action & ADDKEY) {
 			pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
 			if (pu8keybuf == NULL) {
-				PRINT_ER("No buffer to send RxGTK Key\n");
 				ret = -ENOMEM;
 				goto _WPARxGtk_end_case_;
 			}
@@ -1781,7 +1774,6 @@ _WPARxGtk_end_case_:
 		if (pstrHostIFkeyAttr->action & ADDKEY_AP) {
 			pu8keybuf = kmalloc(PTK_KEY_MSG_LEN + 1, GFP_KERNEL);
 			if (!pu8keybuf) {
-				PRINT_ER("No buffer to send PTK Key\n");
 				ret = -ENOMEM;
 				goto _WPAPtk_end_case_;
 			}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 17/24] staging: wilc1000: host_interface.c: replace PRINT_ER with netdev_err
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (15 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 16/24] staging: wilc1000: host_interface.c: " Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 18/24] staging: wilc1000: linux_wlan.c: removes unnecessary log messages Leo Kim
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch replaces PRINT_ER with netdev_err.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/host_interface.c | 284 +++++++++++++++---------------
 1 file changed, 142 insertions(+), 142 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index a827e06..0c09df4 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -335,7 +335,7 @@ static s32 handle_set_wfi_drv_handler(struct wilc_vif *vif,
 		up(&hif_sema_driver);
 
 	if (result) {
-		PRINT_ER("Failed to set driver handler\n");
+		netdev_err(vif->ndev, "Failed to set driver handler\n");
 		return -EINVAL;
 	}
 
@@ -360,7 +360,7 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
 		up(&hif_sema_driver);
 
 	if (result) {
-		PRINT_ER("Failed to set driver handler\n");
+		netdev_err(vif->ndev, "Failed to set driver handler\n");
 		return -EINVAL;
 	}
 
@@ -389,7 +389,7 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 	host_int_get_ipaddress(vif, firmware_ip_addr, idx);
 
 	if (result) {
-		PRINT_ER("Failed to set IP address\n");
+		netdev_err(vif->ndev, "Failed to set IP address\n");
 		return -EINVAL;
 	}
 
@@ -417,7 +417,7 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx)
 		wilc_setup_ipaddress(vif, set_ip[idx], idx);
 
 	if (result != 0) {
-		PRINT_ER("Failed to get IP address\n");
+		netdev_err(vif->ndev, "Failed to get IP address\n");
 		return -EINVAL;
 	}
 
@@ -462,7 +462,7 @@ static s32 handle_get_mac_address(struct wilc_vif *vif,
 				      wilc_get_vif_idx(vif));
 
 	if (result) {
-		PRINT_ER("Failed to get mac address\n");
+		netdev_err(vif->ndev, "Failed to get mac address\n");
 		result = -EFAULT;
 	}
 	up(&hif_sema_wait_response);
@@ -488,7 +488,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.bss_type = (u8)cfg_param_attr->cfg_attr_info.bss_type;
 		} else {
-			PRINT_ER("check value 6 over\n");
+			netdev_err(vif->ndev, "check value 6 over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -504,7 +504,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.auth_type = (u8)cfg_param_attr->cfg_attr_info.auth_type;
 		} else {
-			PRINT_ER("Impossible value \n");
+			netdev_err(vif->ndev, "Impossible value \n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -519,7 +519,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.auth_timeout = cfg_param_attr->cfg_attr_info.auth_timeout;
 		} else {
-			PRINT_ER("Range(1 ~ 65535) over\n");
+			netdev_err(vif->ndev, "Range(1 ~ 65535) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -533,7 +533,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.power_mgmt_mode = (u8)cfg_param_attr->cfg_attr_info.power_mgmt_mode;
 		} else {
-			PRINT_ER("Invalid power mode\n");
+			netdev_err(vif->ndev, "Invalid power mode\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -548,7 +548,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.short_retry_limit = cfg_param_attr->cfg_attr_info.short_retry_limit;
 		} else {
-			PRINT_ER("Range(1~256) over\n");
+			netdev_err(vif->ndev, "Range(1~256) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -563,7 +563,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.long_retry_limit = cfg_param_attr->cfg_attr_info.long_retry_limit;
 		} else {
-			PRINT_ER("Range(1~256) over\n");
+			netdev_err(vif->ndev, "Range(1~256) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -578,7 +578,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.frag_threshold = cfg_param_attr->cfg_attr_info.frag_threshold;
 		} else {
-			PRINT_ER("Threshold Range fail\n");
+			netdev_err(vif->ndev, "Threshold Range fail\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -593,7 +593,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.rts_threshold = cfg_param_attr->cfg_attr_info.rts_threshold;
 		} else {
-			PRINT_ER("Threshold Range fail\n");
+			netdev_err(vif->ndev, "Threshold Range fail\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -607,7 +607,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.preamble_type = cfg_param_attr->cfg_attr_info.preamble_type;
 		} else {
-			PRINT_ER("Preamle Range(0~2) over\n");
+			netdev_err(vif->ndev, "Preamle Range(0~2) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -621,7 +621,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.short_slot_allowed = (u8)cfg_param_attr->cfg_attr_info.short_slot_allowed;
 		} else {
-			PRINT_ER("Short slot(2) over\n");
+			netdev_err(vif->ndev, "Short slot(2) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -635,7 +635,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.txop_prot_disabled = (u8)cfg_param_attr->cfg_attr_info.txop_prot_disabled;
 		} else {
-			PRINT_ER("TXOP prot disable\n");
+			netdev_err(vif->ndev, "TXOP prot disable\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -650,7 +650,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.beacon_interval = cfg_param_attr->cfg_attr_info.beacon_interval;
 		} else {
-			PRINT_ER("Beacon interval(1~65535) fail\n");
+			netdev_err(vif->ndev, "Beacon interval(1~65535)fail\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -665,7 +665,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.dtim_period = cfg_param_attr->cfg_attr_info.dtim_period;
 		} else {
-			PRINT_ER("DTIM range(1~255) fail\n");
+			netdev_err(vif->ndev, "DTIM range(1~255) fail\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -679,7 +679,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(char);
 			hif_drv->cfg_values.site_survey_enabled = (u8)cfg_param_attr->cfg_attr_info.site_survey_enabled;
 		} else {
-			PRINT_ER("Site survey disable\n");
+			netdev_err(vif->ndev, "Site survey disable\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -694,7 +694,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.site_survey_scan_time = cfg_param_attr->cfg_attr_info.site_survey_scan_time;
 		} else {
-			PRINT_ER("Site survey scan time(1~65535) over\n");
+			netdev_err(vif->ndev, "Site scan time(1~65535) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -709,7 +709,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.active_scan_time = cfg_param_attr->cfg_attr_info.active_scan_time;
 		} else {
-			PRINT_ER("Active scan time(1~65535) over\n");
+			netdev_err(vif->ndev, "Active time(1~65535) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -724,7 +724,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.passive_scan_time = cfg_param_attr->cfg_attr_info.passive_scan_time;
 		} else {
-			PRINT_ER("Passive scan time(1~65535) over\n");
+			netdev_err(vif->ndev, "Passive time(1~65535) over\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -745,7 +745,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 			wid_list[wid_cnt].size = sizeof(u16);
 			hif_drv->cfg_values.curr_tx_rate = (u8)curr_tx_rate;
 		} else {
-			PRINT_ER("out of TX rate\n");
+			netdev_err(vif->ndev, "out of TX rate\n");
 			result = -EINVAL;
 			goto ERRORHANDLER;
 		}
@@ -756,7 +756,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
 				      wid_cnt, wilc_get_vif_idx(vif));
 
 	if (result)
-		PRINT_ER("Error in setting CFG params\n");
+		netdev_err(vif->ndev, "Error in setting CFG params\n");
 
 ERRORHANDLER:
 	up(&hif_drv->sem_cfg_values);
@@ -789,13 +789,13 @@ static s32 Handle_Scan(struct wilc_vif *vif,
 
 	if ((hif_drv->hif_state >= HOST_IF_SCANNING) &&
 	    (hif_drv->hif_state < HOST_IF_CONNECTED)) {
-		PRINT_ER("Already scan\n");
+		netdev_err(vif->ndev, "Already scan\n");
 		result = -EBUSY;
 		goto ERRORHANDLER;
 	}
 
 	if (wilc_optaining_ip || wilc_connecting) {
-		PRINT_ER("Don't do obss scan\n");
+		netdev_err(vif->ndev, "Don't do obss scan\n");
 		result = -EBUSY;
 		goto ERRORHANDLER;
 	}
@@ -871,7 +871,7 @@ static s32 Handle_Scan(struct wilc_vif *vif,
 				      wilc_get_vif_idx(vif));
 
 	if (result)
-		PRINT_ER("Failed to send scan parameters config packet\n");
+		netdev_err(vif->ndev, "Failed to send scan parameters\n");
 
 ERRORHANDLER:
 	if (result) {
@@ -911,13 +911,13 @@ static s32 Handle_ScanDone(struct wilc_vif *vif,
 					      wilc_get_vif_idx(vif));
 
 		if (result) {
-			PRINT_ER("Failed to set abort running scan\n");
+			netdev_err(vif->ndev, "Failed to set abort running\n");
 			result = -EFAULT;
 		}
 	}
 
 	if (!hif_drv) {
-		PRINT_ER("Driver handler is NULL\n");
+		netdev_err(vif->ndev, "Driver handler is NULL\n");
 		return result;
 	}
 
@@ -943,13 +943,13 @@ static s32 Handle_Connect(struct wilc_vif *vif,
 
 	if (memcmp(pstrHostIFconnectAttr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) {
 		result = 0;
-		PRINT_ER("Trying to connect to an already connected AP, Discard connect request\n");
+		netdev_err(vif->ndev, "Discard connect request\n");
 		return result;
 	}
 
 	ptstrJoinBssParam = pstrHostIFconnectAttr->params;
 	if (!ptstrJoinBssParam) {
-		PRINT_ER("Required BSSID not found\n");
+		netdev_err(vif->ndev, "Required BSSID not found\n");
 		result = -ENOENT;
 		goto ERRORHANDLER;
 	}
@@ -1057,7 +1057,7 @@ static s32 Handle_Connect(struct wilc_vif *vif,
 	if ((pstrHostIFconnectAttr->ch >= 1) && (pstrHostIFconnectAttr->ch <= 14)) {
 		*(pu8CurrByte++) = pstrHostIFconnectAttr->ch;
 	} else {
-		PRINT_ER("Channel out of range\n");
+		netdev_err(vif->ndev, "Channel out of range\n");
 		*(pu8CurrByte++) = 0xFF;
 	}
 	*(pu8CurrByte++)  = (ptstrJoinBssParam->cap_info) & 0xFF;
@@ -1140,7 +1140,7 @@ static s32 Handle_Connect(struct wilc_vif *vif,
 				      u32WidsCount,
 				      wilc_get_vif_idx(vif));
 	if (result) {
-		PRINT_ER("failed to send config packet\n");
+		netdev_err(vif->ndev, "failed to send config packet\n");
 		result = -EFAULT;
 		goto ERRORHANDLER;
 	} else {
@@ -1177,7 +1177,7 @@ ERRORHANDLER:
 			strConnectInfo.pu8ReqIEs = NULL;
 
 		} else {
-			PRINT_ER("Connect callback function pointer is NULL\n");
+			netdev_err(vif->ndev, "Connect callback is NULL\n");
 		}
 	}
 
@@ -1234,7 +1234,7 @@ static s32 Handle_FlushConnect(struct wilc_vif *vif)
 				      u32WidsCount,
 				      wilc_get_vif_idx(join_req_vif));
 	if (result) {
-		PRINT_ER("failed to send config packet\n");
+		netdev_err(vif->ndev, "failed to send config packet\n");
 		result = -EINVAL;
 	}
 
@@ -1250,7 +1250,7 @@ static s32 Handle_ConnectTimeout(struct wilc_vif *vif)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("Driver handler is NULL\n");
+		netdev_err(vif->ndev, "Driver handler is NULL\n");
 		return result;
 	}
 
@@ -1283,7 +1283,7 @@ static s32 Handle_ConnectTimeout(struct wilc_vif *vif)
 		kfree(strConnectInfo.pu8ReqIEs);
 		strConnectInfo.pu8ReqIEs = NULL;
 	} else {
-		PRINT_ER("Connect callback function pointer is NULL\n");
+		netdev_err(vif->ndev, "Connect callback is NULL\n");
 	}
 
 	wid.id = (u16)WID_DISCONNECT;
@@ -1294,7 +1294,7 @@ static s32 Handle_ConnectTimeout(struct wilc_vif *vif)
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send dissconect config packet\n");
+		netdev_err(vif->ndev, "Failed to send dissconect\n");
 
 	hif_drv->usr_conn_req.ssid_len = 0;
 	kfree(hif_drv->usr_conn_req.ssid);
@@ -1336,7 +1336,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
 		wilc_parse_network_info(pstrRcvdNetworkInfo->buffer, &pstrNetworkInfo);
 		if ((!pstrNetworkInfo) ||
 		    (!hif_drv->usr_scan_req.scan_result)) {
-			PRINT_ER("driver is null\n");
+			netdev_err(vif->ndev, "driver is null\n");
 			result = -EINVAL;
 			goto done;
 		}
@@ -1418,7 +1418,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("Driver handler is NULL\n");
+		netdev_err(vif->ndev, "Driver handler is NULL\n");
 		return -ENODEV;
 	}
 
@@ -1427,14 +1427,14 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 	    hif_drv->usr_scan_req.scan_result) {
 		if (!pstrRcvdGnrlAsyncInfo->buffer ||
 		    !hif_drv->usr_conn_req.conn_result) {
-			PRINT_ER("driver is null\n");
+			netdev_err(vif->ndev, "driver is null\n");
 			return -EINVAL;
 		}
 
 		u8MsgType = pstrRcvdGnrlAsyncInfo->buffer[0];
 
 		if ('I' != u8MsgType) {
-			PRINT_ER("Received Message format incorrect.\n");
+			netdev_err(vif->ndev, "Received Message incorrect.\n");
 			return -EFAULT;
 		}
 
@@ -1463,7 +1463,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 					s32Err = wilc_parse_assoc_resp_info(rcv_assoc_resp, u32RcvdAssocRespInfoLen,
 								    &pstrConnectRespInfo);
 					if (s32Err) {
-						PRINT_ER("wilc_parse_assoc_resp_info() returned error %d\n", s32Err);
+						netdev_err(vif->ndev, "wilc_parse_assoc_resp_info() returned error %d\n", s32Err);
 					} else {
 						strConnectInfo.u16ConnectStatus = pstrConnectRespInfo->status;
 
@@ -1486,10 +1486,10 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 
 			if ((u8MacStatus == MAC_CONNECTED) &&
 			    (strConnectInfo.u16ConnectStatus != SUCCESSFUL_STATUSCODE))	{
-				PRINT_ER("Received MAC status is MAC_CONNECTED while the received status code in Asoc Resp is not SUCCESSFUL_STATUSCODE\n");
+				netdev_err(vif->ndev, "Received MAC status is MAC_CONNECTED while the received status code in Asoc Resp is not SUCCESSFUL_STATUSCODE\n");
 				eth_zero_addr(wilc_connected_ssid);
 			} else if (u8MacStatus == MAC_DISCONNECTED)    {
-				PRINT_ER("Received MAC status is MAC_DISCONNECTED\n");
+				netdev_err(vif->ndev, "Received MAC status is MAC_DISCONNECTED\n");
 				eth_zero_addr(wilc_connected_ssid);
 			}
 
@@ -1568,7 +1568,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 								  &strDisconnectNotifInfo,
 								  hif_drv->usr_conn_req.arg);
 			} else {
-				PRINT_ER("Connect result callback function is NULL\n");
+				netdev_err(vif->ndev, "Connect result NULL\n");
 			}
 
 			eth_zero_addr(hif_drv->assoc_bssid);
@@ -1742,7 +1742,7 @@ static int Handle_Key(struct wilc_vif *vif,
 			if (hif_drv->hif_state == HOST_IF_CONNECTED)
 				memcpy(pu8keybuf, hif_drv->assoc_bssid, ETH_ALEN);
 			else
-				PRINT_ER("Couldn't handle WPARxGtk while state is not HOST_IF_CONNECTED\n");
+				netdev_err(vif->ndev, "Couldn't handle\n");
 
 			memcpy(pu8keybuf + 6, pstrHostIFkeyAttr->attr.wpa.seq, 8);
 			memcpy(pu8keybuf + 14, &pstrHostIFkeyAttr->attr.wpa.index, 1);
@@ -1802,7 +1802,7 @@ _WPARxGtk_end_case_:
 		} else if (pstrHostIFkeyAttr->action & ADDKEY) {
 			pu8keybuf = kmalloc(PTK_KEY_MSG_LEN, GFP_KERNEL);
 			if (!pu8keybuf) {
-				PRINT_ER("No buffer to send PTK Key\n");
+				netdev_err(vif->ndev, "No buffer send PTK\n");
 				ret = -ENOMEM;
 				goto _WPAPtk_end_case_;
 			}
@@ -1834,7 +1834,7 @@ _WPAPtk_end_case_:
 	case PMKSA:
 		pu8keybuf = kmalloc((pstrHostIFkeyAttr->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1, GFP_KERNEL);
 		if (!pu8keybuf) {
-			PRINT_ER("No buffer to send PMKSA Key\n");
+			netdev_err(vif->ndev, "No buffer to send PMKSA Key\n");
 			return -ENOMEM;
 		}
 
@@ -1858,7 +1858,7 @@ _WPAPtk_end_case_:
 	}
 
 	if (result)
-		PRINT_ER("Failed to send key config packet\n");
+		netdev_err(vif->ndev, "Failed to send key config packet\n");
 
 	return result;
 }
@@ -1885,7 +1885,7 @@ static void Handle_Disconnect(struct wilc_vif *vif)
 				      wilc_get_vif_idx(vif));
 
 	if (result) {
-		PRINT_ER("Failed to send dissconect config packet\n");
+		netdev_err(vif->ndev, "Failed to send dissconect\n");
 	} else {
 		tstrDisconnectNotifInfo strDisconnectNotifInfo;
 
@@ -1914,7 +1914,7 @@ static void Handle_Disconnect(struct wilc_vif *vif)
 							  &strDisconnectNotifInfo,
 							  hif_drv->usr_conn_req.arg);
 		} else {
-			PRINT_ER("usr_conn_req.conn_result = NULL\n");
+			netdev_err(vif->ndev, "conn_result = NULL\n");
 		}
 
 		scan_while_connected = false;
@@ -1969,7 +1969,7 @@ static s32 Handle_GetChnl(struct wilc_vif *vif)
 				      wilc_get_vif_idx(vif));
 
 	if (result) {
-		PRINT_ER("Failed to get channel number\n");
+		netdev_err(vif->ndev, "Failed to get channel number\n");
 		result = -EFAULT;
 	}
 
@@ -1989,7 +1989,7 @@ static void Handle_GetRssi(struct wilc_vif *vif)
 	result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result) {
-		PRINT_ER("Failed to get RSSI value\n");
+		netdev_err(vif->ndev, "Failed to get RSSI value\n");
 		result = -EFAULT;
 	}
 
@@ -2011,7 +2011,7 @@ static void Handle_GetLinkspeed(struct wilc_vif *vif)
 	result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result) {
-		PRINT_ER("Failed to get LINKSPEED value\n");
+		netdev_err(vif->ndev, "Failed to get LINKSPEED value\n");
 		result = -EFAULT;
 	}
 
@@ -2058,7 +2058,7 @@ static s32 Handle_GetStatistics(struct wilc_vif *vif,
 				      wilc_get_vif_idx(vif));
 
 	if (result)
-		PRINT_ER("Failed to send scan parameters config packet\n");
+		netdev_err(vif->ndev, "Failed to send scan parameters\n");
 
 	if (pstrStatistics->link_speed > TCP_ACK_FILTER_LINK_SPEED_THRESH &&
 	    pstrStatistics->link_speed != DEFAULT_LINK_SPEED)
@@ -2091,7 +2091,7 @@ static s32 Handle_Get_InActiveTime(struct wilc_vif *vif,
 				      wilc_get_vif_idx(vif));
 
 	if (result) {
-		PRINT_ER("Failed to SET incative time\n");
+		netdev_err(vif->ndev, "Failed to SET incative time\n");
 		return -EFAULT;
 	}
 
@@ -2104,7 +2104,7 @@ static s32 Handle_Get_InActiveTime(struct wilc_vif *vif,
 				      wilc_get_vif_idx(vif));
 
 	if (result) {
-		PRINT_ER("Failed to get incative time\n");
+		netdev_err(vif->ndev, "Failed to get incative time\n");
 		return -EFAULT;
 	}
 
@@ -2158,7 +2158,7 @@ static void Handle_AddBeacon(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send add beacon config packet\n");
+		netdev_err(vif->ndev, "Failed to send add beacon\n");
 
 ERRORHANDLER:
 	kfree(wid.val);
@@ -2185,7 +2185,7 @@ static void Handle_DelBeacon(struct wilc_vif *vif)
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send delete beacon config packet\n");
+		netdev_err(vif->ndev, "Failed to send delete beacon\n");
 }
 
 static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer,
@@ -2256,7 +2256,7 @@ static void Handle_AddStation(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result != 0)
-		PRINT_ER("Failed to send add station config packet\n");
+		netdev_err(vif->ndev, "Failed to send add station\n");
 
 ERRORHANDLER:
 	kfree(pstrStationParam->rates);
@@ -2296,7 +2296,7 @@ static void Handle_DelAllSta(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send add station config packet\n");
+		netdev_err(vif->ndev, "Failed to send add station\n");
 
 ERRORHANDLER:
 	kfree(wid.val);
@@ -2326,7 +2326,7 @@ static void Handle_DelStation(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send add station config packet\n");
+		netdev_err(vif->ndev, "Failed to send add station\n");
 
 ERRORHANDLER:
 	kfree(wid.val);
@@ -2353,7 +2353,7 @@ static void Handle_EditStation(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send edit station config packet\n");
+		netdev_err(vif->ndev, "Failed to send edit station\n");
 
 ERRORHANDLER:
 	kfree(pstrStationParam->rates);
@@ -2409,7 +2409,7 @@ static int Handle_RemainOnChan(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result != 0)
-		PRINT_ER("Failed to set remain on channel\n");
+		netdev_err(vif->ndev, "Failed to set remain on channel\n");
 
 ERRORHANDLER:
 	{
@@ -2453,7 +2453,7 @@ static int Handle_RegisterFrame(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result) {
-		PRINT_ER("Failed to frame register config packet\n");
+		netdev_err(vif->ndev, "Failed to frame register\n");
 		result = -EINVAL;
 	}
 
@@ -2476,7 +2476,7 @@ static u32 Handle_ListenStateExpired(struct wilc_vif *vif,
 		wid.val = kmalloc(wid.size, GFP_KERNEL);
 
 		if (!wid.val) {
-			PRINT_ER("Failed to allocate memory\n");
+			netdev_err(vif->ndev, "Failed to allocate memory\n");
 			return -ENOMEM;
 		}
 
@@ -2486,7 +2486,7 @@ static u32 Handle_ListenStateExpired(struct wilc_vif *vif,
 		result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 					      wilc_get_vif_idx(vif));
 		if (result != 0) {
-			PRINT_ER("Failed to set remain on channel\n");
+			netdev_err(vif->ndev, "Failed to set remain channel\n");
 			goto _done_;
 		}
 
@@ -2519,7 +2519,7 @@ static void ListenTimerCB(unsigned long arg)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 }
 
 static void Handle_PowerManagement(struct wilc_vif *vif,
@@ -2542,7 +2542,7 @@ static void Handle_PowerManagement(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send power management config packet\n");
+		netdev_err(vif->ndev, "Failed to send power management\n");
 }
 
 static void Handle_SetMulticastFilter(struct wilc_vif *vif,
@@ -2577,7 +2577,7 @@ static void Handle_SetMulticastFilter(struct wilc_vif *vif,
 	result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
 				      wilc_get_vif_idx(vif));
 	if (result)
-		PRINT_ER("Failed to send setup multicast config packet\n");
+		netdev_err(vif->ndev, "Failed to send setup multicast\n");
 
 ERRORHANDLER:
 	kfree(wid.val);
@@ -2847,7 +2847,7 @@ static int hostIFthread(void *pvArg)
 			handle_get_tx_pwr(msg.vif, &msg.body.tx_power.tx_pwr);
 			break;
 		default:
-			PRINT_ER("[Host Interface] undefined Received Msg ID\n");
+			netdev_err(vif->ndev, "[Host Interface] undefined\n");
 			break;
 		}
 	}
@@ -2900,7 +2900,7 @@ int wilc_remove_wep_key(struct wilc_vif *vif, u8 index)
 
 	if (!hif_drv) {
 		result = -EFAULT;
-		PRINT_ER("Failed to send setup multicast config packet\n");
+		netdev_err(vif->ndev, "Failed to send setup multicast\n");
 		return result;
 	}
 
@@ -2914,7 +2914,7 @@ int wilc_remove_wep_key(struct wilc_vif *vif, u8 index)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Error in sending message queue : Request to remove WEP key\n");
+		netdev_err(vif->ndev, "Request to remove WEP key\n");
 	down(&hif_drv->sem_test_key_block);
 
 	return result;
@@ -2928,7 +2928,7 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index)
 
 	if (!hif_drv) {
 		result = -EFAULT;
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return result;
 	}
 
@@ -2942,7 +2942,7 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Error in sending message queue : Default key index\n");
+		netdev_err(vif->ndev, "Default key index\n");
 	down(&hif_drv->sem_test_key_block);
 
 	return result;
@@ -2956,7 +2956,7 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -2975,7 +2975,7 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Error in sending message queue :WEP Key\n");
+		netdev_err(vif->ndev, "STA - WEP Key\n");
 	down(&hif_drv->sem_test_key_block);
 
 	return result;
@@ -2989,7 +2989,7 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3011,7 +3011,7 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 
 	if (result)
-		PRINT_ER("Error in sending message queue :WEP Key\n");
+		netdev_err(vif->ndev, "AP - WEP Key\n");
 	down(&hif_drv->sem_test_key_block);
 
 	return result;
@@ -3027,7 +3027,7 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len,
 	u8 key_len = ptk_key_len;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3066,7 +3066,7 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len,
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 
 	if (result)
-		PRINT_ER("Error in sending message queue:  PTK Key\n");
+		netdev_err(vif->ndev, "PTK Key\n");
 
 	down(&hif_drv->sem_test_key_block);
 
@@ -3084,7 +3084,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
 	u8 key_len = gtk_key_len;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 	memset(&msg, 0, sizeof(struct host_if_msg));
@@ -3134,7 +3134,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Error in sending message queue:  RX GTK\n");
+		netdev_err(vif->ndev, "RX GTK\n");
 
 	down(&hif_drv->sem_test_key_block);
 
@@ -3150,7 +3150,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
 	int i;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3170,7 +3170,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER(" Error in sending messagequeue: PMKID Info\n");
+		netdev_err(vif->ndev, "PMKID Info\n");
 
 	return result;
 }
@@ -3188,7 +3188,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("Failed to send get mac address\n");
+		netdev_err(vif->ndev, "Failed to send get mac address\n");
 		return -EFAULT;
 	}
 
@@ -3207,12 +3207,12 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv || !connect_result) {
-		PRINT_ER("Driver is null\n");
+		netdev_err(vif->ndev, "Driver is null\n");
 		return -EFAULT;
 	}
 
 	if (!join_params) {
-		PRINT_ER("Unable to Join - JoinParams is NULL\n");
+		netdev_err(vif->ndev, "Unable to Join - JoinParams is NULL\n");
 		return -EFAULT;
 	}
 
@@ -3252,7 +3252,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("Failed to send message queue: Set join request\n");
+		netdev_err(vif->ndev, "send message: Set join request\n");
 		return -EFAULT;
 	}
 
@@ -3270,7 +3270,7 @@ int wilc_disconnect(struct wilc_vif *vif, u16 reason_code)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("Driver is null\n");
+		netdev_err(vif->ndev, "Driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3281,7 +3281,7 @@ int wilc_disconnect(struct wilc_vif *vif, u16 reason_code)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Failed to send message queue: disconnect\n");
+		netdev_err(vif->ndev, "Failed to send message: disconnect\n");
 
 	down(&hif_drv->sem_test_disconn_block);
 
@@ -3298,7 +3298,7 @@ static s32 host_int_get_assoc_res_info(struct wilc_vif *vif,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("Driver is null\n");
+		netdev_err(vif->ndev, "Driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3311,7 +3311,7 @@ static s32 host_int_get_assoc_res_info(struct wilc_vif *vif,
 				      wilc_get_vif_idx(vif));
 	if (result) {
 		*pu32RcvdAssocRespInfoLen = 0;
-		PRINT_ER("Failed to send association response config packet\n");
+		netdev_err(vif->ndev, "Failed to send association response\n");
 		return -EINVAL;
 	}
 
@@ -3326,7 +3326,7 @@ int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3337,7 +3337,7 @@ int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("wilc mq send fail\n");
+		netdev_err(vif->ndev, "wilc mq send fail\n");
 		return -EINVAL;
 	}
 
@@ -3357,7 +3357,7 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index, u8 mac_idx)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("wilc mq send fail\n");
+		netdev_err(vif->ndev, "wilc mq send fail\n");
 		result = -EINVAL;
 	}
 
@@ -3376,7 +3376,7 @@ int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("wilc mq send fail\n");
+		netdev_err(vif->ndev, "wilc mq send fail\n");
 		result = -EINVAL;
 	}
 
@@ -3391,7 +3391,7 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3403,7 +3403,7 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Failed to send get host channel param's message queue ");
+		netdev_err(vif->ndev, "Failed to send get host ch param\n");
 
 	down(&hif_drv->sem_inactive_time);
 
@@ -3424,14 +3424,14 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("Failed to send get host channel param's message queue ");
+		netdev_err(vif->ndev, "Failed to send get host ch param\n");
 		return -EFAULT;
 	}
 
 	down(&hif_drv->sem_get_rssi);
 
 	if (!rssi_level) {
-		PRINT_ER("RSS pointer value is null");
+		netdev_err(vif->ndev, "RSS pointer value is null\n");
 		return -EFAULT;
 	}
 
@@ -3452,7 +3452,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("Failed to send get host channel param's message queue ");
+		netdev_err(vif->ndev, "Failed to send get host channel\n");
 		return -EFAULT;
 	}
 
@@ -3472,7 +3472,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv || !scan_result) {
-		PRINT_ER("hif_drv or scan_result = NULL\n");
+		netdev_err(vif->ndev, "hif_drv or scan_result = NULL\n");
 		return -EFAULT;
 	}
 
@@ -3505,7 +3505,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result) {
-		PRINT_ER("Error in sending message queue\n");
+		netdev_err(vif->ndev, "Error in sending message queue\n");
 		return -EINVAL;
 	}
 
@@ -3524,7 +3524,7 @@ int wilc_hif_set_cfg(struct wilc_vif *vif,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("hif_drv NULL\n");
+		netdev_err(vif->ndev, "hif_drv NULL\n");
 		return -EFAULT;
 	}
 
@@ -3543,7 +3543,7 @@ static void GetPeriodicRSSI(unsigned long arg)
 	struct wilc_vif *vif = (struct wilc_vif *)arg;
 
 	if (!vif->hif_drv) {
-		PRINT_ER("Driver handler is NULL\n");
+		netdev_err(vif->ndev, "Driver handler is NULL\n");
 		return;
 	}
 
@@ -3598,7 +3598,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 		result = wilc_mq_create(&hif_msg_q);
 
 		if (result < 0) {
-			PRINT_ER("Failed to creat MQ\n");
+			netdev_err(vif->ndev, "Failed to creat MQ\n");
 			goto _fail_;
 		}
 
@@ -3606,7 +3606,7 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
 						 "WILC_kthread");
 
 		if (IS_ERR(hif_thread_handler)) {
-			PRINT_ER("Failed to creat Thread\n");
+			netdev_err(vif->ndev, "Failed to creat Thread\n");
 			result = -EFAULT;
 			goto _fail_mq_;
 		}
@@ -3650,7 +3650,7 @@ int wilc_deinit(struct wilc_vif *vif)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv)	{
-		PRINT_ER("hif_drv = NULL\n");
+		netdev_err(vif->ndev, "hif_drv = NULL\n");
 		return -EFAULT;
 	}
 
@@ -3685,7 +3685,7 @@ int wilc_deinit(struct wilc_vif *vif)
 
 		result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 		if (result != 0)
-			PRINT_ER("Error in sending deinit's message queue message function: Error(%d)\n", result);
+			netdev_err(vif->ndev, "deinit : Error(%d)\n", result);
 
 		down(&hif_sema_thread);
 
@@ -3716,7 +3716,7 @@ void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
 	hif_drv = vif->hif_drv;
 
 	if (!hif_drv || hif_drv == terminated_handle)	{
-		PRINT_ER("NetworkInfo received but driver not init[%p]\n", hif_drv);
+		netdev_err(vif->ndev, "driver not init[%p]\n", hif_drv);
 		return;
 	}
 
@@ -3731,7 +3731,7 @@ void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Error in sending network info message queue message parameters: Error(%d)\n", result);
+		netdev_err(vif->ndev, "message parameters (%d)\n", result);
 }
 
 void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
@@ -3760,7 +3760,7 @@ void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
 	}
 
 	if (!hif_drv->usr_conn_req.conn_result) {
-		PRINT_ER("Received mac status is not needed when there is no current Connect Reques\n");
+		netdev_err(vif->ndev, "there is no current Connect Request\n");
 		up(&hif_sema_deinit);
 		return;
 	}
@@ -3776,7 +3776,7 @@ void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("Error in sending message queue asynchronous message info: Error(%d)\n", result);
+		netdev_err(vif->ndev, "synchronous info (%d)\n", result);
 
 	up(&hif_sema_deinit);
 }
@@ -3807,7 +3807,7 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
 
 		result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 		if (result)
-			PRINT_ER("Error in sending message queue scan complete parameters: Error(%d)\n", result);
+			netdev_err(vif->ndev, "complete param (%d)\n", result);
 	}
 }
 
@@ -3822,7 +3822,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3839,7 +3839,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc mq send fail\n");
+		netdev_err(vif->ndev, "wilc mq send fail\n");
 
 	return result;
 }
@@ -3851,7 +3851,7 @@ int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3864,7 +3864,7 @@ int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc mq send fail\n");
+		netdev_err(vif->ndev, "wilc mq send fail\n");
 
 	return result;
 }
@@ -3876,7 +3876,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3901,7 +3901,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc mq send fail\n");
+		netdev_err(vif->ndev, "wilc mq send fail\n");
 
 	return result;
 }
@@ -3915,7 +3915,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3945,7 +3945,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc mq send fail\n");
+		netdev_err(vif->ndev, "wilc mq send fail\n");
 
 ERRORHANDLER:
 	if (result) {
@@ -3964,7 +3964,7 @@ int wilc_del_beacon(struct wilc_vif *vif)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -3973,7 +3973,7 @@ int wilc_del_beacon(struct wilc_vif *vif)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 
 	return result;
 }
@@ -3986,7 +3986,7 @@ int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4006,7 +4006,7 @@ int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 	return result;
 }
 
@@ -4018,7 +4018,7 @@ int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4034,7 +4034,7 @@ int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 	return result;
 }
 
@@ -4049,7 +4049,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 	u8 assoc_sta = 0;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4071,7 +4071,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 
 	down(&hif_sema_wait_response);
 
@@ -4087,7 +4087,7 @@ int wilc_edit_station(struct wilc_vif *vif,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4107,7 +4107,7 @@ int wilc_edit_station(struct wilc_vif *vif,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 
 	return result;
 }
@@ -4120,7 +4120,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4137,7 +4137,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 	return result;
 }
 
@@ -4150,7 +4150,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4164,7 +4164,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 	return result;
 }
 
@@ -4329,7 +4329,7 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4343,7 +4343,7 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 
 	return result;
 }
@@ -4355,7 +4355,7 @@ static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
-		PRINT_ER("driver is null\n");
+		netdev_err(vif->ndev, "driver is null\n");
 		return -EFAULT;
 	}
 
@@ -4369,7 +4369,7 @@ static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 	if (result)
-		PRINT_ER("wilc_mq_send fail\n");
+		netdev_err(vif->ndev, "wilc_mq_send fail\n");
 
 	return result;
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 18/24] staging: wilc1000: linux_wlan.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (16 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 17/24] staging: wilc1000: host_interface.c: replace PRINT_ER with netdev_err Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 19/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 274f468..749dfc74 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -226,7 +226,6 @@ static void deinit_irq(struct net_device *dev)
 
 void wilc_dbg(u8 *buff)
 {
-	PRINT_D(INIT_DBG, "%d\n", *buff);
 }
 
 int wilc_lock_timeout(struct wilc *nic, void *vp, u32 timeout)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 19/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (17 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 18/24] staging: wilc1000: linux_wlan.c: removes unnecessary log messages Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 20/24] staging: wilc1000: wilc_wlan.c: " Leo Kim
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index a8107f1..0fd3a1e 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2315,7 +2315,6 @@ int wilc_init_host_int(struct net_device *net)
 
 	struct wilc_priv *priv;
 
-	PRINT_D(INIT_DBG, "Host[%p][%p]\n", net, net->ieee80211_ptr);
 	priv = wdev_priv(net->ieee80211_ptr);
 	if (op_ifcs == 0) {
 		setup_timer(&hAgingTimer, remove_network_from_shadow, 0);
@@ -2364,24 +2363,17 @@ int wilc_deinit_host_int(struct net_device *net)
 
 void wilc_free_wiphy(struct net_device *net)
 {
-	if (!net) {
-		PRINT_D(INIT_DBG, "net_device is NULL\n");
+	if (!net)
 		return;
-	}
 
-	if (!net->ieee80211_ptr) {
-		PRINT_D(INIT_DBG, "ieee80211_ptr is NULL\n");
+	if (!net->ieee80211_ptr)
 		return;
-	}
 
-	if (!net->ieee80211_ptr->wiphy) {
-		PRINT_D(INIT_DBG, "wiphy is NULL\n");
+	if (!net->ieee80211_ptr->wiphy)
 		return;
-	}
 
 	wiphy_unregister(net->ieee80211_ptr->wiphy);
 
-	PRINT_D(INIT_DBG, "Freeing wiphy\n");
 	wiphy_free(net->ieee80211_ptr->wiphy);
 	kfree(net->ieee80211_ptr);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 20/24] staging: wilc1000: wilc_wlan.c: removes unnecessary log messages
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (18 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 19/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 21/24] staging: wilc1000: removes unused region feature Leo Kim
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unnecessary log messages.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/wilc_wlan.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index c6d206d..e7ae359 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1022,7 +1022,6 @@ int wilc_wlan_firmware_download(struct wilc *wilc, const u8 *buffer,
 			ret = -EIO;
 			goto _fail_;
 		}
-		PRINT_D(INIT_DBG, "Offset = %d\n", offset);
 	} while (offset < buffer_size);
 
 _fail_:
@@ -1449,8 +1448,6 @@ int wilc_wlan_init(struct net_device *dev)
 
 	wilc = vif->wilc;
 
-	PRINT_D(INIT_DBG, "Initializing WILC_Wlan ...\n");
-
 	wilc->quit = 0;
 
 	if (!wilc->hif_func->hif_init(wilc, false)) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 21/24] staging: wilc1000: removes unused region feature
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (19 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 20/24] staging: wilc1000: wilc_wlan.c: " Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 22/24] staging: wilc1000: removes usused PRINT_XX(region...) Leo Kim
                   ` (3 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unused region feature on debug message.
Also, removes the functions of related in this feature.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan_common.h | 17 ++---------
 drivers/staging/wilc1000/wilc_debugfs.c      | 42 ----------------------------
 2 files changed, 3 insertions(+), 56 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index e408631..57d3901 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -1,15 +1,7 @@
 #ifndef LINUX_WLAN_COMMON_H
 #define LINUX_WLAN_COMMON_H
 
-enum debug_region {
-	Init_debug = 0,
-	COMP = 0xFFFFFFFF,
-};
-
-#define INIT_DBG                (1 << Init_debug)
-
 #if defined(WILC_DEBUGFS)
-extern atomic_t WILC_REGION;
 extern atomic_t WILC_DEBUG_LEVEL;
 
 #define DEBUG           BIT(0)
@@ -19,8 +11,7 @@ extern atomic_t WILC_DEBUG_LEVEL;
 
 #define PRINT_D(region, ...)						\
 	do {								\
-		if ((atomic_read(&WILC_DEBUG_LEVEL) & DEBUG) &&	\
-		   ((atomic_read(&WILC_REGION)) & (region))) {	\
+		if ((atomic_read(&WILC_DEBUG_LEVEL) & DEBUG)) {	\
 			printk("DBG [%s: %d]", __func__, __LINE__);	\
 			printk(__VA_ARGS__);				\
 		}							\
@@ -28,8 +19,7 @@ extern atomic_t WILC_DEBUG_LEVEL;
 
 #define PRINT_INFO(region, ...)						\
 	do {								\
-		if ((atomic_read(&WILC_DEBUG_LEVEL) & INFO) &&	\
-		   ((atomic_read(&WILC_REGION)) & (region))) {	\
+		if ((atomic_read(&WILC_DEBUG_LEVEL) & INFO)) {	\
 			printk("INFO [%s]", __func__);			\
 			printk(__VA_ARGS__);				\
 		}							\
@@ -37,8 +27,7 @@ extern atomic_t WILC_DEBUG_LEVEL;
 
 #define PRINT_WRN(region, ...)						\
 	do {								\
-		if ((atomic_read(&WILC_DEBUG_LEVEL) & WRN) &&	\
-		   ((atomic_read(&WILC_REGION)) & (region))) {	\
+		if ((atomic_read(&WILC_DEBUG_LEVEL) & WRN)) {	\
 			printk("WRN [%s: %d]", __func__, __LINE__);	\
 			printk(__VA_ARGS__);				\
 		}							\
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index 266d96b..215e2f0 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,10 +24,7 @@ static struct dentry *wilc_dir;
  * --------------------------------------------------------------------------------
  */
 
-#define DBG_REGION_ALL	(INIT_DBG)
 #define DBG_LEVEL_ALL	(DEBUG | INFO | WRN | ERR)
-atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG);
-EXPORT_SYMBOL_GPL(WILC_REGION);
 atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
 EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL);
 
@@ -75,44 +72,6 @@ static ssize_t wilc_debug_level_write(struct file *filp, const char __user *buf,
 	return count;
 }
 
-static ssize_t wilc_debug_region_read(struct file *file, char __user *userbuf, size_t count, loff_t *ppos)
-{
-	char buf[128];
-	int res = 0;
-
-	/* only allow read from start */
-	if (*ppos > 0)
-		return 0;
-
-	res = scnprintf(buf, sizeof(buf), "Debug region: %x\n", atomic_read(&WILC_REGION));
-
-	return simple_read_from_buffer(userbuf, count, ppos, buf, res);
-}
-
-static ssize_t wilc_debug_region_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos)
-{
-	char buffer[128] = {};
-	int flag;
-
-	if (count > sizeof(buffer))
-		return -EINVAL;
-
-	if (copy_from_user(buffer, buf, count))
-		return -EFAULT;
-
-	flag = buffer[0] - '0';
-
-	if (flag > DBG_REGION_ALL) {
-		printk("%s, value (0x%08x) is out of range, stay previous flag (0x%08x)\n", __func__, flag, atomic_read(&WILC_REGION));
-		return -EFAULT;
-	}
-
-	atomic_set(&WILC_REGION, (int)flag);
-	printk("new debug-region is %x\n", atomic_read(&WILC_REGION));
-
-	return count;
-}
-
 /*
  * --------------------------------------------------------------------------------
  */
@@ -134,7 +93,6 @@ struct wilc_debugfs_info_t {
 
 static struct wilc_debugfs_info_t debugfs_info[] = {
 	{ "wilc_debug_level",	0666,	(DEBUG | ERR), FOPS(NULL, wilc_debug_level_read, wilc_debug_level_write, NULL), },
-	{ "wilc_debug_region",	0666,	(INIT_DBG), FOPS(NULL, wilc_debug_region_read, wilc_debug_region_write, NULL), },
 };
 
 static int __init wilc_debugfs_init(void)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 22/24] staging: wilc1000: removes usused PRINT_XX(region...)
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (20 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 21/24] staging: wilc1000: removes unused region feature Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 23/24] staging: wilc1000: moves to define values Leo Kim
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch removes unused PRINT_XX(region...)
because already removed in used to region feature of whole wilc source.
Also, removes unnecessary related region extern variable.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan_common.h | 69 ----------------------------
 1 file changed, 69 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 57d3901..2e2109c 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -2,83 +2,14 @@
 #define LINUX_WLAN_COMMON_H
 
 #if defined(WILC_DEBUGFS)
-extern atomic_t WILC_DEBUG_LEVEL;
-
 #define DEBUG           BIT(0)
 #define INFO            BIT(1)
 #define WRN             BIT(2)
 #define ERR             BIT(3)
-
-#define PRINT_D(region, ...)						\
-	do {								\
-		if ((atomic_read(&WILC_DEBUG_LEVEL) & DEBUG)) {	\
-			printk("DBG [%s: %d]", __func__, __LINE__);	\
-			printk(__VA_ARGS__);				\
-		}							\
-	} while (0)
-
-#define PRINT_INFO(region, ...)						\
-	do {								\
-		if ((atomic_read(&WILC_DEBUG_LEVEL) & INFO)) {	\
-			printk("INFO [%s]", __func__);			\
-			printk(__VA_ARGS__);				\
-		}							\
-	} while (0)
-
-#define PRINT_WRN(region, ...)						\
-	do {								\
-		if ((atomic_read(&WILC_DEBUG_LEVEL) & WRN)) {	\
-			printk("WRN [%s: %d]", __func__, __LINE__);	\
-			printk(__VA_ARGS__);				\
-		}							\
-	} while (0)
-
-#define PRINT_ER(...)							\
-	do {								\
-		if ((atomic_read(&WILC_DEBUG_LEVEL) & ERR)) {	\
-			printk("ERR [%s: %d]", __func__, __LINE__);	\
-			printk(__VA_ARGS__);				\
-		}							\
-	} while (0)
-
 #else
-
-#define REGION  (INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG)
-
 #define DEBUG       1
 #define INFO        0
 #define WRN         0
-
-#define PRINT_D(region, ...)						\
-	do {								\
-		if (DEBUG == 1 && ((REGION)&(region))) {		\
-			printk("DBG [%s: %d]", __func__, __LINE__);	\
-			printk(__VA_ARGS__);				\
-		}							\
-	} while (0)
-
-#define PRINT_INFO(region, ...)						\
-	do {								\
-		if (INFO == 1 && ((REGION)&(region))) {			\
-			printk("INFO [%s]", __func__);			\
-			printk(__VA_ARGS__);				\
-		}							\
-	} while (0)
-
-#define PRINT_WRN(region, ...)						\
-	do {								\
-		if (WRN == 1 && ((REGION)&(region))) {			\
-			printk("WRN [%s: %d]", __func__, __LINE__);	\
-			printk(__VA_ARGS__);				\
-		}							\
-	} while (0)
-
-#define PRINT_ER(...)							\
-	do {								\
-		printk("ERR [%s: %d]", __func__, __LINE__);		\
-		printk(__VA_ARGS__);					\
-	} while (0)
-
 #endif
 
 #define LINUX_RX_SIZE	(96 * 1024)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 23/24] staging: wilc1000: moves to define values
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (21 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 22/24] staging: wilc1000: removes usused PRINT_XX(region...) Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 10:14 ` [PATCH V4 24/24] staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE Leo Kim
  2016-02-22 20:01 ` [PATCH V4 00/24] staging: wilc1000: Resend V4 Greg KH
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch moves DEBUG, INFO, WRN and ERR values to wilc_debugfs.c file
because this is only used to wilc_debugfs.c file.
And, removes unnecessary WILC_DEBUGFS and else-case variables.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan_common.h | 11 -----------
 drivers/staging/wilc1000/wilc_debugfs.c      |  4 ++++
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 2e2109c..51601aa 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -1,17 +1,6 @@
 #ifndef LINUX_WLAN_COMMON_H
 #define LINUX_WLAN_COMMON_H
 
-#if defined(WILC_DEBUGFS)
-#define DEBUG           BIT(0)
-#define INFO            BIT(1)
-#define WRN             BIT(2)
-#define ERR             BIT(3)
-#else
-#define DEBUG       1
-#define INFO        0
-#define WRN         0
-#endif
-
 #define LINUX_RX_SIZE	(96 * 1024)
 #define LINUX_TX_SIZE	(64 * 1024)
 
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index 215e2f0..fcbc95d 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -23,6 +23,10 @@ static struct dentry *wilc_dir;
 /*
  * --------------------------------------------------------------------------------
  */
+#define DEBUG           BIT(0)
+#define INFO            BIT(1)
+#define WRN             BIT(2)
+#define ERR             BIT(3)
 
 #define DBG_LEVEL_ALL	(DEBUG | INFO | WRN | ERR)
 atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH V4 24/24] staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (22 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 23/24] staging: wilc1000: moves to define values Leo Kim
@ 2016-02-22 10:14 ` Leo Kim
  2016-02-22 20:01 ` [PATCH V4 00/24] staging: wilc1000: Resend V4 Greg KH
  24 siblings, 0 replies; 26+ messages in thread
From: Leo Kim @ 2016-02-22 10:14 UTC (permalink / raw)
  To: gregkh
  Cc: devel, linux-wireless, tony.cho, glen.lee, leo.kim, austin.shin,
	Chris.Park, adham.abozaeid, Nicolas.FERRE, Chris Park

From: Chris Park <chris.park@atmel.com>

This patch moves LINUX_RX_SIZE and LINUX_TX_SIZE to wilc_wlan.h file
because there are only used to wilc_wlan.c file.

Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_wlan_common.h | 4 ----
 drivers/staging/wilc1000/wilc_wlan.h         | 3 +++
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 51601aa..aa2c026 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -1,10 +1,6 @@
 #ifndef LINUX_WLAN_COMMON_H
 #define LINUX_WLAN_COMMON_H
 
-#define LINUX_RX_SIZE	(96 * 1024)
-#define LINUX_TX_SIZE	(64 * 1024)
-
-
 #define WILC_MULTICAST_TABLE_SIZE	8
 
 #if defined(BEAGLE_BOARD)
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index 06d02ab..792d338 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -128,6 +128,9 @@
 #define WILC_PLL_TO_SPI		2
 #define ABORT_INT		BIT(31)
 
+#define LINUX_RX_SIZE		(96 * 1024)
+#define LINUX_TX_SIZE		(64 * 1024)
+
 /*******************************************/
 /*        E0 and later Interrupt flags.    */
 /*******************************************/
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH V4 00/24] staging: wilc1000: Resend V4
  2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
                   ` (23 preceding siblings ...)
  2016-02-22 10:14 ` [PATCH V4 24/24] staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE Leo Kim
@ 2016-02-22 20:01 ` Greg KH
  24 siblings, 0 replies; 26+ messages in thread
From: Greg KH @ 2016-02-22 20:01 UTC (permalink / raw)
  To: Leo Kim
  Cc: devel, Chris.Park, austin.shin, linux-wireless, Nicolas.FERRE,
	tony.cho, adham.abozaeid

On Mon, Feb 22, 2016 at 07:14:07PM +0900, Leo Kim wrote:
> Dear Greg
> 
> This is the 4th fix patch about the mistake merging.
> Mistake merging is revert the below commit when rebase V3 patches.
> (already applied commit) - 6c2ab2398b88 ("staging: wilc1000: remove spaces around '->'")
> (V3 mistake patch) - [PATCH V3 09/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages
> 
> I'll resend 4th patches after modified this mistake.
> We apologize for the inconvenience.

Oops, I applied the v3 series, can you just send me a "fixup patch" or
whatever else is needed here instead?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2016-02-22 20:01 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
2016-02-22 10:14 ` [PATCH V4 01/24] staging: wilc1000: wilc_wlan.c: removes PRINT_ER Leo Kim
2016-02-22 10:14 ` [PATCH V4 02/24] staging: wilc1000: linux_mon.c: removes debug logs Leo Kim
2016-02-22 10:14 ` [PATCH V4 03/24] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err Leo Kim
2016-02-22 10:14 ` [PATCH V4 04/24] staging: wilc1000: linux_mon.c: add to check routine Leo Kim
2016-02-22 10:14 ` [PATCH V4 05/24] staging: wilc1000: removes potential null dereference Leo Kim
2016-02-22 10:14 ` [PATCH V4 06/24] staging: wilc1000: host_interface.c: removes unnecessary log message Leo Kim
2016-02-22 10:14 ` [PATCH V4 07/24] staging: wilc1000: linux_mon.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 08/24] staging: wilc1000: linux_mon.c: removes comments Leo Kim
2016-02-22 10:14 ` [PATCH V4 09/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 10/24] staging: wilc1000: removes unused HOSTAPD_DBG tag Leo Kim
2016-02-22 10:14 ` [PATCH V4 11/24] staging: wilc1000: host_interface.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 12/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 13/24] " Leo Kim
2016-02-22 10:14 ` [PATCH V4 14/24] staging: wilc1000: removes unused CFG80211_DBG tag Leo Kim
2016-02-22 10:14 ` [PATCH V4 15/24] staging: wilc1000: coreconfigurator.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 16/24] staging: wilc1000: host_interface.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 17/24] staging: wilc1000: host_interface.c: replace PRINT_ER with netdev_err Leo Kim
2016-02-22 10:14 ` [PATCH V4 18/24] staging: wilc1000: linux_wlan.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 19/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 20/24] staging: wilc1000: wilc_wlan.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 21/24] staging: wilc1000: removes unused region feature Leo Kim
2016-02-22 10:14 ` [PATCH V4 22/24] staging: wilc1000: removes usused PRINT_XX(region...) Leo Kim
2016-02-22 10:14 ` [PATCH V4 23/24] staging: wilc1000: moves to define values Leo Kim
2016-02-22 10:14 ` [PATCH V4 24/24] staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE Leo Kim
2016-02-22 20:01 ` [PATCH V4 00/24] staging: wilc1000: Resend V4 Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.