Skip to contentSkip to conversation

staging: wilc1000: fix return type of wilc_add_pkt declaration

PATCH New Chaehyun Lim 1 participant 13 messages Dec 22, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/13 staging: wilc1000: fix return type of wilc_add_pkt declaration

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.

---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.h +1 -1
index 8faac27..be1536a 100644
@@ -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,
Signature · 1 line
2.6.4
#1 lore raw

PATCH 2/13 staging: wilc1000: match argument name of wilc_add_ptk declaration

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.

---
 drivers/staging/wilc1000/host_interface.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.h +3 -3
index be1536a..7e89776 100644
@@ -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,
Signature · 1 line
2.6.4
#2 lore raw

PATCH 3/13 staging: wilc1000: fix return type of wilc_add_rx_gtk declaration

In reply to 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.

---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.h +1 -1
index 7e89776..02c10171 100644
@@ -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);
Signature · 1 line
2.6.4
#3 lore raw

PATCH 4/13 staging: wilc1000: match argument name of wilc_add_rx_gtk declaration

In reply to 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.

---
 drivers/staging/wilc1000/host_interface.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/host_interface.h +4 -4
index 02c10171..6a5f3bd 100644
@@ -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,
Signature · 1 line
2.6.4
#4 lore raw

PATCH 5/13 staging: wilc1000: remove wilc_add_tx_gtk declaration

In reply to Chaehyun Lim

This patch deletes wilc_add_tx_gtk declaration. It is not find wilc_add_tx_gtk definition in this driver.

---
 drivers/staging/wilc1000/host_interface.h | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/host_interface.h +0 -2
index 6a5f3bd..a21ca37 100644
@@ -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);
Signature · 1 line
2.6.4
#5 lore raw

PATCH 6/13 staging: wilc1000: remove wilc_set_start_scan_req declaration

In reply to Chaehyun Lim

This patch deletes wilc_set_start_scan_req declaration. It is not find wilc_set_start_scan_req definition in this driver.

---
 drivers/staging/wilc1000/host_interface.h | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/wilc1000/host_interface.h +0 -1
index a21ca37..1e3f389 100644
@@ -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,
Signature · 1 line
2.6.4
#6 lore raw

PATCH 7/13 staging: wilc1000: fix return type of wilc_set_pmkid_info

In reply to 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.

---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
index 8c77520..c976c1f 100644
@@ -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;
drivers/staging/wilc1000/host_interface.h +1 -1
index 1e3f389..3dfdc04 100644
@@ -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);
Signature · 1 line
2.6.4
#7 lore raw

PATCH 8/13 staging: wilc1000: replace u32 with int

In reply to 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.

---
 drivers/staging/wilc1000/host_interface.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +1 -1
index c976c1f..3ad4b0e 100644
@@ -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");
Signature · 1 line
2.6.4
#8 lore raw

PATCH 9/13 staging: wilc1000: rename pu8PmkidInfoArray in wilc_set_pmkid_info

In reply to Chaehyun Lim

This patch changes pu8PmkidInfoArray to pmkid to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 8 ++++----
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/host_interface.c +4 -4
index 3ad4b0e..485318f 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index 3dfdc04..675a4e1 100644
@@ -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);
Signature · 1 line
2.6.4
#9 lore raw

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

In reply to 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.

---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
index 485318f..affd1e6 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index 675a4e1..6be4b14 100644
@@ -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,
Signature · 1 line
2.6.4
#10 lore raw

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

In reply to Chaehyun Lim

This patch changes pu8MacAddress to mac_addr to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
index affd1e6..613c5a2 100644
@@ -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;
@@ -3333,7 +3333,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));
drivers/staging/wilc1000/host_interface.h +1 -1
index 6be4b14..76f90cd 100644
@@ -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,
Signature · 1 line
2.6.4
#11 lore raw

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

In reply to 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.

---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
index 613c5a2..ed6f932 100644
@@ -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]);
drivers/staging/wilc1000/host_interface.h +1 -1
index 76f90cd..337965f 100644
@@ -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,
Signature · 1 line
2.6.4
#12 lore raw

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

In reply to Chaehyun Lim

This patch changes pu8MacAddress to mac_addr to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 drivers/staging/wilc1000/host_interface.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/host_interface.c +3 -3
index ed6f932..78d26ee 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index 337965f..13d253c 100644
@@ -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,
Signature · 1 line
2.6.4