2016-02-04 09:30:53

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 40/70] staging: wilc1000: wilc_wlan.c: replaces PRINT_ER with netdev_err

From: Leo Kim <[email protected]>

This patches replaces PRINT_ER with netdev_err.
Removes unnecessary debug logs as well.

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 46087e2..ec111d8 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1496,7 +1496,6 @@ int wilc_wlan_init(struct net_device *dev)

if (!wilc->tx_buffer) {
ret = -ENOBUFS;
- PRINT_ER("Can't allocate Tx Buffer");
goto _fail_;
}

@@ -1505,7 +1504,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



2016-02-04 17:38:21

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH RESEND 70/70] staging: wilc1000: remove warnings line over 80 characters

On Thu, 2016-02-04 at 18:24 +0900, Glen Lee wrote:
> From: Leo Kim <[email protected]>
>
> This patch removes the warnings reported by checkpatch.pl
> for line over 80 characters.
>
> Signed-off-by: Leo Kim <[email protected]>
> ---
> ?drivers/staging/wilc1000/coreconfigurator.c | 11 +++++++----
> ?1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
[]
> @@ -4,7 +4,7 @@
> ?#include
> ?#include
> ?#define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \
> - BEACON_INTERVAL_LEN + CAP_INFO_LEN)
> + ?BEACON_INTERVAL_LEN + CAP_INFO_LEN)

Another style is to use the continuation on the first line

#define TAG_PARAM_OFFSET \
(MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN)

> ?
> ?enum basic_frame_type {
> ? FRAME_TYPE_CONTROL?????= 0x04,
> @@ -337,8 +337,10 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
> ? tim_elm = get_tim_elm(msa, rx_len + FCS_LEN, index);
> ? if (tim_elm)
> ? network_info->dtim_period = tim_elm[3];
> - ies = &msa[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN];
> - ies_len = rx_len - (MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN);
> + ies = &msa[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN +
> + ???CAP_INFO_LEN];
> + ies_len = rx_len - (MAC_HDR_LEN + TIME_STAMP_LEN +
> + ????BEACON_INTERVAL_LEN + CAP_INFO_LEN);

Pretty funny that a TAG_PARAM_OFFSET change is in the same patch

It'd be simpler to use that define here.

ies = &msa[TAG_PARAM_OFFSET];
ies_len = rx_len - TAG_PARAM_OFFSET;

> ? if (!connect_resp_info->ies)


2016-02-04 09:33:39

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 61/70] staging: wilc1000: renames u32Tsf of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u32Tsf variable to tsf_lo.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 6c748aa..3e1e1f5 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -315,7 +315,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,

rx_len = wid_len - 1;
network_info->cap_info = get_cap_info(msa);
- network_info->u32Tsf = get_beacon_timestamp_lo(msa);
+ network_info->tsf_lo = get_beacon_timestamp_lo(msa);

tsf_lo = get_beacon_timestamp_lo(msa);
tsf_hi = get_beacon_timestamp_hi(msa);
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 27c35d7..07a2ef0 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -89,7 +89,7 @@ struct network_info {
unsigned long time_scan;
bool new_network;
u8 found;
- u32 u32Tsf;
+ u32 tsf_lo;
u8 *pu8IEs;
u16 u16IEsLen;
void *pJoinParams;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c0171f9..fa6ee92 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4330,7 +4330,7 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
(pu8IEs[index + 5] == 0x09) && (pu8IEs[index + 6] == 0x0c)) {
u16 u16P2P_count;

- pNewJoinBssParam->tsf = ptstrNetworkInfo->u32Tsf;
+ pNewJoinBssParam->tsf = ptstrNetworkInfo->tsf_lo;
pNewJoinBssParam->noa_enabled = 1;
pNewJoinBssParam->idx = pu8IEs[index + 9];

--
1.9.1


2016-02-07 21:43:21

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH RESEND 40/70] staging: wilc1000: wilc_wlan.c: replaces PRINT_ER with netdev_err

On Thu, Feb 04, 2016 at 06:24:01PM +0900, Glen Lee wrote:
> From: Leo Kim <[email protected]>
>
> This patches replaces PRINT_ER with netdev_err.

No, that's not what this patch does :(

> Removes unnecessary debug logs as well.

That's what this patch does.

Please be more careful.

I'm not going to apply this patch.

greg k-h

2016-02-04 09:32:05

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 46/70] staging: wilc1000: removes function 'wilc_dealloc_assoc_resp_info()'

From: Leo Kim <[email protected]>

This patch removes function wilc_dealloc_assoc_resp_info()'.
Does not need this function which only free memory.
Therefore, this function is removed and changed directly with kfree.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 22 ----------------------
drivers/staging/wilc1000/coreconfigurator.h | 1 -
drivers/staging/wilc1000/host_interface.c | 4 ++--
3 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 81dd22e..c86278d 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -386,25 +386,3 @@ s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,

return 0;
}
-
-s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *connect_resp_info)
-{
- s32 result = 0;
-
- if (connect_resp_info) {
- if (connect_resp_info->pu8RespIEs) {
- kfree(connect_resp_info->pu8RespIEs);
- connect_resp_info->pu8RespIEs = NULL;
- } else {
- result = -EFAULT;
- }
-
- kfree(connect_resp_info);
- connect_resp_info = NULL;
-
- } else {
- result = -EFAULT;
- }
-
- return result;
-}
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 23775e4..d42f47c 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -123,7 +123,6 @@ typedef struct {
s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info);
s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
tstrConnectRespInfo **ret_connect_resp_info);
-s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *connect_resp_info);
void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
u32 u32Length);
void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 2a1d7e9..30b93d0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1501,8 +1501,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
}

if (pstrConnectRespInfo) {
- wilc_dealloc_assoc_resp_info(pstrConnectRespInfo);
- pstrConnectRespInfo = NULL;
+ kfree(pstrConnectRespInfo->pu8RespIEs);
+ kfree(pstrConnectRespInfo);
}
}
}
--
1.9.1


2016-02-04 09:32:37

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 51/70] staging: wilc1000: renames u16CapInfo of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u16CapInfo variable to cap_info.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 42 +++++++++++++++++------
4 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 1e8c56b..6c40d36 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -314,7 +314,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
msa = &wid_val[1];

rx_len = wid_len - 1;
- network_info->u16CapInfo = get_cap_info(msa);
+ network_info->cap_info = get_cap_info(msa);
network_info->u32Tsf = get_beacon_timestamp_lo(msa);

tsf_lo = get_beacon_timestamp_lo(msa);
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index e386e85..ace50d8 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -78,7 +78,7 @@ typedef struct {

struct network_info {
s8 rssi;
- u16 u16CapInfo;
+ u16 cap_info;
u8 au8ssid[MAX_SSID_LEN];
u8 u8SsidLen;
u8 au8bssid[6];
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index f40b5a7..d56a33c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4277,7 +4277,7 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
if (pNewJoinBssParam) {
pNewJoinBssParam->dtim_period = ptstrNetworkInfo->u8DtimPeriod;
pNewJoinBssParam->beacon_period = ptstrNetworkInfo->u16BeaconPeriod;
- pNewJoinBssParam->cap_info = ptstrNetworkInfo->u16CapInfo;
+ pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info;
memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->au8bssid, 6);
memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->au8ssid, ptstrNetworkInfo->u8SsidLen + 1);
pNewJoinBssParam->ssid_len = ptstrNetworkInfo->u8SsidLen;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index f0c6c9f..578a3f2 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -246,9 +246,17 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
rssi = get_rssi_avg(network_info);
if (memcmp("DIRECT-", network_info->au8ssid, 7) ||
direct_scan) {
- bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, network_info->au8bssid, network_info->u64Tsf, network_info->u16CapInfo,
- network_info->u16BeaconPeriod, (const u8 *)network_info->pu8IEs,
- (size_t)network_info->u16IEsLen, (((s32)rssi) * 100), GFP_KERNEL);
+ bss = cfg80211_inform_bss(wiphy,
+ channel,
+ CFG80211_BSS_FTYPE_UNKNOWN,
+ network_info->au8bssid,
+ network_info->u64Tsf,
+ network_info->cap_info,
+ network_info->u16BeaconPeriod,
+ (const u8 *)network_info->pu8IEs,
+ (size_t)network_info->u16IEsLen,
+ (s32)rssi * 100,
+ GFP_KERNEL);
cfg80211_put_bss(wiphy, bss);
}
}
@@ -358,7 +366,7 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
}
last_scanned_shadow[ap_index].strRssi.u8Index = rssi_index;
last_scanned_shadow[ap_index].rssi = pstrNetworkInfo->rssi;
- last_scanned_shadow[ap_index].u16CapInfo = pstrNetworkInfo->u16CapInfo;
+ last_scanned_shadow[ap_index].cap_info = pstrNetworkInfo->cap_info;
last_scanned_shadow[ap_index].u8SsidLen = pstrNetworkInfo->u8SsidLen;
memcpy(last_scanned_shadow[ap_index].au8ssid,
pstrNetworkInfo->au8ssid, pstrNetworkInfo->u8SsidLen);
@@ -414,9 +422,15 @@ static void CfgScanResult(enum scan_event scan_event,
if (!channel)
return;

- PRINT_INFO(CFG80211_DBG, "Network Info:: CHANNEL Frequency: %d, RSSI: %d, CapabilityInfo: %d,"
- "BeaconPeriod: %d\n", channel->center_freq, (((s32)network_info->rssi) * 100),
- network_info->u16CapInfo, network_info->u16BeaconPeriod);
+ 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->u16BeaconPeriod);

if (network_info->bNewNetwork) {
if (priv->u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) {
@@ -426,9 +440,17 @@ static void CfgScanResult(enum scan_event scan_event,
add_network_to_shadow(network_info, priv, join_params);

if (!(memcmp("DIRECT-", network_info->au8ssid, 7))) {
- bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, network_info->au8bssid, network_info->u64Tsf, network_info->u16CapInfo,
- network_info->u16BeaconPeriod, (const u8 *)network_info->pu8IEs,
- (size_t)network_info->u16IEsLen, (((s32)network_info->rssi) * 100), GFP_KERNEL);
+ bss = cfg80211_inform_bss(wiphy,
+ channel,
+ CFG80211_BSS_FTYPE_UNKNOWN,
+ network_info->au8bssid,
+ network_info->u64Tsf,
+ network_info->cap_info,
+ network_info->u16BeaconPeriod,
+ (const u8 *)network_info->pu8IEs,
+ (size_t)network_info->u16IEsLen,
+ (s32)network_info->rssi * 100,
+ GFP_KERNEL);
cfg80211_put_bss(wiphy, bss);
}
}
--
1.9.1


2016-02-04 09:31:33

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 43/70] staging: wilc1000: remove unused log message using the HOSTINF_DBG tag

From: Chris Park <[email protected]>

This patch remove unused log message using the HOSTINF_DBG tag

Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 198 +---------------------
drivers/staging/wilc1000/linux_wlan_common.h | 2 -
drivers/staging/wilc1000/wilc_debugfs.c | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 -
4 files changed, 10 insertions(+), 194 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 2022deb..6e0a426 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -310,8 +310,6 @@ static s32 handle_set_channel(struct wilc_vif *vif,
wid.val = (char *)&hif_set_ch->set_ch;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Setting channel\n");
-
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));

@@ -382,9 +380,6 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
if (ip_addr[0] < 192)
ip_addr[0] = 0;

- PRINT_INFO(HOSTINF_DBG, "Indx = %d, Handling set IP = %pI4\n",
- idx, ip_addr);
-
memcpy(set_ip[idx], ip_addr, IP_ALEN);

wid.id = (u16)WID_IP_ADDRESS;
@@ -402,8 +397,6 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
return -EINVAL;
}

- PRINT_INFO(HOSTINF_DBG, "IP address set\n");
-
return result;
}

@@ -420,8 +413,6 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx)
result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));

- PRINT_INFO(HOSTINF_DBG, "%pI4\n", wid.val);
-
memcpy(get_ip[idx], wid.val, IP_ALEN);

kfree(wid.val);
@@ -434,10 +425,6 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx)
return -EINVAL;
}

- PRINT_INFO(HOSTINF_DBG, "IP address retrieved:: u8IfIdx = %d\n", idx);
- PRINT_INFO(HOSTINF_DBG, "%pI4\n", get_ip[idx]);
- PRINT_INFO(HOSTINF_DBG, "\n");
-
return result;
}

@@ -504,8 +491,6 @@ static s32 handle_cfg_param(struct wilc_vif *vif,

down(&hif_drv->sem_cfg_values);

- PRINT_D(HOSTINF_DBG, "Setting CFG params\n");
-
if (cfg_param_attr->cfg_attr_info.flag & BSS_TYPE) {
if (cfg_param_attr->cfg_attr_info.bss_type < 6) {
wid_list[wid_cnt].id = WID_BSS_TYPE;
@@ -810,9 +795,6 @@ static s32 Handle_Scan(struct wilc_vif *vif,
u8 *pu8HdnNtwrksWidVal = NULL;
struct host_if_drv *hif_drv = vif->hif_drv;

- PRINT_D(HOSTINF_DBG, "Setting SCAN params\n");
- PRINT_D(HOSTINF_DBG, "Scanning: In [%d] state\n", hif_drv->hif_state);
-
hif_drv->usr_scan_req.scan_result = pstrHostIFscanAttr->result;
hif_drv->usr_scan_req.arg = pstrHostIFscanAttr->arg;

@@ -832,8 +814,6 @@ static s32 Handle_Scan(struct wilc_vif *vif,
goto ERRORHANDLER;
}

- PRINT_D(HOSTINF_DBG, "Setting SCAN params\n");
-
hif_drv->usr_scan_req.rcvd_ch_cnt = 0;

strWIDList[u32WidsCount].id = (u16)WID_SSID_PROBE_REQ;
@@ -848,8 +828,6 @@ static s32 Handle_Scan(struct wilc_vif *vif,

*pu8Buffer++ = pstrHostIFscanAttr->hidden_network.n_ssids;

- PRINT_D(HOSTINF_DBG, "In Handle_ProbeRequest number of ssid %d\n", pstrHostIFscanAttr->hidden_network.n_ssids);
-
for (i = 0; i < pstrHostIFscanAttr->hidden_network.n_ssids; i++) {
*pu8Buffer++ = pstrHostIFscanAttr->hidden_network.net_info[i].ssid_len;
memcpy(pu8Buffer, pstrHostIFscanAttr->hidden_network.net_info[i].ssid, pstrHostIFscanAttr->hidden_network.net_info[i].ssid_len);
@@ -908,8 +886,6 @@ static s32 Handle_Scan(struct wilc_vif *vif,

if (result)
PRINT_ER("Failed to send scan paramters config packet\n");
- else
- PRINT_D(HOSTINF_DBG, "Successfully sent SCAN params config packet\n");

ERRORHANDLER:
if (result) {
@@ -938,8 +914,6 @@ static s32 Handle_ScanDone(struct wilc_vif *vif,
struct wid wid;
struct host_if_drv *hif_drv = vif->hif_drv;

- PRINT_D(HOSTINF_DBG, "in Handle_ScanDone()\n");
-
if (enuEvent == SCAN_EVENT_ABORTED) {
PRINT_D(GENERIC_DBG, "Abort running scan\n");
u8abort_running_scan = 1;
@@ -990,8 +964,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
return result;
}

- PRINT_INFO(HOSTINF_DBG, "Saving connection parameters in global structure\n");
-
ptstrJoinBssParam = (struct join_bss_param *)pstrHostIFconnectAttr->params;
if (!ptstrJoinBssParam) {
PRINT_ER("Required BSSID not found\n");
@@ -1067,8 +1039,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7))
mode_11i = hif_drv->usr_conn_req.u8security;

- PRINT_INFO(HOSTINF_DBG, "Encrypt Mode = %x\n", hif_drv->usr_conn_req.u8security);
-
strWIDList[u32WidsCount].id = (u16)WID_AUTH_TYPE;
strWIDList[u32WidsCount].type = WID_CHAR;
strWIDList[u32WidsCount].size = sizeof(char);
@@ -1078,11 +1048,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7))
auth_type = (u8)hif_drv->usr_conn_req.auth_type;

- PRINT_INFO(HOSTINF_DBG, "Authentication Type = %x\n",
- hif_drv->usr_conn_req.auth_type);
- PRINT_D(HOSTINF_DBG, "Connecting to network of SSID %s on channel %d\n",
- hif_drv->usr_conn_req.pu8ssid, pstrHostIFconnectAttr->ch);
-
strWIDList[u32WidsCount].id = (u16)WID_JOIN_REQ_EXTENDED;
strWIDList[u32WidsCount].type = WID_STR;
strWIDList[u32WidsCount].size = 112;
@@ -1114,7 +1079,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
}
*(pu8CurrByte++) = (ptstrJoinBssParam->cap_info) & 0xFF;
*(pu8CurrByte++) = ((ptstrJoinBssParam->cap_info) >> 8) & 0xFF;
- PRINT_D(HOSTINF_DBG, "* Cap Info %0x*\n", (*(pu8CurrByte - 2) | ((*(pu8CurrByte - 1)) << 8)));

if (pstrHostIFconnectAttr->bssid)
memcpy(pu8CurrByte, pstrHostIFconnectAttr->bssid, 6);
@@ -1126,26 +1090,20 @@ static s32 Handle_Connect(struct wilc_vif *vif,

*(pu8CurrByte++) = (ptstrJoinBssParam->beacon_period) & 0xFF;
*(pu8CurrByte++) = ((ptstrJoinBssParam->beacon_period) >> 8) & 0xFF;
- PRINT_D(HOSTINF_DBG, "* Beacon Period %d*\n", (*(pu8CurrByte - 2) | ((*(pu8CurrByte - 1)) << 8)));
*(pu8CurrByte++) = ptstrJoinBssParam->dtim_period;
- PRINT_D(HOSTINF_DBG, "* DTIM Period %d*\n", (*(pu8CurrByte - 1)));

memcpy(pu8CurrByte, ptstrJoinBssParam->supp_rates, MAX_RATES_SUPPORTED + 1);
pu8CurrByte += (MAX_RATES_SUPPORTED + 1);

*(pu8CurrByte++) = ptstrJoinBssParam->wmm_cap;
- PRINT_D(HOSTINF_DBG, "* wmm cap%d*\n", (*(pu8CurrByte - 1)));
*(pu8CurrByte++) = ptstrJoinBssParam->uapsd_cap;

*(pu8CurrByte++) = ptstrJoinBssParam->ht_capable;
hif_drv->usr_conn_req.ht_capable = ptstrJoinBssParam->ht_capable;

*(pu8CurrByte++) = ptstrJoinBssParam->rsn_found;
- PRINT_D(HOSTINF_DBG, "* rsn found %d*\n", *(pu8CurrByte - 1));
*(pu8CurrByte++) = ptstrJoinBssParam->rsn_grp_policy;
- PRINT_D(HOSTINF_DBG, "* rsn group policy %0x*\n", (*(pu8CurrByte - 1)));
*(pu8CurrByte++) = ptstrJoinBssParam->mode_802_11i;
- PRINT_D(HOSTINF_DBG, "* mode_802_11i %d*\n", (*(pu8CurrByte - 1)));

memcpy(pu8CurrByte, ptstrJoinBssParam->rsn_pcip_policy, sizeof(ptstrJoinBssParam->rsn_pcip_policy));
pu8CurrByte += sizeof(ptstrJoinBssParam->rsn_pcip_policy);
@@ -1160,8 +1118,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
*(pu8CurrByte++) = ptstrJoinBssParam->noa_enabled;

if (ptstrJoinBssParam->noa_enabled) {
- PRINT_D(HOSTINF_DBG, "NOA present\n");
-
*(pu8CurrByte++) = (ptstrJoinBssParam->tsf) & 0xFF;
*(pu8CurrByte++) = ((ptstrJoinBssParam->tsf) >> 8) & 0xFF;
*(pu8CurrByte++) = ((ptstrJoinBssParam->tsf) >> 16) & 0xFF;
@@ -1183,8 +1139,7 @@ static s32 Handle_Connect(struct wilc_vif *vif,

memcpy(pu8CurrByte, ptstrJoinBssParam->start_time, sizeof(ptstrJoinBssParam->start_time));
pu8CurrByte += sizeof(ptstrJoinBssParam->start_time);
- } else
- PRINT_D(HOSTINF_DBG, "NOA not present\n");
+ }

pu8CurrByte = strWIDList[u32WidsCount].val;
u32WidsCount++;
@@ -1194,8 +1149,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
join_req_vif = vif;
}

- PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n");
-
if (pstrHostIFconnectAttr->bssid) {
memcpy(wilc_connected_ssid,
pstrHostIFconnectAttr->bssid, ETH_ALEN);
@@ -1222,8 +1175,6 @@ ERRORHANDLER:

del_timer(&hif_drv->connect_timer);

- PRINT_D(HOSTINF_DBG, "could not start wilc_connecting to the required network\n");
-
memset(&strConnectInfo, 0, sizeof(tstrConnectInfo));

if (pstrHostIFconnectAttr->result) {
@@ -1252,7 +1203,6 @@ ERRORHANDLER:
}
}

- PRINT_D(HOSTINF_DBG, "Deallocating connection parameters\n");
kfree(pstrHostIFconnectAttr->bssid);
pstrHostIFconnectAttr->bssid = NULL;

@@ -1363,8 +1313,6 @@ static s32 Handle_ConnectTimeout(struct wilc_vif *vif)
wid.val = (s8 *)&u16DummyReasonCode;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
-
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
@@ -1405,10 +1353,8 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
struct host_if_drv *hif_drv = vif->hif_drv;

bNewNtwrkFound = true;
- PRINT_INFO(HOSTINF_DBG, "Handling received network info\n");

if (hif_drv->usr_scan_req.scan_result) {
- PRINT_D(HOSTINF_DBG, "State: Scanning, parsing network information received\n");
wilc_parse_network_info(pstrRcvdNetworkInfo->buffer, &pstrNetworkInfo);
if ((!pstrNetworkInfo) ||
(!hif_drv->usr_scan_req.scan_result)) {
@@ -1423,7 +1369,6 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
if (memcmp(hif_drv->usr_scan_req.net_info[i].au8bssid,
pstrNetworkInfo->au8bssid, 6) == 0) {
if (pstrNetworkInfo->s8rssi <= hif_drv->usr_scan_req.net_info[i].s8rssi) {
- PRINT_D(HOSTINF_DBG, "Network previously discovered\n");
goto done;
} else {
hif_drv->usr_scan_req.net_info[i].s8rssi = pstrNetworkInfo->s8rssi;
@@ -1435,8 +1380,6 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
}

if (bNewNtwrkFound) {
- PRINT_D(HOSTINF_DBG, "New network found\n");
-
if (hif_drv->usr_scan_req.rcvd_ch_cnt < MAX_NUM_SCANNED_NETWORKS) {
hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].s8rssi = pstrNetworkInfo->s8rssi;

@@ -1454,8 +1397,6 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
hif_drv->usr_scan_req.arg,
pJoinParams);
}
- } else {
- PRINT_WRN(HOSTINF_DBG, "Discovered networks exceeded max. limit\n");
}
} else {
pstrNetworkInfo->bNewNetwork = false;
@@ -1528,13 +1469,10 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
u8MacStatus = pstrRcvdGnrlAsyncInfo->buffer[7];
u8MacStatusReasonCode = pstrRcvdGnrlAsyncInfo->buffer[8];
u8MacStatusAdditionalInfo = pstrRcvdGnrlAsyncInfo->buffer[9];
- PRINT_INFO(HOSTINF_DBG, "Recieved MAC status = %d with Reason = %d , Info = %d\n", u8MacStatus, u8MacStatusReasonCode, u8MacStatusAdditionalInfo);
if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
u32 u32RcvdAssocRespInfoLen = 0;
tstrConnectRespInfo *pstrConnectRespInfo = NULL;

- PRINT_D(HOSTINF_DBG, "Recieved MAC status = %d with Reason = %d , Code = %d\n", u8MacStatus, u8MacStatusReasonCode, u8MacStatusAdditionalInfo);
-
memset(&strConnectInfo, 0, sizeof(tstrConnectInfo));

if (u8MacStatus == MAC_CONNECTED) {
@@ -1545,10 +1483,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
MAX_ASSOC_RESP_FRAME_SIZE,
&u32RcvdAssocRespInfoLen);

- PRINT_INFO(HOSTINF_DBG, "Received association response with length = %d\n", u32RcvdAssocRespInfoLen);
-
if (u32RcvdAssocRespInfoLen != 0) {
- PRINT_D(HOSTINF_DBG, "Parsing association response\n");
s32Err = wilc_parse_assoc_resp_info(rcv_assoc_resp, u32RcvdAssocRespInfoLen,
&pstrConnectRespInfo);
if (s32Err) {
@@ -1557,7 +1492,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
strConnectInfo.u16ConnectStatus = pstrConnectRespInfo->u16ConnectStatus;

if (strConnectInfo.u16ConnectStatus == SUCCESSFUL_STATUSCODE) {
- PRINT_INFO(HOSTINF_DBG, "Association response received : Successful connection status\n");
if (pstrConnectRespInfo->pu8RespIEs) {
strConnectInfo.u16RespIEsLen = pstrConnectRespInfo->u16RespIEsLen;
strConnectInfo.pu8RespIEs = kmalloc(pstrConnectRespInfo->u16RespIEsLen, GFP_KERNEL);
@@ -1584,7 +1518,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
}

if (hif_drv->usr_conn_req.pu8bssid) {
- PRINT_D(HOSTINF_DBG, "Retrieving actual BSSID from AP\n");
memcpy(strConnectInfo.au8bssid, hif_drv->usr_conn_req.pu8bssid, 6);

if ((u8MacStatus == MAC_CONNECTED) &&
@@ -1613,7 +1546,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
(strConnectInfo.u16ConnectStatus == SUCCESSFUL_STATUSCODE)) {
wilc_set_power_mgmt(vif, 0, 0);

- PRINT_D(HOSTINF_DBG, "MAC status : CONNECTED and Connect Status : Successful\n");
hif_drv->hif_state = HOST_IF_CONNECTED;

PRINT_D(GENERIC_DBG, "Obtaining an IP, Disable Scan\n");
@@ -1621,7 +1553,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
mod_timer(&wilc_during_ip_timer,
jiffies + msecs_to_jiffies(10000));
} else {
- PRINT_D(HOSTINF_DBG, "MAC status : %d and Connect Status : %d\n", u8MacStatus, strConnectInfo.u16ConnectStatus);
hif_drv->hif_state = HOST_IF_IDLE;
scan_while_connected = false;
}
@@ -1641,12 +1572,9 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
hif_drv->usr_conn_req.ies = NULL;
} else if ((u8MacStatus == MAC_DISCONNECTED) &&
(hif_drv->hif_state == HOST_IF_CONNECTED)) {
- PRINT_D(HOSTINF_DBG, "Received MAC_DISCONNECTED from the FW\n");
-
memset(&strDisconnectNotifInfo, 0, sizeof(tstrDisconnectNotifInfo));

if (hif_drv->usr_scan_req.scan_result) {
- PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running OBSS Scan >>\n\n");
del_timer(&hif_drv->scan_timer);
Handle_ScanDone(vif, SCAN_EVENT_ABORTED);
}
@@ -1694,9 +1622,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,

} else if ((u8MacStatus == MAC_DISCONNECTED) &&
(hif_drv->usr_scan_req.scan_result)) {
- PRINT_D(HOSTINF_DBG, "Received MAC_DISCONNECTED from the FW while scanning\n");
- PRINT_D(HOSTINF_DBG, "\n\n<< Abort the running Scan >>\n\n");
-
del_timer(&hif_drv->scan_timer);
if (hif_drv->usr_scan_req.scan_result)
Handle_ScanDone(vif, SCAN_EVENT_ABORTED);
@@ -1725,8 +1650,6 @@ static int Handle_Key(struct wilc_vif *vif,
case WEP:

if (pstrHostIFkeyAttr->action & ADDKEY_AP) {
- PRINT_D(HOSTINF_DBG, "Handling WEP key\n");
- PRINT_D(GENERIC_DBG, "ID Hostint is %d\n", pstrHostIFkeyAttr->attr.wep.index);
strWIDList[0].id = (u16)WID_11I_MODE;
strWIDList[0].type = WID_CHAR;
strWIDList[0].size = sizeof(char);
@@ -1763,7 +1686,6 @@ static int Handle_Key(struct wilc_vif *vif,
wilc_get_vif_idx(vif));
kfree(pu8keybuf);
} else if (pstrHostIFkeyAttr->action & ADDKEY) {
- PRINT_D(HOSTINF_DBG, "Handling WEP key\n");
pu8keybuf = kmalloc(pstrHostIFkeyAttr->attr.wep.key_len + 2, GFP_KERNEL);
if (!pu8keybuf) {
PRINT_ER("No buffer to send Key\n");
@@ -1785,7 +1707,6 @@ static int Handle_Key(struct wilc_vif *vif,
wilc_get_vif_idx(vif));
kfree(pu8keybuf);
} else if (pstrHostIFkeyAttr->action & REMOVEKEY) {
- PRINT_D(HOSTINF_DBG, "Removing key\n");
wid.id = (u16)WID_REMOVE_WEP_KEY;
wid.type = WID_STR;

@@ -1802,8 +1723,6 @@ static int Handle_Key(struct wilc_vif *vif,
wid.val = (s8 *)&pstrHostIFkeyAttr->attr.wep.index;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Setting default key index\n");
-
result = wilc_send_config_pkt(vif, SET_CFG,
&wid, 1,
wilc_get_vif_idx(vif));
@@ -1845,8 +1764,6 @@ static int Handle_Key(struct wilc_vif *vif,
kfree(pu8keybuf);
up(&hif_drv->sem_test_key_block);
} else if (pstrHostIFkeyAttr->action & ADDKEY) {
- PRINT_D(HOSTINF_DBG, "Handling group key(Rx) function\n");
-
pu8keybuf = kzalloc(RX_MIC_KEY_MSG_LEN, GFP_KERNEL);
if (pu8keybuf == NULL) {
PRINT_ER("No buffer to send RxGTK Key\n");
@@ -1948,9 +1865,6 @@ _WPAPtk_end_case_:
break;

case PMKSA:
-
- PRINT_D(HOSTINF_DBG, "Handling PMKSA key\n");
-
pu8keybuf = kmalloc((pstrHostIFkeyAttr->attr.pmkid.numpmkid * PMKSA_KEY_LEN) + 1, GFP_KERNEL);
if (!pu8keybuf) {
PRINT_ER("No buffer to send PMKSA Key\n");
@@ -1995,8 +1909,6 @@ static void Handle_Disconnect(struct wilc_vif *vif)
wid.val = (s8 *)&u16DummyReasonCode;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
-
wilc_optaining_ip = false;
wilc_set_power_mgmt(vif, 0, 0);

@@ -2026,10 +1938,8 @@ static void Handle_Disconnect(struct wilc_vif *vif)
}

if (hif_drv->usr_conn_req.conn_result) {
- if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
- PRINT_D(HOSTINF_DBG, "Upper layer requested termination of connection\n");
+ if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP)
del_timer(&hif_drv->connect_timer);
- }

hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF,
NULL,
@@ -2074,10 +1984,8 @@ void wilc_resolve_disconnect_aberration(struct wilc_vif *vif)
if (!vif->hif_drv)
return;
if ((vif->hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
- (vif->hif_drv->hif_state == HOST_IF_CONNECTING)) {
- PRINT_D(HOSTINF_DBG, "\n\n<< correcting Supplicant state machine >>\n\n");
+ (vif->hif_drv->hif_state == HOST_IF_CONNECTING))
wilc_disconnect(vif, 1);
- }
}

static s32 Handle_GetChnl(struct wilc_vif *vif)
@@ -2091,8 +1999,6 @@ static s32 Handle_GetChnl(struct wilc_vif *vif)
wid.val = (s8 *)&ch_no;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Getting channel value\n");
-
result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));

@@ -2116,8 +2022,6 @@ static void Handle_GetRssi(struct wilc_vif *vif)
wid.val = &rssi;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Getting RSSI value\n");
-
result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result) {
@@ -2141,8 +2045,6 @@ static void Handle_GetLinkspeed(struct wilc_vif *vif)
wid.val = &link_speed;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Getting LINKSPEED value\n");
-
result = wilc_send_config_pkt(vif, GET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result) {
@@ -2260,8 +2162,6 @@ static void Handle_AddBeacon(struct wilc_vif *vif,
struct wid wid;
u8 *pu8CurrByte;

- PRINT_D(HOSTINF_DBG, "Adding BEACON\n");
-
wid.id = (u16)WID_ADD_BEACON;
wid.type = WID_BIN;
wid.size = pstrSetBeaconParam->head_len + pstrSetBeaconParam->tail_len + 16;
@@ -2324,8 +2224,6 @@ static void Handle_DelBeacon(struct wilc_vif *vif)

pu8CurrByte = wid.val;

- PRINT_D(HOSTINF_DBG, "Deleting BEACON\n");
-
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
@@ -2339,7 +2237,6 @@ static u32 WILC_HostIf_PackStaParam(u8 *pu8Buffer,

pu8CurrByte = pu8Buffer;

- PRINT_D(HOSTINF_DBG, "Packing STA params\n");
memcpy(pu8CurrByte, pstrStationParam->bssid, ETH_ALEN);
pu8CurrByte += ETH_ALEN;

@@ -2387,7 +2284,6 @@ static void Handle_AddStation(struct wilc_vif *vif,
struct wid wid;
u8 *pu8CurrByte;

- PRINT_D(HOSTINF_DBG, "Handling add station\n");
wid.id = (u16)WID_ADD_STA;
wid.type = WID_BIN;
wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->rates_len;
@@ -2422,8 +2318,6 @@ static void Handle_DelAllSta(struct wilc_vif *vif,
wid.type = WID_STR;
wid.size = (pstrDelAllStaParam->assoc_sta * ETH_ALEN) + 1;

- PRINT_D(HOSTINF_DBG, "Handling delete station\n");
-
wid.val = kmalloc((pstrDelAllStaParam->assoc_sta * ETH_ALEN) + 1, GFP_KERNEL);
if (!wid.val)
goto ERRORHANDLER;
@@ -2463,8 +2357,6 @@ static void Handle_DelStation(struct wilc_vif *vif,
wid.type = WID_BIN;
wid.size = ETH_ALEN;

- PRINT_D(HOSTINF_DBG, "Handling delete station\n");
-
wid.val = kmalloc(wid.size, GFP_KERNEL);
if (!wid.val)
goto ERRORHANDLER;
@@ -2493,7 +2385,6 @@ static void Handle_EditStation(struct wilc_vif *vif,
wid.type = WID_BIN;
wid.size = WILC_ADD_STA_LENGTH + pstrStationParam->rates_len;

- PRINT_D(HOSTINF_DBG, "Handling edit station\n");
wid.val = kmalloc(wid.size, GFP_KERNEL);
if (!wid.val)
goto ERRORHANDLER;
@@ -2547,9 +2438,6 @@ static int Handle_RemainOnChan(struct wilc_vif *vif,
goto ERRORHANDLER;
}

- PRINT_D(HOSTINF_DBG, "Setting channel :%d\n",
- pstrHostIfRemainOnChan->ch);
-
u8remain_on_chan_flag = true;
wid.id = (u16)WID_REMAIN_ON_CHAN;
wid.type = WID_STR;
@@ -2593,10 +2481,6 @@ static int Handle_RegisterFrame(struct wilc_vif *vif,
struct wid wid;
u8 *pu8CurrByte;

- PRINT_D(HOSTINF_DBG, "Handling frame register : %d FrameType: %d\n",
- pstrHostIfRegisterFrame->reg,
- pstrHostIfRegisterFrame->frame_type);
-
wid.id = (u16)WID_REGISTER_FRAME;
wid.type = WID_STR;
wid.val = kmalloc(sizeof(u16) + 2, GFP_KERNEL);
@@ -2629,8 +2513,6 @@ static u32 Handle_ListenStateExpired(struct wilc_vif *vif,
s32 result = 0;
struct host_if_drv *hif_drv = vif->hif_drv;

- PRINT_D(HOSTINF_DBG, "CANCEL REMAIN ON CHAN\n");
-
if (P2P_LISTEN_STATE) {
u8remain_on_chan_flag = false;
wid.id = (u16)WID_REMAIN_ON_CHAN;
@@ -2698,12 +2580,10 @@ static void Handle_PowerManagement(struct wilc_vif *vif,
s8PowerMode = MIN_FAST_PS;
else
s8PowerMode = NO_POWERSAVE;
- PRINT_D(HOSTINF_DBG, "Handling power mgmt to %d\n", s8PowerMode);
+
wid.val = &s8PowerMode;
wid.size = sizeof(char);

- PRINT_D(HOSTINF_DBG, "Handling Power Management\n");
-
result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
if (result)
@@ -2717,8 +2597,6 @@ static void Handle_SetMulticastFilter(struct wilc_vif *vif,
struct wid wid;
u8 *pu8CurrByte;

- PRINT_D(HOSTINF_DBG, "Setup Multicast Filter\n");
-
wid.id = (u16)WID_SETUP_MULTICAST_FILTER;
wid.type = WID_BIN;
wid.size = sizeof(struct set_multicast) + ((strHostIfSetMulti->cnt) * ETH_ALEN);
@@ -2779,8 +2657,6 @@ static s32 Handle_DelAllRxBASessions(struct wilc_vif *vif,

result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
- if (result)
- PRINT_D(HOSTINF_DBG, "Couldn't delete BA Session\n");

kfree(wid.val);

@@ -2849,7 +2725,6 @@ static int hostIFthread(void *pvArg)

if (msg.id == HOST_IF_MSG_CONNECT &&
vif->hif_drv->usr_scan_req.scan_result) {
- PRINT_D(HOSTINF_DBG, "Requeue connect request till scan done received\n");
wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
usleep_range(2 * 1000, 2 * 1000);
continue;
@@ -2899,7 +2774,6 @@ static int hostIFthread(void *pvArg)

case HOST_IF_MSG_RCVD_SCAN_COMPLETE:
del_timer(&vif->hif_drv->scan_timer);
- PRINT_D(HOSTINF_DBG, "scan completed successfully\n");

if (!wilc_wlan_get_num_conn_ifcs(wilc))
wilc_chip_sleep_manually(wilc);
@@ -2954,13 +2828,11 @@ static int hostIFthread(void *pvArg)
break;

case HOST_IF_MSG_SCAN_TIMER_FIRED:
- PRINT_D(HOSTINF_DBG, "Scan Timeout\n");

Handle_ScanDone(msg.vif, SCAN_EVENT_ABORTED);
break;

case HOST_IF_MSG_CONNECT_TIMER_FIRED:
- PRINT_D(HOSTINF_DBG, "Connect Timeout\n");
Handle_ConnectTimeout(msg.vif);
break;

@@ -2978,14 +2850,12 @@ static int hostIFthread(void *pvArg)
break;

case HOST_IF_MSG_SET_IPADDRESS:
- PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
handle_set_ip_address(vif,
msg.body.ip_info.ip_addr,
msg.body.ip_info.idx);
break;

case HOST_IF_MSG_GET_IPADDRESS:
- PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
handle_get_ip_address(vif, msg.body.ip_info.idx);
break;

@@ -3000,12 +2870,10 @@ static int hostIFthread(void *pvArg)
break;

case HOST_IF_MSG_REMAIN_ON_CHAN:
- PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_REMAIN_ON_CHAN\n");
Handle_RemainOnChan(msg.vif, &msg.body.remain_on_ch);
break;

case HOST_IF_MSG_REGISTER_FRAME:
- PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_REGISTER_FRAME\n");
Handle_RegisterFrame(msg.vif, &msg.body.reg_frame);
break;

@@ -3014,7 +2882,6 @@ static int hostIFthread(void *pvArg)
break;

case HOST_IF_MSG_SET_MULTICAST_FILTER:
- PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_MULTICAST_FILTER\n");
Handle_SetMulticastFilter(msg.vif, &msg.body.multicast_info);
break;

@@ -3039,7 +2906,6 @@ static int hostIFthread(void *pvArg)
}
}

- PRINT_D(HOSTINF_DBG, "Releasing thread exit semaphore\n");
up(&hif_sema_thread);
return 0;
}
@@ -3689,9 +3555,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
if (hidden_network) {
msg.body.scan_info.hidden_network.net_info = hidden_network->net_info;
msg.body.scan_info.hidden_network.n_ssids = hidden_network->n_ssids;
-
- } else
- PRINT_D(HOSTINF_DBG, "hidden_network IS EQUAL TO NULL\n");
+ }

msg.vif = vif;
msg.body.scan_info.src = scan_source;
@@ -3717,7 +3581,6 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
return -EINVAL;
}

- PRINT_D(HOSTINF_DBG, ">> Starting the SCAN timer\n");
hif_drv->scan_timer.data = (unsigned long)vif;
mod_timer(&hif_drv->scan_timer,
jiffies + msecs_to_jiffies(HOST_IF_SCAN_TIMEOUT));
@@ -3774,8 +3637,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
vif = netdev_priv(dev);
wilc = vif->wilc;

- PRINT_D(HOSTINF_DBG, "Initializing host interface for client %d\n", clients_count + 1);
-
scan_while_connected = false;

sema_init(&hif_sema_wait_response, 0);
@@ -3794,7 +3655,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)

wilc_optaining_ip = false;

- PRINT_D(HOSTINF_DBG, "Global handle pointer value=%p\n", hif_drv);
if (clients_count == 0) {
sema_init(&hif_sema_thread, 0);
sema_init(&hif_sema_driver, 0);
@@ -3808,8 +3668,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)
sema_init(&hif_drv->sem_get_chnl, 0);
sema_init(&hif_drv->sem_inactive_time, 0);

- PRINT_D(HOSTINF_DBG, "INIT: CLIENT COUNT %d\n", clients_count);
-
if (clients_count == 0) {
result = wilc_mq_create(&hif_msg_q);

@@ -3847,13 +3705,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)

hif_drv->p2p_timeout = 0;

- PRINT_INFO(HOSTINF_DBG, "Initialization values, Site survey value: %d\n Scan source: %d\n Active scan time: %d\n Passive scan time: %d\nCurrent tx Rate = %d\n",
- hif_drv->cfg_values.site_survey_enabled,
- hif_drv->cfg_values.scan_source,
- hif_drv->cfg_values.active_scan_time,
- hif_drv->cfg_values.passive_scan_time,
- hif_drv->cfg_values.curr_tx_rate);
-
up(&hif_drv->sem_cfg_values);

clients_count++;
@@ -3880,17 +3731,10 @@ s32 wilc_deinit(struct wilc_vif *vif)
down(&hif_sema_deinit);

terminated_handle = hif_drv;
- PRINT_D(HOSTINF_DBG, "De-initializing host interface for client %d\n", clients_count);
-
- if (del_timer_sync(&hif_drv->scan_timer))
- PRINT_D(HOSTINF_DBG, ">> Scan timer is active\n");
-
- if (del_timer_sync(&hif_drv->connect_timer))
- PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
-
- if (del_timer_sync(&periodic_rssi))
- PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");

+ del_timer_sync(&hif_drv->scan_timer);
+ del_timer_sync(&hif_drv->connect_timer);
+ del_timer_sync(&periodic_rssi);
del_timer_sync(&hif_drv->remain_on_ch_timer);

wilc_set_wfi_drv_handler(vif, 0, 0);
@@ -3909,9 +3753,7 @@ s32 wilc_deinit(struct wilc_vif *vif)
memset(&msg, 0, sizeof(struct host_if_msg));

if (clients_count == 1) {
- if (del_timer_sync(&periodic_rssi))
- PRINT_D(HOSTINF_DBG, ">> Connect timer is active\n");
-
+ del_timer_sync(&periodic_rssi);
msg.id = HOST_IF_MSG_EXIT;
msg.vif = vif;

@@ -3985,10 +3827,8 @@ void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
}

hif_drv = vif->hif_drv;
- PRINT_D(HOSTINF_DBG, "General asynchronous info packet received\n");

if (!hif_drv || hif_drv == terminated_handle) {
- PRINT_D(HOSTINF_DBG, "Wifi driver handler is equal to NULL\n");
up(&hif_sema_deinit);
return;
}
@@ -4123,17 +3963,14 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
msg.id = HOST_IF_MSG_REGISTER_FRAME;
switch (frame_type) {
case ACTION:
- PRINT_D(HOSTINF_DBG, "ACTION\n");
msg.body.reg_frame.reg_id = ACTION_FRM_IDX;
break;

case PROBE_REQ:
- PRINT_D(HOSTINF_DBG, "PROBE REQ\n");
msg.body.reg_frame.reg_id = PROBE_REQ_IDX;
break;

default:
- PRINT_D(HOSTINF_DBG, "Not valid frame type\n");
break;
}
msg.body.reg_frame.frame_type = frame_type;
@@ -4162,8 +3999,6 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,

memset(&msg, 0, sizeof(struct host_if_msg));

- PRINT_D(HOSTINF_DBG, "Setting adding beacon message queue params\n");
-
msg.id = HOST_IF_MSG_ADD_BEACON;
msg.vif = vif;
beacon_info->interval = interval;
@@ -4213,7 +4048,6 @@ int wilc_del_beacon(struct wilc_vif *vif)

msg.id = HOST_IF_MSG_DEL_BEACON;
msg.vif = vif;
- PRINT_D(HOSTINF_DBG, "Setting deleting beacon message queue params\n");

result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
@@ -4236,8 +4070,6 @@ int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param)

memset(&msg, 0, sizeof(struct host_if_msg));

- PRINT_D(HOSTINF_DBG, "Setting adding station message queue params\n");
-
msg.id = HOST_IF_MSG_ADD_STATION;
msg.vif = vif;

@@ -4270,8 +4102,6 @@ int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr)

memset(&msg, 0, sizeof(struct host_if_msg));

- PRINT_D(HOSTINF_DBG, "Setting deleting station message queue params\n");
-
msg.id = HOST_IF_MSG_DEL_STATION;
msg.vif = vif;

@@ -4303,8 +4133,6 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])

memset(&msg, 0, sizeof(struct host_if_msg));

- PRINT_D(HOSTINF_DBG, "Setting deauthenticating station message queue params\n");
-
msg.id = HOST_IF_MSG_DEL_ALL_STA;
msg.vif = vif;

@@ -4350,8 +4178,6 @@ int wilc_edit_station(struct wilc_vif *vif,
return -EFAULT;
}

- PRINT_D(HOSTINF_DBG, "Setting editing station message queue params\n");
-
memset(&msg, 0, sizeof(struct host_if_msg));

msg.id = HOST_IF_MSG_EDIT_STATION;
@@ -4380,8 +4206,6 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout)
struct power_mgmt_param *pwr_mgmt_info = &msg.body.pwr_mgmt_info;
struct host_if_drv *hif_drv = vif->hif_drv;

- PRINT_INFO(HOSTINF_DBG, "\n\n>> Setting PS to %d <<\n\n", enabled);
-
if (!hif_drv) {
PRINT_ER("driver is null\n");
return -EFAULT;
@@ -4390,8 +4214,6 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout)
if (wilc_wlan_get_num_conn_ifcs(vif->wilc) == 2 && enabled)
return 0;

- PRINT_D(HOSTINF_DBG, "Setting Power management message queue params\n");
-
memset(&msg, 0, sizeof(struct host_if_msg));

msg.id = HOST_IF_MSG_POWER_MGMT;
@@ -4419,8 +4241,6 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
return -EFAULT;
}

- PRINT_D(HOSTINF_DBG, "Setting Multicast Filter params\n");
-
memset(&msg, 0, sizeof(struct host_if_msg));

msg.id = HOST_IF_MSG_SET_MULTICAST_FILTER;
diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 5e1d3ad..5374f36 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -4,7 +4,6 @@
enum debug_region {
Generic_debug = 0,
Hostapd_debug,
- Hostinf_debug,
CFG80211_debug,
Interrupt_debug,
TX_debug,
@@ -22,7 +21,6 @@ enum debug_region {

#define GENERIC_DBG (1 << Generic_debug)
#define HOSTAPD_DBG (1 << Hostapd_debug)
-#define HOSTINF_DBG (1 << Hostinf_debug)
#define CFG80211_DBG (1 << CFG80211_debug)
#define INT_DBG (1 << Interrupt_debug)
#define TX_DBG (1 << TX_debug)
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index c7e0775..4b38c37 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,7 +24,7 @@ static struct dentry *wilc_dir;
* --------------------------------------------------------------------------------
*/

-#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | HOSTINF_DBG | CFG80211_DBG | INT_DBG | TX_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
+#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INT_DBG | TX_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
#define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR)
atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG);
EXPORT_SYMBOL_GPL(WILC_REGION);
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 809dbb5..8d922e6 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -1716,8 +1716,6 @@ static void WILC_WFI_RemainOnChannelReady(void *pUserVoid)

priv = (struct wilc_priv *)pUserVoid;

- PRINT_D(HOSTINF_DBG, "Remain on channel ready\n");
-
priv->bInP2PlistenState = true;

cfg80211_ready_on_channel(priv->wdev,
--
1.9.1


2016-02-07 21:44:01

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH RESEND 41/70] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err

On Thu, Feb 04, 2016 at 06:24:02PM +0900, Glen Lee wrote:
> From: Leo Kim <[email protected]>
>
> This patches replaces PRINT_ER with netdev_err.

It also does more than that:

> @@ -273,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");

Look, proper error checking.

Which is great, but again, the changelog text was wrong :(


2016-02-04 09:35:15

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 70/70] staging: wilc1000: remove warnings line over 80 characters

From: Leo Kim <[email protected]>

This patch removes the warnings reported by checkpatch.pl
for line over 80 characters.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index d481719..3a76586 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -4,7 +4,7 @@
#include <linux/errno.h>
#include <linux/slab.h>
#define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \
- BEACON_INTERVAL_LEN + CAP_INFO_LEN)
+ BEACON_INTERVAL_LEN + CAP_INFO_LEN)

enum basic_frame_type {
FRAME_TYPE_CONTROL = 0x04,
@@ -337,8 +337,10 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
tim_elm = get_tim_elm(msa, rx_len + FCS_LEN, index);
if (tim_elm)
network_info->dtim_period = tim_elm[3];
- ies = &msa[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN];
- ies_len = rx_len - (MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN);
+ ies = &msa[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN +
+ CAP_INFO_LEN];
+ ies_len = rx_len - (MAC_HDR_LEN + TIME_STAMP_LEN +
+ BEACON_INTERVAL_LEN + CAP_INFO_LEN);

if (ies_len > 0) {
network_info->ies = kmemdup(ies, ies_len, GFP_KERNEL);
@@ -373,7 +375,8 @@ s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
connect_resp_info->assoc_id = get_asoc_id(buffer);

ies = &buffer[CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN];
- ies_len = assoc_resp_len - (CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN);
+ ies_len = assoc_resp_len - (CAP_INFO_LEN + STATUS_CODE_LEN +
+ AID_LEN);

connect_resp_info->ies = kmemdup(ies, ies_len, GFP_KERNEL);
if (!connect_resp_info->ies)
--
1.9.1


2016-02-04 09:30:59

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 41/70] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err

From: Leo Kim <[email protected]>

This patches replaces PRINT_ER with netdev_err.
Removes unnecessary debug logs as well.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/linux_mon.c | 30 ++++++++++--------------------
1 file changed, 10 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index e9bb0ec..f0a94e5 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);

@@ -273,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);
@@ -307,11 +302,8 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
}

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;
@@ -319,14 +311,12 @@ 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);
- if (!priv) {
- PRINT_ER("private structure is NULL\n");
+ if (!priv)
return NULL;
- }

priv->real_ndev = real_dev;

--
1.9.1


2016-02-04 09:34:01

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 65/70] staging: wilc1000: renames u64Tsf of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u64Tsf variable to tsf_hi.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index cbca6a0..d481719 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -320,7 +320,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
tsf_lo = get_beacon_timestamp_lo(msa);
tsf_hi = get_beacon_timestamp_hi(msa);

- network_info->u64Tsf = tsf_lo | ((u64)tsf_hi << 32);
+ network_info->tsf_hi = tsf_lo | ((u64)tsf_hi << 32);

get_ssid(msa, network_info->ssid, &network_info->ssid_len);
get_BSSID(msa, network_info->bssid);
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 18c785b..748199d 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -94,7 +94,7 @@ struct network_info {
u16 ies_len;
void *join_params;
tstrRSSI str_rssi;
- u64 u64Tsf;
+ u64 tsf_hi;
};

struct connect_resp_info {
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 6750700..f3b4a98 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -251,7 +251,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
channel,
CFG80211_BSS_FTYPE_UNKNOWN,
network_info->bssid,
- network_info->u64Tsf,
+ network_info->tsf_hi,
network_info->cap_info,
network_info->beacon_period,
(const u8 *)network_info->ies,
@@ -379,7 +379,7 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
last_scanned_shadow[ap_index].dtim_period = pstrNetworkInfo->dtim_period;
last_scanned_shadow[ap_index].ch = pstrNetworkInfo->ch;
last_scanned_shadow[ap_index].ies_len = pstrNetworkInfo->ies_len;
- last_scanned_shadow[ap_index].u64Tsf = pstrNetworkInfo->u64Tsf;
+ last_scanned_shadow[ap_index].tsf_hi = pstrNetworkInfo->tsf_hi;
if (ap_found != -1)
kfree(last_scanned_shadow[ap_index].ies);
last_scanned_shadow[ap_index].ies = kmalloc(pstrNetworkInfo->ies_len,
@@ -449,7 +449,7 @@ static void CfgScanResult(enum scan_event scan_event,
channel,
CFG80211_BSS_FTYPE_UNKNOWN,
network_info->bssid,
- network_info->u64Tsf,
+ network_info->tsf_hi,
network_info->cap_info,
network_info->beacon_period,
(const u8 *)network_info->ies,
--
1.9.1


2016-02-04 09:32:55

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 54/70] staging: wilc1000: renames au8bssid of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames au8bssid variable to bssid.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 10 +++----
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 34 ++++++++++++-----------
4 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 273fad9..4a82576 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -323,7 +323,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
network_info->u64Tsf = tsf_lo | ((u64)tsf_hi << 32);

get_ssid(msa, network_info->ssid, &network_info->ssid_len);
- get_BSSID(msa, network_info->au8bssid);
+ get_BSSID(msa, network_info->bssid);

network_info->u8channel = get_current_channel_802_11n(msa,
rx_len + FCS_LEN);
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 39f3691..5404162 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -81,7 +81,7 @@ struct network_info {
u16 cap_info;
u8 ssid[MAX_SSID_LEN];
u8 ssid_len;
- u8 au8bssid[6];
+ u8 bssid[6];
u16 u16BeaconPeriod;
u8 u8DtimPeriod;
u8 u8channel;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index f9a8a44..2534c9a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1365,9 +1365,9 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,

for (i = 0; i < hif_drv->usr_scan_req.rcvd_ch_cnt; i++) {
if ((hif_drv->usr_scan_req.net_info[i].au8bssid) &&
- (pstrNetworkInfo->au8bssid)) {
+ (pstrNetworkInfo->bssid)) {
if (memcmp(hif_drv->usr_scan_req.net_info[i].au8bssid,
- pstrNetworkInfo->au8bssid, 6) == 0) {
+ pstrNetworkInfo->bssid, 6) == 0) {
if (pstrNetworkInfo->rssi <= hif_drv->usr_scan_req.net_info[i].s8rssi) {
goto done;
} else {
@@ -1384,9 +1384,9 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].s8rssi = pstrNetworkInfo->rssi;

if (hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].au8bssid &&
- pstrNetworkInfo->au8bssid) {
+ pstrNetworkInfo->bssid) {
memcpy(hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].au8bssid,
- pstrNetworkInfo->au8bssid, 6);
+ pstrNetworkInfo->bssid, 6);

hif_drv->usr_scan_req.rcvd_ch_cnt++;

@@ -4278,7 +4278,7 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
pNewJoinBssParam->dtim_period = ptstrNetworkInfo->u8DtimPeriod;
pNewJoinBssParam->beacon_period = ptstrNetworkInfo->u16BeaconPeriod;
pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info;
- memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->au8bssid, 6);
+ memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->bssid, 6);
memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->ssid,
ptstrNetworkInfo->ssid_len + 1);
pNewJoinBssParam->ssid_len = ptstrNetworkInfo->ssid_len;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 9819d14..80f46d7 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -249,7 +249,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
bss = cfg80211_inform_bss(wiphy,
channel,
CFG80211_BSS_FTYPE_UNKNOWN,
- network_info->au8bssid,
+ network_info->bssid,
network_info->u64Tsf,
network_info->cap_info,
network_info->u16BeaconPeriod,
@@ -332,8 +332,8 @@ static int is_network_in_shadow(struct network_info *pstrNetworkInfo,
state = -1;
} else {
for (i = 0; i < last_scanned_cnt; i++) {
- if (memcmp(last_scanned_shadow[i].au8bssid,
- pstrNetworkInfo->au8bssid, 6) == 0) {
+ if (memcmp(last_scanned_shadow[i].bssid,
+ pstrNetworkInfo->bssid, 6) == 0) {
state = i;
break;
}
@@ -371,8 +371,8 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
last_scanned_shadow[ap_index].ssid_len = pstrNetworkInfo->ssid_len;
memcpy(last_scanned_shadow[ap_index].ssid,
pstrNetworkInfo->ssid, pstrNetworkInfo->ssid_len);
- memcpy(last_scanned_shadow[ap_index].au8bssid,
- pstrNetworkInfo->au8bssid, ETH_ALEN);
+ memcpy(last_scanned_shadow[ap_index].bssid,
+ pstrNetworkInfo->bssid, ETH_ALEN);
last_scanned_shadow[ap_index].u16BeaconPeriod = pstrNetworkInfo->u16BeaconPeriod;
last_scanned_shadow[ap_index].u8DtimPeriod = pstrNetworkInfo->u8DtimPeriod;
last_scanned_shadow[ap_index].u8channel = pstrNetworkInfo->u8channel;
@@ -446,7 +446,7 @@ static void CfgScanResult(enum scan_event scan_event,
bss = cfg80211_inform_bss(wiphy,
channel,
CFG80211_BSS_FTYPE_UNKNOWN,
- network_info->au8bssid,
+ network_info->bssid,
network_info->u64Tsf,
network_info->cap_info,
network_info->u16BeaconPeriod,
@@ -461,7 +461,7 @@ static void CfgScanResult(enum scan_event scan_event,
u32 i;

for (i = 0; i < priv->u32RcvdChCount; i++) {
- if (memcmp(last_scanned_shadow[i].au8bssid, network_info->au8bssid, 6) == 0) {
+ 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;
@@ -560,8 +560,9 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent,


for (i = 0; i < last_scanned_cnt; i++) {
- if (memcmp(last_scanned_shadow[i].au8bssid,
- pstrConnectInfo->au8bssid, ETH_ALEN) == 0) {
+ if (memcmp(last_scanned_shadow[i].bssid,
+ pstrConnectInfo->au8bssid,
+ ETH_ALEN) == 0) {
unsigned long now = jiffies;

if (time_after(now,
@@ -747,7 +748,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
PRINT_INFO(CFG80211_DBG, "BSSID is not passed from the user\n");
break;
} else {
- if (memcmp(last_scanned_shadow[i].au8bssid,
+ 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");
@@ -762,10 +763,11 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,

pstrNetworkInfo = &last_scanned_shadow[i];

- PRINT_INFO(CFG80211_DBG, "network BSSID to be associated: %x%x%x%x%x%x\n",
- pstrNetworkInfo->au8bssid[0], pstrNetworkInfo->au8bssid[1],
- pstrNetworkInfo->au8bssid[2], pstrNetworkInfo->au8bssid[3],
- pstrNetworkInfo->au8bssid[4], pstrNetworkInfo->au8bssid[5]);
+ 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)
@@ -903,9 +905,9 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
if (!pstrWFIDrv->p2p_connect)
wlan_channel = pstrNetworkInfo->u8channel;

- wilc_wlan_set_bssid(dev, pstrNetworkInfo->au8bssid, STATION_MODE);
+ wilc_wlan_set_bssid(dev, pstrNetworkInfo->bssid, STATION_MODE);

- s32Error = wilc_set_join_req(vif, pstrNetworkInfo->au8bssid, sme->ssid,
+ s32Error = wilc_set_join_req(vif, pstrNetworkInfo->bssid, sme->ssid,
sme->ssid_len, sme->ie, sme->ie_len,
CfgConnectResult, (void *)priv,
u8security, tenuAuth_type,
--
1.9.1


2016-02-04 09:34:24

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 67/70] staging: wilc1000: remove unused log message using the RX_DBG tag

From: Chris Park <[email protected]>

This patch remove unused log message using the RX_DBG tag

Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/linux_wlan_common.h | 2 --
drivers/staging/wilc1000/wilc_debugfs.c | 2 +-
drivers/staging/wilc1000/wilc_wlan.c | 5 -----
drivers/staging/wilc1000/wilc_wlan_cfg.c | 5 -----
4 files changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 617bc53..63d0ec5 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -6,7 +6,6 @@ enum debug_region {
Hostapd_debug,
CFG80211_debug,
Interrupt_debug,
- RX_debug,
Lock_debug,
Tcp_enhance,
Spin_debug,
@@ -22,7 +21,6 @@ enum debug_region {
#define HOSTAPD_DBG (1 << Hostapd_debug)
#define CFG80211_DBG (1 << CFG80211_debug)
#define INT_DBG (1 << Interrupt_debug)
-#define RX_DBG (1 << RX_debug)
#define LOCK_DBG (1 << Lock_debug)
#define TCP_ENH (1 << Tcp_enhance)
#define SPIN_DEBUG (1 << Spin_debug)
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index a3d274b..9c85bdd 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,7 +24,7 @@ static struct dentry *wilc_dir;
* --------------------------------------------------------------------------------
*/

-#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INT_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
+#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INT_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
#define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR)
atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG);
EXPORT_SYMBOL_GPL(WILC_REGION);
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 8cb1ef6..7480f9e 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -835,11 +835,8 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
u32 pkt_len, pkt_offset, tp_len;
int is_cfg_packet;

- PRINT_D(RX_DBG, "In the 2nd do-while\n");
memcpy(&header, &buffer[offset], 4);
header = cpu_to_le32(header);
- PRINT_D(RX_DBG, "Header = %04x - Offset = %d\n",
- header, offset);

is_cfg_packet = (header >> 31) & 0x1;
pkt_offset = (header >> 22) & 0x1ff;
@@ -890,7 +887,6 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
} while (1);

wilc->rxq_exit = 1;
- PRINT_D(RX_DBG, "THREAD: Exiting RX thread\n");
}

static void wilc_unknown_isr_ext(struct wilc *wilc)
@@ -958,7 +954,6 @@ _end_:
if (rqe) {
rqe->buffer = buffer;
rqe->buffer_size = size;
- PRINT_D(RX_DBG, "rxq entery Size= %d - Address = %p\n", rqe->buffer_size, rqe->buffer);
wilc_wlan_rxq_add(wilc, rqe);
}
}
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index b72c77b..3b3065b 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -522,7 +522,6 @@ int wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
rsp->type = wilc_wlan_parse_info_frame(frame, size);
rsp->seq_no = msg_id;
/*call host interface info parse as well*/
- PRINT_INFO(RX_DBG, "Info message received\n");
wilc_gnrl_async_info_received(wilc, frame - 4, size + 4);
break;

@@ -532,14 +531,10 @@ int wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
break;

case 'S':
- PRINT_INFO(RX_DBG, "Scan Notification Received\n");
wilc_scan_complete_received(wilc, frame - 4, size + 4);
break;

default:
- PRINT_INFO(RX_DBG, "Receive unknown message type[%d-%d-%d-%d-%d-%d-%d-%d]\n",
- frame[0], frame[1], frame[2], frame[3], frame[4],
- frame[5], frame[6], frame[7]);
rsp->type = 0;
rsp->seq_no = msg_id;
ret = 0;
--
1.9.1


2016-02-04 09:33:55

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 64/70] staging: wilc1000: renames strRssi of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames strRssi variable to str_rssi.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 13 +++++++------
2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index f154e39..18c785b 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -93,7 +93,7 @@ struct network_info {
u8 *ies;
u16 ies_len;
void *join_params;
- tstrRSSI strRssi;
+ tstrRSSI str_rssi;
u64 u64Tsf;
};

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 6ebf268..6750700 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -210,10 +210,11 @@ static u32 get_rssi_avg(struct network_info *network_info)
{
u8 i;
int rssi_v = 0;
- u8 num_rssi = (network_info->strRssi.u8Full) ? NUM_RSSI : (network_info->strRssi.u8Index);
+ u8 num_rssi = (network_info->str_rssi.u8Full) ?
+ NUM_RSSI : (network_info->str_rssi.u8Index);

for (i = 0; i < num_rssi; i++)
- rssi_v += network_info->strRssi.as8RSSI[i];
+ rssi_v += network_info->str_rssi.as8RSSI[i];

rssi_v /= num_rssi;
return rssi_v;
@@ -360,13 +361,13 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
} else {
ap_index = ap_found;
}
- rssi_index = last_scanned_shadow[ap_index].strRssi.u8Index;
- last_scanned_shadow[ap_index].strRssi.as8RSSI[rssi_index++] = pstrNetworkInfo->rssi;
+ rssi_index = last_scanned_shadow[ap_index].str_rssi.u8Index;
+ last_scanned_shadow[ap_index].str_rssi.as8RSSI[rssi_index++] = pstrNetworkInfo->rssi;
if (rssi_index == NUM_RSSI) {
rssi_index = 0;
- last_scanned_shadow[ap_index].strRssi.u8Full = 1;
+ last_scanned_shadow[ap_index].str_rssi.u8Full = 1;
}
- last_scanned_shadow[ap_index].strRssi.u8Index = rssi_index;
+ last_scanned_shadow[ap_index].str_rssi.u8Index = rssi_index;
last_scanned_shadow[ap_index].rssi = pstrNetworkInfo->rssi;
last_scanned_shadow[ap_index].cap_info = pstrNetworkInfo->cap_info;
last_scanned_shadow[ap_index].ssid_len = pstrNetworkInfo->ssid_len;
--
1.9.1


2016-02-04 09:31:59

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 45/70] staging: wilc1000: removes function 'wilc_dealloc_network_info()'

From: Leo Kim <[email protected]>

This patch removes function 'wilc_dealloc_network_info()'.
Does not need this function which only free memory.
Therefore, this function is removed and changed directly with kfree.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 22 ----------------------
drivers/staging/wilc1000/coreconfigurator.h | 1 -
drivers/staging/wilc1000/host_interface.c | 4 ++--
3 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 11e3ce0..81dd22e 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -353,28 +353,6 @@ s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info)
return 0;
}

-s32 wilc_dealloc_network_info(tstrNetworkInfo *network_info)
-{
- s32 result = 0;
-
- if (network_info) {
- if (network_info->pu8IEs) {
- kfree(network_info->pu8IEs);
- network_info->pu8IEs = NULL;
- } else {
- result = -EFAULT;
- }
-
- kfree(network_info);
- network_info = NULL;
-
- } else {
- result = -EFAULT;
- }
-
- return result;
-}
-
s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
tstrConnectRespInfo **ret_connect_resp_info)
{
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index d801e58..23775e4 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -121,7 +121,6 @@ typedef struct {
} tstrDisconnectNotifInfo;

s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info);
-s32 wilc_dealloc_network_info(tstrNetworkInfo *network_info);
s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
tstrConnectRespInfo **ret_connect_resp_info);
s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *connect_resp_info);
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 6e0a426..2a1d7e9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1410,8 +1410,8 @@ done:
pstrRcvdNetworkInfo->buffer = NULL;

if (pstrNetworkInfo) {
- wilc_dealloc_network_info(pstrNetworkInfo);
- pstrNetworkInfo = NULL;
+ kfree(pstrNetworkInfo->pu8IEs);
+ kfree(pstrNetworkInfo);
}

return result;
--
1.9.1


2016-02-04 09:33:50

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 63/70] staging: wilc1000: renames pJoinParams of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames pJoinParams variable to join_params.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 3dca840..f154e39 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -92,7 +92,7 @@ struct network_info {
u32 tsf_lo;
u8 *ies;
u16 ies_len;
- void *pJoinParams;
+ void *join_params;
tstrRSSI strRssi;
u64 u64Tsf;
};
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index c9acacc..6ebf268 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -199,8 +199,8 @@ static void clear_shadow_scan(void)
last_scanned_shadow[last_scanned_cnt].ies = NULL;
}

- kfree(last_scanned_shadow[i].pJoinParams);
- last_scanned_shadow[i].pJoinParams = NULL;
+ kfree(last_scanned_shadow[i].join_params);
+ last_scanned_shadow[i].join_params = NULL;
}
last_scanned_cnt = 0;
}
@@ -295,7 +295,7 @@ static void remove_network_from_shadow(unsigned long arg)
kfree(last_scanned_shadow[i].ies);
last_scanned_shadow[i].ies = NULL;

- kfree(last_scanned_shadow[i].pJoinParams);
+ kfree(last_scanned_shadow[i].join_params);

for (j = i; (j < last_scanned_cnt - 1); j++)
last_scanned_shadow[j] = last_scanned_shadow[j + 1];
@@ -389,8 +389,8 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
last_scanned_shadow[ap_index].time_scan_cached = jiffies;
last_scanned_shadow[ap_index].found = 1;
if (ap_found != -1)
- kfree(last_scanned_shadow[ap_index].pJoinParams);
- last_scanned_shadow[ap_index].pJoinParams = pJoinParams;
+ kfree(last_scanned_shadow[ap_index].join_params);
+ last_scanned_shadow[ap_index].join_params = pJoinParams;
}

static void CfgScanResult(enum scan_event scan_event,
@@ -913,7 +913,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
CfgConnectResult, (void *)priv,
u8security, tenuAuth_type,
pstrNetworkInfo->ch,
- pstrNetworkInfo->pJoinParams);
+ pstrNetworkInfo->join_params);
if (s32Error != 0) {
netdev_err(dev, "wilc_set_join_req(): Error\n");
s32Error = -ENOENT;
--
1.9.1


2016-02-04 09:33:27

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 59/70] staging: wilc1000: renames bNewNetwork of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames bNewNetwork variable to new_network.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 4 ++--
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 0e10c75..fd3b5d4 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -87,7 +87,7 @@ struct network_info {
u8 ch;
unsigned long time_scan_cached;
unsigned long time_scan;
- bool bNewNetwork;
+ bool new_network;
u8 u8Found;
u32 u32Tsf;
u8 *pu8IEs;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index df33197..c0171f9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1390,7 +1390,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,

hif_drv->usr_scan_req.rcvd_ch_cnt++;

- pstrNetworkInfo->bNewNetwork = true;
+ pstrNetworkInfo->new_network = true;
pJoinParams = host_int_ParseJoinBssParam(pstrNetworkInfo);

hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo,
@@ -1399,7 +1399,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
}
}
} else {
- pstrNetworkInfo->bNewNetwork = false;
+ pstrNetworkInfo->new_network = false;
hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo,
hif_drv->usr_scan_req.arg, NULL);
}
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 44d1855..ab3390c 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -434,7 +434,7 @@ static void CfgScanResult(enum scan_event scan_event,
network_info->cap_info,
network_info->beacon_period);

- if (network_info->bNewNetwork) {
+ if (network_info->new_network) {
if (priv->u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) {
PRINT_D(CFG80211_DBG,
"Network %s found\n",
--
1.9.1


2016-02-04 09:32:49

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 53/70] staging: wilc1000: renames u8SsidLen of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u8SsidLen variable to ssid_len.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 4 ++--
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 4dd7c8a..273fad9 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -322,7 +322,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,

network_info->u64Tsf = tsf_lo | ((u64)tsf_hi << 32);

- get_ssid(msa, network_info->ssid, &network_info->u8SsidLen);
+ get_ssid(msa, network_info->ssid, &network_info->ssid_len);
get_BSSID(msa, network_info->au8bssid);

network_info->u8channel = get_current_channel_802_11n(msa,
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 781a65f..39f3691 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -80,7 +80,7 @@ struct network_info {
s8 rssi;
u16 cap_info;
u8 ssid[MAX_SSID_LEN];
- u8 u8SsidLen;
+ u8 ssid_len;
u8 au8bssid[6];
u16 u16BeaconPeriod;
u8 u8DtimPeriod;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c31f0b5..f9a8a44 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4280,8 +4280,8 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info;
memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->au8bssid, 6);
memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->ssid,
- ptstrNetworkInfo->u8SsidLen + 1);
- pNewJoinBssParam->ssid_len = ptstrNetworkInfo->u8SsidLen;
+ ptstrNetworkInfo->ssid_len + 1);
+ pNewJoinBssParam->ssid_len = ptstrNetworkInfo->ssid_len;
memset(pNewJoinBssParam->rsn_pcip_policy, 0xFF, 3);
memset(pNewJoinBssParam->rsn_auth_policy, 0xFF, 3);

diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 9aae11e..9819d14 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -368,9 +368,9 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
last_scanned_shadow[ap_index].strRssi.u8Index = rssi_index;
last_scanned_shadow[ap_index].rssi = pstrNetworkInfo->rssi;
last_scanned_shadow[ap_index].cap_info = pstrNetworkInfo->cap_info;
- last_scanned_shadow[ap_index].u8SsidLen = pstrNetworkInfo->u8SsidLen;
+ last_scanned_shadow[ap_index].ssid_len = pstrNetworkInfo->ssid_len;
memcpy(last_scanned_shadow[ap_index].ssid,
- pstrNetworkInfo->ssid, pstrNetworkInfo->u8SsidLen);
+ pstrNetworkInfo->ssid, pstrNetworkInfo->ssid_len);
memcpy(last_scanned_shadow[ap_index].au8bssid,
pstrNetworkInfo->au8bssid, ETH_ALEN);
last_scanned_shadow[ap_index].u16BeaconPeriod = pstrNetworkInfo->u16BeaconPeriod;
@@ -738,7 +738,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
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].u8SsidLen) &&
+ if ((sme->ssid_len == last_scanned_shadow[i].ssid_len) &&
memcmp(last_scanned_shadow[i].ssid,
sme->ssid,
sme->ssid_len) == 0) {
--
1.9.1


2016-02-04 09:35:00

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 69/70] staging: wilc1000: remove unnecessary log message using GENERIC_DBG tag

From: Chris Park <[email protected]>

This patch remove unnecessary log message using GENERIC_DBG tag.
Needed log messages has changed netdev_dbg from PRINT_D.
And removes variables that were used to log message.

Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/host_interface.c | 42 +------------
drivers/staging/wilc1000/linux_wlan.c | 2 -
drivers/staging/wilc1000/linux_wlan_common.h | 4 +-
drivers/staging/wilc1000/wilc_debugfs.c | 6 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 76 +++--------------------
drivers/staging/wilc1000/wilc_wlan.c | 2 -
drivers/staging/wilc1000/wilc_wlan_cfg.c | 11 +---
7 files changed, 18 insertions(+), 125 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 781063d..abb20fb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -445,7 +445,6 @@ static s32 handle_set_mac_address(struct wilc_vif *vif,
wid.type = WID_STR;
wid.val = mac_buf;
wid.size = ETH_ALEN;
- PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", wid.val);

result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1,
wilc_get_vif_idx(vif));
@@ -800,15 +799,12 @@ static s32 Handle_Scan(struct wilc_vif *vif,

if ((hif_drv->hif_state >= HOST_IF_SCANNING) &&
(hif_drv->hif_state < HOST_IF_CONNECTED)) {
- PRINT_D(GENERIC_DBG, "Don't scan already in [%d] state\n",
- hif_drv->hif_state);
PRINT_ER("Already scan\n");
result = -EBUSY;
goto ERRORHANDLER;
}

if (wilc_optaining_ip || wilc_connecting) {
- PRINT_D(GENERIC_DBG, "[handle_scan]: Don't do obss scan until IP adresss is obtained\n");
PRINT_ER("Don't do obss scan\n");
result = -EBUSY;
goto ERRORHANDLER;
@@ -915,7 +911,6 @@ static s32 Handle_ScanDone(struct wilc_vif *vif,
struct host_if_drv *hif_drv = vif->hif_drv;

if (enuEvent == SCAN_EVENT_ABORTED) {
- PRINT_D(GENERIC_DBG, "Abort running scan\n");
u8abort_running_scan = 1;
wid.id = (u16)WID_ABORT_RUNNING_SCAN;
wid.type = WID_CHAR;
@@ -956,8 +951,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
struct join_bss_param *ptstrJoinBssParam;
struct host_if_drv *hif_drv = vif->hif_drv;

- PRINT_D(GENERIC_DBG, "Handling connect request\n");
-
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");
@@ -1149,13 +1142,9 @@ static s32 Handle_Connect(struct wilc_vif *vif,
join_req_vif = vif;
}

- if (pstrHostIFconnectAttr->bssid) {
+ if (pstrHostIFconnectAttr->bssid)
memcpy(wilc_connected_ssid,
pstrHostIFconnectAttr->bssid, ETH_ALEN);
- PRINT_D(GENERIC_DBG, "save Bssid = %pM\n",
- pstrHostIFconnectAttr->bssid);
- PRINT_D(GENERIC_DBG, "save bssid = %pM\n", wilc_connected_ssid);
- }

result = wilc_send_config_pkt(vif, SET_CFG, strWIDList,
u32WidsCount,
@@ -1165,7 +1154,6 @@ static s32 Handle_Connect(struct wilc_vif *vif,
result = -EFAULT;
goto ERRORHANDLER;
} else {
- PRINT_D(GENERIC_DBG, "set HOST_IF_WAITING_CONN_RESP\n");
hif_drv->hif_state = HOST_IF_WAITING_CONN_RESP;
}

@@ -1443,8 +1431,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
PRINT_ER("Driver handler is NULL\n");
return -ENODEV;
}
- PRINT_D(GENERIC_DBG, "Current State = %d,Received state = %d\n",
- hif_drv->hif_state, pstrRcvdGnrlAsyncInfo->buffer[7]);

if ((hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
(hif_drv->hif_state == HOST_IF_CONNECTED) ||
@@ -1548,7 +1534,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,

hif_drv->hif_state = HOST_IF_CONNECTED;

- PRINT_D(GENERIC_DBG, "Obtaining an IP, Disable Scan\n");
wilc_optaining_ip = true;
mod_timer(&wilc_during_ip_timer,
jiffies + msecs_to_jiffies(10000));
@@ -2421,19 +2406,16 @@ static int Handle_RemainOnChan(struct wilc_vif *vif,
}

if (hif_drv->usr_scan_req.scan_result) {
- PRINT_INFO(GENERIC_DBG, "Required to remain on chan while scanning return\n");
hif_drv->remain_on_ch_pending = 1;
result = -EBUSY;
goto ERRORHANDLER;
}
if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
- PRINT_INFO(GENERIC_DBG, "Required to remain on chan while connecting return\n");
result = -EBUSY;
goto ERRORHANDLER;
}

if (wilc_optaining_ip || wilc_connecting) {
- PRINT_D(GENERIC_DBG, "[handle_scan]: Don't do obss scan until IP adresss is obtained\n");
result = -EBUSY;
goto ERRORHANDLER;
}
@@ -2541,7 +2523,7 @@ static u32 Handle_ListenStateExpired(struct wilc_vif *vif,
}
P2P_LISTEN_STATE = 0;
} else {
- PRINT_D(GENERIC_DBG, "Not in listen state\n");
+ netdev_dbg(vif->ndev, "Not in listen state\n");
result = -EFAULT;
}

@@ -2635,12 +2617,6 @@ static s32 Handle_DelAllRxBASessions(struct wilc_vif *vif,
struct wid wid;
char *ptr = NULL;

- PRINT_D(GENERIC_DBG, "Delete Block Ack session with\nBSSID = %.2x:%.2x:%.2x\nTID=%d\n",
- strHostIfBASessionInfo->bssid[0],
- strHostIfBASessionInfo->bssid[1],
- strHostIfBASessionInfo->bssid[2],
- strHostIfBASessionInfo->tid);
-
wid.id = (u16)WID_DEL_ALL_RX_BA;
wid.type = WID_STR;
wid.val = kmalloc(BLOCK_ACK_REQ_SIZE, GFP_KERNEL);
@@ -2711,13 +2687,10 @@ static int hostIFthread(void *pvArg)
while (1) {
wilc_mq_recv(&hif_msg_q, &msg, sizeof(struct host_if_msg), &u32Ret);
vif = msg.vif;
- if (msg.id == HOST_IF_MSG_EXIT) {
- PRINT_D(GENERIC_DBG, "THREAD: Exiting HostIfThread\n");
+ if (msg.id == HOST_IF_MSG_EXIT)
break;
- }

if ((!wilc_initialized)) {
- PRINT_D(GENERIC_DBG, "--WAIT--");
usleep_range(200 * 1000, 200 * 1000);
wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
continue;
@@ -3318,9 +3291,6 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
}
if (hif_drv->hif_state < HOST_IF_CONNECTING)
hif_drv->hif_state = HOST_IF_CONNECTING;
- else
- PRINT_D(GENERIC_DBG, "Don't set state to 'connecting' : %d\n",
- hif_drv->hif_state);

result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result) {
@@ -3870,8 +3840,6 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
return;
hif_drv = vif->hif_drv;

- PRINT_D(GENERIC_DBG, "Scan notification received %p\n", hif_drv);
-
if (!hif_drv || hif_drv == terminated_handle)
return;

@@ -4341,10 +4309,6 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
pNewJoinBssParam->opp_enabled = 0;
}

- PRINT_D(GENERIC_DBG, "P2P Dump\n");
- for (i = 0; i < pu8IEs[index + 7]; i++)
- PRINT_D(GENERIC_DBG, " %x\n", pu8IEs[index + 9 + i]);
-
pNewJoinBssParam->cnt = pu8IEs[index + 11];
u16P2P_count = index + 12;

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index e702020..c11830f 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -253,8 +253,6 @@ void wilc_mac_indicate(struct wilc *wilc, int flag)
} else {
wilc->mac_status = status;
}
- } else if (flag == WILC_MAC_INDICATE_SCAN) {
- PRINT_D(GENERIC_DBG, "Scanning ...\n");
}
}

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 758633e..44573e2 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -2,14 +2,12 @@
#define LINUX_WLAN_COMMON_H

enum debug_region {
- Generic_debug = 0,
- Hostapd_debug,
+ Hostapd_debug = 0,
CFG80211_debug,
Init_debug,
COMP = 0xFFFFFFFF,
};

-#define GENERIC_DBG (1 << Generic_debug)
#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 8d08824..c5c8cc9 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 (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INIT_DBG)
+#define DBG_REGION_ALL (HOSTAPD_DBG | CFG80211_DBG | INIT_DBG)
#define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR)
-atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG |
+atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | CFG80211_DBG |
HOSTAPD_DBG);
EXPORT_SYMBOL_GPL(WILC_REGION);
atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
@@ -136,7 +136,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 | GENERIC_DBG | CFG80211_DBG), FOPS(NULL, wilc_debug_region_read, wilc_debug_region_write, NULL), },
+ { "wilc_debug_region", 0666, (INIT_DBG | CFG80211_DBG), FOPS(NULL, wilc_debug_region_read, wilc_debug_region_write, NULL), },
};

static int __init wilc_debugfs_init(void)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index f3b4a98..a899b37 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -317,7 +317,6 @@ static void remove_network_from_shadow(unsigned long arg)

static void clear_duringIP(unsigned long arg)
{
- PRINT_D(GENERIC_DBG, "GO:IP Obtained , enable scan\n");
wilc_optaining_ip = false;
}

@@ -1567,7 +1566,6 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
}
if (wlan_channel != INVALID_CHANNEL) {
if (channel_list_attr_index) {
- PRINT_D(GENERIC_DBG, "Modify channel list attribute\n");
for (i = channel_list_attr_index + 3; i < ((channel_list_attr_index + 3) + buf[channel_list_attr_index + 1]); i++) {
if (buf[i] == 0x51) {
for (j = i + 2; j < ((i + 2) + buf[i + 1]); j++) {
@@ -1579,7 +1577,6 @@ static void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)
}

if (op_channel_attr_index) {
- PRINT_D(GENERIC_DBG, "Modify operating channel attribute\n");
buf[op_channel_attr_index + 6] = 0x51;
buf[op_channel_attr_index + 7] = wlan_channel;
}
@@ -1609,7 +1606,6 @@ static void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftyp
}
if (wlan_channel != INVALID_CHANNEL && bOperChan) {
if (channel_list_attr_index) {
- PRINT_D(GENERIC_DBG, "Modify channel list attribute\n");
for (i = channel_list_attr_index + 3; i < ((channel_list_attr_index + 3) + buf[channel_list_attr_index + 1]); i++) {
if (buf[i] == 0x51) {
for (j = i + 2; j < ((i + 2) + buf[i + 1]); j++) {
@@ -1621,7 +1617,6 @@ static void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftyp
}

if (op_channel_attr_index) {
- PRINT_D(GENERIC_DBG, "Modify operating channel attribute\n");
buf[op_channel_attr_index + 6] = 0x51;
buf[op_channel_attr_index + 7] = wlan_channel;
}
@@ -1645,41 +1640,29 @@ void WILC_WFI_p2p_rx (struct net_device *dev, u8 *buff, u32 size)

if (pkt_offset & IS_MANAGMEMENT_CALLBACK) {
if (buff[FRAME_TYPE_ID] == IEEE80211_STYPE_PROBE_RESP) {
- PRINT_D(GENERIC_DBG, "Probe response ACK\n");
cfg80211_mgmt_tx_status(priv->wdev, priv->u64tx_cookie, buff, size, true, GFP_KERNEL);
return;
} else {
- if (pkt_offset & IS_MGMT_STATUS_SUCCES) {
- PRINT_D(GENERIC_DBG, "Success Ack - Action frame category: %x Action Subtype: %d Dialog T: %x OR %x\n", buff[ACTION_CAT_ID], buff[ACTION_SUBTYPE_ID],
- buff[ACTION_SUBTYPE_ID + 1], buff[P2P_PUB_ACTION_SUBTYPE + 1]);
+ if (pkt_offset & IS_MGMT_STATUS_SUCCES)
cfg80211_mgmt_tx_status(priv->wdev, priv->u64tx_cookie, buff, size, true, GFP_KERNEL);
- } else {
- PRINT_D(GENERIC_DBG, "Fail Ack - Action frame category: %x Action Subtype: %d Dialog T: %x OR %x\n", buff[ACTION_CAT_ID], buff[ACTION_SUBTYPE_ID],
- buff[ACTION_SUBTYPE_ID + 1], buff[P2P_PUB_ACTION_SUBTYPE + 1]);
+ else
cfg80211_mgmt_tx_status(priv->wdev, priv->u64tx_cookie, buff, size, false, GFP_KERNEL);
- }
return;
}
} else {
- PRINT_D(GENERIC_DBG, "Rx Frame Type:%x\n", buff[FRAME_TYPE_ID]);
-
s32Freq = ieee80211_channel_to_frequency(curr_channel, IEEE80211_BAND_2GHZ);

if (ieee80211_is_action(buff[FRAME_TYPE_ID])) {
- PRINT_D(GENERIC_DBG, "Rx Action Frame Type: %x %x\n", buff[ACTION_SUBTYPE_ID], buff[P2P_PUB_ACTION_SUBTYPE]);
-
if (priv->bCfgScanning && time_after_eq(jiffies, (unsigned long)pstrWFIDrv->p2p_timeout)) {
- PRINT_D(GENERIC_DBG, "Receiving action frames from wrong channels\n");
+ netdev_dbg(dev, "Receiving action wrong ch\n");
return;
}
if (buff[ACTION_CAT_ID] == PUB_ACTION_ATTR_ID) {
switch (buff[ACTION_SUBTYPE_ID]) {
case GAS_INTIAL_REQ:
- PRINT_D(GENERIC_DBG, "GAS INITIAL REQ %x\n", buff[ACTION_SUBTYPE_ID]);
break;

case GAS_INTIAL_RSP:
- PRINT_D(GENERIC_DBG, "GAS INITIAL RSP %x\n", buff[ACTION_SUBTYPE_ID]);
break;

case PUBLIC_ACT_VENDORSPEC:
@@ -1690,7 +1673,6 @@ void WILC_WFI_p2p_rx (struct net_device *dev, u8 *buff, u32 size)
if (!memcmp(p2p_vendor_spec, &buff[i], 6)) {
p2p_recv_random = buff[i + 6];
wilc_ie = true;
- PRINT_D(GENERIC_DBG, "WILC Vendor specific IE:%02x\n", p2p_recv_random);
break;
}
}
@@ -1707,20 +1689,19 @@ void WILC_WFI_p2p_rx (struct net_device *dev, u8 *buff, u32 size)
}
}
} else {
- PRINT_D(GENERIC_DBG, "PEER WILL BE GO LocaRand=%02x RecvRand %02x\n", p2p_local_random, p2p_recv_random);
+ netdev_dbg(dev, "PEER WILL BE GO LocaRand=%02x RecvRand %02x\n", p2p_local_random, p2p_recv_random);
}
}


if ((buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buff[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP) && (wilc_ie)) {
- PRINT_D(GENERIC_DBG, "Sending P2P to host without extra elemnt\n");
cfg80211_rx_mgmt(priv->wdev, s32Freq, 0, buff, size - 7, 0);
return;
}
break;

default:
- PRINT_D(GENERIC_DBG, "NOT HANDLED PUBLIC ACTION FRAME TYPE:%x\n", buff[ACTION_SUBTYPE_ID]);
+ netdev_dbg(dev, "NOT HANDLED PUBLIC ACTION FRAME TYPE:%x\n", buff[ACTION_SUBTYPE_ID]);
break;
}
}
@@ -1761,17 +1742,12 @@ static void WILC_WFI_RemainOnChannelExpired(void *pUserVoid, u32 u32SessionID)
priv = (struct wilc_priv *)pUserVoid;

if (u32SessionID == priv->strRemainOnChanParams.u32ListenSessionID) {
- PRINT_D(GENERIC_DBG, "Remain on channel expired\n");
-
priv->bInP2PlistenState = false;

cfg80211_remain_on_channel_expired(priv->wdev,
priv->strRemainOnChanParams.u64ListenCookie,
priv->strRemainOnChanParams.pstrListenChan,
GFP_KERNEL);
- } else {
- PRINT_D(GENERIC_DBG, "Received ID 0x%x Expected ID 0x%x (No match)\n", u32SessionID
- , priv->strRemainOnChanParams.u32ListenSessionID);
}
}

@@ -1787,11 +1763,8 @@ static int remain_on_channel(struct wiphy *wiphy,
priv = wiphy_priv(wiphy);
vif = netdev_priv(priv->dev);

- PRINT_D(GENERIC_DBG, "Remaining on channel %d\n", chan->hw_value);
-
-
if (wdev->iftype == NL80211_IFTYPE_AP) {
- PRINT_D(GENERIC_DBG, "Required remain-on-channel while in AP mode");
+ netdev_dbg(vif->ndev, "Required while in AP mode\n");
return s32Error;
}

@@ -1868,34 +1841,22 @@ static int mgmt_tx(struct wiphy *wiphy,


if (ieee80211_is_probe_resp(mgmt->frame_control)) {
- PRINT_D(GENERIC_DBG, "TX: Probe Response\n");
- PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value);
wilc_set_mac_chnl_num(vif, chan->hw_value);
curr_channel = chan->hw_value;
} else if (ieee80211_is_action(mgmt->frame_control)) {
- PRINT_D(GENERIC_DBG, "ACTION FRAME:%x\n", (u16)mgmt->frame_control);
-
-
if (buf[ACTION_CAT_ID] == PUB_ACTION_ATTR_ID) {
if (buf[ACTION_SUBTYPE_ID] != PUBLIC_ACT_VENDORSPEC ||
buf[P2P_PUB_ACTION_SUBTYPE] != GO_NEG_CONF) {
- PRINT_D(GENERIC_DBG, "Setting channel: %d\n", chan->hw_value);
wilc_set_mac_chnl_num(vif,
chan->hw_value);
curr_channel = chan->hw_value;
}
switch (buf[ACTION_SUBTYPE_ID]) {
case GAS_INTIAL_REQ:
- {
- PRINT_D(GENERIC_DBG, "GAS INITIAL REQ %x\n", buf[ACTION_SUBTYPE_ID]);
break;
- }

case GAS_INTIAL_RSP:
- {
- PRINT_D(GENERIC_DBG, "GAS INITIAL RSP %x\n", buf[ACTION_SUBTYPE_ID]);
break;
- }

case PUBLIC_ACT_VENDORSPEC:
{
@@ -1910,8 +1871,6 @@ static int mgmt_tx(struct wiphy *wiphy,
if ((buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == GO_NEG_RSP
|| buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP)) {
if (p2p_local_random > p2p_recv_random) {
- PRINT_D(GENERIC_DBG, "LOCAL WILL BE GO LocaRand=%02x RecvRand %02x\n", p2p_local_random, p2p_recv_random);
-
for (i = P2P_PUB_ACTION_SUBTYPE + 2; i < len; i++) {
if (buf[i] == P2PELEM_ATTR_ID && !(memcmp(p2p_oui, &buf[i + 2], 4))) {
if (buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_REQ || buf[P2P_PUB_ACTION_SUBTYPE] == P2P_INV_RSP)
@@ -1927,13 +1886,11 @@ static int mgmt_tx(struct wiphy *wiphy,
mgmt_tx->buff[len + sizeof(p2p_vendor_spec)] = p2p_local_random;
mgmt_tx->size = buf_len;
}
- } else {
- PRINT_D(GENERIC_DBG, "PEER WILL BE GO LocaRand=%02x RecvRand %02x\n", p2p_local_random, p2p_recv_random);
}
}

} else {
- PRINT_D(GENERIC_DBG, "Not a P2P public action frame\n");
+ netdev_dbg(vif->ndev, "Not a P2P public action frame\n");
}

break;
@@ -1941,24 +1898,18 @@ static int mgmt_tx(struct wiphy *wiphy,

default:
{
- PRINT_D(GENERIC_DBG, "NOT HANDLED PUBLIC ACTION FRAME TYPE:%x\n", buf[ACTION_SUBTYPE_ID]);
+ netdev_dbg(vif->ndev, "NOT HANDLED PUBLIC ACTION FRAME TYPE:%x\n", buf[ACTION_SUBTYPE_ID]);
break;
}
}
}

- PRINT_D(GENERIC_DBG, "TX: ACTION FRAME Type:%x : Chan:%d\n", buf[ACTION_SUBTYPE_ID], chan->hw_value);
pstrWFIDrv->p2p_timeout = (jiffies + msecs_to_jiffies(wait));
-
- PRINT_D(GENERIC_DBG, "Current Jiffies: %lu Timeout:%llu\n",
- jiffies, pstrWFIDrv->p2p_timeout);
}

wilc_wlan_txq_add_mgmt_pkt(wdev->netdev, mgmt_tx,
mgmt_tx->buff, mgmt_tx->size,
WILC_WFI_mgmt_tx_complete);
- } else {
- PRINT_D(GENERIC_DBG, "This function transmits only management frames\n");
}
return 0;
}
@@ -1972,9 +1923,6 @@ static int mgmt_tx_cancel_wait(struct wiphy *wiphy,

priv = wiphy_priv(wiphy);
pstrWFIDrv = (struct host_if_drv *)priv->hif_drv;
-
-
- PRINT_D(GENERIC_DBG, "Tx Cancel wait :%lu\n", jiffies);
pstrWFIDrv->p2p_timeout = jiffies;

if (!priv->bInP2PlistenState) {
@@ -2001,7 +1949,6 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
if (!frame_type)
return;

- PRINT_D(GENERIC_DBG, "Frame registering Frame Type: %x: Boolean: %d\n", frame_type, reg);
switch (frame_type) {
case PROBE_REQ:
{
@@ -2023,10 +1970,8 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,
}
}

- if (!wl->initialized) {
- PRINT_D(GENERIC_DBG, "Return since mac is closed\n");
+ if (!wl->initialized)
return;
- }
wilc_frame_register(vif, frame_type, reg);
}

@@ -2099,7 +2044,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
wilc_ie = false;
wilc_optaining_ip = false;
del_timer(&wilc_during_ip_timer);
- PRINT_D(GENERIC_DBG, "Changing virtual interface, enable scan\n");

switch (type) {
case NL80211_IFTYPE_STATION:
@@ -2148,8 +2092,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,
break;

case NL80211_IFTYPE_P2P_GO:
- PRINT_D(GENERIC_DBG, "start duringIP timer\n");
-
wilc_optaining_ip = true;
mod_timer(&wilc_during_ip_timer,
jiffies + msecs_to_jiffies(during_ip_time));
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 7480f9e..6d13054 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -713,8 +713,6 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
break;

if (entries == 0) {
- PRINT_WRN(GENERIC_DBG, "[wilc txq]: no more buffer in the chip (reg: %08x), retry later [[ %d, %x ]]\n", reg, i, vmm_table[i - 1]);
-
ret = wilc->hif_func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, &reg);
if (!ret)
break;
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index 3b3065b..2bb684a 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -270,13 +270,12 @@ static int wilc_wlan_cfg_set_bin(u8 *frame, u32 offset, u16 id, u8 *b, u32 size)
static void wilc_wlan_parse_response_frame(u8 *info, int size)
{
u32 wid, len = 0, i = 0;
- static int seq;

while (size > 0) {
i = 0;
wid = info[0] | (info[1] << 8);
wid = cpu_to_le32(wid);
- PRINT_INFO(GENERIC_DBG, "Processing response for %d seq %d\n", wid, seq++);
+
switch ((wid >> 12) & 0x7) {
case WID_CHAR:
do {
@@ -329,10 +328,6 @@ static void wilc_wlan_parse_response_frame(u8 *info, int size)
if (wid == WID_SITE_SURVEY_RESULTS) {
static int toggle;

- PRINT_INFO(GENERIC_DBG, "Site survey results received[%d]\n",
- size);
-
- PRINT_INFO(GENERIC_DBG, "Site survey results value[%d]toggle[%d]\n", size, toggle);
i += toggle;
toggle ^= 1;
}
@@ -361,7 +356,7 @@ static int wilc_wlan_parse_info_frame(u8 *info, int size)
wid = info[0] | (info[1] << 8);

len = info[2];
- PRINT_INFO(GENERIC_DBG, "Status Len = %d Id= %d\n", len, wid);
+
if ((len == 1) && (wid == WID_STATUS)) {
pd->mac_status = info[3];
type = WILC_CFG_RSP_STATUS;
@@ -475,8 +470,6 @@ int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, u32 buffer_size)
if (g_cfg_str[i].id == WID_SITE_SURVEY_RESULTS) {
static int toggle;

- PRINT_INFO(GENERIC_DBG, "Site survey results value[%d]\n",
- size);
i += toggle;
toggle ^= 1;

--
1.9.1


2016-02-04 09:33:21

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 58/70] staging: wilc1000: renames struct connect_resp_info variables

From: Leo Kim <[email protected]>

This patch renames to avoid camelcase changes follow are:
- u32TimeRcvdInScanCached to time_scan_cached
- u32TimeRcvdInScan to time_scan

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.h | 4 ++--
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 15 ++++++++-------
2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 2f030a9..0e10c75 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -85,8 +85,8 @@ struct network_info {
u16 beacon_period;
u8 dtim_period;
u8 ch;
- unsigned long u32TimeRcvdInScanCached;
- unsigned long u32TimeRcvdInScan;
+ unsigned long time_scan_cached;
+ unsigned long time_scan;
bool bNewNetwork;
u8 u8Found;
u32 u32Tsf;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 362fe1b..44d1855 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -277,7 +277,7 @@ static void update_scan_time(void)
int i;

for (i = 0; i < last_scanned_cnt; i++)
- last_scanned_shadow[i].u32TimeRcvdInScan = jiffies;
+ last_scanned_shadow[i].time_scan = jiffies;
}

static void remove_network_from_shadow(unsigned long arg)
@@ -287,7 +287,8 @@ 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].u32TimeRcvdInScan + (unsigned long)(SCAN_RESULT_EXPIRE))) {
+ 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);

@@ -384,8 +385,8 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
kmalloc(pstrNetworkInfo->u16IEsLen, GFP_KERNEL);
memcpy(last_scanned_shadow[ap_index].pu8IEs,
pstrNetworkInfo->pu8IEs, pstrNetworkInfo->u16IEsLen);
- last_scanned_shadow[ap_index].u32TimeRcvdInScan = jiffies;
- last_scanned_shadow[ap_index].u32TimeRcvdInScanCached = jiffies;
+ last_scanned_shadow[ap_index].time_scan = jiffies;
+ last_scanned_shadow[ap_index].time_scan_cached = jiffies;
last_scanned_shadow[ap_index].u8Found = 1;
if (ap_found != -1)
kfree(last_scanned_shadow[ap_index].pJoinParams);
@@ -465,7 +466,7 @@ static void CfgScanResult(enum scan_event scan_event,
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].u32TimeRcvdInScan = jiffies;
+ last_scanned_shadow[i].time_scan = jiffies;
break;
}
}
@@ -566,9 +567,9 @@ static void CfgConnectResult(enum conn_event enuConnDisconnEvent,
unsigned long now = jiffies;

if (time_after(now,
- last_scanned_shadow[i].u32TimeRcvdInScanCached + (unsigned long)(nl80211_SCAN_RESULT_EXPIRE - (1 * HZ)))) {
+ last_scanned_shadow[i].time_scan_cached +
+ (unsigned long)(nl80211_SCAN_RESULT_EXPIRE - (1 * HZ))))
bNeedScanRefresh = true;
- }

break;
}
--
1.9.1


2016-02-04 09:32:17

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 48/70] staging: wilc1000: renames struct connect_resp_info variables

From: Leo Kim <[email protected]>

This patch renames to avoid camelcase and remove prefix names,
changes follow are:
- u16capability to capability
- u16ConnectStatus to status
- u16AssocID to assoc_id
- pu8RespIEs to ies
- u16RespIEsLen to ies_len

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 14 +++++++-------
drivers/staging/wilc1000/coreconfigurator.h | 10 +++++-----
drivers/staging/wilc1000/host_interface.c | 14 +++++++-------
3 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index c456a32..e9f6262 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -367,19 +367,19 @@ s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,

assoc_resp_len = (u16)buffer_len;

- connect_resp_info->u16ConnectStatus = get_asoc_status(buffer);
- if (connect_resp_info->u16ConnectStatus == SUCCESSFUL_STATUSCODE) {
- connect_resp_info->u16capability = get_assoc_resp_cap_info(buffer);
- connect_resp_info->u16AssocID = get_asoc_id(buffer);
+ connect_resp_info->status = get_asoc_status(buffer);
+ if (connect_resp_info->status == SUCCESSFUL_STATUSCODE) {
+ connect_resp_info->capability = get_assoc_resp_cap_info(buffer);
+ connect_resp_info->assoc_id = get_asoc_id(buffer);

ies = &buffer[CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN];
ies_len = assoc_resp_len - (CAP_INFO_LEN + STATUS_CODE_LEN + AID_LEN);

- connect_resp_info->pu8RespIEs = kmemdup(ies, ies_len, GFP_KERNEL);
- if (!connect_resp_info->pu8RespIEs)
+ connect_resp_info->ies = kmemdup(ies, ies_len, GFP_KERNEL);
+ if (!connect_resp_info->ies)
return -ENOMEM;

- connect_resp_info->u16RespIEsLen = ies_len;
+ connect_resp_info->ies_len = ies_len;
}

*ret_connect_resp_info = connect_resp_info;
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 611486b..aa9aee6 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -98,11 +98,11 @@ typedef struct {
} tstrNetworkInfo;

struct connect_resp_info {
- u16 u16capability;
- u16 u16ConnectStatus;
- u16 u16AssocID;
- u8 *pu8RespIEs;
- u16 u16RespIEsLen;
+ u16 capability;
+ u16 status;
+ u16 assoc_id;
+ u8 *ies;
+ u16 ies_len;
};

typedef struct {
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 513b1f0..992008b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1489,19 +1489,19 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
if (s32Err) {
PRINT_ER("wilc_parse_assoc_resp_info() returned error %d\n", s32Err);
} else {
- strConnectInfo.u16ConnectStatus = pstrConnectRespInfo->u16ConnectStatus;
+ strConnectInfo.u16ConnectStatus = pstrConnectRespInfo->status;

if (strConnectInfo.u16ConnectStatus == SUCCESSFUL_STATUSCODE) {
- if (pstrConnectRespInfo->pu8RespIEs) {
- strConnectInfo.u16RespIEsLen = pstrConnectRespInfo->u16RespIEsLen;
- strConnectInfo.pu8RespIEs = kmalloc(pstrConnectRespInfo->u16RespIEsLen, GFP_KERNEL);
- memcpy(strConnectInfo.pu8RespIEs, pstrConnectRespInfo->pu8RespIEs,
- pstrConnectRespInfo->u16RespIEsLen);
+ if (pstrConnectRespInfo->ies) {
+ strConnectInfo.u16RespIEsLen = pstrConnectRespInfo->ies_len;
+ strConnectInfo.pu8RespIEs = kmalloc(pstrConnectRespInfo->ies_len, GFP_KERNEL);
+ memcpy(strConnectInfo.pu8RespIEs, pstrConnectRespInfo->ies,
+ pstrConnectRespInfo->ies_len);
}
}

if (pstrConnectRespInfo) {
- kfree(pstrConnectRespInfo->pu8RespIEs);
+ kfree(pstrConnectRespInfo->ies);
kfree(pstrConnectRespInfo);
}
}
--
1.9.1


2016-02-04 09:34:13

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 66/70] staging: wilc1000: remove unnecessary wilc_rx_complete function

From: Chris Park <[email protected]>

This patch remove unnecessary wilc_rx_complete function
because this function only print unused log message.
remove unused has_packet variable nomore.

Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/linux_wlan.c | 5 -----
drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 -
drivers/staging/wilc1000/wilc_wlan.c | 7 +------
3 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 202be15..e702020 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -372,11 +372,6 @@ static int linux_wlan_txq_task(void *vp)
return 0;
}

-void wilc_rx_complete(struct wilc *nic)
-{
- PRINT_D(RX_DBG, "RX completed\n");
-}
-
int wilc_wlan_get_firmware(struct net_device *dev)
{
struct wilc_vif *vif;
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index 07a4ff1..3077f5d4 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -228,7 +228,6 @@ int wilc1000_wlan_init(struct net_device *dev, struct wilc_vif *vif);

void wilc_frmw_to_linux(struct wilc *wilc, u8 *buff, u32 size, u32 pkt_offset);
void wilc_mac_indicate(struct wilc *wilc, int flag);
-void wilc_rx_complete(struct wilc *wilc);
void wilc_dbg(u8 *buff);

int wilc_lock_timeout(struct wilc *wilc, void *, u32 timeout);
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index d7f14a9..8cb1ef6 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -811,7 +811,7 @@ _end_:

static void wilc_wlan_handle_rxq(struct wilc *wilc)
{
- int offset = 0, size, has_packet = 0;
+ int offset = 0, size;
u8 *buffer;
struct rxq_entry_t *rqe;

@@ -866,7 +866,6 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
&buffer[offset],
pkt_len,
pkt_offset);
- has_packet = 1;
}
} else {
struct wilc_cfg_rsp rsp;
@@ -888,10 +887,6 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
break;
} while (1);
kfree(rqe);
-
- if (has_packet)
- wilc_rx_complete(wilc);
-
} while (1);

wilc->rxq_exit = 1;
--
1.9.1


2016-02-04 09:33:33

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 60/70] staging: wilc1000: renames u8Found of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u8Found variable to found.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index fd3b5d4..27c35d7 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -88,7 +88,7 @@ struct network_info {
unsigned long time_scan_cached;
unsigned long time_scan;
bool new_network;
- u8 u8Found;
+ u8 found;
u32 u32Tsf;
u8 *pu8IEs;
u16 u16IEsLen;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index ab3390c..2d3a2d3 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -235,7 +235,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)

network_info = &last_scanned_shadow[i];

- if (!network_info->u8Found || all) {
+ if (!network_info->found || all) {
s32 freq;
struct ieee80211_channel *channel;

@@ -269,7 +269,7 @@ static void reset_shadow_found(void)
int i;

for (i = 0; i < last_scanned_cnt; i++)
- last_scanned_shadow[i].u8Found = 0;
+ last_scanned_shadow[i].found = 0;
}

static void update_scan_time(void)
@@ -387,7 +387,7 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
pstrNetworkInfo->pu8IEs, pstrNetworkInfo->u16IEsLen);
last_scanned_shadow[ap_index].time_scan = jiffies;
last_scanned_shadow[ap_index].time_scan_cached = jiffies;
- last_scanned_shadow[ap_index].u8Found = 1;
+ last_scanned_shadow[ap_index].found = 1;
if (ap_found != -1)
kfree(last_scanned_shadow[ap_index].pJoinParams);
last_scanned_shadow[ap_index].pJoinParams = pJoinParams;
--
1.9.1


2016-02-04 09:31:50

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 44/70] staging: wilc1000: remove unused log message using the TX_DBG tag

From: Chris Park <[email protected]>

This patch remove unused log message using the TX_DBG tag

Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/linux_wlan.c | 4 ----
drivers/staging/wilc1000/linux_wlan_common.h | 2 --
drivers/staging/wilc1000/wilc_debugfs.c | 2 +-
drivers/staging/wilc1000/wilc_wlan.c | 9 +++------
4 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 9e5dea4..202be15 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1047,10 +1047,6 @@ static void linux_wlan_tx_complete(void *priv, int status)
{
struct tx_complete_data *pv_data = (struct tx_complete_data *)priv;

- if (status == 1)
- PRINT_D(TX_DBG, "Packet sent successfully - Size = %d - Address = %p - SKB = %p\n", pv_data->size, pv_data->buff, pv_data->skb);
- else
- PRINT_D(TX_DBG, "Couldn't send packet - Size = %d - Address = %p - SKB = %p\n", pv_data->size, pv_data->buff, pv_data->skb);
dev_kfree_skb(pv_data->skb);
kfree(pv_data);
}
diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 5374f36..617bc53 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -6,7 +6,6 @@ enum debug_region {
Hostapd_debug,
CFG80211_debug,
Interrupt_debug,
- TX_debug,
RX_debug,
Lock_debug,
Tcp_enhance,
@@ -23,7 +22,6 @@ enum debug_region {
#define HOSTAPD_DBG (1 << Hostapd_debug)
#define CFG80211_DBG (1 << CFG80211_debug)
#define INT_DBG (1 << Interrupt_debug)
-#define TX_DBG (1 << TX_debug)
#define RX_DBG (1 << RX_debug)
#define LOCK_DBG (1 << Lock_debug)
#define TCP_ENH (1 << Tcp_enhance)
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index 4b38c37..a3d274b 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,7 +24,7 @@ static struct dentry *wilc_dir;
* --------------------------------------------------------------------------------
*/

-#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INT_DBG | TX_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
+#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INT_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
#define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR)
atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG);
EXPORT_SYMBOL_GPL(WILC_REGION);
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index ec111d8..d7f14a9 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -652,13 +652,11 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)
}
} while (1);

- if (i == 0) {
- PRINT_D(TX_DBG, "Nothing in TX-Q\n");
+ if (i == 0)
break;
- } else {
- PRINT_D(TX_DBG, "Mark the last entry in VMM table - number of previous entries = %d\n", i);
+ else
vmm_table[i] = 0x0;
- }
+
acquire_bus(wilc, ACQUIRE_AND_WAKEUP);
counter = 0;
do {
@@ -807,7 +805,6 @@ _end_:
up(&wilc->txq_add_to_head_cs);

wilc->txq_exit = 1;
- PRINT_D(TX_DBG, "THREAD: Exiting txq\n");
*txq_count = wilc->txq_entries;
return ret;
}
--
1.9.1


2016-02-04 09:31:11

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 42/70] staging: wilc1000: remove unused log message using the CORECONFIG_DBG tag

From: Chris Park <[email protected]>

This patch remove unused log messages using the CORECONFIG_DBG tag

Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 1 -
drivers/staging/wilc1000/linux_wlan_common.h | 2 --
drivers/staging/wilc1000/wilc_debugfs.c | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 20 +-------------------
4 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index a0b80bf..11e3ce0 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -315,7 +315,6 @@ s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info)
rx_len = wid_len - 1;
network_info->u16CapInfo = get_cap_info(msa);
network_info->u32Tsf = get_beacon_timestamp_lo(msa);
- PRINT_D(CORECONFIG_DBG, "TSF :%x\n", network_info->u32Tsf);

tsf_lo = get_beacon_timestamp_lo(msa);
tsf_hi = get_beacon_timestamp_hi(msa);
diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 5d40f05..5e1d3ad 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -6,7 +6,6 @@ enum debug_region {
Hostapd_debug,
Hostinf_debug,
CFG80211_debug,
- Coreconfig_debug,
Interrupt_debug,
TX_debug,
RX_debug,
@@ -24,7 +23,6 @@ enum debug_region {
#define GENERIC_DBG (1 << Generic_debug)
#define HOSTAPD_DBG (1 << Hostapd_debug)
#define HOSTINF_DBG (1 << Hostinf_debug)
-#define CORECONFIG_DBG (1 << Coreconfig_debug)
#define CFG80211_DBG (1 << CFG80211_debug)
#define INT_DBG (1 << Interrupt_debug)
#define TX_DBG (1 << TX_debug)
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index 291e6fa..c7e0775 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,7 +24,7 @@ static struct dentry *wilc_dir;
* --------------------------------------------------------------------------------
*/

-#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | HOSTINF_DBG | CORECONFIG_DBG | CFG80211_DBG | INT_DBG | TX_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
+#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | HOSTINF_DBG | CFG80211_DBG | INT_DBG | TX_DBG | RX_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
#define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR)
atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG);
EXPORT_SYMBOL_GPL(WILC_REGION);
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index dbbf7bf..809dbb5 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -192,7 +192,6 @@ static void clear_shadow_scan(void)

if (op_ifcs == 0) {
del_timer_sync(&hAgingTimer);
- PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n");

for (i = 0; i < last_scanned_cnt; i++) {
if (last_scanned_shadow[last_scanned_cnt].pu8IEs) {
@@ -424,8 +423,6 @@ static void CfgScanResult(enum scan_event scan_event,
PRINT_D(CFG80211_DBG, "Network %s found\n", network_info->au8ssid);
priv->u32RcvdChCount++;

- if (!join_params)
- PRINT_INFO(CORECONFIG_DBG, ">> Something really bad happened\n");
add_network_to_shadow(network_info, priv, join_params);

if (!(memcmp("DIRECT-", network_info->au8ssid, 7))) {
@@ -762,24 +759,14 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,

PRINT_INFO(CFG80211_DBG, "sme->crypto.n_ciphers_pairwise=%d\n", sme->crypto.n_ciphers_pairwise);

- if (INFO) {
- for (i = 0; i < sme->crypto.n_ciphers_pairwise; i++)
- PRINT_D(CORECONFIG_DBG, "sme->crypto.ciphers_pairwise[%d]=%x\n", i, sme->crypto.ciphers_pairwise[i]);
- }
-
if (sme->crypto.cipher_group != NO_ENCRYPT) {
pcwpa_version = "Default";
- PRINT_D(CORECONFIG_DBG, ">> sme->crypto.wpa_versions: %x\n", sme->crypto.wpa_versions);
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);

- if (INFO) {
- for (i = 0; i < sme->key_len; i++)
- PRINT_D(CORECONFIG_DBG, "WEP Key Value[%d] = %d\n", i, sme->key[i]);
- }
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);

@@ -1386,9 +1373,6 @@ static int get_station(struct wiphy *wiphy, struct net_device *dev,
wilc_enable_tcp_ack_filter(true);
else if (strStatistics.link_speed != DEFAULT_LINK_SPEED)
wilc_enable_tcp_ack_filter(false);
-
- PRINT_D(CORECONFIG_DBG, "*** stats[%d][%d][%d][%d][%d]\n", sinfo->signal, sinfo->rx_packets, sinfo->tx_packets,
- sinfo->tx_failed, sinfo->txrate.legacy);
}
return 0;
}
@@ -2716,10 +2700,8 @@ int wilc_deinit_host_int(struct net_device *net)
s32Error = wilc_deinit(vif);

clear_shadow_scan();
- if (op_ifcs == 0) {
- PRINT_D(CORECONFIG_DBG, "destroy during ip\n");
+ if (op_ifcs == 0)
del_timer_sync(&wilc_during_ip_timer);
- }

if (s32Error)
netdev_err(net, "Error while deintializing host interface\n");
--
1.9.1


2016-02-04 09:33:10

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 56/70] staging: wilc1000: renames u8DtimPeriod of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u8DtimPeriod variable to dtim_period.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index b4f7ec3..ce3bc29 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -336,7 +336,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,

tim_elm = get_tim_elm(msa, rx_len + FCS_LEN, index);
if (tim_elm)
- network_info->u8DtimPeriod = tim_elm[3];
+ network_info->dtim_period = tim_elm[3];
ies = &msa[MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN];
ies_len = rx_len - (MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN);

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 2fbffe8..bbc4b0e 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -83,7 +83,7 @@ struct network_info {
u8 ssid_len;
u8 bssid[6];
u16 beacon_period;
- u8 u8DtimPeriod;
+ u8 dtim_period;
u8 u8channel;
unsigned long u32TimeRcvdInScanCached;
unsigned long u32TimeRcvdInScan;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 0ba248b..df33197 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4275,7 +4275,7 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)

pNewJoinBssParam = kzalloc(sizeof(struct join_bss_param), GFP_KERNEL);
if (pNewJoinBssParam) {
- pNewJoinBssParam->dtim_period = ptstrNetworkInfo->u8DtimPeriod;
+ pNewJoinBssParam->dtim_period = ptstrNetworkInfo->dtim_period;
pNewJoinBssParam->beacon_period = ptstrNetworkInfo->beacon_period;
pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info;
memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->bssid, 6);
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 9424776..16b2798 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -374,7 +374,7 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
memcpy(last_scanned_shadow[ap_index].bssid,
pstrNetworkInfo->bssid, ETH_ALEN);
last_scanned_shadow[ap_index].beacon_period = pstrNetworkInfo->beacon_period;
- last_scanned_shadow[ap_index].u8DtimPeriod = pstrNetworkInfo->u8DtimPeriod;
+ last_scanned_shadow[ap_index].dtim_period = pstrNetworkInfo->dtim_period;
last_scanned_shadow[ap_index].u8channel = pstrNetworkInfo->u8channel;
last_scanned_shadow[ap_index].u16IEsLen = pstrNetworkInfo->u16IEsLen;
last_scanned_shadow[ap_index].u64Tsf = pstrNetworkInfo->u64Tsf;
--
1.9.1


2016-02-04 09:34:43

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 68/70] staging: wilc1000: remove unused debug tag

From: Chris Park <[email protected]>

This patch remove unused debug tag INT_DBG, LOCK_DBG, BUS_DBG,
MEM_DBG and FIRM_DBG

Signed-off-by: Chris Park <[email protected]>
Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/linux_wlan_common.h | 15 ---------------
drivers/staging/wilc1000/wilc_debugfs.c | 5 +++--
2 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_wlan_common.h b/drivers/staging/wilc1000/linux_wlan_common.h
index 63d0ec5..758633e 100644
--- a/drivers/staging/wilc1000/linux_wlan_common.h
+++ b/drivers/staging/wilc1000/linux_wlan_common.h
@@ -5,29 +5,14 @@ enum debug_region {
Generic_debug = 0,
Hostapd_debug,
CFG80211_debug,
- Interrupt_debug,
- Lock_debug,
- Tcp_enhance,
- Spin_debug,
-
Init_debug,
- Bus_debug,
- Mem_debug,
- Firmware_debug,
COMP = 0xFFFFFFFF,
};

#define GENERIC_DBG (1 << Generic_debug)
#define HOSTAPD_DBG (1 << Hostapd_debug)
#define CFG80211_DBG (1 << CFG80211_debug)
-#define INT_DBG (1 << Interrupt_debug)
-#define LOCK_DBG (1 << Lock_debug)
-#define TCP_ENH (1 << Tcp_enhance)
-#define SPIN_DEBUG (1 << Spin_debug)
#define INIT_DBG (1 << Init_debug)
-#define BUS_DBG (1 << Bus_debug)
-#define MEM_DBG (1 << Mem_debug)
-#define FIRM_DBG (1 << Firmware_debug)

#if defined (WILC_DEBUGFS)
extern atomic_t WILC_REGION;
diff --git a/drivers/staging/wilc1000/wilc_debugfs.c b/drivers/staging/wilc1000/wilc_debugfs.c
index 9c85bdd..8d08824 100644
--- a/drivers/staging/wilc1000/wilc_debugfs.c
+++ b/drivers/staging/wilc1000/wilc_debugfs.c
@@ -24,9 +24,10 @@ static struct dentry *wilc_dir;
* --------------------------------------------------------------------------------
*/

-#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INT_DBG | LOCK_DBG | INIT_DBG | BUS_DBG | MEM_DBG)
+#define DBG_REGION_ALL (GENERIC_DBG | HOSTAPD_DBG | CFG80211_DBG | INIT_DBG)
#define DBG_LEVEL_ALL (DEBUG | INFO | WRN | ERR)
-atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG | FIRM_DBG | HOSTAPD_DBG);
+atomic_t WILC_REGION = ATOMIC_INIT(INIT_DBG | GENERIC_DBG | CFG80211_DBG |
+ HOSTAPD_DBG);
EXPORT_SYMBOL_GPL(WILC_REGION);
atomic_t WILC_DEBUG_LEVEL = ATOMIC_INIT(ERR);
EXPORT_SYMBOL_GPL(WILC_DEBUG_LEVEL);
--
1.9.1


2016-02-04 09:33:16

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 57/70] staging: wilc1000: renames u8channel of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u8channel variable to ch.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++++++-------
3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index ce3bc29..6c748aa 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -325,7 +325,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
get_ssid(msa, network_info->ssid, &network_info->ssid_len);
get_BSSID(msa, network_info->bssid);

- network_info->u8channel = get_current_channel_802_11n(msa,
+ network_info->ch = get_current_channel_802_11n(msa,
rx_len + FCS_LEN);

index = MAC_HDR_LEN + TIME_STAMP_LEN;
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index bbc4b0e..2f030a9 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -84,7 +84,7 @@ struct network_info {
u8 bssid[6];
u16 beacon_period;
u8 dtim_period;
- u8 u8channel;
+ u8 ch;
unsigned long u32TimeRcvdInScanCached;
unsigned long u32TimeRcvdInScan;
bool bNewNetwork;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 16b2798..362fe1b 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -240,7 +240,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
struct ieee80211_channel *channel;

if (network_info) {
- freq = ieee80211_channel_to_frequency((s32)network_info->u8channel, IEEE80211_BAND_2GHZ);
+ freq = ieee80211_channel_to_frequency((s32)network_info->ch, IEEE80211_BAND_2GHZ);
channel = ieee80211_get_channel(wiphy, freq);

rssi = get_rssi_avg(network_info);
@@ -375,7 +375,7 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
pstrNetworkInfo->bssid, ETH_ALEN);
last_scanned_shadow[ap_index].beacon_period = pstrNetworkInfo->beacon_period;
last_scanned_shadow[ap_index].dtim_period = pstrNetworkInfo->dtim_period;
- last_scanned_shadow[ap_index].u8channel = pstrNetworkInfo->u8channel;
+ last_scanned_shadow[ap_index].ch = pstrNetworkInfo->ch;
last_scanned_shadow[ap_index].u16IEsLen = pstrNetworkInfo->u16IEsLen;
last_scanned_shadow[ap_index].u64Tsf = pstrNetworkInfo->u64Tsf;
if (ap_found != -1)
@@ -417,7 +417,7 @@ static void CfgScanResult(enum scan_event scan_event,
return;

if (network_info) {
- s32Freq = ieee80211_channel_to_frequency((s32)network_info->u8channel, IEEE80211_BAND_2GHZ);
+ s32Freq = ieee80211_channel_to_frequency((s32)network_info->ch, IEEE80211_BAND_2GHZ);
channel = ieee80211_get_channel(wiphy, s32Freq);

if (!channel)
@@ -895,15 +895,15 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
}


- PRINT_INFO(CFG80211_DBG, "Required Channel = %d\n", pstrNetworkInfo->u8channel);
+ 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->u8channel;
+ curr_channel = pstrNetworkInfo->ch;

if (!pstrWFIDrv->p2p_connect)
- wlan_channel = pstrNetworkInfo->u8channel;
+ wlan_channel = pstrNetworkInfo->ch;

wilc_wlan_set_bssid(dev, pstrNetworkInfo->bssid, STATION_MODE);

@@ -911,7 +911,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
sme->ssid_len, sme->ie, sme->ie_len,
CfgConnectResult, (void *)priv,
u8security, tenuAuth_type,
- pstrNetworkInfo->u8channel,
+ pstrNetworkInfo->ch,
pstrNetworkInfo->pJoinParams);
if (s32Error != 0) {
netdev_err(dev, "wilc_set_join_req(): Error\n");
--
1.9.1


2016-02-04 09:32:42

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 52/70] staging: wilc1000: renames au8ssid of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames au8ssid variable to ssid.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 3 ++-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 19 +++++++++++--------
4 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 6c40d36..4dd7c8a 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -322,7 +322,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,

network_info->u64Tsf = tsf_lo | ((u64)tsf_hi << 32);

- get_ssid(msa, network_info->au8ssid, &network_info->u8SsidLen);
+ get_ssid(msa, network_info->ssid, &network_info->u8SsidLen);
get_BSSID(msa, network_info->au8bssid);

network_info->u8channel = get_current_channel_802_11n(msa,
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index ace50d8..781a65f 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -79,7 +79,7 @@ typedef struct {
struct network_info {
s8 rssi;
u16 cap_info;
- u8 au8ssid[MAX_SSID_LEN];
+ u8 ssid[MAX_SSID_LEN];
u8 u8SsidLen;
u8 au8bssid[6];
u16 u16BeaconPeriod;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index d56a33c..c31f0b5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4279,7 +4279,8 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
pNewJoinBssParam->beacon_period = ptstrNetworkInfo->u16BeaconPeriod;
pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info;
memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->au8bssid, 6);
- memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->au8ssid, ptstrNetworkInfo->u8SsidLen + 1);
+ memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->ssid,
+ ptstrNetworkInfo->u8SsidLen + 1);
pNewJoinBssParam->ssid_len = ptstrNetworkInfo->u8SsidLen;
memset(pNewJoinBssParam->rsn_pcip_policy, 0xFF, 3);
memset(pNewJoinBssParam->rsn_auth_policy, 0xFF, 3);
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 578a3f2..9aae11e 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -244,7 +244,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
channel = ieee80211_get_channel(wiphy, freq);

rssi = get_rssi_avg(network_info);
- if (memcmp("DIRECT-", network_info->au8ssid, 7) ||
+ if (memcmp("DIRECT-", network_info->ssid, 7) ||
direct_scan) {
bss = cfg80211_inform_bss(wiphy,
channel,
@@ -288,7 +288,8 @@ 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].u32TimeRcvdInScan + (unsigned long)(SCAN_RESULT_EXPIRE))) {
- PRINT_D(CFG80211_DBG, "Network expired in ScanShadow: %s\n", last_scanned_shadow[i].au8ssid);
+ PRINT_D(CFG80211_DBG, "Network expired ScanShadow:%s\n",
+ last_scanned_shadow[i].ssid);

kfree(last_scanned_shadow[i].pu8IEs);
last_scanned_shadow[i].pu8IEs = NULL;
@@ -368,8 +369,8 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
last_scanned_shadow[ap_index].rssi = pstrNetworkInfo->rssi;
last_scanned_shadow[ap_index].cap_info = pstrNetworkInfo->cap_info;
last_scanned_shadow[ap_index].u8SsidLen = pstrNetworkInfo->u8SsidLen;
- memcpy(last_scanned_shadow[ap_index].au8ssid,
- pstrNetworkInfo->au8ssid, pstrNetworkInfo->u8SsidLen);
+ memcpy(last_scanned_shadow[ap_index].ssid,
+ pstrNetworkInfo->ssid, pstrNetworkInfo->u8SsidLen);
memcpy(last_scanned_shadow[ap_index].au8bssid,
pstrNetworkInfo->au8bssid, ETH_ALEN);
last_scanned_shadow[ap_index].u16BeaconPeriod = pstrNetworkInfo->u16BeaconPeriod;
@@ -434,12 +435,14 @@ static void CfgScanResult(enum scan_event scan_event,

if (network_info->bNewNetwork) {
if (priv->u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) {
- PRINT_D(CFG80211_DBG, "Network %s found\n", network_info->au8ssid);
+ PRINT_D(CFG80211_DBG,
+ "Network %s found\n",
+ network_info->ssid);
priv->u32RcvdChCount++;

add_network_to_shadow(network_info, priv, join_params);

- if (!(memcmp("DIRECT-", network_info->au8ssid, 7))) {
+ if (!(memcmp("DIRECT-", network_info->ssid, 7))) {
bss = cfg80211_inform_bss(wiphy,
channel,
CFG80211_BSS_FTYPE_UNKNOWN,
@@ -459,7 +462,7 @@ static void CfgScanResult(enum scan_event scan_event,

for (i = 0; i < priv->u32RcvdChCount; i++) {
if (memcmp(last_scanned_shadow[i].au8bssid, network_info->au8bssid, 6) == 0) {
- PRINT_D(CFG80211_DBG, "Update RSSI of %s\n", last_scanned_shadow[i].au8ssid);
+ 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].u32TimeRcvdInScan = jiffies;
@@ -736,7 +739,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,

for (i = 0; i < last_scanned_cnt; i++) {
if ((sme->ssid_len == last_scanned_shadow[i].u8SsidLen) &&
- memcmp(last_scanned_shadow[i].au8ssid,
+ 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);
--
1.9.1


2016-02-04 09:32:23

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 49/70] staging: wilc1000: remove typedef from pstrNetworkInfo

From: Leo Kim <[email protected]>

This patch removes typedef from the struct pstrNetworkInfo and
renames it to network_info.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 7 ++++---
drivers/staging/wilc1000/coreconfigurator.h | 7 ++++---
drivers/staging/wilc1000/host_interface.c | 6 +++---
drivers/staging/wilc1000/host_interface.h | 4 ++--
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++++++-------
5 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index e9f6262..0d0a4ec 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -270,9 +270,10 @@ static u8 get_current_channel_802_11n(u8 *pu8msa, u16 rx_len)
return 0;
}

-s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info)
+s32 wilc_parse_network_info(u8 *msg_buffer,
+ struct network_info **ret_network_info)
{
- tstrNetworkInfo *network_info = NULL;
+ struct network_info *network_info = NULL;
u8 msg_type = 0;
u8 msg_id = 0;
u16 msg_len = 0;
@@ -304,7 +305,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info)
u32 tsf_lo;
u32 tsf_hi;

- network_info = kzalloc(sizeof(tstrNetworkInfo), GFP_KERNEL);
+ network_info = kzalloc(sizeof(*network_info), GFP_KERNEL);
if (!network_info)
return -ENOMEM;

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index aa9aee6..214b43b 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -76,7 +76,7 @@ typedef struct {
s8 as8RSSI[NUM_RSSI];
} tstrRSSI;

-typedef struct {
+struct network_info {
s8 s8rssi;
u16 u16CapInfo;
u8 au8ssid[MAX_SSID_LEN];
@@ -95,7 +95,7 @@ typedef struct {
void *pJoinParams;
tstrRSSI strRssi;
u64 u64Tsf;
-} tstrNetworkInfo;
+};

struct connect_resp_info {
u16 capability;
@@ -120,7 +120,8 @@ typedef struct {
size_t ie_len;
} tstrDisconnectNotifInfo;

-s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info);
+s32 wilc_parse_network_info(u8 *msg_buffer,
+ struct network_info **ret_network_info);
s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
struct connect_resp_info **ret_connect_resp_info);
void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 992008b..c0b4f7b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -272,7 +272,7 @@ static struct wilc_vif *join_req_vif;
#define FLUSHED_JOIN_REQ 1
#define FLUSHED_BYTE_POS 79

-static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo);
+static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo);
static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);

/* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as
@@ -1348,7 +1348,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
u32 i;
bool bNewNtwrkFound;
s32 result = 0;
- tstrNetworkInfo *pstrNetworkInfo = NULL;
+ struct network_info *pstrNetworkInfo = NULL;
void *pJoinParams = NULL;
struct host_if_drv *hif_drv = vif->hif_drv;

@@ -4255,7 +4255,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
return result;
}

-static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo)
+static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
{
struct join_bss_param *pNewJoinBssParam = NULL;
u8 *pu8IEs;
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 69c36a7..c73a5c3 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -168,8 +168,8 @@ enum KEY_TYPE {
PMKSA,
};

-typedef void (*wilc_scan_result)(enum scan_event, tstrNetworkInfo *,
- void *, void *);
+typedef void (*wilc_scan_result)(enum scan_event, struct network_info *,
+ void *, void *);

typedef void (*wilc_connect_result)(enum conn_event,
tstrConnectInfo *,
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 8d922e6..b22a48a 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -93,7 +93,7 @@ static const struct wiphy_wowlan_support wowlan_support = {
extern int wilc_mac_open(struct net_device *ndev);
extern int wilc_mac_close(struct net_device *ndev);

-static tstrNetworkInfo last_scanned_shadow[MAX_NUM_SCANNED_NETWORKS_SHADOW];
+static struct network_info last_scanned_shadow[MAX_NUM_SCANNED_NETWORKS_SHADOW];
static u32 last_scanned_cnt;
struct timer_list wilc_during_ip_timer;
static struct timer_list hAgingTimer;
@@ -206,7 +206,7 @@ static void clear_shadow_scan(void)
}
}

-static u32 get_rssi_avg(tstrNetworkInfo *network_info)
+static u32 get_rssi_avg(struct network_info *network_info)
{
u8 i;
int rssi_v = 0;
@@ -231,7 +231,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
wiphy = priv->dev->ieee80211_ptr->wiphy;

for (i = 0; i < last_scanned_cnt; i++) {
- tstrNetworkInfo *network_info;
+ struct network_info *network_info;

network_info = &last_scanned_shadow[i];

@@ -310,7 +310,7 @@ static void clear_duringIP(unsigned long arg)
wilc_optaining_ip = false;
}

-static int is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo,
+static int is_network_in_shadow(struct network_info *pstrNetworkInfo,
void *user_void)
{
int state = -1;
@@ -333,7 +333,7 @@ static int is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo,
return state;
}

-static void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo,
+static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
void *user_void, void *pJoinParams)
{
int ap_found = is_network_in_shadow(pstrNetworkInfo, user_void);
@@ -384,7 +384,7 @@ static void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo,
}

static void CfgScanResult(enum scan_event scan_event,
- tstrNetworkInfo *network_info,
+ struct network_info *network_info,
void *user_void,
void *join_params)
{
@@ -693,7 +693,7 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,

struct wilc_priv *priv;
struct host_if_drv *pstrWFIDrv;
- tstrNetworkInfo *pstrNetworkInfo = NULL;
+ struct network_info *pstrNetworkInfo = NULL;
struct wilc_vif *vif;

wilc_connecting = 1;
--
1.9.1


2016-02-04 09:32:11

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 47/70] staging: wilc1000: remove typedef from tstrConnectRespInfo

From: Leo Kim <[email protected]>

This patch removes typedef from the struct tstrConnectRespInfo and
renames it to connect_resp_info.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 6 +++---
drivers/staging/wilc1000/coreconfigurator.h | 6 +++---
drivers/staging/wilc1000/host_interface.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index c86278d..c456a32 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -354,14 +354,14 @@ s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info)
}

s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
- tstrConnectRespInfo **ret_connect_resp_info)
+ struct connect_resp_info **ret_connect_resp_info)
{
- tstrConnectRespInfo *connect_resp_info = NULL;
+ struct connect_resp_info *connect_resp_info = NULL;
u16 assoc_resp_len = 0;
u8 *ies = NULL;
u16 ies_len = 0;

- connect_resp_info = kzalloc(sizeof(tstrConnectRespInfo), GFP_KERNEL);
+ connect_resp_info = kzalloc(sizeof(*connect_resp_info), GFP_KERNEL);
if (!connect_resp_info)
return -ENOMEM;

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index d42f47c..611486b 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -97,13 +97,13 @@ typedef struct {
u64 u64Tsf;
} tstrNetworkInfo;

-typedef struct {
+struct connect_resp_info {
u16 u16capability;
u16 u16ConnectStatus;
u16 u16AssocID;
u8 *pu8RespIEs;
u16 u16RespIEsLen;
-} tstrConnectRespInfo;
+};

typedef struct {
u8 au8bssid[6];
@@ -122,7 +122,7 @@ typedef struct {

s32 wilc_parse_network_info(u8 *msg_buffer, tstrNetworkInfo **ret_network_info);
s32 wilc_parse_assoc_resp_info(u8 *buffer, u32 buffer_len,
- tstrConnectRespInfo **ret_connect_resp_info);
+ struct connect_resp_info **ret_connect_resp_info);
void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
u32 u32Length);
void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 30b93d0..513b1f0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1471,7 +1471,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
u8MacStatusAdditionalInfo = pstrRcvdGnrlAsyncInfo->buffer[9];
if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) {
u32 u32RcvdAssocRespInfoLen = 0;
- tstrConnectRespInfo *pstrConnectRespInfo = NULL;
+ struct connect_resp_info *pstrConnectRespInfo = NULL;

memset(&strConnectInfo, 0, sizeof(tstrConnectInfo));

--
1.9.1


2016-02-04 09:33:01

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 55/70] staging: wilc1000: renames u16BeaconPeriod of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames u16BeaconPeriod variable to beacon_period.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 2 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++----
4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 4a82576..b4f7ec3 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -330,7 +330,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,

index = MAC_HDR_LEN + TIME_STAMP_LEN;

- network_info->u16BeaconPeriod = get_beacon_period(msa + index);
+ network_info->beacon_period = get_beacon_period(msa + index);

index += BEACON_INTERVAL_LEN + CAP_INFO_LEN;

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 5404162..2fbffe8 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -82,7 +82,7 @@ struct network_info {
u8 ssid[MAX_SSID_LEN];
u8 ssid_len;
u8 bssid[6];
- u16 u16BeaconPeriod;
+ u16 beacon_period;
u8 u8DtimPeriod;
u8 u8channel;
unsigned long u32TimeRcvdInScanCached;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 2534c9a..0ba248b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4276,7 +4276,7 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
pNewJoinBssParam = kzalloc(sizeof(struct join_bss_param), GFP_KERNEL);
if (pNewJoinBssParam) {
pNewJoinBssParam->dtim_period = ptstrNetworkInfo->u8DtimPeriod;
- pNewJoinBssParam->beacon_period = ptstrNetworkInfo->u16BeaconPeriod;
+ pNewJoinBssParam->beacon_period = ptstrNetworkInfo->beacon_period;
pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info;
memcpy(pNewJoinBssParam->au8bssid, ptstrNetworkInfo->bssid, 6);
memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->ssid,
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 80f46d7..9424776 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -252,7 +252,7 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
network_info->bssid,
network_info->u64Tsf,
network_info->cap_info,
- network_info->u16BeaconPeriod,
+ network_info->beacon_period,
(const u8 *)network_info->pu8IEs,
(size_t)network_info->u16IEsLen,
(s32)rssi * 100,
@@ -373,7 +373,7 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
pstrNetworkInfo->ssid, pstrNetworkInfo->ssid_len);
memcpy(last_scanned_shadow[ap_index].bssid,
pstrNetworkInfo->bssid, ETH_ALEN);
- last_scanned_shadow[ap_index].u16BeaconPeriod = pstrNetworkInfo->u16BeaconPeriod;
+ last_scanned_shadow[ap_index].beacon_period = pstrNetworkInfo->beacon_period;
last_scanned_shadow[ap_index].u8DtimPeriod = pstrNetworkInfo->u8DtimPeriod;
last_scanned_shadow[ap_index].u8channel = pstrNetworkInfo->u8channel;
last_scanned_shadow[ap_index].u16IEsLen = pstrNetworkInfo->u16IEsLen;
@@ -431,7 +431,7 @@ static void CfgScanResult(enum scan_event scan_event,
channel->center_freq,
(s32)network_info->rssi * 100,
network_info->cap_info,
- network_info->u16BeaconPeriod);
+ network_info->beacon_period);

if (network_info->bNewNetwork) {
if (priv->u32RcvdChCount < MAX_NUM_SCANNED_NETWORKS) {
@@ -449,7 +449,7 @@ static void CfgScanResult(enum scan_event scan_event,
network_info->bssid,
network_info->u64Tsf,
network_info->cap_info,
- network_info->u16BeaconPeriod,
+ network_info->beacon_period,
(const u8 *)network_info->pu8IEs,
(size_t)network_info->u16IEsLen,
(s32)network_info->rssi * 100,
--
1.9.1


2016-02-04 09:33:44

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 62/70] staging: wilc1000: renames struct connect_resp_info variables

From: Leo Kim <[email protected]>

This patch renames to avoid camelcase changes follow are:
- pu8IEs to ies
- u16IEsLen to ies_len

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 7 +++---
drivers/staging/wilc1000/coreconfigurator.h | 4 +--
drivers/staging/wilc1000/host_interface.c | 6 ++---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 30 +++++++++++------------
4 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 3e1e1f5..cbca6a0 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -341,12 +341,11 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
ies_len = rx_len - (MAC_HDR_LEN + TIME_STAMP_LEN + BEACON_INTERVAL_LEN + CAP_INFO_LEN);

if (ies_len > 0) {
- network_info->pu8IEs = kmemdup(ies, ies_len,
- GFP_KERNEL);
- if (!network_info->pu8IEs)
+ network_info->ies = kmemdup(ies, ies_len, GFP_KERNEL);
+ if (!network_info->ies)
return -ENOMEM;
}
- network_info->u16IEsLen = ies_len;
+ network_info->ies_len = ies_len;
}

*ret_network_info = network_info;
diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 07a2ef0..3dca840 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -90,8 +90,8 @@ struct network_info {
bool new_network;
u8 found;
u32 tsf_lo;
- u8 *pu8IEs;
- u16 u16IEsLen;
+ u8 *ies;
+ u16 ies_len;
void *pJoinParams;
tstrRSSI strRssi;
u64 u64Tsf;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index fa6ee92..781063d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1410,7 +1410,7 @@ done:
pstrRcvdNetworkInfo->buffer = NULL;

if (pstrNetworkInfo) {
- kfree(pstrNetworkInfo->pu8IEs);
+ kfree(pstrNetworkInfo->ies);
kfree(pstrNetworkInfo);
}

@@ -4270,8 +4270,8 @@ static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo)
u8 authTotalCount = 0;
u8 i, j;

- pu8IEs = ptstrNetworkInfo->pu8IEs;
- u16IEsLen = ptstrNetworkInfo->u16IEsLen;
+ pu8IEs = ptstrNetworkInfo->ies;
+ u16IEsLen = ptstrNetworkInfo->ies_len;

pNewJoinBssParam = kzalloc(sizeof(struct join_bss_param), GFP_KERNEL);
if (pNewJoinBssParam) {
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 2d3a2d3..c9acacc 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -194,9 +194,9 @@ static void clear_shadow_scan(void)
del_timer_sync(&hAgingTimer);

for (i = 0; i < last_scanned_cnt; i++) {
- if (last_scanned_shadow[last_scanned_cnt].pu8IEs) {
- kfree(last_scanned_shadow[i].pu8IEs);
- last_scanned_shadow[last_scanned_cnt].pu8IEs = NULL;
+ if (last_scanned_shadow[last_scanned_cnt].ies) {
+ kfree(last_scanned_shadow[i].ies);
+ last_scanned_shadow[last_scanned_cnt].ies = NULL;
}

kfree(last_scanned_shadow[i].pJoinParams);
@@ -253,8 +253,8 @@ static void refresh_scan(void *user_void, u8 all, bool direct_scan)
network_info->u64Tsf,
network_info->cap_info,
network_info->beacon_period,
- (const u8 *)network_info->pu8IEs,
- (size_t)network_info->u16IEsLen,
+ (const u8 *)network_info->ies,
+ (size_t)network_info->ies_len,
(s32)rssi * 100,
GFP_KERNEL);
cfg80211_put_bss(wiphy, bss);
@@ -292,8 +292,8 @@ static void remove_network_from_shadow(unsigned long arg)
PRINT_D(CFG80211_DBG, "Network expired ScanShadow:%s\n",
last_scanned_shadow[i].ssid);

- kfree(last_scanned_shadow[i].pu8IEs);
- last_scanned_shadow[i].pu8IEs = NULL;
+ kfree(last_scanned_shadow[i].ies);
+ last_scanned_shadow[i].ies = NULL;

kfree(last_scanned_shadow[i].pJoinParams);

@@ -377,14 +377,14 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
last_scanned_shadow[ap_index].beacon_period = pstrNetworkInfo->beacon_period;
last_scanned_shadow[ap_index].dtim_period = pstrNetworkInfo->dtim_period;
last_scanned_shadow[ap_index].ch = pstrNetworkInfo->ch;
- last_scanned_shadow[ap_index].u16IEsLen = pstrNetworkInfo->u16IEsLen;
+ last_scanned_shadow[ap_index].ies_len = pstrNetworkInfo->ies_len;
last_scanned_shadow[ap_index].u64Tsf = pstrNetworkInfo->u64Tsf;
if (ap_found != -1)
- kfree(last_scanned_shadow[ap_index].pu8IEs);
- last_scanned_shadow[ap_index].pu8IEs =
- kmalloc(pstrNetworkInfo->u16IEsLen, GFP_KERNEL);
- memcpy(last_scanned_shadow[ap_index].pu8IEs,
- pstrNetworkInfo->pu8IEs, pstrNetworkInfo->u16IEsLen);
+ kfree(last_scanned_shadow[ap_index].ies);
+ last_scanned_shadow[ap_index].ies = kmalloc(pstrNetworkInfo->ies_len,
+ GFP_KERNEL);
+ memcpy(last_scanned_shadow[ap_index].ies,
+ pstrNetworkInfo->ies, pstrNetworkInfo->ies_len);
last_scanned_shadow[ap_index].time_scan = jiffies;
last_scanned_shadow[ap_index].time_scan_cached = jiffies;
last_scanned_shadow[ap_index].found = 1;
@@ -451,8 +451,8 @@ static void CfgScanResult(enum scan_event scan_event,
network_info->u64Tsf,
network_info->cap_info,
network_info->beacon_period,
- (const u8 *)network_info->pu8IEs,
- (size_t)network_info->u16IEsLen,
+ (const u8 *)network_info->ies,
+ (size_t)network_info->ies_len,
(s32)network_info->rssi * 100,
GFP_KERNEL);
cfg80211_put_bss(wiphy, bss);
--
1.9.1


2016-02-04 09:32:30

by Glen Lee

[permalink] [raw]
Subject: [PATCH RESEND 50/70] staging: wilc1000: renames s8rssi of connect_resp_info structure

From: Leo Kim <[email protected]>

This patch renames s8rssi variable to rssi.

Signed-off-by: Leo Kim <[email protected]>
---
drivers/staging/wilc1000/coreconfigurator.c | 2 +-
drivers/staging/wilc1000/coreconfigurator.h | 2 +-
drivers/staging/wilc1000/host_interface.c | 6 +++---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +++++++-------
4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 0d0a4ec..1e8c56b 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -309,7 +309,7 @@ s32 wilc_parse_network_info(u8 *msg_buffer,
if (!network_info)
return -ENOMEM;

- network_info->s8rssi = wid_val[0];
+ network_info->rssi = wid_val[0];

msa = &wid_val[1];

diff --git a/drivers/staging/wilc1000/coreconfigurator.h b/drivers/staging/wilc1000/coreconfigurator.h
index 214b43b..e386e85 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -77,7 +77,7 @@ typedef struct {
} tstrRSSI;

struct network_info {
- s8 s8rssi;
+ s8 rssi;
u16 u16CapInfo;
u8 au8ssid[MAX_SSID_LEN];
u8 u8SsidLen;
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index c0b4f7b..f40b5a7 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -1368,10 +1368,10 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,
(pstrNetworkInfo->au8bssid)) {
if (memcmp(hif_drv->usr_scan_req.net_info[i].au8bssid,
pstrNetworkInfo->au8bssid, 6) == 0) {
- if (pstrNetworkInfo->s8rssi <= hif_drv->usr_scan_req.net_info[i].s8rssi) {
+ if (pstrNetworkInfo->rssi <= hif_drv->usr_scan_req.net_info[i].s8rssi) {
goto done;
} else {
- hif_drv->usr_scan_req.net_info[i].s8rssi = pstrNetworkInfo->s8rssi;
+ hif_drv->usr_scan_req.net_info[i].s8rssi = pstrNetworkInfo->rssi;
bNewNtwrkFound = false;
break;
}
@@ -1381,7 +1381,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif,

if (bNewNtwrkFound) {
if (hif_drv->usr_scan_req.rcvd_ch_cnt < MAX_NUM_SCANNED_NETWORKS) {
- hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].s8rssi = pstrNetworkInfo->s8rssi;
+ hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].s8rssi = pstrNetworkInfo->rssi;

if (hif_drv->usr_scan_req.net_info[hif_drv->usr_scan_req.rcvd_ch_cnt].au8bssid &&
pstrNetworkInfo->au8bssid) {
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index b22a48a..f0c6c9f 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -351,13 +351,13 @@ static void add_network_to_shadow(struct network_info *pstrNetworkInfo,
ap_index = ap_found;
}
rssi_index = last_scanned_shadow[ap_index].strRssi.u8Index;
- last_scanned_shadow[ap_index].strRssi.as8RSSI[rssi_index++] = pstrNetworkInfo->s8rssi;
+ last_scanned_shadow[ap_index].strRssi.as8RSSI[rssi_index++] = pstrNetworkInfo->rssi;
if (rssi_index == NUM_RSSI) {
rssi_index = 0;
last_scanned_shadow[ap_index].strRssi.u8Full = 1;
}
last_scanned_shadow[ap_index].strRssi.u8Index = rssi_index;
- last_scanned_shadow[ap_index].s8rssi = pstrNetworkInfo->s8rssi;
+ last_scanned_shadow[ap_index].rssi = pstrNetworkInfo->rssi;
last_scanned_shadow[ap_index].u16CapInfo = pstrNetworkInfo->u16CapInfo;
last_scanned_shadow[ap_index].u8SsidLen = pstrNetworkInfo->u8SsidLen;
memcpy(last_scanned_shadow[ap_index].au8ssid,
@@ -403,8 +403,8 @@ static void CfgScanResult(enum scan_event scan_event,
return;

if (wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC &&
- (((s32)network_info->s8rssi * 100) < 0 ||
- ((s32)network_info->s8rssi * 100) > 100))
+ (((s32)network_info->rssi * 100) < 0 ||
+ ((s32)network_info->rssi * 100) > 100))
return;

if (network_info) {
@@ -415,7 +415,7 @@ static void CfgScanResult(enum scan_event scan_event,
return;

PRINT_INFO(CFG80211_DBG, "Network Info:: CHANNEL Frequency: %d, RSSI: %d, CapabilityInfo: %d,"
- "BeaconPeriod: %d\n", channel->center_freq, (((s32)network_info->s8rssi) * 100),
+ "BeaconPeriod: %d\n", channel->center_freq, (((s32)network_info->rssi) * 100),
network_info->u16CapInfo, network_info->u16BeaconPeriod);

if (network_info->bNewNetwork) {
@@ -428,7 +428,7 @@ static void CfgScanResult(enum scan_event scan_event,
if (!(memcmp("DIRECT-", network_info->au8ssid, 7))) {
bss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, network_info->au8bssid, network_info->u64Tsf, network_info->u16CapInfo,
network_info->u16BeaconPeriod, (const u8 *)network_info->pu8IEs,
- (size_t)network_info->u16IEsLen, (((s32)network_info->s8rssi) * 100), GFP_KERNEL);
+ (size_t)network_info->u16IEsLen, (((s32)network_info->rssi) * 100), GFP_KERNEL);
cfg80211_put_bss(wiphy, bss);
}
}
@@ -439,7 +439,7 @@ static void CfgScanResult(enum scan_event scan_event,
if (memcmp(last_scanned_shadow[i].au8bssid, network_info->au8bssid, 6) == 0) {
PRINT_D(CFG80211_DBG, "Update RSSI of %s\n", last_scanned_shadow[i].au8ssid);

- last_scanned_shadow[i].s8rssi = network_info->s8rssi;
+ last_scanned_shadow[i].rssi = network_info->rssi;
last_scanned_shadow[i].u32TimeRcvdInScan = jiffies;
break;
}
--
1.9.1