This patches removes PRINT_ER that is unnecessary debug logs.
Signed-off-by: Leo Kim <[email protected]>
---
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 ef65e8e..50f85ac 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1480,7 +1480,6 @@ int wilc_wlan_init(struct net_device *dev)
if (!wilc->tx_buffer) {
ret = -ENOBUFS;
- PRINT_ER("Can't allocate Tx Buffer");
goto _fail_;
}
@@ -1489,7 +1488,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
From: Chris Park <[email protected]>
This patch removes unnecessary log messages.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 a731b46..660bf63 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
From: Chris Park <[email protected]>
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 <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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
This patch adds the return value which needs the check and
prints the error message when it fails.
Signed-off-by: Leo Kim <[email protected]>
---
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 3048e88..dbb98bf 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
From: Chris Park <[email protected]>
This patch removes unnecessary comments.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 7e7cff4..28e52eb 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
From: Chris Park <[email protected]>
This patch replaces PRINT_ER with netdev_err.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 288 +++++++++++++++---------------
1 file changed, 144 insertions(+), 144 deletions(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 60678aa..1d33153 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;
}
@@ -432,7 +432,7 @@ static s32 handle_set_mac_address(struct wilc_vif *vif,
u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
if (!mac_buf) {
- PRINT_ER("No buffer to send mac address\n");
+ netdev_err(vif->ndev, "No buffer to send mac address\n");
return -EFAULT;
}
memcpy(mac_buf, set_mac_addr->mac_addr, ETH_ALEN);
@@ -445,7 +445,7 @@ static s32 handle_set_mac_address(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 set mac address\n");
+ netdev_err(vif->ndev, "Failed to set mac address\n");
result = -EFAULT;
}
@@ -468,7 +468,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);
@@ -494,7 +494,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;
}
@@ -510,7 +510,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;
}
@@ -525,7 +525,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;
}
@@ -539,7 +539,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;
}
@@ -554,7 +554,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;
}
@@ -569,7 +569,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;
}
@@ -584,7 +584,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;
}
@@ -599,7 +599,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;
}
@@ -613,7 +613,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;
}
@@ -627,7 +627,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;
}
@@ -641,7 +641,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;
}
@@ -656,7 +656,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;
}
@@ -671,7 +671,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;
}
@@ -685,7 +685,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;
}
@@ -700,7 +700,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;
}
@@ -715,7 +715,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;
}
@@ -730,7 +730,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;
}
@@ -751,7 +751,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;
}
@@ -762,7 +762,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);
@@ -795,13 +795,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;
}
@@ -877,7 +877,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) {
@@ -917,13 +917,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;
}
@@ -949,13 +949,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;
}
@@ -1063,7 +1063,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;
@@ -1146,7 +1146,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 {
@@ -1183,7 +1183,7 @@ ERRORHANDLER:
strConnectInfo.pu8ReqIEs = NULL;
} else {
- PRINT_ER("Connect callback function pointer is NULL\n");
+ netdev_err(vif->ndev, "Connect callback is NULL\n");
}
}
@@ -1240,7 +1240,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;
}
@@ -1256,7 +1256,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;
}
@@ -1289,7 +1289,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;
@@ -1300,7 +1300,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);
@@ -1342,7 +1342,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;
}
@@ -1424,7 +1424,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;
}
@@ -1433,14 +1433,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;
}
@@ -1469,7 +1469,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;
@@ -1492,10 +1492,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);
}
@@ -1574,7 +1574,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);
@@ -1748,7 +1748,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);
@@ -1808,7 +1808,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_;
}
@@ -1840,7 +1840,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;
}
@@ -1864,7 +1864,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;
}
@@ -1891,7 +1891,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;
@@ -1920,7 +1920,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;
@@ -1976,7 +1976,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;
}
@@ -1998,7 +1998,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;
}
@@ -2021,7 +2021,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;
}
@@ -2069,7 +2069,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)
@@ -2102,7 +2102,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;
}
@@ -2115,7 +2115,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;
}
@@ -2169,7 +2169,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);
@@ -2196,7 +2196,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,
@@ -2267,7 +2267,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);
@@ -2307,7 +2307,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);
@@ -2337,7 +2337,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);
@@ -2364,7 +2364,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);
@@ -2420,7 +2420,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:
{
@@ -2464,7 +2464,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;
}
@@ -2487,7 +2487,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;
}
@@ -2497,7 +2497,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_;
}
@@ -2530,7 +2530,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,
@@ -2553,7 +2553,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,
@@ -2588,7 +2588,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);
@@ -2858,7 +2858,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;
}
}
@@ -2911,7 +2911,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;
}
@@ -2925,7 +2925,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;
@@ -2939,7 +2939,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;
}
@@ -2953,7 +2953,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;
@@ -2967,7 +2967,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;
}
@@ -2986,7 +2986,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;
@@ -3000,7 +3000,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;
}
@@ -3022,7 +3022,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;
@@ -3038,7 +3038,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;
}
@@ -3077,7 +3077,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);
@@ -3095,7 +3095,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));
@@ -3145,7 +3145,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);
@@ -3161,7 +3161,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;
}
@@ -3181,7 +3181,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;
}
@@ -3199,7 +3199,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;
}
@@ -3218,12 +3218,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;
}
@@ -3263,7 +3263,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;
}
@@ -3281,7 +3281,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;
}
@@ -3292,7 +3292,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);
@@ -3309,7 +3309,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;
}
@@ -3322,7 +3322,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;
}
@@ -3337,7 +3337,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;
}
@@ -3348,7 +3348,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;
}
@@ -3368,7 +3368,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;
}
@@ -3387,7 +3387,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;
}
@@ -3402,7 +3402,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;
}
@@ -3414,7 +3414,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);
@@ -3435,14 +3435,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;
}
@@ -3463,7 +3463,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;
}
@@ -3483,7 +3483,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;
}
@@ -3516,7 +3516,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;
}
@@ -3535,7 +3535,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;
}
@@ -3554,7 +3554,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;
}
@@ -3611,7 +3611,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_;
}
@@ -3619,7 +3619,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_;
}
@@ -3663,7 +3663,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;
}
@@ -3698,7 +3698,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);
@@ -3729,7 +3729,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;
}
@@ -3744,7 +3744,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,
@@ -3773,7 +3773,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;
}
@@ -3789,7 +3789,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);
}
@@ -3820,7 +3820,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);
}
}
@@ -3835,7 +3835,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;
}
@@ -3852,7 +3852,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;
}
@@ -3864,7 +3864,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;
}
@@ -3877,7 +3877,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;
}
@@ -3889,7 +3889,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;
}
@@ -3914,7 +3914,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;
}
@@ -3928,7 +3928,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;
}
@@ -3958,7 +3958,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) {
@@ -3977,7 +3977,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;
}
@@ -3986,7 +3986,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;
}
@@ -3999,7 +3999,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;
}
@@ -4019,7 +4019,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;
}
@@ -4031,7 +4031,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;
}
@@ -4047,7 +4047,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;
}
@@ -4062,7 +4062,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;
}
@@ -4084,7 +4084,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);
@@ -4100,7 +4100,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;
}
@@ -4120,7 +4120,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;
}
@@ -4133,7 +4133,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;
}
@@ -4150,7 +4150,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;
}
@@ -4163,7 +4163,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;
}
@@ -4177,7 +4177,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;
}
@@ -4342,7 +4342,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;
}
@@ -4356,7 +4356,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;
}
@@ -4368,7 +4368,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;
}
@@ -4382,7 +4382,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
From: Chris Park <[email protected]>
This patch removes unnecessary log message and relate variables.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 dbb98bf..7e7cff4 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
This patches replaces PRINT_ER with netdev_err.
Signed-off-by: Leo Kim <[email protected]>
---
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 9edc6e9..3048e88 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
From: Chris Park <[email protected]>
This patch removes unnecessary log messages.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 c6ceff5..cebe58d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2341,7 +2341,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);
@@ -2390,24 +2389,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
From: Chris Park <[email protected]>
This patch removes unused CFG80211_DBG tag.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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
From: Chris Park <[email protected]>
This patch removes unnecessary log messages and relate variables.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 0794f93..be7d835 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 = kmalloc(request->n_ssids * sizeof(struct hidden_network), GFP_KERNEL);
@@ -677,11 +628,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,
@@ -689,7 +638,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,
@@ -701,10 +649,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;
}
@@ -730,53 +676,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;
}
@@ -784,18 +707,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);
@@ -868,18 +785,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:
@@ -897,12 +809,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)
@@ -943,8 +849,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;
@@ -965,7 +869,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;
@@ -980,15 +883,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:
@@ -996,12 +890,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)
@@ -1018,12 +906,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);
}
@@ -1074,22 +956,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
@@ -1111,14 +983,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)
@@ -1162,10 +1026,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;
}
@@ -1199,21 +1059,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;
@@ -1281,11 +1132,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);
}
@@ -1298,26 +1146,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;
@@ -1339,8 +1178,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;
@@ -1374,7 +1211,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) {
@@ -1406,7 +1242,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;
}
@@ -1421,33 +1256,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");
@@ -1465,19 +1292,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,
@@ -1489,10 +1313,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;
}
@@ -1504,12 +1327,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;
}
@@ -1536,8 +1356,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;
@@ -1793,8 +1611,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;
}
@@ -1977,7 +1793,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;
}
@@ -1987,8 +1802,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;
@@ -2008,8 +1821,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;
@@ -2193,11 +2004,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 {
@@ -2463,9 +2269,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_;
@@ -2496,8 +2299,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");
@@ -2512,8 +2313,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;
@@ -2526,19 +2325,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;
@@ -2599,8 +2390,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
From: Chris Park <[email protected]>
This patch removes unnecessary log messages.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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
This patches removes unnecessary debug logs.
Signed-off-by: Leo Kim <[email protected]>
---
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 21f35d7..9edc6e9 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
From: Chris Park <[email protected]>
This patch removes unused HOSTAPD_DBG tag.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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
From: Chris Park <[email protected]>
This patch removes unnecessary log messages.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 50f85ac..0cd3ed8 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1028,7 +1028,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_:
@@ -1461,8 +1460,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
From: Chris Park <[email protected]>
This patch removes unnecessary log messages.
And, it adds a 'break' statement in accordance with the switch-case rule.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 be7d835..c6ceff5 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -795,7 +795,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
On Thu, Feb 18, 2016 at 08:30:01PM +0900, Leo Kim wrote:
> This patches removes PRINT_ER that is unnecessary debug logs.
>
> Signed-off-by: Leo Kim <[email protected]>
> ---
> drivers/staging/wilc1000/wilc_wlan.c | 2 --
> 1 file changed, 2 deletions(-)
What changed in this series from v1? Why should I take it?
Please resend a v3 that says exactly what differs.
thanks,
greg k-h
From: Chris Park <[email protected]>
This patch removes unnecessary log message and relate variables.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 7b9dbc0..ee45103 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2106,8 +2106,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));
@@ -2129,8 +2127,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;
@@ -3048,7 +3044,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");
@@ -3076,20 +3071,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;
@@ -4096,20 +4082,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
From: Chris Park <[email protected]>
This patch removes unused region feature on debug message.
Also, removes the functions of related in this feature.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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
From: Chris Park <[email protected]>
This patch removes the unnecessary log messages which is used with
the HOSTAPD_DBG tag.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 a71c01d..0794f93 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1358,10 +1358,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;
@@ -2039,9 +2035,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;
@@ -2051,8 +2044,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;
@@ -2067,8 +2058,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;
@@ -2081,7 +2070,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;
@@ -2098,8 +2086,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;
@@ -2129,10 +2115,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);
@@ -2159,8 +2141,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,
@@ -2182,8 +2162,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);
@@ -2219,9 +2197,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;
@@ -2240,23 +2215,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");
@@ -2280,16 +2238,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);
@@ -2307,9 +2258,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;
@@ -2322,14 +2270,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 {
@@ -2347,23 +2287,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");
@@ -2383,20 +2306,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;
}
@@ -2406,7 +2321,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
From: Chris Park <[email protected]>
This patch removes unnecessary log messages.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 ee45103..60678aa 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1643,11 +1643,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;
@@ -1668,10 +1665,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,
@@ -1715,7 +1710,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_;
}
@@ -1747,7 +1741,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_;
}
@@ -1787,7 +1780,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
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 <[email protected]>
---
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 d4705b7..a71c01d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -665,6 +665,8 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
if (request->n_ssids >= 1) {
strHiddenNetwork.net_info = kmalloc(request->n_ssids * sizeof(struct hidden_network), GFP_KERNEL);
+ if (!strHiddenNetwork.net_info)
+ return -ENOMEM;
strHiddenNetwork.n_ssids = request->n_ssids;
--
1.9.1
From: Chris Park <[email protected]>
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 <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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
SGkgSnVsaWFuLA0KDQpZZXMsIG9uZ29pbmcgcmVtb3ZlIHRoaXMgZnVuY3Rpb24uDQpJIHdpbGwg
YmUgcmVtb3ZpbmcgdGhpcyBmdW5jdGlvbiBmb3IgbmV4dCBwYXRjaC4NClRoYW5rIHlvdSBpbiB5
b3VyIGFkdmljZS4NCg0KwqBUaGFua3MsIEJSDQrCoExlbw0KDQotLS0tLU9yaWdpbmFsIE1lc3Nh
Z2UtLS0tLQ0KRnJvbTogSnVsaWFuIENhbGFieSBbbWFpbHRvOmp1bGlhbi5jYWxhYnlAZ21haWwu
Y29tXSANClNlbnQ6IEZyaWRheSwgRmVicnVhcnkgMTksIDIwMTYgOTo0MSBBTQ0KVG86IEtpbSwg
TGVvIDxMZW8uS2ltQGF0bWVsLmNvbT4NCkNjOiBHcmVnIEtIIDxncmVna2hAbGludXhmb3VuZGF0
aW9uLm9yZz47IGRldmVsQGRyaXZlcmRldi5vc3Vvc2wub3JnOyBsaW51eC13aXJlbGVzcyA8bGlu
dXgtd2lyZWxlc3NAdmdlci5rZXJuZWwub3JnPjsgQ2hvLCBUb255IDxUb255LkNob0BhdG1lbC5j
b20+OyBMZWUsIEdsZW4gPEdsZW4uTGVlQGF0bWVsLmNvbT47IFNoaW4sIEF1c3RpbiA8QXVzdGlu
LlNoaW5AYXRtZWwuY29tPjsgUGFyaywgQ2hyaXMgPENocmlzLlBhcmtAYXRtZWwuY29tPjsgQWJv
emFlaWQsIEFkaGFtIDxBZGhhbS5BYm96YWVpZEBhdG1lbC5jb20+OyBGZXJyZSwgTmljb2xhcyA8
Tmljb2xhcy5GRVJSRUBhdG1lbC5jb20+DQpTdWJqZWN0OiBSZTogW1BBVENIIFYyIDE4LzI0XSBz
dGFnaW5nOiB3aWxjMTAwMDogbGludXhfd2xhbi5jOiByZW1vdmVzIHVubmVjZXNzYXJ5IGxvZyBt
ZXNzYWdlcw0KDQpIaSBMZW8sDQoNCk9uIFRodSwgRmViIDE4LCAyMDE2IGF0IDEwOjMwIFBNLCBM
ZW8gS2ltIDxsZW8ua2ltQGF0bWVsLmNvbT4gd3JvdGU6DQo+IEZyb206IENocmlzIFBhcmsgPGNo
cmlzLnBhcmtAYXRtZWwuY29tPg0KPg0KPiBUaGlzIHBhdGNoIHJlbW92ZXMgdW5uZWNlc3Nhcnkg
bG9nIG1lc3NhZ2VzLg0KPg0KPiBTaWduZWQtb2ZmLWJ5OiBDaHJpcyBQYXJrIDxjaHJpcy5wYXJr
QGF0bWVsLmNvbT4NCj4gU2lnbmVkLW9mZi1ieTogTGVvIEtpbSA8bGVvLmtpbUBhdG1lbC5jb20+
DQo+IC0tLQ0KPiAgZHJpdmVycy9zdGFnaW5nL3dpbGMxMDAwL2xpbnV4X3dsYW4uYyB8IDEgLQ0K
PiAgMSBmaWxlIGNoYW5nZWQsIDEgZGVsZXRpb24oLSkNCj4NCj4gZGlmZiAtLWdpdCBhL2RyaXZl
cnMvc3RhZ2luZy93aWxjMTAwMC9saW51eF93bGFuLmMgYi9kcml2ZXJzL3N0YWdpbmcvd2lsYzEw
MDAvbGludXhfd2xhbi5jDQo+IGluZGV4IGE3MzFiNDYuLjY2MGJmNjMgMTAwNjQ0DQo+IC0tLSBh
L2RyaXZlcnMvc3RhZ2luZy93aWxjMTAwMC9saW51eF93bGFuLmMNCj4gKysrIGIvZHJpdmVycy9z
dGFnaW5nL3dpbGMxMDAwL2xpbnV4X3dsYW4uYw0KPiBAQCAtMjI2LDcgKzIyNiw2IEBAIHN0YXRp
YyB2b2lkIGRlaW5pdF9pcnEoc3RydWN0IG5ldF9kZXZpY2UgKmRldikNCj4NCj4gIHZvaWQgd2ls
Y19kYmcodTggKmJ1ZmYpDQo+ICB7DQo+IC0gICAgICAgUFJJTlRfRChJTklUX0RCRywgIiVkXG4i
LCAqYnVmZik7DQo+ICB9DQoNCkFyZSB5b3Ugc3VyZSB0aGlzIGlzIHJpZ2h0PyBJZiBzbywgd2h5
IG5vdCBqdXN0IHJlbW92ZSB0aGlzIGZ1bmN0aW9uIGVudGlyZWx5Pw0KDQpUaGFua3MsDQoNCi0t
IA0KSnVsaWFuIENhbGFieQ0KDQpFbWFpbDoganVsaWFuLmNhbGFieUBnbWFpbC5jb20NClByb2Zp
bGU6IGh0dHA6Ly93d3cuZ29vZ2xlLmNvbS9wcm9maWxlcy9qdWxpYW4uY2FsYWJ5Lw0K
Hi Leo,
On Thu, Feb 18, 2016 at 10:30 PM, Leo Kim <[email protected]> wrote:
> From: Chris Park <[email protected]>
>
> This patch removes unnecessary log messages.
>
> Signed-off-by: Chris Park <[email protected]>
> Signed-off-by: Leo Kim <[email protected]>
> ---
> 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 a731b46..660bf63 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);
> }
Are you sure this is right? If so, why not just remove this function entirely?
Thanks,
--
Julian Calaby
Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
From: Chris Park <[email protected]>
This patch removes unnecessary log message and relate variables.
Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
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 d1eedfb..7b9dbc0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3010,7 +3010,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");
@@ -3019,10 +3018,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