[PATCH 02/32] staging: wilc1000: fix argument name of host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes struct host_if_drv of host_int_add_ptk function
declaration from hWFIDrv to hif_drv.
With this change, first parameter of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index ee9c8fe..12deff4 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -311,7 +311,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv 
*hif_drv,
 int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
const u8 *key, u8 len, u8 index, u8 mode,
enum AUTHTYPE auth_type);
-int host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk,
+int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk,
 u8 u8PtkKeylen, const u8 *mac_addr,
 const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/32] staging: wilc1000: fix return type of host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes return type of host_int_add_ptk from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d5b7725..082450f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3207,12 +3207,12 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
return result;
 }
 
-s32 host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk,
+int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk,
 u8 u8PtkKeylen, const u8 *mac_addr,
 const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
u8 u8KeyLen = u8PtkKeylen;
u32 i;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 57e1d42..ee9c8fe 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -311,7 +311,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv 
*hif_drv,
 int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
const u8 *key, u8 len, u8 index, u8 mode,
enum AUTHTYPE auth_type);
-s32 host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk,
+int host_int_add_ptk(struct host_if_drv *hWFIDrv, const u8 *pu8Ptk,
 u8 u8PtkKeylen, const u8 *mac_addr,
 const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/32] staging: wilc1000: rename u8Ciphermode in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes u8Ciphermode to cipher_mode to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a8566ee..80a1442 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3210,7 +3210,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
 const u8 *rx_mic, const u8 *tx_mic,
-u8 mode, u8 u8Ciphermode, u8 u8Idx)
+u8 mode, u8 cipher_mode, u8 u8Idx)
 {
int result = 0;
struct host_if_msg msg;
@@ -3259,7 +3259,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 
msg.body.key_info.attr.wpa.key_len = u8KeyLen;
msg.body.key_info.attr.wpa.mac_addr = mac_addr;
-   msg.body.key_info.attr.wpa.mode = u8Ciphermode;
+   msg.body.key_info.attr.wpa.mode = cipher_mode;
msg.drv = hif_drv;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 5da584b..04ecf50 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -314,7 +314,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
 const u8 *rx_mic, const u8 *tx_mic,
-u8 mode, u8 u8Ciphermode, u8 u8Idx);
+u8 mode, u8 cipher_mode, u8 u8Idx);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
 s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/32] staging: wilc1000: rename pu8Ptk in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes pu8Ptk to ptk to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 082450f..d225dbf 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3207,7 +3207,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
return result;
 }
 
-int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk,
+int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 u8PtkKeylen, const u8 *mac_addr,
 const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx)
@@ -3240,7 +3240,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *pu8Ptk,
msg.body.key_info.action = ADDKEY;
 
msg.body.key_info.attr.wpa.key = kmalloc(u8PtkKeylen, GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.key, pu8Ptk, u8PtkKeylen);
+   memcpy(msg.body.key_info.attr.wpa.key, ptk, u8PtkKeylen);
 
if (pu8RxMic) {
memcpy(msg.body.key_info.attr.wpa.key + 16, pu8RxMic, 
RX_MIC_KEY_LEN);
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 12deff4..ae70dc5 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -311,7 +311,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv 
*hif_drv,
 int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
const u8 *key, u8 len, u8 index, u8 mode,
enum AUTHTYPE auth_type);
-int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *pu8Ptk,
+int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 u8PtkKeylen, const u8 *mac_addr,
 const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/32] staging: wilc1000: replace u32 with int

2015-11-07 Thread Chaehyun Lim
The data type of variable i changes u32 to int.
It is used as array index to print debug message so that it is better to
use data type of int.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index fedd099..a959f48 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3215,7 +3215,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
int result = 0;
struct host_if_msg msg;
u8 u8KeyLen = ptk_key_len;
-   u32 i;
+   int i;
 
if (!hif_drv) {
PRINT_ER("driver is null\n");
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/32] staging: wilc1000: rename u8PtkKeylen in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes u8PtkKeylen to ptk_key_len to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d225dbf..96a0a58 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3208,13 +3208,13 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
 }
 
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
-u8 u8PtkKeylen, const u8 *mac_addr,
+u8 ptk_key_len, const u8 *mac_addr,
 const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx)
 {
int result = 0;
struct host_if_msg msg;
-   u8 u8KeyLen = u8PtkKeylen;
+   u8 u8KeyLen = ptk_key_len;
u32 i;
 
if (!hif_drv) {
@@ -3239,8 +3239,8 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
if (mode == STATION_MODE)
msg.body.key_info.action = ADDKEY;
 
-   msg.body.key_info.attr.wpa.key = kmalloc(u8PtkKeylen, GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.key, ptk, u8PtkKeylen);
+   msg.body.key_info.attr.wpa.key = kmalloc(ptk_key_len, GFP_KERNEL);
+   memcpy(msg.body.key_info.attr.wpa.key, ptk, ptk_key_len);
 
if (pu8RxMic) {
memcpy(msg.body.key_info.attr.wpa.key + 16, pu8RxMic, 
RX_MIC_KEY_LEN);
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index ae70dc5..ae0e260 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -312,7 +312,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
const u8 *key, u8 len, u8 index, u8 mode,
enum AUTHTYPE auth_type);
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
-u8 u8PtkKeylen, const u8 *mac_addr,
+u8 ptk_key_len, const u8 *mac_addr,
 const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/32] staging: wilc1000: rename pu8TxMic in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes pu8TxMic to tx_mic to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 10 +-
 drivers/staging/wilc1000/host_interface.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 9616a61..a8566ee 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3209,7 +3209,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
 
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
-const u8 *rx_mic, const u8 *pu8TxMic,
+const u8 *rx_mic, const u8 *tx_mic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx)
 {
int result = 0;
@@ -3225,7 +3225,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
if (rx_mic)
u8KeyLen += RX_MIC_KEY_LEN;
 
-   if (pu8TxMic)
+   if (tx_mic)
u8KeyLen += TX_MIC_KEY_LEN;
 
memset(&msg, 0, sizeof(struct host_if_msg));
@@ -3249,11 +3249,11 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
PRINT_INFO(CFG80211_DBG, "PairwiseRx[%d] = 
%x\n", i, rx_mic[i]);
}
}
-   if (pu8TxMic) {
-   memcpy(msg.body.key_info.attr.wpa.key + 24, pu8TxMic, 
TX_MIC_KEY_LEN);
+   if (tx_mic) {
+   memcpy(msg.body.key_info.attr.wpa.key + 24, tx_mic, 
TX_MIC_KEY_LEN);
if (INFO) {
for (i = 0; i < TX_MIC_KEY_LEN; i++)
-   PRINT_INFO(CFG80211_DBG, "PairwiseTx[%d] = 
%x\n", i, pu8TxMic[i]);
+   PRINT_INFO(CFG80211_DBG, "PairwiseTx[%d] = 
%x\n", i, tx_mic[i]);
}
}
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 2ee9304..5da584b 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -313,7 +313,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
enum AUTHTYPE auth_type);
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
-const u8 *rx_mic, const u8 *pu8TxMic,
+const u8 *rx_mic, const u8 *tx_mic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/32] staging: wilc1000: use kmemdup in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes kmalloc followed by memcpy to kmemdup
The error checking is also added when kmemdup is failed.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index dd7e8ed..18623c7 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3239,8 +3239,9 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
if (mode == STATION_MODE)
msg.body.key_info.action = ADDKEY;
 
-   msg.body.key_info.attr.wpa.key = kmalloc(ptk_key_len, GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.key, ptk, ptk_key_len);
+   msg.body.key_info.attr.wpa.key = kmemdup(ptk, ptk_key_len, GFP_KERNEL);
+   if (!msg.body.key_info.attr.wpa.key)
+   return -ENOMEM;
 
if (rx_mic) {
memcpy(msg.body.key_info.attr.wpa.key + 16, rx_mic, 
RX_MIC_KEY_LEN);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/32] staging: wilc1000: rename u8Idx in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes u8Idx to index to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 80a1442..fedd099 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3210,7 +3210,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
 const u8 *rx_mic, const u8 *tx_mic,
-u8 mode, u8 cipher_mode, u8 u8Idx)
+u8 mode, u8 cipher_mode, u8 index)
 {
int result = 0;
struct host_if_msg msg;
@@ -3234,7 +3234,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
msg.body.key_info.type = WPA_PTK;
if (mode == AP_MODE) {
msg.body.key_info.action = ADDKEY_AP;
-   msg.body.key_info.attr.wpa.index = u8Idx;
+   msg.body.key_info.attr.wpa.index = index;
}
if (mode == STATION_MODE)
msg.body.key_info.action = ADDKEY;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 04ecf50..9238315 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -314,7 +314,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
 const u8 *rx_mic, const u8 *tx_mic,
-u8 mode, u8 cipher_mode, u8 u8Idx);
+u8 mode, u8 cipher_mode, u8 index);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
 s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/32] staging: wilc1000: fix argument name of host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes struct host_if_drv of host_int_add_rx_gtk function
declaration from hWFIDrv to hif_drv.
With this change, first argument of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 2f10598..5f1b20c 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -317,7 +317,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 
*ptk,
 u8 mode, u8 cipher_mode, u8 index);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
-int host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk,
+int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk,
u8 u8GtkKeylen, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/32] staging: wilc1000: rename pu8RxGtk in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes pu8RxGtk to rx_gtk to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 12b3f1d..b79383e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3273,7 +3273,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
return result;
 }
 
-int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk,
+int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 u8GtkKeylen, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
@@ -3312,7 +3312,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *pu8RxGtk,
msg.body.key_info.action = ADDKEY;
 
msg.body.key_info.attr.wpa.key = kmalloc(u8KeyLen, GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.key, pu8RxGtk, u8GtkKeylen);
+   memcpy(msg.body.key_info.attr.wpa.key, rx_gtk, u8GtkKeylen);
 
if (pu8RxMic)
memcpy(msg.body.key_info.attr.wpa.key + 16, pu8RxMic,
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 5f1b20c..51f51be 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -317,7 +317,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 
*ptk,
 u8 mode, u8 cipher_mode, u8 index);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
-int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk,
+int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 u8GtkKeylen, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/32] staging: wilc1000: fix return type of host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes return type of host_int_add_rx_gtk from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 18623c7..12b3f1d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3273,13 +3273,13 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
return result;
 }
 
-s32 host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk,
+int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *pu8RxGtk,
u8 u8GtkKeylen, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
u8 u8KeyLen = u8GtkKeylen;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 9238315..2f10598 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -317,7 +317,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 
*ptk,
 u8 mode, u8 cipher_mode, u8 index);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
-s32 host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk,
+int host_int_add_rx_gtk(struct host_if_drv *hWFIDrv, const u8 *pu8RxGtk,
u8 u8GtkKeylen, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/32] staging: wilc1000: rename u8KeyLen in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes u8KeyLen to key_len to avoid camelcase.
It is used as local variable in order to save pkt_key_len that is
argument of this function.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a959f48..dd7e8ed 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3214,7 +3214,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 {
int result = 0;
struct host_if_msg msg;
-   u8 u8KeyLen = ptk_key_len;
+   u8 key_len = ptk_key_len;
int i;
 
if (!hif_drv) {
@@ -3223,10 +3223,10 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
}
 
if (rx_mic)
-   u8KeyLen += RX_MIC_KEY_LEN;
+   key_len += RX_MIC_KEY_LEN;
 
if (tx_mic)
-   u8KeyLen += TX_MIC_KEY_LEN;
+   key_len += TX_MIC_KEY_LEN;
 
memset(&msg, 0, sizeof(struct host_if_msg));
 
@@ -3257,7 +3257,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
}
}
 
-   msg.body.key_info.attr.wpa.key_len = u8KeyLen;
+   msg.body.key_info.attr.wpa.key_len = key_len;
msg.body.key_info.attr.wpa.mac_addr = mac_addr;
msg.body.key_info.attr.wpa.mode = cipher_mode;
msg.drv = hif_drv;
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/32] staging: wilc1000: rename pu8RxMic in host_int_add_ptk

2015-11-07 Thread Chaehyun Lim
This patch changes pu8RxMic to rx_mic to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 10 +-
 drivers/staging/wilc1000/host_interface.h |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 96a0a58..9616a61 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3209,7 +3209,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv 
*hif_drv,
 
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
-const u8 *pu8RxMic, const u8 *pu8TxMic,
+const u8 *rx_mic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx)
 {
int result = 0;
@@ -3222,7 +3222,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
return -EFAULT;
}
 
-   if (pu8RxMic)
+   if (rx_mic)
u8KeyLen += RX_MIC_KEY_LEN;
 
if (pu8TxMic)
@@ -3242,11 +3242,11 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
msg.body.key_info.attr.wpa.key = kmalloc(ptk_key_len, GFP_KERNEL);
memcpy(msg.body.key_info.attr.wpa.key, ptk, ptk_key_len);
 
-   if (pu8RxMic) {
-   memcpy(msg.body.key_info.attr.wpa.key + 16, pu8RxMic, 
RX_MIC_KEY_LEN);
+   if (rx_mic) {
+   memcpy(msg.body.key_info.attr.wpa.key + 16, rx_mic, 
RX_MIC_KEY_LEN);
if (INFO) {
for (i = 0; i < RX_MIC_KEY_LEN; i++)
-   PRINT_INFO(CFG80211_DBG, "PairwiseRx[%d] = 
%x\n", i, pu8RxMic[i]);
+   PRINT_INFO(CFG80211_DBG, "PairwiseRx[%d] = 
%x\n", i, rx_mic[i]);
}
}
if (pu8TxMic) {
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index ae0e260..2ee9304 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -313,7 +313,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
enum AUTHTYPE auth_type);
 int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 *ptk,
 u8 ptk_key_len, const u8 *mac_addr,
-const u8 *pu8RxMic, const u8 *pu8TxMic,
+const u8 *rx_mic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx);
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/32] staging: wilc1000: rename u8KeyIdx in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes u8KeyIdx to index to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5c40d40..22fdca5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3274,7 +3274,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 }
 
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
-   u8 gtk_key_len, u8 u8KeyIdx,
+   u8 gtk_key_len, u8 index,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode)
@@ -3322,7 +3322,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
memcpy(msg.body.key_info.attr.wpa.key + 24, pu8TxMic,
   TX_MIC_KEY_LEN);
 
-   msg.body.key_info.attr.wpa.index = u8KeyIdx;
+   msg.body.key_info.attr.wpa.index = index;
msg.body.key_info.attr.wpa.key_len = u8KeyLen;
msg.body.key_info.attr.wpa.seq_len = u32KeyRSClen;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 6b7b05e..41ca349 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -318,7 +318,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 
*ptk,
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
-   u8 gtk_key_len, u8 u8KeyIdx,
+   u8 gtk_key_len, u8 index,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 18/32] staging: wilc1000: rename KeyRSC in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes KeyRSC to key_rsc to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 32d4606..b50e78d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3275,7 +3275,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
-   u32 key_rsc_len, const u8 *KeyRSC,
+   u32 key_rsc_len, const u8 *key_rsc,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode)
 {
@@ -3295,9 +3295,9 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
if (pu8TxMic)
u8KeyLen += TX_MIC_KEY_LEN;
 
-   if (KeyRSC) {
+   if (key_rsc) {
msg.body.key_info.attr.wpa.seq = kmalloc(key_rsc_len, 
GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.seq, KeyRSC, key_rsc_len);
+   memcpy(msg.body.key_info.attr.wpa.seq, key_rsc, key_rsc_len);
}
 
msg.id = HOST_IF_MSG_KEY;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index f75bfa1..66bb7d7 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -319,7 +319,7 @@ s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, 
const u8 *mac,
   u32 *pu32InactiveTime);
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
-   u32 key_rsc_len, const u8 *KeyRSC,
+   u32 key_rsc_len, const u8 *key_rsc,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode);
 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 17/32] staging: wilc1000: rename u32KeyRSClen in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes u32KeyRSClen to key_rsc_len to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 22fdca5..32d4606 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3275,7 +3275,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
-   u32 u32KeyRSClen, const u8 *KeyRSC,
+   u32 key_rsc_len, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode)
 {
@@ -3296,8 +3296,8 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
u8KeyLen += TX_MIC_KEY_LEN;
 
if (KeyRSC) {
-   msg.body.key_info.attr.wpa.seq = kmalloc(u32KeyRSClen, 
GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.seq, KeyRSC, u32KeyRSClen);
+   msg.body.key_info.attr.wpa.seq = kmalloc(key_rsc_len, 
GFP_KERNEL);
+   memcpy(msg.body.key_info.attr.wpa.seq, KeyRSC, key_rsc_len);
}
 
msg.id = HOST_IF_MSG_KEY;
@@ -3324,7 +3324,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
 
msg.body.key_info.attr.wpa.index = index;
msg.body.key_info.attr.wpa.key_len = u8KeyLen;
-   msg.body.key_info.attr.wpa.seq_len = u32KeyRSClen;
+   msg.body.key_info.attr.wpa.seq_len = key_rsc_len;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 41ca349..f75bfa1 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -319,7 +319,7 @@ s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, 
const u8 *mac,
   u32 *pu32InactiveTime);
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
-   u32 u32KeyRSClen, const u8 *KeyRSC,
+   u32 key_rsc_len, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode);
 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 22/32] staging: wilc1000: rename u8KeyLen in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes u8KeyLen to key_len to avoid camelcase.
It is used as local variable in order to save gtk_key_len that is
argument of this function.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 7b647ce..0028bed 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3281,7 +3281,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
 {
int result = 0;
struct host_if_msg msg;
-   u8 u8KeyLen = gtk_key_len;
+   u8 key_len = gtk_key_len;
 
if (!hif_drv) {
PRINT_ER("driver is null\n");
@@ -3290,10 +3290,10 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
memset(&msg, 0, sizeof(struct host_if_msg));
 
if (rx_mic)
-   u8KeyLen += RX_MIC_KEY_LEN;
+   key_len += RX_MIC_KEY_LEN;
 
if (tx_mic)
-   u8KeyLen += TX_MIC_KEY_LEN;
+   key_len += TX_MIC_KEY_LEN;
 
if (key_rsc) {
msg.body.key_info.attr.wpa.seq = kmalloc(key_rsc_len, 
GFP_KERNEL);
@@ -3311,7 +3311,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
if (mode == STATION_MODE)
msg.body.key_info.action = ADDKEY;
 
-   msg.body.key_info.attr.wpa.key = kmalloc(u8KeyLen, GFP_KERNEL);
+   msg.body.key_info.attr.wpa.key = kmalloc(key_len, GFP_KERNEL);
memcpy(msg.body.key_info.attr.wpa.key, rx_gtk, gtk_key_len);
 
if (rx_mic)
@@ -3323,7 +3323,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
   TX_MIC_KEY_LEN);
 
msg.body.key_info.attr.wpa.index = index;
-   msg.body.key_info.attr.wpa.key_len = u8KeyLen;
+   msg.body.key_info.attr.wpa.key_len = key_len;
msg.body.key_info.attr.wpa.seq_len = key_rsc_len;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 21/32] staging: wilc1000: rename u8Ciphermode in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes u8Ciphermode to cipher_mode to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 7ca924a..7b647ce 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3277,7 +3277,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
u32 key_rsc_len, const u8 *key_rsc,
const u8 *rx_mic, const u8 *tx_mic,
-   u8 mode, u8 u8Ciphermode)
+   u8 mode, u8 cipher_mode)
 {
int result = 0;
struct host_if_msg msg;
@@ -3306,7 +3306,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
 
if (mode == AP_MODE) {
msg.body.key_info.action = ADDKEY_AP;
-   msg.body.key_info.attr.wpa.mode = u8Ciphermode;
+   msg.body.key_info.attr.wpa.mode = cipher_mode;
}
if (mode == STATION_MODE)
msg.body.key_info.action = ADDKEY;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index e25f838..da81b92 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -321,7 +321,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const 
u8 *rx_gtk,
u8 gtk_key_len, u8 index,
u32 key_rsc_len, const u8 *key_rsc,
const u8 *rx_mic, const u8 *tx_mic,
-   u8 mode, u8 u8Ciphermode);
+   u8 mode, u8 cipher_mode);
 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
u8 *pu8TxGtk, u8 u8KeyIdx);
 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 24/32] staging: wilc1000: remove host_int_add_tx_gtk declaration

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_add_tx_gtk declaration that is defined in
host_interface.h file. It can not find any host_int_add_tx_gtk
function definition in this driver so just remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index da81b92..91fbfa6 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -322,8 +322,6 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const 
u8 *rx_gtk,
u32 key_rsc_len, const u8 *key_rsc,
const u8 *rx_mic, const u8 *tx_mic,
u8 mode, u8 cipher_mode);
-s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
-   u8 *pu8TxGtk, u8 u8KeyIdx);
 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
struct host_if_pmkid_attr *pu8PmkidInfoArray);
 s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 20/32] staging: wilc1000: rename pu8TxMic in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes pu8TxMic to tx_mic to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index df364dc..7ca924a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3276,7 +3276,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
u32 key_rsc_len, const u8 *key_rsc,
-   const u8 *rx_mic, const u8 *pu8TxMic,
+   const u8 *rx_mic, const u8 *tx_mic,
u8 mode, u8 u8Ciphermode)
 {
int result = 0;
@@ -3292,7 +3292,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
if (rx_mic)
u8KeyLen += RX_MIC_KEY_LEN;
 
-   if (pu8TxMic)
+   if (tx_mic)
u8KeyLen += TX_MIC_KEY_LEN;
 
if (key_rsc) {
@@ -3318,8 +3318,8 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
memcpy(msg.body.key_info.attr.wpa.key + 16, rx_mic,
   RX_MIC_KEY_LEN);
 
-   if (pu8TxMic)
-   memcpy(msg.body.key_info.attr.wpa.key + 24, pu8TxMic,
+   if (tx_mic)
+   memcpy(msg.body.key_info.attr.wpa.key + 24, tx_mic,
   TX_MIC_KEY_LEN);
 
msg.body.key_info.attr.wpa.index = index;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 42c8749..e25f838 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -320,7 +320,7 @@ s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, 
const u8 *mac,
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
u32 key_rsc_len, const u8 *key_rsc,
-   const u8 *rx_mic, const u8 *pu8TxMic,
+   const u8 *rx_mic, const u8 *tx_mic,
u8 mode, u8 u8Ciphermode);
 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
u8 *pu8TxGtk, u8 u8KeyIdx);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 25/32] staging: wilc1000: remove host_int_get_pmkid_info

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_get_pmkid_info function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 14 --
 drivers/staging/wilc1000/host_interface.h |  2 --
 2 files changed, 16 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 51b6ddb..6015582 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3373,20 +3373,6 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hif_drv, 
struct host_if_pmkid_at
return result;
 }
 
-s32 host_int_get_pmkid_info(struct host_if_drv *hif_drv,
-   u8 *pu8PmkidInfoArray,
-   u32 u32PmkidInfoLen)
-{
-   struct wid wid;
-
-   wid.id = (u16)WID_PMKID_INFO;
-   wid.type = WID_STR;
-   wid.size = u32PmkidInfoLen;
-   wid.val = pu8PmkidInfoArray;
-
-   return 0;
-}
-
 s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hif_drv,
 u8 *pu8PassPhrase,
 u8 u8Psklength)
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 91fbfa6..dd5a14a 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -324,8 +324,6 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const 
u8 *rx_gtk,
u8 mode, u8 cipher_mode);
 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
struct host_if_pmkid_attr *pu8PmkidInfoArray);
-s32 host_int_get_pmkid_info(struct host_if_drv *hWFIDrv, u8 *pu8PmkidInfoArray,
-   u32 u32PmkidInfoLen);
 s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
 u8 *pu8PassPhrase,
 u8 u8Psklength);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 23/32] staging: wilc1000: use kmemdup in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes kmalloc followed by memcpy to kmemdup.
The error checking is also added when kmemdup is failed.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 14 ++
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0028bed..51b6ddb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3296,8 +3296,11 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
key_len += TX_MIC_KEY_LEN;
 
if (key_rsc) {
-   msg.body.key_info.attr.wpa.seq = kmalloc(key_rsc_len, 
GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.seq, key_rsc, key_rsc_len);
+   msg.body.key_info.attr.wpa.seq = kmemdup(key_rsc,
+key_rsc_len,
+GFP_KERNEL);
+   if (!msg.body.key_info.attr.wpa.seq)
+   return -ENOMEM;
}
 
msg.id = HOST_IF_MSG_KEY;
@@ -3311,8 +3314,11 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
if (mode == STATION_MODE)
msg.body.key_info.action = ADDKEY;
 
-   msg.body.key_info.attr.wpa.key = kmalloc(key_len, GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.key, rx_gtk, gtk_key_len);
+   msg.body.key_info.attr.wpa.key = kmemdup(rx_gtk,
+key_len,
+GFP_KERNEL);
+   if (!msg.body.key_info.attr.wpa.key)
+   return -ENOMEM;
 
if (rx_mic)
memcpy(msg.body.key_info.attr.wpa.key + 16, rx_mic,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 28/32] staging: wilc1000: remove host_int_set_start_scan_req

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_set_start_scan_req function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so that
just remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 12 
 drivers/staging/wilc1000/host_interface.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index f7bbad0..174cb6a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3413,18 +3413,6 @@ s32 host_int_set_MacAddress(struct host_if_drv *hif_drv, 
u8 *pu8MacAddress)
return result;
 }
 
-s32 host_int_set_start_scan_req(struct host_if_drv *hif_drv, u8 scanSource)
-{
-   struct wid wid;
-
-   wid.id = (u16)WID_START_SCAN_REQ;
-   wid.type = WID_CHAR;
-   wid.val = (s8 *)&scanSource;
-   wid.size = sizeof(char);
-
-   return 0;
-}
-
 s32 host_int_get_start_scan_req(struct host_if_drv *hif_drv, u8 *pu8ScanSource)
 {
struct wid wid;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 976067a..14ce397 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -327,7 +327,6 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
 s32 hif_get_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 int host_int_wait_msg_queue_idle(void);
-s32 host_int_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
 s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 
*pu8ScanSource);
 s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
  const u8 *pu8ssid, size_t ssidLen,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 27/32] staging: wilc1000: remove host_int_get_RSNAConfigPSKPassPhrase

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_get_RSNAConfigPSKPassPhrase function
definition and declaration that is defined at host_interface.c and
host_interface.h. This function is defined but not used anywhere in this
driver so just remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 13 -
 drivers/staging/wilc1000/host_interface.h |  2 --
 2 files changed, 15 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index fb6f353..f7bbad0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3413,19 +3413,6 @@ s32 host_int_set_MacAddress(struct host_if_drv *hif_drv, 
u8 *pu8MacAddress)
return result;
 }
 
-s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hif_drv,
-u8 *pu8PassPhrase, u8 u8Psklength)
-{
-   struct wid wid;
-
-   wid.id = (u16)WID_11I_PSK;
-   wid.type = WID_STR;
-   wid.size = u8Psklength;
-   wid.val = pu8PassPhrase;
-
-   return 0;
-}
-
 s32 host_int_set_start_scan_req(struct host_if_drv *hif_drv, u8 scanSource)
 {
struct wid wid;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 8113d76..976067a 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -324,8 +324,6 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const 
u8 *rx_gtk,
u8 mode, u8 cipher_mode);
 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
struct host_if_pmkid_attr *pu8PmkidInfoArray);
-s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
-u8 *pu8PassPhrase, u8 u8Psklength);
 s32 hif_get_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 int host_int_wait_msg_queue_idle(void);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 29/32] staging: wilc1000: remove host_int_get_start_scan_req

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_get_start_scan_req function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 12 
 drivers/staging/wilc1000/host_interface.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 174cb6a..0575345 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3413,18 +3413,6 @@ s32 host_int_set_MacAddress(struct host_if_drv *hif_drv, 
u8 *pu8MacAddress)
return result;
 }
 
-s32 host_int_get_start_scan_req(struct host_if_drv *hif_drv, u8 *pu8ScanSource)
-{
-   struct wid wid;
-
-   wid.id = (u16)WID_START_SCAN_REQ;
-   wid.type = WID_CHAR;
-   wid.val = (s8 *)pu8ScanSource;
-   wid.size = sizeof(char);
-
-   return 0;
-}
-
 s32 host_int_set_join_req(struct host_if_drv *hif_drv, u8 *pu8bssid,
  const u8 *pu8ssid, size_t ssidLen,
  const u8 *pu8IEs, size_t IEsLen,
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 14ce397..52622df 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -327,7 +327,6 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
 s32 hif_get_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 s32 host_int_set_MacAddress(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
 int host_int_wait_msg_queue_idle(void);
-s32 host_int_get_start_scan_req(struct host_if_drv *hWFIDrv, u8 
*pu8ScanSource);
 s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 *pu8bssid,
  const u8 *pu8ssid, size_t ssidLen,
  const u8 *pu8IEs, size_t IEsLen,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/32] staging: wilc1000: rename u8GtkKeylen in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes u8GtkKeylen to gtk_key_len to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index b79383e..5c40d40 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3274,14 +3274,14 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 }
 
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
-   u8 u8GtkKeylen, u8 u8KeyIdx,
+   u8 gtk_key_len, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode)
 {
int result = 0;
struct host_if_msg msg;
-   u8 u8KeyLen = u8GtkKeylen;
+   u8 u8KeyLen = gtk_key_len;
 
if (!hif_drv) {
PRINT_ER("driver is null\n");
@@ -3312,7 +3312,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
msg.body.key_info.action = ADDKEY;
 
msg.body.key_info.attr.wpa.key = kmalloc(u8KeyLen, GFP_KERNEL);
-   memcpy(msg.body.key_info.attr.wpa.key, rx_gtk, u8GtkKeylen);
+   memcpy(msg.body.key_info.attr.wpa.key, rx_gtk, gtk_key_len);
 
if (pu8RxMic)
memcpy(msg.body.key_info.attr.wpa.key + 16, pu8RxMic,
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 51f51be..6b7b05e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -318,7 +318,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const u8 
*ptk,
 s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, const u8 *mac,
   u32 *pu32InactiveTime);
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
-   u8 u8GtkKeylen, u8 u8KeyIdx,
+   u8 gtk_key_len, u8 u8KeyIdx,
u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 19/32] staging: wilc1000: rename pu8RxMic in host_int_add_rx_gtk

2015-11-07 Thread Chaehyun Lim
This patch changes pu8RxMic to rx_mic to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index b50e78d..df364dc 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3276,7 +3276,7 @@ int host_int_add_ptk(struct host_if_drv *hif_drv, const 
u8 *ptk,
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
u32 key_rsc_len, const u8 *key_rsc,
-   const u8 *pu8RxMic, const u8 *pu8TxMic,
+   const u8 *rx_mic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode)
 {
int result = 0;
@@ -3289,7 +3289,7 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
}
memset(&msg, 0, sizeof(struct host_if_msg));
 
-   if (pu8RxMic)
+   if (rx_mic)
u8KeyLen += RX_MIC_KEY_LEN;
 
if (pu8TxMic)
@@ -3314,8 +3314,8 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, 
const u8 *rx_gtk,
msg.body.key_info.attr.wpa.key = kmalloc(u8KeyLen, GFP_KERNEL);
memcpy(msg.body.key_info.attr.wpa.key, rx_gtk, gtk_key_len);
 
-   if (pu8RxMic)
-   memcpy(msg.body.key_info.attr.wpa.key + 16, pu8RxMic,
+   if (rx_mic)
+   memcpy(msg.body.key_info.attr.wpa.key + 16, rx_mic,
   RX_MIC_KEY_LEN);
 
if (pu8TxMic)
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 66bb7d7..42c8749 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -320,7 +320,7 @@ s32 host_int_get_inactive_time(struct host_if_drv *hWFIDrv, 
const u8 *mac,
 int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const u8 *rx_gtk,
u8 gtk_key_len, u8 index,
u32 key_rsc_len, const u8 *key_rsc,
-   const u8 *pu8RxMic, const u8 *pu8TxMic,
+   const u8 *rx_mic, const u8 *pu8TxMic,
u8 mode, u8 u8Ciphermode);
 s32 host_int_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
u8 *pu8TxGtk, u8 u8KeyIdx);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 32/32] staging: wilc1000: remove host_int_get_rx_power_level

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_get_rx_power_level function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 14 --
 drivers/staging/wilc1000/host_interface.h |  3 ---
 2 files changed, 17 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index ff15179..5bf9a55 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3560,20 +3560,6 @@ s32 host_int_get_assoc_res_info(struct host_if_drv 
*hif_drv,
return result;
 }
 
-s32 host_int_get_rx_power_level(struct host_if_drv *hif_drv,
-   u8 *pu8RxPowerLevel,
-   u32 u32RxPowerLevelLen)
-{
-   struct wid wid;
-
-   wid.id = (u16)WID_RX_POWER_LEVEL;
-   wid.type = WID_STR;
-   wid.val = pu8RxPowerLevel;
-   wid.size = u32RxPowerLevelLen;
-
-   return 0;
-}
-
 int host_int_set_mac_chnl_num(struct host_if_drv *hif_drv, u8 channel)
 {
int result;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 8870458..c01f441 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -339,9 +339,6 @@ s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv,
u8 *pu8AssocRespInfo,
u32 u32MaxAssocRespInfoLen,
u32 *pu32RcvdAssocRespInfoLen);
-s32 host_int_get_rx_power_level(struct host_if_drv *hWFIDrv,
-   u8 *pu8RxPowerLevel,
-   u32 u32RxPowerLevelLen);
 int host_int_set_mac_chnl_num(struct host_if_drv *wfi_drv, u8 channel);
 s32 host_int_get_host_chnl_num(struct host_if_drv *hWFIDrv, u8 *pu8ChNo);
 s32 host_int_get_rssi(struct host_if_drv *hWFIDrv, s8 *ps8Rssi);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 26/32] staging: wilc1000: remove host_int_set_RSNAConfigPSKPassPhrase

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_set_RSNAConfigPSKPassPhrase function
definition and declaration that is defined at host_interface.c and
host_interface.h. This function is defined but not used anywhere in this
driver so just remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 16 
 drivers/staging/wilc1000/host_interface.h |  3 ---
 2 files changed, 19 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 6015582..fb6f353 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3373,22 +3373,6 @@ s32 host_int_set_pmkid_info(struct host_if_drv *hif_drv, 
struct host_if_pmkid_at
return result;
 }
 
-s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hif_drv,
-u8 *pu8PassPhrase,
-u8 u8Psklength)
-{
-   struct wid wid;
-
-   if ((u8Psklength > 7) && (u8Psklength < 65)) {
-   wid.id = (u16)WID_11I_PSK;
-   wid.type = WID_STR;
-   wid.val = pu8PassPhrase;
-   wid.size = u8Psklength;
-   }
-
-   return 0;
-}
-
 s32 hif_get_mac_address(struct host_if_drv *hif_drv, u8 *pu8MacAddress)
 {
s32 result = 0;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index dd5a14a..8113d76 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -324,9 +324,6 @@ int host_int_add_rx_gtk(struct host_if_drv *hif_drv, const 
u8 *rx_gtk,
u8 mode, u8 cipher_mode);
 s32 host_int_set_pmkid_info(struct host_if_drv *hWFIDrv,
struct host_if_pmkid_attr *pu8PmkidInfoArray);
-s32 host_int_set_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
-u8 *pu8PassPhrase,
-u8 u8Psklength);
 s32 host_int_get_RSNAConfigPSKPassPhrase(struct host_if_drv *hWFIDrv,
 u8 *pu8PassPhrase, u8 u8Psklength);
 s32 hif_get_mac_address(struct host_if_drv *hWFIDrv, u8 *pu8MacAddress);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 30/32] staging: wilc1000: remove host_int_disconnect_station

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_disconnect_station function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere so just remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 12 
 drivers/staging/wilc1000/host_interface.h |  1 -
 2 files changed, 13 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0575345..676b3c7 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3529,18 +3529,6 @@ s32 host_int_disconnect(struct host_if_drv *hif_drv, u16 
u16ReasonCode)
return result;
 }
 
-s32 host_int_disconnect_station(struct host_if_drv *hif_drv, u8 assoc_id)
-{
-   struct wid wid;
-
-   wid.id = (u16)WID_DISCONNECT;
-   wid.type = WID_CHAR;
-   wid.val = (s8 *)&assoc_id;
-   wid.size = sizeof(char);
-
-   return 0;
-}
-
 s32 host_int_get_assoc_req_info(struct host_if_drv *hif_drv,
u8 *pu8AssocReqInfo,
u32 u32AssocReqInfoLen)
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 52622df..e51a563 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -335,7 +335,6 @@ s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 
*pu8bssid,
  u8 u8channel, void *pJoinParams);
 s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv);
 s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
-s32 host_int_disconnect_station(struct host_if_drv *hWFIDrv, u8 assoc_id);
 s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv,
u8 *pu8AssocReqInfo,
u32 u32AssocReqInfoLen);
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 31/32] staging: wilc1000: remove host_int_get_assoc_req_info

2015-11-07 Thread Chaehyun Lim
This patch removes host_int_get_assoc_req_info function definition and
declaration that is defined at host_interface.c and host_interface.h.
This function is defined but not used anywhere in this driver so just
remove it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 14 --
 drivers/staging/wilc1000/host_interface.h |  3 ---
 2 files changed, 17 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 676b3c7..ff15179 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3529,20 +3529,6 @@ s32 host_int_disconnect(struct host_if_drv *hif_drv, u16 
u16ReasonCode)
return result;
 }
 
-s32 host_int_get_assoc_req_info(struct host_if_drv *hif_drv,
-   u8 *pu8AssocReqInfo,
-   u32 u32AssocReqInfoLen)
-{
-   struct wid wid;
-
-   wid.id = (u16)WID_ASSOC_REQ_INFO;
-   wid.type = WID_STR;
-   wid.val = pu8AssocReqInfo;
-   wid.size = u32AssocReqInfoLen;
-
-   return 0;
-}
-
 s32 host_int_get_assoc_res_info(struct host_if_drv *hif_drv,
u8 *pu8AssocRespInfo,
u32 u32MaxAssocRespInfoLen,
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index e51a563..8870458 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -335,9 +335,6 @@ s32 host_int_set_join_req(struct host_if_drv *hWFIDrv, u8 
*pu8bssid,
  u8 u8channel, void *pJoinParams);
 s32 host_int_flush_join_req(struct host_if_drv *hWFIDrv);
 s32 host_int_disconnect(struct host_if_drv *hWFIDrv, u16 u16ReasonCode);
-s32 host_int_get_assoc_req_info(struct host_if_drv *hWFIDrv,
-   u8 *pu8AssocReqInfo,
-   u32 u32AssocReqInfoLen);
 s32 host_int_get_assoc_res_info(struct host_if_drv *hWFIDrv,
u8 *pu8AssocRespInfo,
u32 u32MaxAssocRespInfoLen,
-- 
2.6.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/13] staging: wilc1000: fix return type of wilc_add_rx_gtk declaration

2015-12-21 Thread Chaehyun Lim
This patch changes return type of wilc_add_rx_gtk declaration from s32
to int. The return type of this function declaration and definition
should be same as data type of int.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 7e89776..02c10171 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -317,7 +317,7 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 
ptk_key_len,
 u8 mode, u8 cipher_mode, u8 index);
 s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
   u32 *pu32InactiveTime);
-s32 wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *pu8RxGtk, u8 u8GtkKeylen,
+int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *pu8RxGtk, u8 u8GtkKeylen,
u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode,
u8 u8Ciphermode);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/13] staging: wilc1000: match argument name of wilc_add_ptk declaration

2015-12-21 Thread Chaehyun Lim
Some arguments name of wilc_add_pkt declaration is different to those of
this function definition. It is changed as same name of this function
declaration and definition.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index be1536a..7e89776 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -312,9 +312,9 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 
*key, u8 len,
 u8 index);
 int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
u8 index, u8 mode, enum AUTHTYPE auth_type);
-int wilc_add_ptk(struct wilc_vif *vif, const u8 *pu8Ptk, u8 u8PtkKeylen,
-const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic,
-u8 mode, u8 u8Ciphermode, u8 u8Idx);
+int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len,
+const u8 *mac_addr, const u8 *rx_mic, const u8 *tx_mic,
+u8 mode, u8 cipher_mode, u8 index);
 s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
   u32 *pu32InactiveTime);
 s32 wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *pu8RxGtk, u8 u8GtkKeylen,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/13] staging: wilc1000: fix return type of wilc_add_pkt declaration

2015-12-21 Thread Chaehyun Lim
This patch changes return type of wilc_add_pkt declaration from s32 to
int. The return type of this function declaration and definition should
be same as data type of int.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 8faac27..be1536a 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -312,7 +312,7 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 
*key, u8 len,
 u8 index);
 int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len,
u8 index, u8 mode, enum AUTHTYPE auth_type);
-s32 wilc_add_ptk(struct wilc_vif *vif, const u8 *pu8Ptk, u8 u8PtkKeylen,
+int wilc_add_ptk(struct wilc_vif *vif, const u8 *pu8Ptk, u8 u8PtkKeylen,
 const u8 *mac_addr, const u8 *pu8RxMic, const u8 *pu8TxMic,
 u8 mode, u8 u8Ciphermode, u8 u8Idx);
 s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/13] staging: wilc1000: remove wilc_set_start_scan_req declaration

2015-12-21 Thread Chaehyun Lim
This patch deletes wilc_set_start_scan_req declaration. It is not find
wilc_set_start_scan_req definition in this driver.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index a21ca37..1e3f389 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -326,7 +326,6 @@ s32 wilc_set_pmkid_info(struct wilc_vif *vif,
 s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 int wilc_wait_msg_queue_idle(void);
-s32 wilc_set_start_scan_req(struct host_if_drv *hWFIDrv, u8 scanSource);
 s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/13] staging: wilc1000: replace u32 with int

2015-12-21 Thread Chaehyun Lim
The data type of variable i changes u32 to int.
It is used as array index to copy some data with memcpy function
so that it is better to use data type of int.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index c976c1f..3ad4b0e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3297,7 +3297,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
-   u32 i;
+   int i;
 
if (!hif_drv) {
PRINT_ER("driver is null\n");
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/13] staging: wilc1000: fix return type of wilc_get_mac_address

2015-12-21 Thread Chaehyun Lim
This patch changes return type of wilc_get_mac_address from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 485318f..affd1e6 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3325,9 +3325,9 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
return result;
 }
 
-s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
+int wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
 
memset(&msg, 0, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 675a4e1..6be4b14 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -323,7 +323,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, 
u8 gtk_key_len,
u8 cipher_mode);
 int wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pmkid);
-s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
+int wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 int wilc_wait_msg_queue_idle(void);
 s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/13] staging: wilc1000: rename pu8PmkidInfoArray in wilc_set_pmkid_info

2015-12-21 Thread Chaehyun Lim
This patch changes pu8PmkidInfoArray to pmkid to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3ad4b0e..485318f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3292,7 +3292,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 
*rx_gtk, u8 gtk_key_len,
 }
 
 int wilc_set_pmkid_info(struct wilc_vif *vif,
-   struct host_if_pmkid_attr *pu8PmkidInfoArray)
+   struct host_if_pmkid_attr *pmkid)
 {
int result = 0;
struct host_if_msg msg;
@@ -3311,11 +3311,11 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
msg.body.key_info.action = ADDKEY;
msg.vif = vif;
 
-   for (i = 0; i < pu8PmkidInfoArray->numpmkid; i++) {
+   for (i = 0; i < pmkid->numpmkid; i++) {
memcpy(msg.body.key_info.attr.pmkid.pmkidlist[i].bssid,
-  &pu8PmkidInfoArray->pmkidlist[i].bssid, ETH_ALEN);
+  &pmkid->pmkidlist[i].bssid, ETH_ALEN);
memcpy(msg.body.key_info.attr.pmkid.pmkidlist[i].pmkid,
-  &pu8PmkidInfoArray->pmkidlist[i].pmkid, PMKID_LEN);
+  &pmkid->pmkidlist[i].pmkid, PMKID_LEN);
}
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 3dfdc04..675a4e1 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -322,7 +322,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, 
u8 gtk_key_len,
const u8 *rx_mic, const u8 *tx_mic, u8 mode,
u8 cipher_mode);
 int wilc_set_pmkid_info(struct wilc_vif *vif,
-   struct host_if_pmkid_attr *pu8PmkidInfoArray);
+   struct host_if_pmkid_attr *pmkid);
 s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 int wilc_wait_msg_queue_idle(void);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/13] staging: wilc1000: remove wilc_add_tx_gtk declaration

2015-12-21 Thread Chaehyun Lim
This patch deletes wilc_add_tx_gtk declaration. It is not find
wilc_add_tx_gtk definition in this driver.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 6a5f3bd..a21ca37 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -321,8 +321,6 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, 
u8 gtk_key_len,
u8 index, u32 key_rsc_len, const u8 *key_rsc,
const u8 *rx_mic, const u8 *tx_mic, u8 mode,
u8 cipher_mode);
-s32 wilc_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
-   u8 *pu8TxGtk, u8 u8KeyIdx);
 s32 wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pu8PmkidInfoArray);
 s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/13] staging: wilc1000: match argument name of wilc_add_rx_gtk declaration

2015-12-21 Thread Chaehyun Lim
Some argument name of wilc_add_rx_gtk declaration is different to those
of this function definition. It is changed as same name of this function
declaration and definition.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.h | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 02c10171..6a5f3bd 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -317,10 +317,10 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 
ptk_key_len,
 u8 mode, u8 cipher_mode, u8 index);
 s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,
   u32 *pu32InactiveTime);
-int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *pu8RxGtk, u8 u8GtkKeylen,
-   u8 u8KeyIdx, u32 u32KeyRSClen, const u8 *KeyRSC,
-   const u8 *pu8RxMic, const u8 *pu8TxMic, u8 mode,
-   u8 u8Ciphermode);
+int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len,
+   u8 index, u32 key_rsc_len, const u8 *key_rsc,
+   const u8 *rx_mic, const u8 *tx_mic, u8 mode,
+   u8 cipher_mode);
 s32 wilc_add_tx_gtk(struct host_if_drv *hWFIDrv, u8 u8KeyLen,
u8 *pu8TxGtk, u8 u8KeyIdx);
 s32 wilc_set_pmkid_info(struct wilc_vif *vif,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/13] staging: wilc1000: fix return type of wilc_set_mac_address

2015-12-21 Thread Chaehyun Lim
This patch changes return type of wilc_set_mac_address from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 613c5a2..ed6f932 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3346,9 +3346,9 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
return result;
 }
 
-s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
+int wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
 
PRINT_D(GENERIC_DBG, "mac addr = %x:%x:%x\n", pu8MacAddress[0], 
pu8MacAddress[1], pu8MacAddress[2]);
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 76f90cd..337965f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -324,7 +324,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, 
u8 gtk_key_len,
 int wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pmkid);
 int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);
-s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
+int wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 int wilc_wait_msg_queue_idle(void);
 s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/13] staging: wilc1000: rename pu8MacAddress in wilc_get_mac_address

2015-12-21 Thread Chaehyun Lim
This patch changes pu8MacAddress to mac_addr to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index affd1e6..613c5a2 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3325,7 +3325,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
return result;
 }
 
-int wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
+int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr)
 {
int result = 0;
struct host_if_msg msg;
@@ -,7 +,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 
*pu8MacAddress)
memset(&msg, 0, sizeof(struct host_if_msg));
 
msg.id = HOST_IF_MSG_GET_MAC_ADDRESS;
-   msg.body.get_mac_info.mac_addr = pu8MacAddress;
+   msg.body.get_mac_info.mac_addr = mac_addr;
msg.vif = vif;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 6be4b14..76f90cd 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -323,7 +323,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, 
u8 gtk_key_len,
u8 cipher_mode);
 int wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pmkid);
-int wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
+int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 int wilc_wait_msg_queue_idle(void);
 s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/13] staging: wilc1000: rename pu8MacAddress in wilc_set_mac_address

2015-12-21 Thread Chaehyun Lim
This patch changes pu8MacAddress to mac_addr to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index ed6f932..78d26ee 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3346,16 +3346,16 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
return result;
 }
 
-int wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress)
+int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)
 {
int result = 0;
struct host_if_msg msg;
 
-   PRINT_D(GENERIC_DBG, "mac addr = %x:%x:%x\n", pu8MacAddress[0], 
pu8MacAddress[1], pu8MacAddress[2]);
+   PRINT_D(GENERIC_DBG, "mac addr = %x:%x:%x\n", mac_addr[0], mac_addr[1], 
mac_addr[2]);
 
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_MAC_ADDRESS;
-   memcpy(msg.body.set_mac_info.mac_addr, pu8MacAddress, ETH_ALEN);
+   memcpy(msg.body.set_mac_info.mac_addr, mac_addr, ETH_ALEN);
msg.vif = vif;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 337965f..13d253c 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -324,7 +324,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, 
u8 gtk_key_len,
 int wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pmkid);
 int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);
-int wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
+int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_wait_msg_queue_idle(void);
 s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/13] staging: wilc1000: fix return type of wilc_set_pmkid_info

2015-12-21 Thread Chaehyun Lim
This patch changes return type of wilc_set_pmkid_info from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8c77520..c976c1f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3291,10 +3291,10 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 
*rx_gtk, u8 gtk_key_len,
return result;
 }
 
-s32 wilc_set_pmkid_info(struct wilc_vif *vif,
+int wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pu8PmkidInfoArray)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
u32 i;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 1e3f389..3dfdc04 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -321,7 +321,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, 
u8 gtk_key_len,
u8 index, u32 key_rsc_len, const u8 *key_rsc,
const u8 *rx_mic, const u8 *tx_mic, u8 mode,
u8 cipher_mode);
-s32 wilc_set_pmkid_info(struct wilc_vif *vif,
+int wilc_set_pmkid_info(struct wilc_vif *vif,
struct host_if_pmkid_attr *pu8PmkidInfoArray);
 s32 wilc_get_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
 s32 wilc_set_mac_address(struct wilc_vif *vif, u8 *pu8MacAddress);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/21] staging: wilc1000: rename pu8IEs in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames pu8IEs to ies to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 4730b60..bf1597c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3366,7 +3366,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
 }
 
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
- size_t ssid_len, const u8 *pu8IEs, size_t IEsLen,
+ size_t ssid_len, const u8 *ies, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams)
@@ -3408,10 +3408,10 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
memcpy(msg.body.con_info.ssid, ssid, ssid_len);
}
 
-   if (pu8IEs) {
+   if (ies) {
msg.body.con_info.ies_len = IEsLen;
msg.body.con_info.ies = kmalloc(IEsLen, GFP_KERNEL);
-   memcpy(msg.body.con_info.ies, pu8IEs, IEsLen);
+   memcpy(msg.body.con_info.ies, ies, IEsLen);
}
if (hif_drv->hif_state < HOST_IF_CONNECTING)
hif_drv->hif_state = HOST_IF_CONNECTING;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 4c4674b..44929a6 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -327,7 +327,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 
*mac_addr);
 int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_wait_msg_queue_idle(void);
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
- size_t ssid_len, const u8 *pu8IEs, size_t IEsLen,
+ size_t ssid_len, const u8 *ies, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 20/21] staging: wilc1000: fix return type of wilc_get_statistics

2015-12-23 Thread Chaehyun Lim
This patch changes return type of wilc_get_statistics from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e1e123b..732ea96 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3656,9 +3656,9 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)
return result;
 }
 
-s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics)
+int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
 
memset(&msg, 0, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 4506e0b..c64dc13d 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -365,7 +365,7 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 
u32SessionID);
 s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
-s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics);
+int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics);
 void wilc_resolve_disconnect_aberration(struct wilc_vif *vif);
 int wilc_get_vif_idx(struct wilc_vif *vif);
 
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/21] staging: wilc1000: rename pu8ssid in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames pu8ssid to ssid to remove pu8 prefix.
There is no need to add this prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index bb4b612..a146d4f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3365,7 +3365,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
return result;
 }
 
-int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid,
+int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
@@ -3402,10 +3402,10 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *pu8ssid,
memcpy(msg.body.con_info.bssid, bssid, 6);
}
 
-   if (pu8ssid) {
+   if (ssid) {
msg.body.con_info.ssid_len = ssidLen;
msg.body.con_info.ssid = kmalloc(ssidLen, GFP_KERNEL);
-   memcpy(msg.body.con_info.ssid, pu8ssid, ssidLen);
+   memcpy(msg.body.con_info.ssid, ssid, ssidLen);
}
 
if (pu8IEs) {
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 0e40c8f..5d6f807 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -326,7 +326,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
 int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_wait_msg_queue_idle(void);
-int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid,
+int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/21] staging: wilc1000: rename pu8bssid in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames pu8bssid to bssid to remove pu8 prefix.
There is no need to add this prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index b24697b..bb4b612 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3365,7 +3365,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
return result;
 }
 
-int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
+int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
@@ -3397,9 +3397,9 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, 
const u8 *pu8ssid,
msg.body.con_info.params = pJoinParams;
msg.vif = vif;
 
-   if (pu8bssid) {
+   if (bssid) {
msg.body.con_info.bssid = kmalloc(6, GFP_KERNEL);
-   memcpy(msg.body.con_info.bssid, pu8bssid, 6);
+   memcpy(msg.body.con_info.bssid, bssid, 6);
}
 
if (pu8ssid) {
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index eaf3a10..0e40c8f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -326,7 +326,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
 int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_wait_msg_queue_idle(void);
-int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
+int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/21] staging: wilc1000: rename tenuAuth_type in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames tenuAuth_type to auth_type to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 64189fa..d3c595e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3368,7 +3368,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
- u8 security, enum AUTHTYPE tenuAuth_type,
+ u8 security, enum AUTHTYPE auth_type,
  u8 u8channel, void *pJoinParams)
 {
int result = 0;
@@ -3390,7 +3390,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
msg.id = HOST_IF_MSG_CONNECT;
 
msg.body.con_info.security = security;
-   msg.body.con_info.auth_type = tenuAuth_type;
+   msg.body.con_info.auth_type = auth_type;
msg.body.con_info.ch = u8channel;
msg.body.con_info.result = connect_result;
msg.body.con_info.arg = user_arg;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index bb08e7f..3d5fea7 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -329,7 +329,7 @@ int wilc_wait_msg_queue_idle(void);
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
- u8 security, enum AUTHTYPE tenuAuth_type,
+ u8 security, enum AUTHTYPE auth_type,
  u8 u8channel, void *pJoinParams);
 int wilc_flush_join_req(struct wilc_vif *vif);
 s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/21] staging: wilc1000: use kmemdup instead of kmalloc and memcpy

2015-12-23 Thread Chaehyun Lim
This patch changes kmalloc/memcpy to kmemdup.
It is also added error checking to return -ENOMEM if kmemdup is failed.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 15 +--
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 79f3d9f..6518942 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3398,20 +3398,23 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
msg.vif = vif;
 
if (bssid) {
-   msg.body.con_info.bssid = kmalloc(6, GFP_KERNEL);
-   memcpy(msg.body.con_info.bssid, bssid, 6);
+   msg.body.con_info.bssid = kmemdup(bssid, 6, GFP_KERNEL);
+   if (!msg.body.con_info.bssid)
+   return -ENOMEM;
}
 
if (ssid) {
msg.body.con_info.ssid_len = ssid_len;
-   msg.body.con_info.ssid = kmalloc(ssid_len, GFP_KERNEL);
-   memcpy(msg.body.con_info.ssid, ssid, ssid_len);
+   msg.body.con_info.ssid = kmemdup(ssid, ssid_len, GFP_KERNEL);
+   if (!msg.body.con_info.ssid)
+   return -ENOMEM;
}
 
if (ies) {
msg.body.con_info.ies_len = ies_len;
-   msg.body.con_info.ies = kmalloc(ies_len, GFP_KERNEL);
-   memcpy(msg.body.con_info.ies, ies, ies_len);
+   msg.body.con_info.ies = kmemdup(ies, ies_len, GFP_KERNEL);
+   if (!msg.body.con_info.ies)
+   return -ENOMEM;
}
if (hif_drv->hif_state < HOST_IF_CONNECTING)
hif_drv->hif_state = HOST_IF_CONNECTING;
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/21] staging: wilc1000: fix return type of wilc_flush_join_req

2015-12-23 Thread Chaehyun Lim
This patch changes return type of wilc_flush_join_req from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 78d26ee..78d58e0 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3432,9 +3432,9 @@ s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, 
const u8 *pu8ssid,
return result;
 }
 
-s32 wilc_flush_join_req(struct wilc_vif *vif)
+int wilc_flush_join_req(struct wilc_vif *vif)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 13d253c..af85824 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -331,7 +331,7 @@ s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, 
const u8 *pu8ssid,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams);
-s32 wilc_flush_join_req(struct wilc_vif *vif);
+int wilc_flush_join_req(struct wilc_vif *vif);
 s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
 int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
 s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/21] staging: wilc1000: fix return type of wilc_disconnect

2015-12-23 Thread Chaehyun Lim
This patch changes return type of wilc_disconnect from s32 to int.
The result variable gets return value from wilc_disconnect that has
return type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 6518942..5ddf78d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3461,9 +3461,9 @@ int wilc_flush_join_req(struct wilc_vif *vif)
return result;
 }
 
-s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode)
+int wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 698d1b6..e8c556a 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -332,7 +332,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
  u8 security, enum AUTHTYPE auth_type,
  u8 channel, void *join_params);
 int wilc_flush_join_req(struct wilc_vif *vif);
-s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
+int wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
 int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
 s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
 s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/21] staging: wilc1000: rename pvUserArg in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames pvUserArg to user_arg to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d691c95..1190359 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3367,7 +3367,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
 
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
- wilc_connect_result connect_result, void *pvUserArg,
+ wilc_connect_result connect_result, void *user_arg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams)
 {
@@ -3393,7 +3393,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
msg.body.con_info.auth_type = tenuAuth_type;
msg.body.con_info.ch = u8channel;
msg.body.con_info.result = connect_result;
-   msg.body.con_info.arg = pvUserArg;
+   msg.body.con_info.arg = user_arg;
msg.body.con_info.params = pJoinParams;
msg.vif = vif;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index b426132..9e66d5e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -328,7 +328,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr);
 int wilc_wait_msg_queue_idle(void);
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
- wilc_connect_result connect_result, void *pvUserArg,
+ wilc_connect_result connect_result, void *user_arg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams);
 int wilc_flush_join_req(struct wilc_vif *vif);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/21] staging: wilc1000: rename ssidLen in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames ssidLen to ssid_len to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a146d4f..4730b60 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3366,7 +3366,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
 }
 
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
- size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
+ size_t ssid_len, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams)
@@ -3403,9 +3403,9 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
}
 
if (ssid) {
-   msg.body.con_info.ssid_len = ssidLen;
-   msg.body.con_info.ssid = kmalloc(ssidLen, GFP_KERNEL);
-   memcpy(msg.body.con_info.ssid, ssid, ssidLen);
+   msg.body.con_info.ssid_len = ssid_len;
+   msg.body.con_info.ssid = kmalloc(ssid_len, GFP_KERNEL);
+   memcpy(msg.body.con_info.ssid, ssid, ssid_len);
}
 
if (pu8IEs) {
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 5d6f807..4c4674b 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -327,7 +327,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 
*mac_addr);
 int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_wait_msg_queue_idle(void);
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
- size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
+ size_t ssid_len, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/21] staging: wilc1000: rename u16ReasonCode in wilc_disconnect

2015-12-23 Thread Chaehyun Lim
This patch renames u16ReasonCode to reason_code to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5ddf78d..6e5bccc 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3461,7 +3461,7 @@ int wilc_flush_join_req(struct wilc_vif *vif)
return result;
 }
 
-int wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode)
+int wilc_disconnect(struct wilc_vif *vif, u16 reason_code)
 {
int result = 0;
struct host_if_msg msg;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index e8c556a..fa5d292 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -332,7 +332,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
  u8 security, enum AUTHTYPE auth_type,
  u8 channel, void *join_params);
 int wilc_flush_join_req(struct wilc_vif *vif);
-int wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
+int wilc_disconnect(struct wilc_vif *vif, u16 reason_code);
 int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
 s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
 s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 18/21] staging: wilc1000: fix return type of wilc_get_rssi

2015-12-23 Thread Chaehyun Lim
This patch changes return type of wilc_get_rssi from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 724b4bd..c059e6d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3628,9 +3628,9 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 
*mac,
return result;
 }
 
-s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi)
+int wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 7ac85f2..51ec72c 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -334,7 +334,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
 int wilc_flush_join_req(struct wilc_vif *vif);
 int wilc_disconnect(struct wilc_vif *vif, u16 reason_code);
 int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
-s32 wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
+int wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
 s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
  u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs,
  size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/21] staging: wilc1000: fix return type of wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch changes return type of wilc_set_join_req from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 78d58e0..b24697b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3365,13 +3365,13 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
return result;
 }
 
-s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
+int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index af85824..eaf3a10 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -326,7 +326,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,
 int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_wait_msg_queue_idle(void);
-s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
+int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,
  size_t ssidLen, const u8 *pu8IEs, size_t IEsLen,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/21] staging: wilc1000: rename IEsLen in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames IEsLen to ies_len to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index bf1597c..4421bab 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3366,7 +3366,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
 }
 
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
- size_t ssid_len, const u8 *ies, size_t IEsLen,
+ size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams)
@@ -3409,9 +3409,9 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
}
 
if (ies) {
-   msg.body.con_info.ies_len = IEsLen;
-   msg.body.con_info.ies = kmalloc(IEsLen, GFP_KERNEL);
-   memcpy(msg.body.con_info.ies, ies, IEsLen);
+   msg.body.con_info.ies_len = ies_len;
+   msg.body.con_info.ies = kmalloc(ies_len, GFP_KERNEL);
+   memcpy(msg.body.con_info.ies, ies, ies_len);
}
if (hif_drv->hif_state < HOST_IF_CONNECTING)
hif_drv->hif_state = HOST_IF_CONNECTING;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 44929a6..5edb178 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -327,7 +327,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 
*mac_addr);
 int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);
 int wilc_wait_msg_queue_idle(void);
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
- size_t ssid_len, const u8 *ies, size_t IEsLen,
+ size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result pfConnectResult, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/21] staging: wilc1000: rename u8security in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames u8security to security to remove u8 prefix.
There is no need to add prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 1190359..64189fa 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3368,7 +3368,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
- u8 u8security, enum AUTHTYPE tenuAuth_type,
+ u8 security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams)
 {
int result = 0;
@@ -3389,7 +3389,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
 
msg.id = HOST_IF_MSG_CONNECT;
 
-   msg.body.con_info.security = u8security;
+   msg.body.con_info.security = security;
msg.body.con_info.auth_type = tenuAuth_type;
msg.body.con_info.ch = u8channel;
msg.body.con_info.result = connect_result;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 9e66d5e..bb08e7f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -329,7 +329,7 @@ int wilc_wait_msg_queue_idle(void);
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
- u8 u8security, enum AUTHTYPE tenuAuth_type,
+ u8 security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams);
 int wilc_flush_join_req(struct wilc_vif *vif);
 s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/21] staging: wilc1000: rename pfConnectResult in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames pfConnectResult to connect_result to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 4421bab..d691c95 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3367,7 +3367,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr)
 
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
- wilc_connect_result pfConnectResult, void *pvUserArg,
+ wilc_connect_result connect_result, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams)
 {
@@ -3375,7 +3375,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
-   if (!hif_drv || !pfConnectResult) {
+   if (!hif_drv || !connect_result) {
PRINT_ER("Driver is null\n");
return -EFAULT;
}
@@ -3392,7 +3392,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
msg.body.con_info.security = u8security;
msg.body.con_info.auth_type = tenuAuth_type;
msg.body.con_info.ch = u8channel;
-   msg.body.con_info.result = pfConnectResult;
+   msg.body.con_info.result = connect_result;
msg.body.con_info.arg = pvUserArg;
msg.body.con_info.params = pJoinParams;
msg.vif = vif;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 5edb178..b426132 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -328,7 +328,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 
*mac_addr);
 int wilc_wait_msg_queue_idle(void);
 int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
- wilc_connect_result pfConnectResult, void *pvUserArg,
+ wilc_connect_result connect_result, void *pvUserArg,
  u8 u8security, enum AUTHTYPE tenuAuth_type,
  u8 u8channel, void *pJoinParams);
 int wilc_flush_join_req(struct wilc_vif *vif);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 21/21] staging: wilc1000: rename pstrStatistics in wilc_get_statistics

2015-12-23 Thread Chaehyun Lim
This patch renames pstrStatistics to stats to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 732ea96..5113d3d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3656,14 +3656,14 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)
return result;
 }
 
-int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics)
+int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)
 {
int result = 0;
struct host_if_msg msg;
 
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_STATISTICS;
-   msg.body.data = (char *)pstrStatistics;
+   msg.body.data = (char *)stats;
msg.vif = vif;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index c64dc13d..b8b235d 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -365,7 +365,7 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 
u32SessionID);
 s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
-int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics);
+int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats);
 void wilc_resolve_disconnect_aberration(struct wilc_vif *vif);
 int wilc_get_vif_idx(struct wilc_vif *vif);
 
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/21] staging: wilc1000: rename pJoinParams in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames pJoinParams to join_params to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 66abfa7..79f3d9f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3369,7 +3369,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
  u8 security, enum AUTHTYPE auth_type,
- u8 channel, void *pJoinParams)
+ u8 channel, void *join_params)
 {
int result = 0;
struct host_if_msg msg;
@@ -3380,7 +3380,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
return -EFAULT;
}
 
-   if (!pJoinParams) {
+   if (!join_params) {
PRINT_ER("Unable to Join - JoinParams is NULL\n");
return -EFAULT;
}
@@ -3394,7 +3394,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
msg.body.con_info.ch = channel;
msg.body.con_info.result = connect_result;
msg.body.con_info.arg = user_arg;
-   msg.body.con_info.params = pJoinParams;
+   msg.body.con_info.params = join_params;
msg.vif = vif;
 
if (bssid) {
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index b12c04f..698d1b6 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -330,7 +330,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
  u8 security, enum AUTHTYPE auth_type,
- u8 channel, void *pJoinParams);
+ u8 channel, void *join_params);
 int wilc_flush_join_req(struct wilc_vif *vif);
 s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
 int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/21] staging: wilc1000: rename u8channel in wilc_set_join_req

2015-12-23 Thread Chaehyun Lim
This patch renames u8channel to channel to remove u8 prefix.
There is no need to add prefix in order to show data type of this
variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d3c595e..66abfa7 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3369,7 +3369,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
  u8 security, enum AUTHTYPE auth_type,
- u8 u8channel, void *pJoinParams)
+ u8 channel, void *pJoinParams)
 {
int result = 0;
struct host_if_msg msg;
@@ -3391,7 +3391,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
 
msg.body.con_info.security = security;
msg.body.con_info.auth_type = auth_type;
-   msg.body.con_info.ch = u8channel;
+   msg.body.con_info.ch = channel;
msg.body.con_info.result = connect_result;
msg.body.con_info.arg = user_arg;
msg.body.con_info.params = pJoinParams;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 3d5fea7..b12c04f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -330,7 +330,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
  size_t ssid_len, const u8 *ies, size_t ies_len,
  wilc_connect_result connect_result, void *user_arg,
  u8 security, enum AUTHTYPE auth_type,
- u8 u8channel, void *pJoinParams);
+ u8 channel, void *pJoinParams);
 int wilc_flush_join_req(struct wilc_vif *vif);
 s32 wilc_disconnect(struct wilc_vif *vif, u16 u16ReasonCode);
 int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 17/21] staging: wilc1000: remove wilc_free_join_params

2015-12-23 Thread Chaehyun Lim
wilc_free_join_params call kfree. There is no need to use
wrapper function, so use kfree directly.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 drivers/staging/wilc1000/host_interface.h | 3 ---
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
 3 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 6e5bccc..724b4bd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4609,14 +4609,6 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
return (void *)pNewJoinBssParam;
 }
 
-void wilc_free_join_params(void *pJoinParams)
-{
-   if ((struct bss_param *)pJoinParams)
-   kfree((struct bss_param *)pJoinParams);
-   else
-   PRINT_ER("Unable to FREE null pointer\n");
-}
-
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID)
 {
s32 result = 0;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index fa5d292..7ac85f2 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -365,9 +365,6 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 
u32SessionID);
 s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
-
-void wilc_free_join_params(void *pJoinParams);
-
 s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics);
 void wilc_resolve_disconnect_aberration(struct wilc_vif *vif);
 int wilc_get_vif_idx(struct wilc_vif *vif);
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 53fb2d4..be5704b 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -196,7 +196,7 @@ static void clear_shadow_scan(void)
last_scanned_shadow[last_scanned_cnt].pu8IEs = 
NULL;
}
 
-   
wilc_free_join_params(last_scanned_shadow[i].pJoinParams);
+   kfree(last_scanned_shadow[i].pJoinParams);
last_scanned_shadow[i].pJoinParams = NULL;
}
last_scanned_cnt = 0;
@@ -282,7 +282,7 @@ static void remove_network_from_shadow(unsigned long arg)
kfree(last_scanned_shadow[i].pu8IEs);
last_scanned_shadow[i].pu8IEs = NULL;
 
-   
wilc_free_join_params(last_scanned_shadow[i].pJoinParams);
+   kfree(last_scanned_shadow[i].pJoinParams);
 
for (j = i; (j < last_scanned_cnt - 1); j++)
last_scanned_shadow[j] = last_scanned_shadow[j 
+ 1];
@@ -376,7 +376,7 @@ static void add_network_to_shadow(tstrNetworkInfo 
*pstrNetworkInfo,
last_scanned_shadow[ap_index].u32TimeRcvdInScanCached = jiffies;
last_scanned_shadow[ap_index].u8Found = 1;
if (ap_found != -1)
-   
wilc_free_join_params(last_scanned_shadow[ap_index].pJoinParams);
+   kfree(last_scanned_shadow[ap_index].pJoinParams);
last_scanned_shadow[ap_index].pJoinParams = pJoinParams;
 }
 
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 19/21] staging: wilc1000: rename ps8Rssi in wilc_get_rssi

2015-12-23 Thread Chaehyun Lim
This patch renames ps8Rssi to rssi_level to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index c059e6d..e1e123b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3628,7 +3628,7 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 
*mac,
return result;
 }
 
-int wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi)
+int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)
 {
int result = 0;
struct host_if_msg msg;
@@ -3646,12 +3646,12 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi)
 
down(&hif_drv->sem_get_rssi);
 
-   if (!ps8Rssi) {
+   if (!rssi_level) {
PRINT_ER("RSS pointer value is null");
return -EFAULT;
}
 
-   *ps8Rssi = rssi;
+   *rssi_level = rssi;
 
return result;
 }
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 51ec72c..4506e0b 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -334,7 +334,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, 
const u8 *ssid,
 int wilc_flush_join_req(struct wilc_vif *vif);
 int wilc_disconnect(struct wilc_vif *vif, u16 reason_code);
 int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);
-int wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi);
+int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level);
 s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
  u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs,
  size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/20] staging: wilc1000: rename bReg in wilc_frame_register

2015-12-30 Thread Chaehyun Lim
This patch renames bReg to reg to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index c3e59d8..9b72519 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4123,7 +4123,7 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 
u32SessionID)
return result;
 }
 
-int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool bReg)
+int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 {
int result = 0;
struct host_if_msg msg;
@@ -4153,7 +4153,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 
frame_type, bool bReg)
break;
}
msg.body.reg_frame.frame_type = frame_type;
-   msg.body.reg_frame.reg = bReg;
+   msg.body.reg_frame.reg = reg;
msg.vif = vif;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index efb657b..b43e0a1 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -362,7 +362,7 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg);
 s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
-int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool bReg);
+int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
 int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/20] staging: wilc1000: fix return type of wilc_frame_register

2015-12-30 Thread Chaehyun Lim
This patch changes return type of wilc_frame_register from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5113d3d..d9e4e11 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4123,9 +4123,9 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 
u32SessionID)
return result;
 }
 
-s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg)
+int wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index b8b235d..5ecc978 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -362,7 +362,7 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg);
 s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
-s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
+int wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
 int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/20] staging: wilc1000: rename u16FrameType in wilc_frame_register

2015-12-30 Thread Chaehyun Lim
This patch renames u16FrameType to frame_type to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d9e4e11..c3e59d8 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4123,7 +4123,7 @@ s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 
u32SessionID)
return result;
 }
 
-int wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg)
+int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool bReg)
 {
int result = 0;
struct host_if_msg msg;
@@ -4137,7 +4137,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 
u16FrameType, bool bReg)
memset(&msg, 0, sizeof(struct host_if_msg));
 
msg.id = HOST_IF_MSG_REGISTER_FRAME;
-   switch (u16FrameType) {
+   switch (frame_type) {
case ACTION:
PRINT_D(HOSTINF_DBG, "ACTION\n");
msg.body.reg_frame.reg_id = ACTION_FRM_IDX;
@@ -4152,7 +4152,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 
u16FrameType, bool bReg)
PRINT_D(HOSTINF_DBG, "Not valid frame type\n");
break;
}
-   msg.body.reg_frame.frame_type = u16FrameType;
+   msg.body.reg_frame.frame_type = frame_type;
msg.body.reg_frame.reg = bReg;
msg.vif = vif;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 5ecc978..efb657b 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -362,7 +362,7 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg);
 s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
-int wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
+int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool bReg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
 int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/20] staging: wilc1000: rename bIsEnabled in wilc_set_power_mgmt

2015-12-30 Thread Chaehyun Lim
This patch renames bIsEnabled to enabled to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8b1e535..3ed8275 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4393,14 +4393,14 @@ s32 wilc_edit_station(struct wilc_vif *vif,
return result;
 }
 
-int wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout)
+int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 u32Timeout)
 {
int result = 0;
struct host_if_msg msg;
struct power_mgmt_param *pstrPowerMgmtParam = &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", bIsEnabled);
+   PRINT_INFO(HOSTINF_DBG, "\n\n>> Setting PS to %d <<\n\n", enabled);
 
if (!hif_drv) {
PRINT_ER("driver is null\n");
@@ -4414,7 +4414,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool 
bIsEnabled, u32 u32Timeout)
msg.id = HOST_IF_MSG_POWER_MGMT;
msg.vif = vif;
 
-   pstrPowerMgmtParam->enabled = bIsEnabled;
+   pstrPowerMgmtParam->enabled = enabled;
pstrPowerMgmtParam->timeout = u32Timeout;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index fb9c0ea..89765b8 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -351,7 +351,7 @@ s32 wilc_del_allstation(struct wilc_vif *vif, u8 
pu8MacAddr[][ETH_ALEN]);
 int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
 s32 wilc_edit_station(struct wilc_vif *vif,
  struct add_sta_param *pstrStaParams);
-int wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout);
+int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 u32Timeout);
 s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
u32 u32count);
 s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/20] staging: wilc1000: fix return type of wilc_listen_state_expired

2015-12-30 Thread Chaehyun Lim
This patch changes return type of wilc_listen_state_expired from s32 to
int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 9b72519..4db211b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4098,9 +4098,9 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
return result;
 }
 
-s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID)
+int wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index b43e0a1..fbc1ee1 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -361,7 +361,7 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg);
-s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
+int wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
 int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/20] staging: wilc1000: rename u32Timeout in wilc_set_power_mgmt

2015-12-30 Thread Chaehyun Lim
This patch renames u32Timeout to timeout to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3ed8275..dc1773d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4393,7 +4393,7 @@ s32 wilc_edit_station(struct wilc_vif *vif,
return result;
 }
 
-int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 u32Timeout)
+int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout)
 {
int result = 0;
struct host_if_msg msg;
@@ -4415,7 +4415,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool 
enabled, u32 u32Timeout)
msg.vif = vif;
 
pstrPowerMgmtParam->enabled = enabled;
-   pstrPowerMgmtParam->timeout = u32Timeout;
+   pstrPowerMgmtParam->timeout = timeout;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 89765b8..7b12425 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -351,7 +351,7 @@ s32 wilc_del_allstation(struct wilc_vif *vif, u8 
pu8MacAddr[][ETH_ALEN]);
 int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
 s32 wilc_edit_station(struct wilc_vif *vif,
  struct add_sta_param *pstrStaParams);
-int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 u32Timeout);
+int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout);
 s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
u32 u32count);
 s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 06/20] staging: wilc1000: fix return type of wilc_set_power_mgmt

2015-12-30 Thread Chaehyun Lim
This patch changes return type of wilc_set_power_mgmt from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3a9a967..8b1e535 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4393,9 +4393,9 @@ s32 wilc_edit_station(struct wilc_vif *vif,
return result;
 }
 
-s32 wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout)
+int wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct power_mgmt_param *pstrPowerMgmtParam = &msg.body.pwr_mgmt_info;
struct host_if_drv *hif_drv = vif->hif_drv;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 47c664e..fb9c0ea 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -351,7 +351,7 @@ s32 wilc_del_allstation(struct wilc_vif *vif, u8 
pu8MacAddr[][ETH_ALEN]);
 int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
 s32 wilc_edit_station(struct wilc_vif *vif,
  struct add_sta_param *pstrStaParams);
-s32 wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout);
+int wilc_set_power_mgmt(struct wilc_vif *vif, bool bIsEnabled, u32 u32Timeout);
 s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
u32 u32count);
 s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/20] staging: wilc1000: rename u16ipadd in wilc_setup_ipaddress

2015-12-30 Thread Chaehyun Lim
This patch renames u16ipadd to ip_addr to remove u16 prefix.
There is no need to use prefix to show data type of this argument.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index dacadc9..0d41657 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4638,7 +4638,7 @@ s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char 
*pBSSID, char TID)
return result;
 }
 
-int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx)
+int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 {
int result = 0;
struct host_if_msg msg;
@@ -4655,7 +4655,7 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 
*u16ipadd, u8 idx)
 
msg.id = HOST_IF_MSG_SET_IPADDRESS;
 
-   msg.body.ip_info.ip_addr = u16ipadd;
+   msg.body.ip_info.ip_addr = ip_addr;
msg.vif = vif;
msg.body.ip_info.idx = idx;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index d36a9f5..f90a530 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -354,7 +354,7 @@ s32 wilc_edit_station(struct wilc_vif *vif,
 int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout);
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 count);
-int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
+int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
 s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
   u32 u32duration, u16 chan,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/20] staging: wilc1000: fix return type of wilc_setup_ipaddress

2015-12-30 Thread Chaehyun Lim
This patch changes return type of wilc_setup_ipaddress from s32 to int.
The result variable gets return value from wilc_mq_send that has data
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index aeb3271..dacadc9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4638,9 +4638,9 @@ s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char 
*pBSSID, char TID)
return result;
 }
 
-s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx)
+int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 5c271b1..d36a9f5 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -354,7 +354,7 @@ s32 wilc_edit_station(struct wilc_vif *vif,
 int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout);
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 count);
-s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
+int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
 s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
   u32 u32duration, u16 chan,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 12/20] staging: wilc1000: rename u32count in wilc_setup_multicast_filter

2015-12-30 Thread Chaehyun Lim
This patch renames u32count to count to remove u32 prefix.
There is no need to use this prefix to show data type of this argument.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a32e930..489ab29 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4424,7 +4424,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool 
enabled, u32 timeout)
 }
 
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
-   u32 u32count)
+   u32 count)
 {
int result = 0;
struct host_if_msg msg;
@@ -,7 +,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, 
bool enabled,
msg.vif = vif;
 
pstrMulticastFilterParam->enabled = enabled;
-   pstrMulticastFilterParam->cnt = u32count;
+   pstrMulticastFilterParam->cnt = count;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 9abdd3f..5c271b1 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -353,7 +353,7 @@ s32 wilc_edit_station(struct wilc_vif *vif,
  struct add_sta_param *pstrStaParams);
 int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout);
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
-   u32 u32count);
+   u32 count);
 s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
 s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/20] staging: wilc1000: rename u32SessionID in wilc_listen_state_expired

2015-12-30 Thread Chaehyun Lim
This patch renames u32SessionID to session_id to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 4db211b..3a9a967 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4098,7 +4098,7 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
return result;
 }
 
-int wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID)
+int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id)
 {
int result = 0;
struct host_if_msg msg;
@@ -4114,7 +4114,7 @@ int wilc_listen_state_expired(struct wilc_vif *vif, u32 
u32SessionID)
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_LISTEN_TIMER_FIRED;
msg.vif = vif;
-   msg.body.remain_on_ch.id = u32SessionID;
+   msg.body.remain_on_ch.id = session_id;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index fbc1ee1..47c664e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -361,7 +361,7 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg);
-int wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
+int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id);
 int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/20] staging: wilc1000: rename pstrMulticastFilterParam in wilc_setup_multicast_filter

2015-12-30 Thread Chaehyun Lim
This patch renames pstrMulticastFilterParam to multicast_filter_param to
avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 489ab29..aeb3271 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4428,7 +4428,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, 
bool enabled,
 {
int result = 0;
struct host_if_msg msg;
-   struct set_multicast *pstrMulticastFilterParam = 
&msg.body.multicast_info;
+   struct set_multicast *multicast_filter_param = &msg.body.multicast_info;
struct host_if_drv *hif_drv = vif->hif_drv;
 
if (!hif_drv) {
@@ -4443,8 +4443,8 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, 
bool enabled,
msg.id = HOST_IF_MSG_SET_MULTICAST_FILTER;
msg.vif = vif;
 
-   pstrMulticastFilterParam->enabled = enabled;
-   pstrMulticastFilterParam->cnt = count;
+   multicast_filter_param->enabled = enabled;
+   multicast_filter_param->cnt = count;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 11/20] staging: wilc1000: rename bIsEnabled in wilc_setup_multicast_filter

2015-12-30 Thread Chaehyun Lim
This patch renames bIsEnabled to enabled to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8e8e70e..a32e930 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4423,7 +4423,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool 
enabled, u32 timeout)
return result;
 }
 
-int wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
+int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 u32count)
 {
int result = 0;
@@ -4443,7 +4443,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, 
bool bIsEnabled,
msg.id = HOST_IF_MSG_SET_MULTICAST_FILTER;
msg.vif = vif;
 
-   pstrMulticastFilterParam->enabled = bIsEnabled;
+   pstrMulticastFilterParam->enabled = enabled;
pstrMulticastFilterParam->cnt = u32count;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 52032be..9abdd3f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -352,7 +352,7 @@ int wilc_del_station(struct wilc_vif *vif, const u8 
*mac_addr);
 s32 wilc_edit_station(struct wilc_vif *vif,
  struct add_sta_param *pstrStaParams);
 int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout);
-int wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
+int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 u32count);
 s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 19/20] staging: wilc1000: rename u16ipadd in host_int_get_ipaddress

2015-12-30 Thread Chaehyun Lim
This patch renames u16ipadd to ip_addr to remove u16 prefix.
There is no need to use this prefix to show data type of this argument.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 72115ae..c8b4b32 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -362,7 +362,7 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
return result;
 }
 
-static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
+static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
 
 static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 {
@@ -4661,7 +4661,7 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 
*ip_addr, u8 idx)
return result;
 }
 
-static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx)
+static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 {
int result = 0;
struct host_if_msg msg;
@@ -4676,7 +4676,7 @@ static int host_int_get_ipaddress(struct wilc_vif *vif, 
u8 *u16ipadd, u8 idx)
 
msg.id = HOST_IF_MSG_GET_IPADDRESS;
 
-   msg.body.ip_info.ip_addr = u16ipadd;
+   msg.body.ip_info.ip_addr = ip_addr;
msg.vif = vif;
msg.body.ip_info.idx = idx;
 
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 17/20] staging: wilc1000: fix return type of host_int_get_ipaddress

2015-12-30 Thread Chaehyun Lim
This patch changes return type of host_int_get_ipaddress from s32 to
int. The result variable gets return value from wilc_mq_send that has
data type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 90fdbdd..a203647 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -362,7 +362,7 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
return result;
 }
 
-static s32 host_int_get_ipaddress(struct wilc_vif *vif,
+static int host_int_get_ipaddress(struct wilc_vif *vif,
  struct host_if_drv *hif_drv,
  u8 *u16ipadd, u8 idx);
 
@@ -4664,11 +4664,11 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 
*ip_addr, u8 idx)
return result;
 }
 
-static s32 host_int_get_ipaddress(struct wilc_vif *vif,
+static int host_int_get_ipaddress(struct wilc_vif *vif,
  struct host_if_drv *hif_drv,
  u8 *u16ipadd, u8 idx)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
 
if (!hif_drv) {
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/20] staging: wilc1000: remove return statement

2015-12-30 Thread Chaehyun Lim
This patch removes return statement that is always returned 0.
wilc_setup_ipaddress can not run to the end due to return statement.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0d41657..90fdbdd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4644,8 +4644,6 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 
*ip_addr, u8 idx)
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
-   return 0;
-
if (!hif_drv) {
PRINT_ER("driver is null\n");
return -EFAULT;
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/20] staging: wilc1000: rename pstrPowerMgmtParam in wilc_set_power_mgmt

2015-12-30 Thread Chaehyun Lim
This patch renames pstrPowerMgmtParam to pwr_mgmt_info to avoid
camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index dc1773d..83ac21a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4397,7 +4397,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool 
enabled, u32 timeout)
 {
int result = 0;
struct host_if_msg msg;
-   struct power_mgmt_param *pstrPowerMgmtParam = &msg.body.pwr_mgmt_info;
+   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);
@@ -4414,8 +4414,8 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool 
enabled, u32 timeout)
msg.id = HOST_IF_MSG_POWER_MGMT;
msg.vif = vif;
 
-   pstrPowerMgmtParam->enabled = enabled;
-   pstrPowerMgmtParam->timeout = timeout;
+   pwr_mgmt_info->enabled = enabled;
+   pwr_mgmt_info->timeout = timeout;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
if (result)
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/20] staging: wilc1000: fix return type of wilc_setup_multicast_filter

2015-12-30 Thread Chaehyun Lim
This patch changes return type of wilc_setup_multicast_filter from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 83ac21a..8e8e70e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4423,10 +4423,10 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool 
enabled, u32 timeout)
return result;
 }
 
-s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
+int wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
u32 u32count)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct set_multicast *pstrMulticastFilterParam = 
&msg.body.multicast_info;
struct host_if_drv *hif_drv = vif->hif_drv;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 7b12425..52032be 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -352,7 +352,7 @@ int wilc_del_station(struct wilc_vif *vif, const u8 
*mac_addr);
 s32 wilc_edit_station(struct wilc_vif *vif,
  struct add_sta_param *pstrStaParams);
 int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout);
-s32 wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
+int wilc_setup_multicast_filter(struct wilc_vif *vif, bool bIsEnabled,
u32 u32count);
 s32 wilc_setup_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 18/20] staging: wilc1000: remove argument hif_drv in host_int_get_ipaddress

2015-12-30 Thread Chaehyun Lim
This patch removes hif_drv argument of host_int_get_ipaddress.
There is no need to pass hif_drv in this function because hif_drv is a
member of vif. It is removed struct host_if_drv and use hif_drv of vif.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a203647..72115ae 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -362,16 +362,13 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
return result;
 }
 
-static int host_int_get_ipaddress(struct wilc_vif *vif,
- struct host_if_drv *hif_drv,
- u8 *u16ipadd, u8 idx);
+static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx);
 
 static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 {
s32 result = 0;
struct wid wid;
char firmware_ip_addr[4] = {0};
-   struct host_if_drv *hif_drv = vif->hif_drv;
 
if (ip_addr[0] < 192)
ip_addr[0] = 0;
@@ -389,7 +386,7 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 
*ip_addr, u8 idx)
result = wilc_send_config_pkt(vif->wilc, SET_CFG, &wid, 1,
 wilc_get_vif_idx(vif));
 
-   host_int_get_ipaddress(vif, hif_drv, firmware_ip_addr, idx);
+   host_int_get_ipaddress(vif, firmware_ip_addr, idx);
 
if (result) {
PRINT_ER("Failed to set IP address\n");
@@ -4664,12 +4661,11 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 
*ip_addr, u8 idx)
return result;
 }
 
-static int host_int_get_ipaddress(struct wilc_vif *vif,
- struct host_if_drv *hif_drv,
- u8 *u16ipadd, u8 idx)
+static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *u16ipadd, u8 idx)
 {
int result = 0;
struct host_if_msg msg;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
if (!hif_drv) {
PRINT_ER("driver is null\n");
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 20/20] staging: wilc1000: move static declaration of host_int_get_ipaddress

2015-12-30 Thread Chaehyun Lim
This patch moves static function declaration to front part of
host_interface.c file.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index c8b4b32..5a97a9d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -263,6 +263,7 @@ static struct wilc_vif *join_req_vif;
 #define FLUSHED_BYTE_POS 79
 
 static void *host_int_ParseJoinBssParam(tstrNetworkInfo *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
  * special purpose in wilc device, so we add 1 to the index to starts from 1.
@@ -362,8 +363,6 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
return result;
 }
 
-static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
-
 static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 {
s32 result = 0;
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 17/30] staging: wilc1000: fix return type of wilc_del_allstation

2016-01-03 Thread Chaehyun Lim
This patch changes return type of wilc_del_allstation from s32 to int.
The result variable gets return value from wilc_mq_send that has data
type of int. It should be changed return type of this function as well
as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 57d59dc..3f410b2 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4299,9 +4299,9 @@ int wilc_del_station(struct wilc_vif *vif, const u8 
*mac_addr)
return result;
 }
 
-s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN])
+int wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN])
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct del_all_sta *pstrDelAllStationMsg = &msg.body.del_all_sta_info;
struct host_if_drv *hif_drv = vif->hif_drv;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index abb626e..6d424e7 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -347,7 +347,7 @@ s32 wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, 
u32 u32DTIMPeriod,
u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail);
 int wilc_del_beacon(struct wilc_vif *vif);
 int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param);
-s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN]);
+int wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN]);
 int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
 int wilc_edit_station(struct wilc_vif *vif,
  struct add_sta_param *sta_param);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 03/30] staging: wilc1000: rename u32SessionID in wilc_remain_on_channel

2016-01-03 Thread Chaehyun Lim
This patch renames u32SessionID to session_id to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 30b4f30..6ea907e 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4061,7 +4061,7 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 
*pu8Buffer,
return;
 }
 
-int wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
+int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
   u32 u32duration, u16 chan,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
@@ -4084,7 +4084,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
msg.body.remain_on_ch.ready = RemainOnChanReady;
msg.body.remain_on_ch.arg = pvUserArg;
msg.body.remain_on_ch.duration = u32duration;
-   msg.body.remain_on_ch.id = u32SessionID;
+   msg.body.remain_on_ch.id = session_id;
msg.vif = vif;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index e28f462..c935e49 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -356,7 +356,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool 
enabled,
u32 count);
 int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
-int wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
+int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
   u32 u32duration, u16 chan,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 16/30] staging: wilc1000: remove rates variable in wilc_edit_station

2016-01-03 Thread Chaehyun Lim
Instead of using rates variable, it is used as add_sta_info->rates
directly.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 290c27a..57d59dc 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4372,12 +4372,11 @@ int wilc_edit_station(struct wilc_vif *vif,
 
memcpy(add_sta_info, sta_param, sizeof(struct add_sta_param));
if (add_sta_info->rates_len > 0) {
-   u8 *rates = kmemdup(sta_param->rates,
-   add_sta_info->rates_len,
-   GFP_KERNEL);
-   if (!rates)
+   add_sta_info->rates = kmemdup(sta_param->rates,
+ add_sta_info->rates_len,
+ GFP_KERNEL);
+   if (!add_sta_info->rates)
return -ENOMEM;
-   add_sta_info->rates = rates;
}
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 07/30] staging: wilc1000: rename pvUserArg in wilc_remain_on_channel

2016-01-03 Thread Chaehyun Lim
This patch renames pvUserArg to user_arg to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 21d1e87e..3636f76 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4065,7 +4065,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 
session_id,
   u32 duration, u16 chan,
   wilc_remain_on_chan_expired expired,
   wilc_remain_on_chan_ready ready,
-  void *pvUserArg)
+  void *user_arg)
 {
int result = 0;
struct host_if_msg msg;
@@ -4082,7 +4082,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 
session_id,
msg.body.remain_on_ch.ch = chan;
msg.body.remain_on_ch.expired = expired;
msg.body.remain_on_ch.ready = ready;
-   msg.body.remain_on_ch.arg = pvUserArg;
+   msg.body.remain_on_ch.arg = user_arg;
msg.body.remain_on_ch.duration = duration;
msg.body.remain_on_ch.id = session_id;
msg.vif = vif;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 8a03055..4f741ff 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -360,7 +360,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 
session_id,
   u32 duration, u16 chan,
   wilc_remain_on_chan_expired expired,
   wilc_remain_on_chan_ready ready,
-  void *pvUserArg);
+  void *user_arg);
 int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id);
 int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg);
 int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 05/30] staging: wilc1000: rename RemainOnChanExpired in wilc_remain_on_channel

2016-01-03 Thread Chaehyun Lim
This patch renames RemainOnChanExpired to expired to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 116942d..9265328 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4063,7 +4063,7 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 
*pu8Buffer,
 
 int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
   u32 duration, u16 chan,
-  wilc_remain_on_chan_expired RemainOnChanExpired,
+  wilc_remain_on_chan_expired expired,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg)
 {
@@ -4080,7 +4080,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 
session_id,
 
msg.id = HOST_IF_MSG_REMAIN_ON_CHAN;
msg.body.remain_on_ch.ch = chan;
-   msg.body.remain_on_ch.expired = RemainOnChanExpired;
+   msg.body.remain_on_ch.expired = expired;
msg.body.remain_on_ch.ready = RemainOnChanReady;
msg.body.remain_on_ch.arg = pvUserArg;
msg.body.remain_on_ch.duration = duration;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 4902cc8..d2ca27e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -358,7 +358,7 @@ int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, 
u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
 int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
   u32 duration, u16 chan,
-  wilc_remain_on_chan_expired RemainOnChanExpired,
+  wilc_remain_on_chan_expired expired,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg);
 int wilc_listen_state_expired(struct wilc_vif *vif, u32 session_id);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 15/30] staging: wilc1000: use kmemdup in wilc_edit_station

2016-01-03 Thread Chaehyun Lim
This patch replaces kmalloc followed by memcpy with kmemdup.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 2f94804..290c27a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4372,13 +4372,11 @@ int wilc_edit_station(struct wilc_vif *vif,
 
memcpy(add_sta_info, sta_param, sizeof(struct add_sta_param));
if (add_sta_info->rates_len > 0) {
-   u8 *rates = kmalloc(add_sta_info->rates_len, GFP_KERNEL);
-
+   u8 *rates = kmemdup(sta_param->rates,
+   add_sta_info->rates_len,
+   GFP_KERNEL);
if (!rates)
return -ENOMEM;
-
-   memcpy(rates, sta_param->rates,
-  add_sta_info->rates_len);
add_sta_info->rates = rates;
}
 
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 04/30] staging: wilc1000: rename u32duration in wilc_remain_on_channel

2016-01-03 Thread Chaehyun Lim
This patch renames u32duration to duration to remove u32 prefix.
There is no need u32 prefix to show data type of this variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 6ea907e..116942d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4062,7 +4062,7 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 
*pu8Buffer,
 }
 
 int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
-  u32 u32duration, u16 chan,
+  u32 duration, u16 chan,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg)
@@ -4083,7 +4083,7 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u32 
session_id,
msg.body.remain_on_ch.expired = RemainOnChanExpired;
msg.body.remain_on_ch.ready = RemainOnChanReady;
msg.body.remain_on_ch.arg = pvUserArg;
-   msg.body.remain_on_ch.duration = u32duration;
+   msg.body.remain_on_ch.duration = duration;
msg.body.remain_on_ch.id = session_id;
msg.vif = vif;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index c935e49..4902cc8 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -357,7 +357,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool 
enabled,
 int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
 int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
-  u32 u32duration, u16 chan,
+  u32 duration, u16 chan,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 08/30] staging: wilc1000: fix return type of wilc_del_all_rx_ba_session

2016-01-03 Thread Chaehyun Lim
This patch changes return type of wilc_del_all_rx_ba_session from s32 to
int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3636f76..bf01e83 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4605,9 +4605,9 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
return (void *)pNewJoinBssParam;
 }
 
-s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID)
+int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct ba_session_info *pBASessionInfo = &msg.body.session_info;
struct host_if_drv *hif_drv = vif->hif_drv;
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 4f741ff..85064cd 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -355,7 +355,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, 
u32 timeout);
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 count);
 int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
-s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
+int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
 int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
   u32 duration, u16 chan,
   wilc_remain_on_chan_expired expired,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 14/30] staging: wilc1000: rename pstrAddStationMsg in wilc_edit_station

2016-01-03 Thread Chaehyun Lim
This patch renames pstrAddStationMsg to add_sta_info to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index de921fa..2f94804 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4355,7 +4355,7 @@ int wilc_edit_station(struct wilc_vif *vif,
 {
int result = 0;
struct host_if_msg msg;
-   struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info;
+   struct add_sta_param *add_sta_info = &msg.body.add_sta_info;
struct host_if_drv *hif_drv = vif->hif_drv;
 
if (!hif_drv) {
@@ -4370,16 +4370,16 @@ int wilc_edit_station(struct wilc_vif *vif,
msg.id = HOST_IF_MSG_EDIT_STATION;
msg.vif = vif;
 
-   memcpy(pstrAddStationMsg, sta_param, sizeof(struct add_sta_param));
-   if (pstrAddStationMsg->rates_len > 0) {
-   u8 *rates = kmalloc(pstrAddStationMsg->rates_len, GFP_KERNEL);
+   memcpy(add_sta_info, sta_param, sizeof(struct add_sta_param));
+   if (add_sta_info->rates_len > 0) {
+   u8 *rates = kmalloc(add_sta_info->rates_len, GFP_KERNEL);
 
if (!rates)
return -ENOMEM;
 
memcpy(rates, sta_param->rates,
-  pstrAddStationMsg->rates_len);
-   pstrAddStationMsg->rates = rates;
+  add_sta_info->rates_len);
+   add_sta_info->rates = rates;
}
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 09/30] staging: wilc1000: rename pBSSID in wilc_del_all_rx_ba_session

2016-01-03 Thread Chaehyun Lim
This patch renames pBSSID to bssid to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index bf01e83..735e6f1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4605,7 +4605,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
return (void *)pNewJoinBssParam;
 }
 
-int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID)
+int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *bssid, char TID)
 {
int result = 0;
struct host_if_msg msg;
@@ -4621,7 +4621,7 @@ int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char 
*pBSSID, char TID)
 
msg.id = HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS;
 
-   memcpy(pBASessionInfo->bssid, pBSSID, ETH_ALEN);
+   memcpy(pBASessionInfo->bssid, bssid, ETH_ALEN);
pBASessionInfo->tid = TID;
msg.vif = vif;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 85064cd..5f7156e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -355,7 +355,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, 
u32 timeout);
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 count);
 int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
-int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
+int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *bssid, char TID);
 int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
   u32 duration, u16 chan,
   wilc_remain_on_chan_expired expired,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 01/30] staging: wilc1000: rename u32duration in struct remain_ch

2016-01-03 Thread Chaehyun Lim
The patch renames u32duration to duration that is a member of struct
remain_ch. The prefix u32 shows data type of its member, but there is no
need to use u32 prefix to represent data type.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5a97a9d..39fa5a3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -2558,7 +2558,7 @@ ERRORHANDLER:
hif_drv->remain_on_ch_timer.data = (unsigned long)vif;
mod_timer(&hif_drv->remain_on_ch_timer,
  jiffies +
- 
msecs_to_jiffies(pstrHostIfRemainOnChan->u32duration));
+ msecs_to_jiffies(pstrHostIfRemainOnChan->duration));
 
if (hif_drv->remain_on_ch.ready)
hif_drv->remain_on_ch.ready(hif_drv->remain_on_ch.arg);
@@ -4083,7 +4083,7 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
msg.body.remain_on_ch.expired = RemainOnChanExpired;
msg.body.remain_on_ch.ready = RemainOnChanReady;
msg.body.remain_on_ch.arg = pvUserArg;
-   msg.body.remain_on_ch.u32duration = u32duration;
+   msg.body.remain_on_ch.duration = u32duration;
msg.body.remain_on_ch.id = u32SessionID;
msg.vif = vif;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index f90a530..a2f428f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -240,7 +240,7 @@ struct ba_session_info {
 
 struct remain_ch {
u16 ch;
-   u32 u32duration;
+   u32 duration;
wilc_remain_on_chan_expired expired;
wilc_remain_on_chan_ready ready;
void *arg;
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 02/30] staging: wilc1000: fix return type of wilc_remain_on_channel

2016-01-03 Thread Chaehyun Lim
This patch changes return type of wilc_remain_on_channel from s32 to
int. The result variable gets return value from wilc_mq_send that has
data type of int. It should be changed return type of this function as
well as data type of result variable.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 39fa5a3..30b4f30 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4061,13 +4061,13 @@ void wilc_scan_complete_received(struct wilc *wilc, u8 
*pu8Buffer,
return;
 }
 
-s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
+int wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
   u32 u32duration, u16 chan,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
   void *pvUserArg)
 {
-   s32 result = 0;
+   int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
 
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index a2f428f..e28f462 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -356,7 +356,7 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool 
enabled,
u32 count);
 int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
 s32 wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *pBSSID, char TID);
-s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
+int wilc_remain_on_channel(struct wilc_vif *vif, u32 u32SessionID,
   u32 u32duration, u16 chan,
   wilc_remain_on_chan_expired RemainOnChanExpired,
   wilc_remain_on_chan_ready RemainOnChanReady,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 13/30] staging: wilc1000: rename pstrStaParams in wilc_edit_station

2016-01-03 Thread Chaehyun Lim
This patch renames pstrStaParams to sta_param to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index eb2d664..de921fa 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4351,7 +4351,7 @@ s32 wilc_del_allstation(struct wilc_vif *vif, u8 
pu8MacAddr[][ETH_ALEN])
 }
 
 int wilc_edit_station(struct wilc_vif *vif,
- struct add_sta_param *pstrStaParams)
+ struct add_sta_param *sta_param)
 {
int result = 0;
struct host_if_msg msg;
@@ -4370,14 +4370,14 @@ int wilc_edit_station(struct wilc_vif *vif,
msg.id = HOST_IF_MSG_EDIT_STATION;
msg.vif = vif;
 
-   memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
+   memcpy(pstrAddStationMsg, sta_param, sizeof(struct add_sta_param));
if (pstrAddStationMsg->rates_len > 0) {
u8 *rates = kmalloc(pstrAddStationMsg->rates_len, GFP_KERNEL);
 
if (!rates)
return -ENOMEM;
 
-   memcpy(rates, pstrStaParams->rates,
+   memcpy(rates, sta_param->rates,
   pstrAddStationMsg->rates_len);
pstrAddStationMsg->rates = rates;
}
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index f60bebb..abb626e 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -350,7 +350,7 @@ int wilc_add_station(struct wilc_vif *vif, struct 
add_sta_param *sta_param);
 s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN]);
 int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr);
 int wilc_edit_station(struct wilc_vif *vif,
- struct add_sta_param *pstrStaParams);
+ struct add_sta_param *sta_param);
 int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout);
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 count);
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 10/30] staging: wilc1000: rename TID in wilc_del_all_rx_ba_session

2016-01-03 Thread Chaehyun Lim
This patch renames TID to tid to avoid camelcase.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 735e6f1..265c42b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4605,7 +4605,7 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo 
*ptstrNetworkInfo)
return (void *)pNewJoinBssParam;
 }
 
-int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *bssid, char TID)
+int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *bssid, char tid)
 {
int result = 0;
struct host_if_msg msg;
@@ -4622,7 +4622,7 @@ int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char 
*bssid, char TID)
msg.id = HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS;
 
memcpy(pBASessionInfo->bssid, bssid, ETH_ALEN);
-   pBASessionInfo->tid = TID;
+   pBASessionInfo->tid = tid;
msg.vif = vif;
 
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 5f7156e..6c8fe3a 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -355,7 +355,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, 
u32 timeout);
 int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled,
u32 count);
 int wilc_setup_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx);
-int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *bssid, char TID);
+int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *bssid, char tid);
 int wilc_remain_on_channel(struct wilc_vif *vif, u32 session_id,
   u32 duration, u16 chan,
   wilc_remain_on_chan_expired expired,
-- 
2.6.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


  1   2   3   4   5   6   7   8   >