Skip to contentSkip to conversation

staging: wilc1000: rename u32duration in struct remain_ch

PATCH New Chaehyun Lim 1 participant 30 messages Jan 3, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/30 staging: wilc1000: rename u32duration in struct remain_ch

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.

---
 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 5a97a9d..39fa5a3 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index f90a530..a2f428f 100644
@@ -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;
Signature · 1 line
2.6.4
#1 lore raw

PATCH 2/30 staging: wilc1000: fix return type of wilc_remain_on_channel

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.

---
 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 39fa5a3..30b4f30 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index a2f428f..e28f462 100644
@@ -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,
Signature · 1 line
2.6.4
#2 lore raw

PATCH 3/30 staging: wilc1000: rename u32SessionID in wilc_remain_on_channel

In reply to Chaehyun Lim

This patch renames u32SessionID to session_id 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 30b4f30..6ea907e 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index e28f462..c935e49 100644
@@ -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,
Signature · 1 line
2.6.4
#3 lore raw

PATCH 4/30 staging: wilc1000: rename u32duration in wilc_remain_on_channel

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

---
 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 6ea907e..116942d 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index c935e49..4902cc8 100644
@@ -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);
Signature · 1 line
2.6.4
#4 lore raw

PATCH 5/30 staging: wilc1000: rename RemainOnChanExpired in wilc_remain_on_channel

In reply to Chaehyun Lim

This patch renames RemainOnChanExpired to expired 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 116942d..9265328 100644
@@ -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;
drivers/staging/wilc1000/host_interface.h +1 -1
index 4902cc8..d2ca27e 100644
@@ -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);
Signature · 1 line
2.6.4
#5 lore raw

PATCH 6/30 staging: wilc1000: rename RemainOnChanReady in wilc_remain_on_channel

In reply to Chaehyun Lim

This patch renames RemainOnChanReady to ready 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 9265328..21d1e87e 100644
@@ -4064,7 +4064,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 expired,
-			   wilc_remain_on_chan_ready RemainOnChanReady,
+			   wilc_remain_on_chan_ready ready,
 			   void *pvUserArg)
 {
 	int result = 0;
@@ -4081,7 +4081,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 = expired;
-	msg.body.remain_on_ch.ready = RemainOnChanReady;
+	msg.body.remain_on_ch.ready = ready;
 	msg.body.remain_on_ch.arg = pvUserArg;
 	msg.body.remain_on_ch.duration = duration;
 	msg.body.remain_on_ch.id = session_id;
drivers/staging/wilc1000/host_interface.h +1 -1
index d2ca27e..8a03055 100644
@@ -359,7 +359,7 @@ 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 expired,
-			   wilc_remain_on_chan_ready RemainOnChanReady,
+			   wilc_remain_on_chan_ready ready,
 			   void *pvUserArg);
 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);
Signature · 1 line
2.6.4
#6 lore raw

PATCH 7/30 staging: wilc1000: rename pvUserArg in wilc_remain_on_channel

In reply to Chaehyun Lim

This patch renames pvUserArg to user_arg 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 21d1e87e..3636f76 100644
@@ -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;
drivers/staging/wilc1000/host_interface.h +1 -1
index 8a03055..4f741ff 100644
@@ -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);
Signature · 1 line
2.6.4
#7 lore raw

PATCH 8/30 staging: wilc1000: fix return type of wilc_del_all_rx_ba_session

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

---
 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 3636f76..bf01e83 100644
@@ -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;
drivers/staging/wilc1000/host_interface.h +1 -1
index 4f741ff..85064cd 100644
@@ -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,
Signature · 1 line
2.6.4
#8 lore raw

PATCH 9/30 staging: wilc1000: rename pBSSID in wilc_del_all_rx_ba_session

In reply to Chaehyun Lim

This patch renames pBSSID to bssid 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 bf01e83..735e6f1 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index 85064cd..5f7156e 100644
@@ -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,
Signature · 1 line
2.6.4
#9 lore raw

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

In reply to Chaehyun Lim

This patch renames TID to tid 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 735e6f1..265c42b 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index 5f7156e..6c8fe3a 100644
@@ -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,
Signature · 1 line
2.6.4
#10 lore raw

PATCH 11/30 staging: wilc1000: rename pBASessionInfo in wilc_del_all_rx_ba_session

In reply to Chaehyun Lim

This patch renames pBASessionInfo to ba_session_info to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +3 -3
index 265c42b..409d910 100644
@@ -4609,7 +4609,7 @@ int wilc_del_all_rx_ba_session(struct wilc_vif *vif, char *bssid, char tid)
 {
 	int result = 0;
 	struct host_if_msg msg;
-	struct ba_session_info *pBASessionInfo = &msg.body.session_info;
+	struct ba_session_info *ba_session_info = &msg.body.session_info;
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
@@ -4621,8 +4621,8 @@ 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;
+	memcpy(ba_session_info->bssid, bssid, ETH_ALEN);
+	ba_session_info->tid = tid;
 	msg.vif = vif;
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
Signature · 1 line
2.6.4
#11 lore raw

PATCH 12/30 staging: wilc1000: fix return type of wilc_edit_station

In reply to Chaehyun Lim

This patch changes return type of wilc_edit_station 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.

---
 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 409d910..eb2d664 100644
@@ -4350,10 +4350,10 @@ s32 wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN])
 	return result;
 }
 
-s32 wilc_edit_station(struct wilc_vif *vif,
+int wilc_edit_station(struct wilc_vif *vif,
 		      struct add_sta_param *pstrStaParams)
 {
-	s32 result = 0;
+	int result = 0;
 	struct host_if_msg msg;
 	struct add_sta_param *pstrAddStationMsg = &msg.body.add_sta_info;
 	struct host_if_drv *hif_drv = vif->hif_drv;
drivers/staging/wilc1000/host_interface.h +1 -1
index 6c8fe3a..f60bebb 100644
@@ -349,7 +349,7 @@ 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_station(struct wilc_vif *vif, const u8 *mac_addr);
-s32 wilc_edit_station(struct wilc_vif *vif,
+int 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,
Signature · 1 line
2.6.4
#12 lore raw

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

In reply to Chaehyun Lim

This patch renames pstrStaParams to sta_param 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 eb2d664..de921fa 100644
@@ -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;
 	}
drivers/staging/wilc1000/host_interface.h +1 -1
index f60bebb..abb626e 100644
@@ -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);
Signature · 1 line
2.6.4
#13 lore raw

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

In reply to Chaehyun Lim

This patch renames pstrAddStationMsg to add_sta_info to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/host_interface.c +6 -6
index de921fa..2f94804 100644
@@ -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));
Signature · 1 line
2.6.4
#14 lore raw

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

In reply to Chaehyun Lim

This patch replaces kmalloc followed by memcpy with kmemdup.

---
 drivers/staging/wilc1000/host_interface.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/host_interface.c +3 -5
index 2f94804..290c27a 100644
@@ -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;
 	}
 
Signature · 1 line
2.6.4
#15 lore raw

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

In reply to Chaehyun Lim

Instead of using rates variable, it is used as add_sta_info->rates directly.

---
 drivers/staging/wilc1000/host_interface.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/host_interface.c +4 -5
index 290c27a..57d59dc 100644
@@ -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));
Signature · 1 line
2.6.4
#16 lore raw

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

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

---
 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 57d59dc..3f410b2 100644
@@ -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;
drivers/staging/wilc1000/host_interface.h +1 -1
index abb626e..6d424e7 100644
@@ -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);
Signature · 1 line
2.6.4
#17 lore raw

PATCH 18/30 staging: wilc1000: rename pu8MacAddr in wilc_del_allstation

In reply to Chaehyun Lim

This patch renames pu8MacAddr 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 3f410b2..37a78a3 100644
@@ -4299,7 +4299,7 @@ int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr)
 	return result;
 }
 
-int wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN])
+int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 {
 	int result = 0;
 	struct host_if_msg msg;
@@ -4322,8 +4322,8 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN])
 	msg.vif = vif;
 
 	for (i = 0; i < MAX_NUM_STA; i++) {
-		if (memcmp(pu8MacAddr[i], au8Zero_Buff, ETH_ALEN)) {
-			memcpy(pstrDelAllStationMsg->del_all_sta[i], pu8MacAddr[i], ETH_ALEN);
+		if (memcmp(mac_addr[i], au8Zero_Buff, ETH_ALEN)) {
+			memcpy(pstrDelAllStationMsg->del_all_sta[i], mac_addr[i], ETH_ALEN);
 			PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n",
 				pstrDelAllStationMsg->del_all_sta[i][0],
 				pstrDelAllStationMsg->del_all_sta[i][1],
drivers/staging/wilc1000/host_interface.h +1 -1
index 6d424e7..3c932e7a 100644
@@ -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);
-int wilc_del_allstation(struct wilc_vif *vif, u8 pu8MacAddr[][ETH_ALEN]);
+int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][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);
Signature · 1 line
2.6.4
#18 lore raw

PATCH 19/30 staging: wilc1000: rename pstrDelAllStationMsg in wilc_del_allstation

In reply to Chaehyun Lim

This patch renames pstrDelAllStationMsg to del_all_sta_info to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/staging/wilc1000/host_interface.c +9 -9
index 37a78a3..7686a52 100644
@@ -4303,7 +4303,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 {
 	int result = 0;
 	struct host_if_msg msg;
-	struct del_all_sta *pstrDelAllStationMsg = &msg.body.del_all_sta_info;
+	struct del_all_sta *del_all_sta_info = &msg.body.del_all_sta_info;
 	struct host_if_drv *hif_drv = vif->hif_drv;
 	u8 au8Zero_Buff[ETH_ALEN] = {0};
 	u32 i;
@@ -4323,14 +4323,14 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 
 	for (i = 0; i < MAX_NUM_STA; i++) {
 		if (memcmp(mac_addr[i], au8Zero_Buff, ETH_ALEN)) {
-			memcpy(pstrDelAllStationMsg->del_all_sta[i], mac_addr[i], ETH_ALEN);
+			memcpy(del_all_sta_info->del_all_sta[i], mac_addr[i], ETH_ALEN);
 			PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n",
-				pstrDelAllStationMsg->del_all_sta[i][0],
-				pstrDelAllStationMsg->del_all_sta[i][1],
-				pstrDelAllStationMsg->del_all_sta[i][2],
-				pstrDelAllStationMsg->del_all_sta[i][3],
-				pstrDelAllStationMsg->del_all_sta[i][4],
-				pstrDelAllStationMsg->del_all_sta[i][5]);
+				del_all_sta_info->del_all_sta[i][0],
+				del_all_sta_info->del_all_sta[i][1],
+				del_all_sta_info->del_all_sta[i][2],
+				del_all_sta_info->del_all_sta[i][3],
+				del_all_sta_info->del_all_sta[i][4],
+				del_all_sta_info->del_all_sta[i][5]);
 			u8AssocNumb++;
 		}
 	}
@@ -4339,7 +4339,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 		return result;
 	}
 
-	pstrDelAllStationMsg->assoc_sta = u8AssocNumb;
+	del_all_sta_info->assoc_sta = u8AssocNumb;
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 
 	if (result)
Signature · 1 line
2.6.4
#19 lore raw

PATCH 20/30 staging: wilc1000: rename au8Zero_Buff in wilc_del_allstation

In reply to Chaehyun Lim

This patch renames au8Zero_Buff to zero_addr to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
index 7686a52..a3f120a 100644
@@ -4305,7 +4305,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 	struct host_if_msg msg;
 	struct del_all_sta *del_all_sta_info = &msg.body.del_all_sta_info;
 	struct host_if_drv *hif_drv = vif->hif_drv;
-	u8 au8Zero_Buff[ETH_ALEN] = {0};
+	u8 zero_addr[ETH_ALEN] = {0};
 	u32 i;
 	u8 u8AssocNumb = 0;
 
@@ -4322,7 +4322,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 	msg.vif = vif;
 
 	for (i = 0; i < MAX_NUM_STA; i++) {
-		if (memcmp(mac_addr[i], au8Zero_Buff, ETH_ALEN)) {
+		if (memcmp(mac_addr[i], zero_addr, ETH_ALEN)) {
 			memcpy(del_all_sta_info->del_all_sta[i], mac_addr[i], ETH_ALEN);
 			PRINT_D(CFG80211_DBG, "BSSID = %x%x%x%x%x%x\n",
 				del_all_sta_info->del_all_sta[i][0],
Signature · 1 line
2.6.4
#20 lore raw

PATCH 21/30 staging: wilc1000: use int instead of u32

In reply to Chaehyun Lim

The variable i is used as array index 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 a3f120a..c0f30a2 100644
@@ -4306,7 +4306,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 	struct del_all_sta *del_all_sta_info = &msg.body.del_all_sta_info;
 	struct host_if_drv *hif_drv = vif->hif_drv;
 	u8 zero_addr[ETH_ALEN] = {0};
-	u32 i;
+	int i;
 	u8 u8AssocNumb = 0;
 
 	if (!hif_drv) {
Signature · 1 line
2.6.4
#21 lore raw

PATCH 22/30 staging: wilc1000: rename u8AssocNumb in wilc_del_allstation

In reply to Chaehyun Lim

This patch renames u8AssocNumb to assoc_sta to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/host_interface.c +4 -4
index c0f30a2..0ff500d 100644
@@ -4307,7 +4307,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 	struct host_if_drv *hif_drv = vif->hif_drv;
 	u8 zero_addr[ETH_ALEN] = {0};
 	int i;
-	u8 u8AssocNumb = 0;
+	u8 assoc_sta = 0;
 
 	if (!hif_drv) {
 		PRINT_ER("driver is null\n");
@@ -4331,15 +4331,15 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN])
 				del_all_sta_info->del_all_sta[i][3],
 				del_all_sta_info->del_all_sta[i][4],
 				del_all_sta_info->del_all_sta[i][5]);
-			u8AssocNumb++;
+			assoc_sta++;
 		}
 	}
-	if (!u8AssocNumb) {
+	if (!assoc_sta) {
 		PRINT_D(CFG80211_DBG, "NO ASSOCIATED STAS\n");
 		return result;
 	}
 
-	del_all_sta_info->assoc_sta = u8AssocNumb;
+	del_all_sta_info->assoc_sta = assoc_sta;
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
 
 	if (result)
Signature · 1 line
2.6.4
#22 lore raw

PATCH 23/30 staging: wilc1000: fix return type of wilc_add_beacon

In reply to Chaehyun Lim

This patch changes return type of wilc_add_beacon 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 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 0ff500d..8d935e4 100644
@@ -4159,10 +4159,10 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 	return result;
 }
 
-s32 wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
+int wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
 		    u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail)
 {
-	s32 result = 0;
+	int result = 0;
 	struct host_if_msg msg;
 	struct beacon_attr *pstrSetBeaconParam = &msg.body.beacon_info;
 	struct host_if_drv *hif_drv = vif->hif_drv;
drivers/staging/wilc1000/host_interface.h +1 -1
index 3c932e7a..272b696 100644
@@ -343,7 +343,7 @@ s32 wilc_hif_set_cfg(struct wilc_vif *vif,
 		     struct cfg_param_val *pstrCfgParamVal);
 s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 s32 wilc_deinit(struct wilc_vif *vif);
-s32 wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
+int 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);
Signature · 1 line
2.6.4
#23 lore raw

PATCH 24/30 staging: wilc1000: rename u32Interval in wilc_add_beacon

In reply to Chaehyun Lim

This patch renames u32Interval to interval 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 8d935e4..615ae59 100644
@@ -4159,7 +4159,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 	return result;
 }
 
-int wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
+int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 u32DTIMPeriod,
 		    u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail)
 {
 	int result = 0;
@@ -4178,7 +4178,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
 
 	msg.id = HOST_IF_MSG_ADD_BEACON;
 	msg.vif = vif;
-	pstrSetBeaconParam->interval = u32Interval;
+	pstrSetBeaconParam->interval = interval;
 	pstrSetBeaconParam->dtim_period = u32DTIMPeriod;
 	pstrSetBeaconParam->head_len = u32HeadLen;
 	pstrSetBeaconParam->head = kmemdup(pu8Head, u32HeadLen, GFP_KERNEL);
drivers/staging/wilc1000/host_interface.h +1 -1
index 272b696..93a8abb 100644
@@ -343,7 +343,7 @@ s32 wilc_hif_set_cfg(struct wilc_vif *vif,
 		     struct cfg_param_val *pstrCfgParamVal);
 s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 s32 wilc_deinit(struct wilc_vif *vif);
-int wilc_add_beacon(struct wilc_vif *vif, u32 u32Interval, u32 u32DTIMPeriod,
+int wilc_add_beacon(struct wilc_vif *vif, u32 interval, 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);
Signature · 1 line
2.6.4
#24 lore raw

PATCH 25/30 staging: wilc1000: rename u32DTIMPeriod in wilc_add_beacon

In reply to Chaehyun Lim

This patch renames u32DTIMPeriod to dtim_period 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 615ae59..9d9cf91 100644
@@ -4159,7 +4159,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 	return result;
 }
 
-int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 u32DTIMPeriod,
+int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 		    u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail)
 {
 	int result = 0;
@@ -4179,7 +4179,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 u32DTIMPeriod,
 	msg.id = HOST_IF_MSG_ADD_BEACON;
 	msg.vif = vif;
 	pstrSetBeaconParam->interval = interval;
-	pstrSetBeaconParam->dtim_period = u32DTIMPeriod;
+	pstrSetBeaconParam->dtim_period = dtim_period;
 	pstrSetBeaconParam->head_len = u32HeadLen;
 	pstrSetBeaconParam->head = kmemdup(pu8Head, u32HeadLen, GFP_KERNEL);
 	if (!pstrSetBeaconParam->head) {
drivers/staging/wilc1000/host_interface.h +1 -1
index 93a8abb..58b73d6 100644
@@ -343,7 +343,7 @@ s32 wilc_hif_set_cfg(struct wilc_vif *vif,
 		     struct cfg_param_val *pstrCfgParamVal);
 s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 s32 wilc_deinit(struct wilc_vif *vif);
-int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 u32DTIMPeriod,
+int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 		    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);
Signature · 1 line
2.6.4
#25 lore raw

PATCH 26/30 staging: wilc1000: rename u32HeadLen in wilc_add_beacon

In reply to Chaehyun Lim

This patch renames u32HeadLen to head_len 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 9d9cf91..07674d2 100644
@@ -4160,7 +4160,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 }
 
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail)
+		    u32 head_len, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail)
 {
 	int result = 0;
 	struct host_if_msg msg;
@@ -4180,8 +4180,8 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 	msg.vif = vif;
 	pstrSetBeaconParam->interval = interval;
 	pstrSetBeaconParam->dtim_period = dtim_period;
-	pstrSetBeaconParam->head_len = u32HeadLen;
-	pstrSetBeaconParam->head = kmemdup(pu8Head, u32HeadLen, GFP_KERNEL);
+	pstrSetBeaconParam->head_len = head_len;
+	pstrSetBeaconParam->head = kmemdup(pu8Head, head_len, GFP_KERNEL);
 	if (!pstrSetBeaconParam->head) {
 		result = -ENOMEM;
 		goto ERRORHANDLER;
drivers/staging/wilc1000/host_interface.h +1 -1
index 58b73d6..0275028 100644
@@ -344,7 +344,7 @@ s32 wilc_hif_set_cfg(struct wilc_vif *vif,
 s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 s32 wilc_deinit(struct wilc_vif *vif);
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 u32HeadLen, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail);
+		    u32 head_len, 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);
 int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]);
Signature · 1 line
2.6.4
#26 lore raw

PATCH 27/30 staging: wilc1000: rename pu8Head in wilc_add_beacon

In reply to Chaehyun Lim

This patch renames pu8Head to head 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 07674d2..e35465e 100644
@@ -4160,7 +4160,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 }
 
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 head_len, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail)
+		    u32 head_len, u8 *head, u32 u32TailLen, u8 *pu8Tail)
 {
 	int result = 0;
 	struct host_if_msg msg;
@@ -4181,7 +4181,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 	pstrSetBeaconParam->interval = interval;
 	pstrSetBeaconParam->dtim_period = dtim_period;
 	pstrSetBeaconParam->head_len = head_len;
-	pstrSetBeaconParam->head = kmemdup(pu8Head, head_len, GFP_KERNEL);
+	pstrSetBeaconParam->head = kmemdup(head, head_len, GFP_KERNEL);
 	if (!pstrSetBeaconParam->head) {
 		result = -ENOMEM;
 		goto ERRORHANDLER;
drivers/staging/wilc1000/host_interface.h +1 -1
index 0275028..1c3f741 100644
@@ -344,7 +344,7 @@ s32 wilc_hif_set_cfg(struct wilc_vif *vif,
 s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 s32 wilc_deinit(struct wilc_vif *vif);
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 head_len, u8 *pu8Head, u32 u32TailLen, u8 *pu8Tail);
+		    u32 head_len, u8 *head, 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);
 int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]);
Signature · 1 line
2.6.4
#27 lore raw

PATCH 28/30 staging: wilc1000: rename u32TailLen in wilc_add_beacon

In reply to Chaehyun Lim

This patch renames u32TailLen to tail_len 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 e35465e..c81c749 100644
@@ -4160,7 +4160,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 }
 
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 head_len, u8 *head, u32 u32TailLen, u8 *pu8Tail)
+		    u32 head_len, u8 *head, u32 tail_len, u8 *pu8Tail)
 {
 	int result = 0;
 	struct host_if_msg msg;
@@ -4186,10 +4186,10 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 		result = -ENOMEM;
 		goto ERRORHANDLER;
 	}
-	pstrSetBeaconParam->tail_len = u32TailLen;
+	pstrSetBeaconParam->tail_len = tail_len;
 
-	if (u32TailLen > 0) {
-		pstrSetBeaconParam->tail = kmemdup(pu8Tail, u32TailLen,
+	if (tail_len > 0) {
+		pstrSetBeaconParam->tail = kmemdup(pu8Tail, tail_len,
 						   GFP_KERNEL);
 		if (!pstrSetBeaconParam->tail) {
 			result = -ENOMEM;
drivers/staging/wilc1000/host_interface.h +1 -1
index 1c3f741..7e4ea18 100644
@@ -344,7 +344,7 @@ s32 wilc_hif_set_cfg(struct wilc_vif *vif,
 s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 s32 wilc_deinit(struct wilc_vif *vif);
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 head_len, u8 *head, u32 u32TailLen, u8 *pu8Tail);
+		    u32 head_len, u8 *head, u32 tail_len, u8 *pu8Tail);
 int wilc_del_beacon(struct wilc_vif *vif);
 int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param);
 int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]);
Signature · 1 line
2.6.4
#28 lore raw

PATCH 29/30 staging: wilc1000: rename pu8Tail in wilc_add_beacon

In reply to Chaehyun Lim

This patch renames pu8Tail to tail 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 c81c749..8f8c583 100644
@@ -4160,7 +4160,7 @@ int wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)
 }
 
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 head_len, u8 *head, u32 tail_len, u8 *pu8Tail)
+		    u32 head_len, u8 *head, u32 tail_len, u8 *tail)
 {
 	int result = 0;
 	struct host_if_msg msg;
@@ -4189,7 +4189,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 	pstrSetBeaconParam->tail_len = tail_len;
 
 	if (tail_len > 0) {
-		pstrSetBeaconParam->tail = kmemdup(pu8Tail, tail_len,
+		pstrSetBeaconParam->tail = kmemdup(tail, tail_len,
 						   GFP_KERNEL);
 		if (!pstrSetBeaconParam->tail) {
 			result = -ENOMEM;
drivers/staging/wilc1000/host_interface.h +1 -1
index 7e4ea18..b61b484 100644
@@ -344,7 +344,7 @@ s32 wilc_hif_set_cfg(struct wilc_vif *vif,
 s32 wilc_init(struct net_device *dev, struct host_if_drv **phWFIDrv);
 s32 wilc_deinit(struct wilc_vif *vif);
 int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
-		    u32 head_len, u8 *head, u32 tail_len, u8 *pu8Tail);
+		    u32 head_len, u8 *head, u32 tail_len, u8 *tail);
 int wilc_del_beacon(struct wilc_vif *vif);
 int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param);
 int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]);
Signature · 1 line
2.6.4
#29 lore raw

PATCH 30/30 staging: wilc1000: rename pstrSetBeaconParam in wilc_add_beacon

In reply to Chaehyun Lim

This patch renames pstrSetBeaconParam to beacon_info to avoid camelcase.

---
 drivers/staging/wilc1000/host_interface.c | 25 ++++++++++++-------------
 1 file changed, 12 insertions(+), 13 deletions(-)
drivers/staging/wilc1000/host_interface.c +12 -13
index 8f8c583..34d56cd 100644
@@ -4164,7 +4164,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 {
 	int result = 0;
 	struct host_if_msg msg;
-	struct beacon_attr *pstrSetBeaconParam = &msg.body.beacon_info;
+	struct beacon_attr *beacon_info = &msg.body.beacon_info;
 	struct host_if_drv *hif_drv = vif->hif_drv;
 
 	if (!hif_drv) {
@@ -4178,25 +4178,24 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 
 	msg.id = HOST_IF_MSG_ADD_BEACON;
 	msg.vif = vif;
-	pstrSetBeaconParam->interval = interval;
-	pstrSetBeaconParam->dtim_period = dtim_period;
-	pstrSetBeaconParam->head_len = head_len;
-	pstrSetBeaconParam->head = kmemdup(head, head_len, GFP_KERNEL);
-	if (!pstrSetBeaconParam->head) {
+	beacon_info->interval = interval;
+	beacon_info->dtim_period = dtim_period;
+	beacon_info->head_len = head_len;
+	beacon_info->head = kmemdup(head, head_len, GFP_KERNEL);
+	if (!beacon_info->head) {
 		result = -ENOMEM;
 		goto ERRORHANDLER;
 	}
-	pstrSetBeaconParam->tail_len = tail_len;
+	beacon_info->tail_len = tail_len;
 
 	if (tail_len > 0) {
-		pstrSetBeaconParam->tail = kmemdup(tail, tail_len,
-						   GFP_KERNEL);
-		if (!pstrSetBeaconParam->tail) {
+		beacon_info->tail = kmemdup(tail, tail_len, GFP_KERNEL);
+		if (!beacon_info->tail) {
 			result = -ENOMEM;
 			goto ERRORHANDLER;
 		}
 	} else {
-		pstrSetBeaconParam->tail = NULL;
+		beacon_info->tail = NULL;
 	}
 
 	result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
@@ -4205,9 +4204,9 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,
 
 ERRORHANDLER:
 	if (result) {
-		kfree(pstrSetBeaconParam->head);
+		kfree(beacon_info->head);
 
-		kfree(pstrSetBeaconParam->tail);
+		kfree(beacon_info->tail);
 	}
 
 	return result;
Signature · 1 line
2.6.4