Skip to contentSkip to conversation

staging: wilc1000: fix return type of wilc_frame_register

PATCH In review Chaehyun Lim 2 participants 21 messages Dec 30, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/20 staging: wilc1000: fix return type of wilc_frame_register

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.

---
 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 5113d3d..d9e4e11 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index b8b235d..5ecc978 100644
@@ -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);
Signature · 1 line
2.6.4
#1 lore raw

PATCH 2/20 staging: wilc1000: rename u16FrameType in wilc_frame_register

This patch renames u16FrameType to frame_type 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 d9e4e11..c3e59d8 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index 5ecc978..efb657b 100644
@@ -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);
Signature · 1 line
2.6.4
#2 lore raw

PATCH 3/20 staging: wilc1000: rename bReg in wilc_frame_register

In reply to Chaehyun Lim

This patch renames bReg to reg 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 c3e59d8..9b72519 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index efb657b..b43e0a1 100644
@@ -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);
Signature · 1 line
2.6.4
#3 lore raw

PATCH 4/20 staging: wilc1000: fix return type of wilc_listen_state_expired

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

---
 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 9b72519..4db211b 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index b43e0a1..fbc1ee1 100644
@@ -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);
Signature · 1 line
2.6.4
#4 lore raw

PATCH 5/20 staging: wilc1000: rename u32SessionID in wilc_listen_state_expired

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 4db211b..3a9a967 100644
@@ -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)
drivers/staging/wilc1000/host_interface.h +1 -1
index fbc1ee1..47c664e 100644
@@ -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);
Signature · 1 line
2.6.4
#5 lore raw

PATCH 6/20 staging: wilc1000: fix return type of wilc_set_power_mgmt

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

---
 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 3a9a967..8b1e535 100644
@@ -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;
drivers/staging/wilc1000/host_interface.h +1 -1
index 47c664e..fb9c0ea 100644
@@ -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);
Signature · 1 line
2.6.4
#6 lore raw

PATCH 7/20 staging: wilc1000: rename bIsEnabled in wilc_set_power_mgmt

In reply to Chaehyun Lim

This patch renames bIsEnabled to enabled 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 8b1e535..3ed8275 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index fb9c0ea..89765b8 100644
@@ -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);
Signature · 1 line
2.6.4
#7 lore raw

PATCH 8/20 staging: wilc1000: rename u32Timeout in wilc_set_power_mgmt

In reply to Chaehyun Lim

This patch renames u32Timeout to timeout 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 3ed8275..dc1773d 100644
@@ -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)
drivers/staging/wilc1000/host_interface.h +1 -1
index 89765b8..7b12425 100644
@@ -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);
Signature · 1 line
2.6.4
#8 lore raw

PATCH 9/20 staging: wilc1000: rename pstrPowerMgmtParam in wilc_set_power_mgmt

In reply to Chaehyun Lim

This patch renames pstrPowerMgmtParam to pwr_mgmt_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 dc1773d..83ac21a 100644
@@ -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)
Signature · 1 line
2.6.4
#9 lore raw

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

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

---
 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 83ac21a..8e8e70e 100644
@@ -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;
drivers/staging/wilc1000/host_interface.h +1 -1
index 7b12425..52032be 100644
@@ -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);
Signature · 1 line
2.6.4
#10 lore raw

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

In reply to Chaehyun Lim

This patch renames bIsEnabled to enabled 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 8e8e70e..a32e930 100644
@@ -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));
drivers/staging/wilc1000/host_interface.h +1 -1
index 52032be..9abdd3f 100644
@@ -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);
Signature · 1 line
2.6.4
#11 lore raw

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

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

---
 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 a32e930..489ab29 100644
@@ -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;
@@ -4444,7 +4444,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)
drivers/staging/wilc1000/host_interface.h +1 -1
index 9abdd3f..5c271b1 100644
@@ -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,
Signature · 1 line
2.6.4
#12 lore raw

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

In reply to Chaehyun Lim

This patch renames pstrMulticastFilterParam to multicast_filter_param 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 489ab29..aeb3271 100644
@@ -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)
Signature · 1 line
2.6.4
#13 lore raw

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

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

---
 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 aeb3271..dacadc9 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index 5c271b1..d36a9f5 100644
@@ -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,
Signature · 1 line
2.6.4
#14 lore raw

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

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

---
 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 dacadc9..0d41657 100644
@@ -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;
 
drivers/staging/wilc1000/host_interface.h +1 -1
index d36a9f5..f90a530 100644
@@ -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,
Signature · 1 line
2.6.4
#15 lore raw

PATCH 16/20 staging: wilc1000: remove return statement

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

---
 drivers/staging/wilc1000/host_interface.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -2
index 0d41657..90fdbdd 100644
@@ -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;
Signature · 1 line
2.6.4
#16 lore raw

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

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

---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +3 -3
index 90fdbdd..a203647 100644
@@ -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) {
Signature · 1 line
2.6.4
#18 lore raw

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

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

---
 drivers/staging/wilc1000/host_interface.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/staging/wilc1000/host_interface.c +4 -8
index a203647..72115ae 100644
@@ -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");
Signature · 1 line
2.6.4
#19 lore raw

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

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

---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +3 -3
index 72115ae..c8b4b32 100644
@@ -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;
 
Signature · 1 line
2.6.4
#20 lore raw

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

In reply to Chaehyun Lim

This patch moves static function declaration to front part of host_interface.c file.

---
 drivers/staging/wilc1000/host_interface.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -2
index c8b4b32..5a97a9d 100644
@@ -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;
Signature · 1 line
2.6.4
#17 lore raw

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

In reply to Chaehyun Lim

Hi Lim,

Quoted 15 lines · 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.

---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -0
index 90fdbdd..a203647 100644

drivers/staging/wilc1000/host_interface.c static s32 handle_set_operation_mode(struct wilc_vif *vif, · line 368

Quoted 8 lines
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -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);
 

s32 and int both are same. isn't it ?

Quoted 17 lines
drivers/staging/wilc1000/host_interface.c +2 -3
@@ -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

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

-Souptick