All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap
@ 2015-10-27 23:19 Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 02/10] staging: wilc1000: fix parameter name of function declaration Chaehyun Lim
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes return type of host_int_add_wep_key_bss_ap 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 <chaehyun.lim@gmail.com>
---
 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 5a23738..e0a4cf3 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3191,14 +3191,14 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
 	return result;
 }
 
-s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
+int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 				const u8 *pu8WepKey,
 				u8 u8WepKeylen,
 				u8 u8Keyidx,
 				u8 u8mode,
 				enum AUTHTYPE tenuAuth_type)
 {
-	s32 result = 0;
+	int result = 0;
 	struct host_if_msg msg;
 	u8 i;
 
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index a9f7d1d..cd6199b 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-s32 host_int_add_wep_key_bss_ap(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
+int host_int_add_wep_key_bss_ap(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

* [PATCH 02/10] staging: wilc1000: fix parameter name of function declaration
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 03/10] staging: wilc1000: replace u8 with int Chaehyun Lim
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes struct host_if_drv of host_int_add_wep_key_bss_ap
function declaration from hWFIDrv to hif_drv.
With this change, first parameter name of this function declaration and
definition has same name as hif_drv.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 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 cd6199b..0bbbf4f 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-int host_int_add_wep_key_bss_ap(struct host_if_drv *hWFIDrv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
+int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

* [PATCH 03/10] staging: wilc1000: replace u8 with int.
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 02/10] staging: wilc1000: fix parameter name of function declaration Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 04/10] staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_ap Chaehyun Lim
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes data type of variable i from u8 to int.
It is used as index of an array to print its content. It's better
to use as data type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 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 e0a4cf3..9a57d31a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3200,7 +3200,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 {
 	int result = 0;
 	struct host_if_msg msg;
-	u8 i;
+	int i;
 
 	if (!hif_drv) {
 		PRINT_ER("driver is null\n");
-- 
2.6.1


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

* [PATCH 04/10] staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_ap
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 02/10] staging: wilc1000: fix parameter name of function declaration Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 03/10] staging: wilc1000: replace u8 with int Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 05/10] staging: wilc1000: rename u8WepKeylen " Chaehyun Lim
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes pu8WepKey to key that is second argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 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 9a57d31a..4be42cb 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3192,7 +3192,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 *pu8WepKey,
+				const u8 *key,
 				u8 u8WepKeylen,
 				u8 u8Keyidx,
 				u8 u8mode,
@@ -3211,14 +3211,14 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 
 	if (INFO) {
 		for (i = 0; i < u8WepKeylen; i++)
-			PRINT_INFO(HOSTAPD_DBG, "KEY is %x\n", pu8WepKey[i]);
+			PRINT_INFO(HOSTAPD_DBG, "KEY is %x\n", key[i]);
 	}
 	msg.id = HOST_IF_MSG_KEY;
 	msg.body.key_info.type = WEP;
 	msg.body.key_info.action = ADDKEY_AP;
 	msg.drv = hif_drv;
 	msg.body.key_info.attr.wep.key = kmalloc(u8WepKeylen, GFP_KERNEL);
-	memcpy(msg.body.key_info.attr.wep.key, pu8WepKey, (u8WepKeylen));
+	memcpy(msg.body.key_info.attr.wep.key, key, (u8WepKeylen));
 	msg.body.key_info.attr.wep.key_len = (u8WepKeylen);
 	msg.body.key_info.attr.wep.index = u8Keyidx;
 	msg.body.key_info.attr.wep.mode = u8mode;
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 0bbbf4f..fa439f2 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *pu8WepKey, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
+int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *key, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

* [PATCH 05/10] staging: wilc1000: rename u8WepKeylen in host_int_add_wep_key_bss_ap
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
                   ` (2 preceding siblings ...)
  2015-10-27 23:19 ` [PATCH 04/10] staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_ap Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 06/10] staging: wilc1000: rename u8Keyidx " Chaehyun Lim
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes u8WepKeylen to len that is third argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 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 4be42cb..c3cf7a1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3193,7 +3193,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 u8WepKeylen,
+				u8 len,
 				u8 u8Keyidx,
 				u8 u8mode,
 				enum AUTHTYPE tenuAuth_type)
@@ -3210,16 +3210,16 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 	memset(&msg, 0, sizeof(struct host_if_msg));
 
 	if (INFO) {
-		for (i = 0; i < u8WepKeylen; i++)
+		for (i = 0; i < len; i++)
 			PRINT_INFO(HOSTAPD_DBG, "KEY is %x\n", key[i]);
 	}
 	msg.id = HOST_IF_MSG_KEY;
 	msg.body.key_info.type = WEP;
 	msg.body.key_info.action = ADDKEY_AP;
 	msg.drv = hif_drv;
-	msg.body.key_info.attr.wep.key = kmalloc(u8WepKeylen, GFP_KERNEL);
-	memcpy(msg.body.key_info.attr.wep.key, key, (u8WepKeylen));
-	msg.body.key_info.attr.wep.key_len = (u8WepKeylen);
+	msg.body.key_info.attr.wep.key = kmalloc(len, GFP_KERNEL);
+	memcpy(msg.body.key_info.attr.wep.key, key, len);
+	msg.body.key_info.attr.wep.key_len = len;
 	msg.body.key_info.attr.wep.index = u8Keyidx;
 	msg.body.key_info.attr.wep.mode = u8mode;
 	msg.body.key_info.attr.wep.auth_type = tenuAuth_type;
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index fa439f2..289dfd3 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *key, u8 u8WepKeylen, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
+int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *key, u8 len, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

* [PATCH 06/10] staging: wilc1000: rename u8Keyidx in host_int_add_wep_key_bss_ap
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
                   ` (3 preceding siblings ...)
  2015-10-27 23:19 ` [PATCH 05/10] staging: wilc1000: rename u8WepKeylen " Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 07/10] staging: wilc1000: rename u8mode " Chaehyun Lim
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes u8Keyidx to index that is fourth argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 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 c3cf7a1..c92e12a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3194,7 +3194,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 u8Keyidx,
+				u8 index,
 				u8 u8mode,
 				enum AUTHTYPE tenuAuth_type)
 {
@@ -3220,7 +3220,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 	msg.body.key_info.attr.wep.key = kmalloc(len, GFP_KERNEL);
 	memcpy(msg.body.key_info.attr.wep.key, key, len);
 	msg.body.key_info.attr.wep.key_len = len;
-	msg.body.key_info.attr.wep.index = u8Keyidx;
+	msg.body.key_info.attr.wep.index = index;
 	msg.body.key_info.attr.wep.mode = u8mode;
 	msg.body.key_info.attr.wep.auth_type = tenuAuth_type;
 
diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index 289dfd3..ab88ed5 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *key, u8 len, u8 u8Keyidx, u8 u8mode, enum AUTHTYPE tenuAuth_type);
+int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *key, u8 len, u8 index, u8 u8mode, enum AUTHTYPE tenuAuth_type);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

* [PATCH 07/10] staging: wilc1000: rename u8mode in host_int_add_wep_key_bss_ap
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
                   ` (4 preceding siblings ...)
  2015-10-27 23:19 ` [PATCH 06/10] staging: wilc1000: rename u8Keyidx " Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 08/10] staging: wilc1000: rename tenuAuth_type " Chaehyun Lim
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes u8mode to mode that is fifth argument of this
function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 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 c92e12a..fbafed9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3195,7 +3195,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 				const u8 *key,
 				u8 len,
 				u8 index,
-				u8 u8mode,
+				u8 mode,
 				enum AUTHTYPE tenuAuth_type)
 {
 	int result = 0;
@@ -3221,7 +3221,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 	memcpy(msg.body.key_info.attr.wep.key, key, len);
 	msg.body.key_info.attr.wep.key_len = len;
 	msg.body.key_info.attr.wep.index = index;
-	msg.body.key_info.attr.wep.mode = u8mode;
+	msg.body.key_info.attr.wep.mode = mode;
 	msg.body.key_info.attr.wep.auth_type = tenuAuth_type;
 
 	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 ab88ed5..1927d4c 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv, const u8 *key, u8 len, u8 index, u8 u8mode, enum AUTHTYPE tenuAuth_type);
+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 tenuAuth_type);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

* [PATCH 08/10] staging: wilc1000: rename tenuAuth_type in host_int_add_wep_key_bss_ap
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
                   ` (5 preceding siblings ...)
  2015-10-27 23:19 ` [PATCH 07/10] staging: wilc1000: rename u8mode " Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 09/10] staging: wilc1000: replace kmalloc/memcpy with kmemdup Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 10/10] staging: wilc1000: fix line over 80 characters Chaehyun Lim
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch changes tenuAuth_type to auth_type that is sixth argument of
this function to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 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 fbafed9..2f4f699 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3196,7 +3196,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 				u8 len,
 				u8 index,
 				u8 mode,
-				enum AUTHTYPE tenuAuth_type)
+				enum AUTHTYPE auth_type)
 {
 	int result = 0;
 	struct host_if_msg msg;
@@ -3222,7 +3222,7 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 	msg.body.key_info.attr.wep.key_len = len;
 	msg.body.key_info.attr.wep.index = index;
 	msg.body.key_info.attr.wep.mode = mode;
-	msg.body.key_info.attr.wep.auth_type = tenuAuth_type;
+	msg.body.key_info.attr.wep.auth_type = auth_type;
 
 	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 1927d4c..cae61a4 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,7 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-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 tenuAuth_type);
+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);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

* [PATCH 09/10] staging: wilc1000: replace kmalloc/memcpy with kmemdup
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
                   ` (6 preceding siblings ...)
  2015-10-27 23:19 ` [PATCH 08/10] staging: wilc1000: rename tenuAuth_type " Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  2015-10-27 23:19 ` [PATCH 10/10] staging: wilc1000: fix line over 80 characters Chaehyun Lim
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch replaces kmalloc followed by memcpy with kmemdup.
It is also added error checking to return -ENOMEM when kmemdup is
failed.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index 2f4f699..0b70ada 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3217,8 +3217,10 @@ int host_int_add_wep_key_bss_ap(struct host_if_drv *hif_drv,
 	msg.body.key_info.type = WEP;
 	msg.body.key_info.action = ADDKEY_AP;
 	msg.drv = hif_drv;
-	msg.body.key_info.attr.wep.key = kmalloc(len, GFP_KERNEL);
-	memcpy(msg.body.key_info.attr.wep.key, key, len);
+	msg.body.key_info.attr.wep.key = kmemdup(key, len, GFP_KERNEL);
+	if (!msg.body.key_info.attr.wep.key)
+		return -ENOMEM;
+
 	msg.body.key_info.attr.wep.key_len = len;
 	msg.body.key_info.attr.wep.index = index;
 	msg.body.key_info.attr.wep.mode = mode;
-- 
2.6.1


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

* [PATCH 10/10] staging: wilc1000: fix line over 80 characters
  2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
                   ` (7 preceding siblings ...)
  2015-10-27 23:19 ` [PATCH 09/10] staging: wilc1000: replace kmalloc/memcpy with kmemdup Chaehyun Lim
@ 2015-10-27 23:19 ` Chaehyun Lim
  8 siblings, 0 replies; 10+ messages in thread
From: Chaehyun Lim @ 2015-10-27 23:19 UTC (permalink / raw)
  To: gregkh
  Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
	linux-wireless, devel, Chaehyun Lim

This patch fixes line over 80 characters found by checkpatch.

WARNING: line over 80 characters
FILE: drivers/staging/wilc1000/host_interface.h:424:

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
 drivers/staging/wilc1000/host_interface.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.h b/drivers/staging/wilc1000/host_interface.h
index cae61a4..7b8b1c6 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -421,7 +421,9 @@ int host_int_add_wep_key_bss_sta(struct host_if_drv *hif_drv,
  *  @date		28 Feb 2013
  *  @version		1.0
  */
-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_wep_key_bss_ap(struct host_if_drv *hif_drv,
+				const u8 *key, u8 len, u8 index, u8 mode,
+				enum AUTHTYPE auth_type);
 
 /**
  *  @brief              adds ptk Key
-- 
2.6.1


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

end of thread, other threads:[~2015-10-27 23:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-27 23:19 [PATCH 01/10] staging: wilc1000: fix return type of host_int_add_wep_key_bss_ap Chaehyun Lim
2015-10-27 23:19 ` [PATCH 02/10] staging: wilc1000: fix parameter name of function declaration Chaehyun Lim
2015-10-27 23:19 ` [PATCH 03/10] staging: wilc1000: replace u8 with int Chaehyun Lim
2015-10-27 23:19 ` [PATCH 04/10] staging: wilc1000: rename pu8WepKey in host_int_add_wep_key_bss_ap Chaehyun Lim
2015-10-27 23:19 ` [PATCH 05/10] staging: wilc1000: rename u8WepKeylen " Chaehyun Lim
2015-10-27 23:19 ` [PATCH 06/10] staging: wilc1000: rename u8Keyidx " Chaehyun Lim
2015-10-27 23:19 ` [PATCH 07/10] staging: wilc1000: rename u8mode " Chaehyun Lim
2015-10-27 23:19 ` [PATCH 08/10] staging: wilc1000: rename tenuAuth_type " Chaehyun Lim
2015-10-27 23:19 ` [PATCH 09/10] staging: wilc1000: replace kmalloc/memcpy with kmemdup Chaehyun Lim
2015-10-27 23:19 ` [PATCH 10/10] staging: wilc1000: fix line over 80 characters Chaehyun Lim

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