staging: wilc1000: fix return type of host_int_del_beacon
PATCH v3 1/12 staging: wilc1000: fix return type of host_int_del_beacon
This patch changes return type of host_int_del_beacon 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.
---
V3: rebase latest staging-testing.
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
@@ -4505,9 +4505,9 @@ ERRORHANDLER:return result; } -s32 host_int_del_beacon (struct host_if_drv *hif_drv) +int host_int_del_beacon (struct host_if_drv *hif_drv) { -s32 result =0 ; +int result =0 ;struct host_if_msg msg;if (!hif_drv) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -377,7 +377,7 @@ s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,u8 *pu8Head, u32 u32TailLen, u8 *pu8tail); -s32 host_int_del_beacon (struct host_if_drv *hWFIDrv); +int host_int_del_beacon (struct host_if_drv *hWFIDrv);s32 host_int_add_station (struct host_if_drv *hWFIDrv,struct add_sta_param *pstrStaParams); s32 host_int_del_allstation(struct host_if_drv *hWFIDrv,
Signature · 1 line
2.6.3
PATCH v3 2/12 staging: wilc1000: fix parameter name of host_int_del_beacon
This patch changes struct host_if_drv of host_int_del_beacon function declaration from hWFIDrv to hif_drv.
With this change, first parameter name of this function declaration and definition has same name as hif_drv.
---
V3: rebase latest staging-testing.
drivers/staging/wilc1000/host_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -377,7 +377,7 @@ s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,u8 *pu8Head, u32 u32TailLen, u8 *pu8tail); -int host_int_del_beacon (struct host_if_drv *hWFIDrv); +int host_int_del_beacon (struct host_if_drv *hif_drv);s32 host_int_add_station (struct host_if_drv *hWFIDrv,struct add_sta_param *pstrStaParams); s32 host_int_del_allstation(struct host_if_drv *hWFIDrv,
Signature · 1 line
2.6.3
PATCH v3 3/12 staging: wilc1000: fix return type of host_int_del_station
In reply to Chaehyun LimThis patch changes return type of host_int_del_station 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.
---
V3: rebase latest staging-testing.
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
@@ -4563,9 +4563,9 @@ s32 host_int_add_station(struct host_if_drv *hif_drv,return result; } -s32 host_int_del_station (struct host_if_drv *hif_drv,const u8 *pu8MacAddr) +int host_int_del_station (struct host_if_drv *hif_drv,const u8 *pu8MacAddr) { -s32 result =0 ; +int result =0 ;struct host_if_msg msg;struct del_sta *pstrDelStationMsg = &msg.body.del_sta_info;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -382,7 +382,7 @@ s32 host_int_add_station(struct host_if_drv *hWFIDrv, struct add_sta_param *pstrStaParams);s32 host_int_del_allstation (struct host_if_drv *hWFIDrv,u8 pu8MacAddr[][ETH_ALEN ]); -s32 host_int_del_station (struct host_if_drv *hWFIDrv,const u8 *pu8MacAddr); +int host_int_del_station (struct host_if_drv *hWFIDrv,const u8 *pu8MacAddr);s32 host_int_edit_station (struct host_if_drv *hWFIDrv,struct add_sta_param *pstrStaParams); s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv,
Signature · 1 line
2.6.3
PATCH v3 4/12 staging: wilc1000: fix parameter name of host_int_del_station
In reply to Chaehyun LimThis patch changes struct host_if_drv of host_int_del_station function declaration from hWFIDrv to hif_drv.
With this change, first parameter name of this function declaration and definition has same name as hif_drv.
---
V3: rebase latest staging-testing.
drivers/staging/wilc1000/host_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -382,7 +382,7 @@ s32 host_int_add_station(struct host_if_drv *hWFIDrv, struct add_sta_param *pstrStaParams);s32 host_int_del_allstation (struct host_if_drv *hWFIDrv,u8 pu8MacAddr[][ETH_ALEN ]); -int host_int_del_station (struct host_if_drv *hWFIDrv,const u8 *pu8MacAddr); +int host_int_del_station (struct host_if_drv *hif_drv,const u8 *pu8MacAddr);s32 host_int_edit_station (struct host_if_drv *hWFIDrv,struct add_sta_param *pstrStaParams); s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv,
Signature · 1 line
2.6.3
PATCH v3 5/12 staging: wilc1000: rename pu8MacAddr in host_int_del_station
In reply to Chaehyun LimThis patch changes pu8MacAddr to mac_addr that is second argument of this function to avoid camelcase.
---
V3: rebase latest staging-testing.
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
@@ -4563,7 +4563,7 @@ s32 host_int_add_station(struct host_if_drv *hif_drv,return result; } -int host_int_del_station (struct host_if_drv *hif_drv,const u8 *pu8MacAddr) +int host_int_del_station (struct host_if_drv *hif_drv,const u8 *mac_addr) {int result =0 ;struct host_if_msg msg;
@@ -4581,10 +4581,10 @@ int host_int_del_station(struct host_if_drv *hif_drv, const u8 *pu8MacAddr) msg.id =HOST_IF_MSG_DEL_STATION ; msg.drv = hif_drv; -if (!pu8MacAddr) +if (!mac_addr)eth_broadcast_addr (pstrDelStationMsg->mac_addr);else -memcpy (pstrDelStationMsg->mac_addr, pu8MacAddr,ETH_ALEN ); +memcpy (pstrDelStationMsg->mac_addr, mac_addr,ETH_ALEN ); result =wilc_mq_send (&hif_msg_q, &msg,sizeof (struct host_if_msg ));if (result)
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -382,7 +382,7 @@ s32 host_int_add_station(struct host_if_drv *hWFIDrv, struct add_sta_param *pstrStaParams);s32 host_int_del_allstation (struct host_if_drv *hWFIDrv,u8 pu8MacAddr[][ETH_ALEN ]); -int host_int_del_station (struct host_if_drv *hif_drv,const u8 *pu8MacAddr); +int host_int_del_station (struct host_if_drv *hif_drv,const u8 *mac_addr);s32 host_int_edit_station (struct host_if_drv *hWFIDrv,struct add_sta_param *pstrStaParams); s32 host_int_set_power_mgmt(struct host_if_drv *hWFIDrv,
Signature · 1 line
2.6.3
PATCH v3 6/12 staging: wilc1000: rename pstrDelStationMsg in host_int_del_station
In reply to Chaehyun LimThis patch renames pstrDelStationMsg to del_sta_info to avoid camelcase.
---
V3: rebase latest staging-testing.
drivers/staging/wilc1000/host_interface.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +3 -3
@@ -4567,7 +4567,7 @@ int host_int_del_station(struct host_if_drv *hif_drv, const u8 *mac_addr) {int result =0 ;struct host_if_msg msg; -struct del_sta *pstrDelStationMsg = &msg.body.del_sta_info; +struct del_sta *del_sta_info = &msg.body.del_sta_info;if (!hif_drv) {PRINT_ER ("driver is null\n" );
@@ -4582,9 +4582,9 @@ int host_int_del_station(struct host_if_drv *hif_drv, const u8 *mac_addr) msg.drv = hif_drv;if (!mac_addr) -eth_broadcast_addr (pstrDelStationMsg->mac_addr); +eth_broadcast_addr (del_sta_info->mac_addr);else -memcpy (pstrDelStationMsg->mac_addr, mac_addr,ETH_ALEN ); +memcpy (del_sta_info->mac_addr, mac_addr,ETH_ALEN ); result =wilc_mq_send (&hif_msg_q, &msg,sizeof (struct host_if_msg ));if (result)
Signature · 1 line
2.6.3
PATCH v3 7/12 staging: wilc1000: fix return type of host_int_add_station
In reply to Chaehyun LimThis patch changes return type of host_int_add_station 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.
---
V3: rebase latest staging-testing.
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
@@ -4526,10 +4526,10 @@ int host_int_del_beacon(struct host_if_drv *hif_drv)return result; } -s32 host_int_add_station (struct host_if_drv *hif_drv, +int host_int_add_station (struct host_if_drv *hif_drv,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;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -378,7 +378,7 @@ s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,u32 u32TailLen, u8 *pu8tail);int host_int_del_beacon (struct host_if_drv *hif_drv); -s32 host_int_add_station (struct host_if_drv *hWFIDrv, +int host_int_add_station (struct host_if_drv *hWFIDrv,struct add_sta_param *pstrStaParams);s32 host_int_del_allstation (struct host_if_drv *hWFIDrv,u8 pu8MacAddr[][ETH_ALEN ]);
Signature · 1 line
2.6.3
PATCH v3 8/12 staging: wilc1000: fix parameter name of host_int_add_station
In reply to Chaehyun LimThis patch changes struct host_if_drv of host_int_add_station function declaration from hWFIDrv to hif_drv.
With this change, first parameter of this function declaration and definition has same name as hif_drv.
---
V3: rebase latest staging-testing.
drivers/staging/wilc1000/host_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -378,7 +378,7 @@ s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval,u32 u32TailLen, u8 *pu8tail);int host_int_del_beacon (struct host_if_drv *hif_drv); -int host_int_add_station (struct host_if_drv *hWFIDrv, +int host_int_add_station (struct host_if_drv *hif_drv,struct add_sta_param *pstrStaParams);s32 host_int_del_allstation (struct host_if_drv *hWFIDrv,u8 pu8MacAddr[][ETH_ALEN ]);
Signature · 1 line
2.6.3
PATCH v3 9/12 staging: wilc1000: rename pstrStaParams in host_int_add_station
In reply to Chaehyun LimThis patch renames pstrStaParams to sta_param to avoid camelcase.
---
V3: rebase latest staging-testing.
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
@@ -4527,7 +4527,7 @@ int host_int_del_beacon(struct host_if_drv *hif_drv) }int host_int_add_station (struct host_if_drv *hif_drv, -struct add_sta_param *pstrStaParams) +struct add_sta_param *sta_param) {int result =0 ;struct host_if_msg msg;
@@ -4545,14 +4545,14 @@ int host_int_add_station(struct host_if_drv *hif_drv, msg.id =HOST_IF_MSG_ADD_STATION ; msg.drv = hif_drv; -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
@@ -379,7 +379,7 @@ s32 host_int_add_beacon(struct host_if_drv *hWFIDrv, u32 u32Interval, u8 *pu8tail);int host_int_del_beacon (struct host_if_drv *hif_drv);int host_int_add_station (struct host_if_drv *hif_drv, -struct add_sta_param *pstrStaParams); +struct add_sta_param *sta_param);s32 host_int_del_allstation (struct host_if_drv *hWFIDrv,u8 pu8MacAddr[][ETH_ALEN ]);int host_int_del_station (struct host_if_drv *hif_drv,const u8 *mac_addr);
Signature · 1 line
2.6.3
PATCH v3 10/12 staging: wilc1000: rename pstrAddStationMsg in host_int_add_station
In reply to Chaehyun LimThis patch renames pstrAddStationMsg to add_sta_info to avoid camelcase.
---
V3: rebase latest staging-testing.
drivers/staging/wilc1000/host_interface.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/host_interface.c +6 -6
@@ -4531,7 +4531,7 @@ int host_int_add_station(struct host_if_drv *hif_drv, {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;if (!hif_drv) {PRINT_ER ("driver is null\n" );
@@ -4545,16 +4545,16 @@ int host_int_add_station(struct host_if_drv *hif_drv, msg.id =HOST_IF_MSG_ADD_STATION ; msg.drv = hif_drv; -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.3
PATCH v3 11/12 staging: wilc1000: use kmemdup in host_int_add_station
In reply to Chaehyun LimThis patch replaces kmalloc followed by memcpy with kmemdup.
---
V3: rebase latest staging-testing.
drivers/staging/wilc1000/host_interface.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/host_interface.c +3 -5
@@ -4547,13 +4547,11 @@ int host_int_add_station(struct host_if_drv *hif_drv,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.3
PATCH v3 12/12 staging: wilc1000: remove rates variable in host_int_add_station
In reply to Chaehyun LimInstead of using rates variable, it is used as add_sta_info->rates directly.
---
V3: rebase latest staging-testing.
drivers/staging/wilc1000/host_interface.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/host_interface.c +4 -5
@@ -4547,12 +4547,11 @@ int host_int_add_station(struct host_if_drv *hif_drv,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.3