staging: wilc1000: fix return type of host_int_set_wfi_drv_handler
PATCH 1/20 staging: wilc1000: fix return type of host_int_set_wfi_drv_handler
This patch changes return type of host_int_set_wfi_drv_handler from s32 to int. s32Error gets return value from wilc_mq_send that has return type of int. It should be changed return type by int as well as data type of s32Error.
--- 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
@@ -5363,9 +5363,9 @@ int host_int_wait_msg_queue_idle(void)return result; } -s32 host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *u32address) +int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *u32address) { -s32 s32Error =0 ; +int s32Error =0 ;struct host_if_msg msg;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -1186,7 +1186,7 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bRe* @date * @version 1.0 */ -s32 host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *u32address); +int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *u32address);s32 host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode);static s32 Handle_ScanDone (tstrWILC_WFIDrv *drvHandler,tenuScanEvent enuEvent);
Signature · 1 line
2.6.0
PATCH 2/20 staging: wilc1000: remove multiple blank lines
This patch removes multiple blank lines found by checkpatch
CHECK: Please don't use multiple blank lines
FILE: drivers/staging/wilc1000/host_interface.c:5343:
FILE: drivers/staging/wilc1000/host_interface.c:5372:
FILE: drivers/staging/wilc1000/host_interface.c:5389:
--- drivers/staging/wilc1000/host_interface.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -4
@@ -5340,7 +5340,6 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)return 0 ; } -int host_int_wait_msg_queue_idle (void ) {int result =0 ;
@@ -5369,7 +5368,6 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address)struct host_if_msg msg; -/* prepare the set driver handler message */ memset (&msg,0 ,sizeof (struct host_if_msg ));
@@ -5386,8 +5384,6 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address)return s32Error; } - -s32 host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode) {s32 s32Error =0 ;
Signature · 1 line
2.6.0
PATCH 3/20 staging: wilc1000: rename s32Error in host_int_set_wfi_drv_handler
In reply to Chaehyun LimThis patch replaces s32Error with result to avoid camelcase.
--- drivers/staging/wilc1000/host_interface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/host_interface.c +5 -5
@@ -5364,7 +5364,7 @@ int host_int_wait_msg_queue_idle(void)int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *u32address) { -int s32Error =0 ; +int result =0 ;struct host_if_msg msg;
@@ -5375,13 +5375,13 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address) msg.body.drv.u32Address =get_id_from_handler (u32address); msg.drvHandler = u32address; - s32Error =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg )); -if (s32Error) { + result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg )); +if (result) {PRINT_ER ("wilc mq send fail\n" ); - s32Error = -EINVAL ; + result = -EINVAL ; } -return s32Error; +return result; }s32 host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode)
Signature · 1 line
2.6.0
PATCH 4/20 staging: wilc1000: rename u32address in host_int_set_wfi_drv_handler
In reply to Chaehyun LimThis patch replaces u32address with address 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
@@ -5362,7 +5362,7 @@ int host_int_wait_msg_queue_idle(void)return result; } -int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *u32address) +int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *address) {int result =0 ;
@@ -5372,8 +5372,8 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *u32address)memset (&msg,0 ,sizeof (struct host_if_msg )); msg.id =HOST_IF_MSG_SET_WFIDRV_HANDLER ; - msg.body.drv.u32Address =get_id_from_handler (u32address); - msg.drvHandler = u32address; + msg.body.drv.u32Address =get_id_from_handler (address); + msg.drvHandler = address; result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg ));if (result) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -1186,7 +1186,7 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bRe* @date * @version 1.0 */ -int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *u32address); +int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *address);s32 host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode);static s32 Handle_ScanDone (tstrWILC_WFIDrv *drvHandler,tenuScanEvent enuEvent);
Signature · 1 line
2.6.0
PATCH 5/20 staging: wilc1000: fix return type of host_int_set_operation_mode
In reply to Chaehyun LimThis patch changes return type of host_int_set_operation_mode from s32 to int. s32Error gets return value from wilc_mq_send that has return type of int. It should be changed return type by int as well as data type of s32Error.
--- 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
@@ -5384,9 +5384,9 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *address)return result; } -s32 host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode) +int host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode) { -s32 s32Error =0 ; +int s32Error =0 ;struct host_if_msg msg;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -1187,7 +1187,7 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bRe* @version 1.0 */ int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *address); -s32 host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode); +int host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode);static s32 Handle_ScanDone (tstrWILC_WFIDrv *drvHandler,tenuScanEvent enuEvent);
Signature · 1 line
2.6.0
PATCH 6/20 staging: wilc1000: rename s32Error in host_int_set_operation_mode
In reply to Chaehyun LimThis patch replaces s32Error with result to avoid camelcase.
--- drivers/staging/wilc1000/host_interface.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/host_interface.c +5 -5
@@ -5386,7 +5386,7 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *address)int host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode) { -int s32Error =0 ; +int result =0 ;struct host_if_msg msg;
@@ -5398,13 +5398,13 @@ int host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode) msg.body.mode.u32Mode = u32mode; msg.drvHandler = hWFIDrv; - s32Error =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg )); -if (s32Error) { + result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg )); +if (result) {PRINT_ER ("wilc mq send fail\n" ); - s32Error = -EINVAL ; + result = -EINVAL ; } -return s32Error; +return result; }/**
Signature · 1 line
2.6.0
PATCH 7/20 staging: wilc1000: rename hWFIDrv in host_int_set_operation_mode
In reply to Chaehyun LimThis patch replaces hWFIDrv with wfi_drv that is first argument of host_int_set_operation_mode 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
@@ -5384,7 +5384,7 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *address)return result; } -int host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode) +int host_int_set_operation_mode (tstrWILC_WFIDrv *wfi_drv,u32 u32mode) {int result =0 ;
@@ -5396,7 +5396,7 @@ int host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, u32 u32mode)memset (&msg,0 ,sizeof (struct host_if_msg )); msg.id =HOST_IF_MSG_SET_OPERATION_MODE ; msg.body.mode.u32Mode = u32mode; - msg.drvHandler = hWFIDrv; + msg.drvHandler = wfi_drv; result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg ));if (result) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -1187,7 +1187,7 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bRe* @version 1.0 */ int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *address); -int host_int_set_operation_mode (tstrWILC_WFIDrv *hWFIDrv,u32 u32mode); +int host_int_set_operation_mode (tstrWILC_WFIDrv *wfi_drv,u32 u32mode);static s32 Handle_ScanDone (tstrWILC_WFIDrv *drvHandler,tenuScanEvent enuEvent);
Signature · 1 line
2.6.0
PATCH 8/20 staging: wilc1000: rename u32mode in host_int_set_operation_mode
In reply to Chaehyun LimThis patch replaces u32mode with mode that is second argument of host_int_set_operation_mode 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
@@ -5384,7 +5384,7 @@ int host_int_set_wfi_drv_handler(tstrWILC_WFIDrv *address)return result; } -int host_int_set_operation_mode (tstrWILC_WFIDrv *wfi_drv,u32 u32mode) +int host_int_set_operation_mode (tstrWILC_WFIDrv *wfi_drv,u32 mode) {int result =0 ;
@@ -5395,7 +5395,7 @@ int host_int_set_operation_mode(tstrWILC_WFIDrv *wfi_drv, u32 u32mode)memset (&msg,0 ,sizeof (struct host_if_msg )); msg.id =HOST_IF_MSG_SET_OPERATION_MODE ; - msg.body.mode.u32Mode = u32mode; + msg.body.mode.u32Mode = mode; msg.drvHandler = wfi_drv; result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg ));
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -1187,7 +1187,7 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, u16 u16FrameType, bool bRe* @version 1.0 */ int host_int_set_wfi_drv_handler (tstrWILC_WFIDrv *address); -int host_int_set_operation_mode (tstrWILC_WFIDrv *wfi_drv,u32 u32mode); +int host_int_set_operation_mode (tstrWILC_WFIDrv *wfi_drv,u32 mode);static s32 Handle_ScanDone (tstrWILC_WFIDrv *drvHandler,tenuScanEvent enuEvent);
Signature · 1 line
2.6.0
PATCH 9/20 staging: wilc1000: delete multiple blank lines
In reply to Chaehyun LimThis patch deletes multiple blank lines found by checkpatch
CHECK: Please don't use multiple blank lines
FILE: drivers/staging/wilc1000/host_interface.c:5393:
--- drivers/staging/wilc1000/host_interface.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +0 -1
@@ -5390,7 +5390,6 @@ int host_int_set_operation_mode(tstrWILC_WFIDrv *wfi_drv, u32 mode)struct host_if_msg msg; -/* prepare the set driver handler message */ memset (&msg,0 ,sizeof (struct host_if_msg ));
Signature · 1 line
2.6.0
PATCH 10/20 staging: wilc1000: remove host_int_test_set_int_wid
In reply to Chaehyun LimThis function is defined but never used anywhere,
so just delete it.
--- drivers/staging/wilc1000/host_interface.c | 43 ------------------------------- 1 file changed, 43 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -43
@@ -5452,49 +5452,6 @@ s32 host_int_get_host_chnl_num(tstrWILC_WFIDrv *hWFIDrv, u8 *pu8ChNo) } - -/** -* @brief host_int_test_set_int_wid -* @details Test function for setting wids -* @param[in,out] WILC_WFIDrvHandle hWFIDrv, u32 u32TestMemAddr -* @return Error code indicating success/failure -* @note -* @author zsalah -* @date 8 March 2012 -* @version 1.0 -*/ -s32 host_int_test_set_int_wid (tstrWILC_WFIDrv *hWFIDrv,u32 u32TestMemAddr) -{ -s32 s32Error =0 ; -tstrWID strWID; -tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; - - -if (pstrWFIDrv ==NULL ) { -PRINT_ER ("driver is null\n" ); -return -EFAULT ; - } - -/*prepare configuration packet*/ - strWID.u16WIDid = (u16 )WID_MEMORY_ADDRESS ; - strWID.enuWIDtype =WID_INT ; - strWID.ps8WidVal = (char *)&u32TestMemAddr; - strWID.s32ValueSize =sizeof (u32); - -/*Sending Cfg*/ - s32Error =send_config_pkt (SET_CFG , &strWID,1 , true, -get_id_from_handler (pstrWFIDrv)); -if (s32Error) { -PRINT_ER ("Failed to set wid value\n" ); -return -EINVAL ; - }else { -PRINT_D (HOSTINF_DBG ,"Successfully set wid value\n" ); - - } - -return s32Error; -} -/** * @brief host_int_get_inactive_time * @details
Signature · 1 line
2.6.0
PATCH 11/20 staging: wilc1000: remove host_int_get_pmkid_info
In reply to Chaehyun LimThis function is defined but never used anywhere,
so just delete it.
--- drivers/staging/wilc1000/host_interface.c | 35 ------------------------------- drivers/staging/wilc1000/host_interface.h | 25 ---------------------- 2 files changed, 60 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -35
@@ -4765,41 +4765,6 @@ s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, tstrHostIFpmkidAttr *pu8Pmreturn s32Error; } -/** -* @brief gets the cached the pmkid info -* @details valid only in BSS STA mode if External Supplicant -* support is enabled. This Function sets the PMKID in firmware -* when host drivr receives the corresponding request from NDIS. -* The firmware then includes theset PMKID in the appropriate -* management frames -* @param[in,out] handle to the wifi driver, -* message containing PMKID Info in the following format -*|-----------------------------------------------------------------| -*|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] | -*|-----------|------------|----------|-------|----------|----------| -| 1 | 6 | 16 | ... | 6 | 16 | -||-----------------------------------------------------------------| -* @param[in] -* @return Error code indicating success/failure -* @note -* @author zsalah -* @date 8 March 2012 -* @version 1.0 -*/ -s32 host_int_get_pmkid_info (tstrWILC_WFIDrv *hWFIDrv,u8 *pu8PmkidInfoArray, -u32 u32PmkidInfoLen) -{ -s32 s32Error =0 ; -tstrWID strWID; -/* tstrWILC_WFIDrv * pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; */ - - strWID.u16WIDid = (u16 )WID_PMKID_INFO ; - strWID.enuWIDtype =WID_STR ; - strWID.s32ValueSize = u32PmkidInfoLen; - strWID.ps8WidVal = pu8PmkidInfoArray; - -return s32Error; -}/** * @brief sets the pass phrase
drivers/staging/wilc1000/host_interface.h +0 -25
@@ -552,31 +552,6 @@ s32 host_int_add_tx_gtk(tstrWILC_WFIDrv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8*/ s32 host_int_set_pmkid_info (tstrWILC_WFIDrv *hWFIDrv,tstrHostIFpmkidAttr *pu8PmkidInfoArray); -/** -* @brief gets the cached the pmkid info -* @details valid only in BSS STA mode if External Supplicant -* support is enabled. This Function sets the PMKID in firmware -* when host drivr receives the corresponding request from NDIS. -* The firmware then includes theset PMKID in the appropriate -* management frames -* @param[in,out] handle to the wifi driver, -* -* message containing PMKID Info in the following format -*|-----------------------------------------------------------------| -*|NumEntries | BSSID[1] | PMKID[1] | ... | BSSID[K] | PMKID[K] | -*|-----------|------------|----------|-------|----------|----------| -| 1 | 6 | 16 | ... | 6 | 16 | -||-----------------------------------------------------------------| -* @param[in] -* @return Error code indicating success/failure -* @note -* @author zsalah -* @date 8 March 2012 -* @version 1.0 -*/ - -s32 host_int_get_pmkid_info (tstrWILC_WFIDrv *hWFIDrv,u8 *pu8PmkidInfoArray, -u32 u32PmkidInfoLen);/** * @brief sets the pass phrase
Signature · 1 line
2.6.0
PATCH 12/20 staging: wilc1000: remove host_int_set_RSNAConfigPSKPassPhrase
In reply to Chaehyun LimThis function is defined but never used anywhere,
so just delete it.
--- drivers/staging/wilc1000/host_interface.c | 31 ------------------------------- drivers/staging/wilc1000/host_interface.h | 16 ---------------- 2 files changed, 47 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -31
@@ -4765,37 +4765,6 @@ s32 host_int_set_pmkid_info(tstrWILC_WFIDrv *hWFIDrv, tstrHostIFpmkidAttr *pu8Pmreturn s32Error; } - -/** -* @brief sets the pass phrase -* @details AP/STA mode. This function gives the pass phrase used to -* generate the Pre-Shared Key when WPA/WPA2 is enabled -* The length of the field can vary from 8 to 64 bytes, -* the lower layer should get the -* @param[in,out] handle to the wifi driver, -* @param[in] String containing PSK -* @return Error code indicating success/failure -* @note -* @author zsalah -* @date 8 March 2012 -* @version 1.0 -*/ -s32 host_int_set_RSNAConfigPSKPassPhrase (tstrWILC_WFIDrv *hWFIDrv,u8 *pu8PassPhrase, -u8 u8Psklength) -{ -s32 s32Error =0 ; -tstrWID strWID; - -/*validating psk length*/ -if ((u8Psklength >7 ) && (u8Psklength <65 )) { - strWID.u16WIDid = (u16 )WID_11I_PSK ; - strWID.enuWIDtype =WID_STR ; - strWID.ps8WidVal = pu8PassPhrase; - strWID.s32ValueSize = u8Psklength; - } - -return s32Error; -}/** * @brief host_int_get_MacAddress * @details gets mac address
drivers/staging/wilc1000/host_interface.h +0 -16
@@ -554,22 +554,6 @@ s32 host_int_add_tx_gtk(tstrWILC_WFIDrv *hWFIDrv, u8 u8KeyLen, u8 *pu8TxGtk, u8s32 host_int_set_pmkid_info (tstrWILC_WFIDrv *hWFIDrv,tstrHostIFpmkidAttr *pu8PmkidInfoArray);/** -* @brief sets the pass phrase -* @details AP/STA mode. This function gives the pass phrase used to -* generate the Pre-Shared Key when WPA/WPA2 is enabled -* The length of the field can vary from 8 to 64 bytes, -* the lower layer should get the -* @param[in,out] handle to the wifi driver, -* @param[in] String containing PSK -* @return Error code indicating success/failure -* @note -* @author zsalah -* @date 8 March 2012 -* @version 1.0 -*/ -s32 host_int_set_RSNAConfigPSKPassPhrase (tstrWILC_WFIDrv *hWFIDrv,u8 *pu8PassPhrase, -u8 u8Psklength); -/** * @brief gets the pass phrase * @details AP/STA mode. This function gets the pass phrase used to * generate the Pre-Shared Key when WPA/WPA2 is enabled
Signature · 1 line
2.6.0
PATCH 13/20 staging: wilc1000: fix return type of host_int_remove_wep_key
In reply to Chaehyun LimThis patch changes return type of host_int_remove_wep_key from s32 to int. s32Error gets return value from wilc_mq_send that has return type of int. It should be changed return type by int as well as data type of s32Error.
--- 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
@@ -4291,9 +4291,9 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)* @date 8 March 2012 * @version 1.0 */ -s32 host_int_remove_wep_key (tstrWILC_WFIDrv *hWFIDrv,u8 u8keyIdx) +int host_int_remove_wep_key (tstrWILC_WFIDrv *hWFIDrv,u8 u8keyIdx) { -s32 s32Error =0 ; +int s32Error =0 ;tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;struct host_if_msg msg;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -407,7 +407,7 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress);* @date 8 March 2012 * @version 1.0 */ -s32 host_int_remove_wep_key (tstrWILC_WFIDrv *hWFIDrv,u8 u8Index); +int host_int_remove_wep_key (tstrWILC_WFIDrv *hWFIDrv,u8 u8Index);/** * @brief sets WEP deafault key * @details Sets the index of the WEP encryption key in use,
Signature · 1 line
2.6.0
PATCH 14/20 staging: wilc1000: rename hWFIDrv in host_int_remove_wep_key
In reply to Chaehyun LimThis patch replaces hWFIDrv with wfi_drv that is first argument of host_int_remove_wep_key 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
@@ -4291,10 +4291,10 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)* @date 8 March 2012 * @version 1.0 */ -int host_int_remove_wep_key (tstrWILC_WFIDrv *hWFIDrv,u8 u8keyIdx) +int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 u8keyIdx) {int s32Error =0 ; -tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv; +tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;struct host_if_msg msg;
@@ -4311,7 +4311,7 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, u8 u8keyIdx) msg.id =HOST_IF_MSG_KEY ; msg.body.key_info.enuKeyType =WEP ; msg.body.key_info.u8KeyAction =REMOVEKEY ; - msg.drvHandler = hWFIDrv; + msg.drvHandler = wfi_drv;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -407,7 +407,7 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress);* @date 8 March 2012 * @version 1.0 */ -int host_int_remove_wep_key (tstrWILC_WFIDrv *hWFIDrv,u8 u8Index); +int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 u8Index);/** * @brief sets WEP deafault key * @details Sets the index of the WEP encryption key in use,
Signature · 1 line
2.6.0
PATCH 15/20 staging: wilc1000: rename u8keyIdx in host_int_remove_wep_key
In reply to Chaehyun LimThis patch replaces u8keyIdx with index that is secondard argument of host_int_remove_wep_key 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
@@ -4291,7 +4291,7 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)* @date 8 March 2012 * @version 1.0 */ -int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 u8keyIdx) +int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 index) {int s32Error =0 ;tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;
@@ -4316,7 +4316,7 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *wfi_drv, u8 u8keyIdx) msg.body.key_info. - uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8keyIdx; + uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = index;/* send the message */ s32Error =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg ));
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -407,7 +407,7 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress);* @date 8 March 2012 * @version 1.0 */ -int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 u8Index); +int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 index);/** * @brief sets WEP deafault key * @details Sets the index of the WEP encryption key in use,
Signature · 1 line
2.6.0
PATCH 16/20 staging: wilc1000: rename s32Error in host_int_remove_wep_key
In reply to Chaehyun LimThis patch replaces s32Error with result in host_int_remove_wep_key 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
@@ -4293,15 +4293,15 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)*/ int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 index) { -int s32Error =0 ; +int result =0 ;tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;struct host_if_msg msg;if (pstrWFIDrv ==NULL ) { - s32Error = -EFAULT ; + result = -EFAULT ;PRINT_ER ("Failed to send setup multicast config packet\n" ); -return s32Error; +return result; }/* prepare the Remove Wep Key Message */
@@ -4319,12 +4319,12 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *wfi_drv, u8 index) uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = index;/* send the message */ - s32Error =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg )); -if (s32Error) + result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg )); +if (result)PRINT_ER ("Error in sending message queue : Request to remove WEP key\n" );down (&(pstrWFIDrv->hSemTestKeyBlock)); -return s32Error; +return result; }/**
Signature · 1 line
2.6.0
PATCH 17/20 staging: wilc1000: remove pstrWFIDrv in host_int_remove_key
In reply to Chaehyun LimThis patch remove pstrWFIDrv in host_int_remove_key. There is no need to make another variable to check if first argument is NULL or not. It is able to use wfi_drv directly that is first argument of this function.
--- drivers/staging/wilc1000/host_interface.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -3
@@ -4294,11 +4294,10 @@ s32 host_int_remove_key(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8StaAddress)int host_int_remove_wep_key (tstrWILC_WFIDrv *wfi_drv,u8 index) {int result =0 ; -tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)wfi_drv;struct host_if_msg msg; -if (pstrWFIDrv ==NULL ) { +if (wfi_drv ==NULL ) { result = -EFAULT ;PRINT_ER ("Failed to send setup multicast config packet\n" );return result;
@@ -4322,7 +4321,7 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *wfi_drv, u8 index) result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg ));if (result)PRINT_ER ("Error in sending message queue : Request to remove WEP key\n" ); -down (&(pstrWFIDrv->hSemTestKeyBlock)); +down (&(wfi_drv->hSemTestKeyBlock));return result; }
Signature · 1 line
2.6.0
PATCH 18/20 staging: wilc1000: remove multiple blank in host_int_remove_wep_key
In reply to Chaehyun LimThis patch removes multiple blank in host_int_remove_wep_key found by checkpatch.
CHECK: Please don't use multiple blank lines
FILE: drivers/staging/wilc1000/host_interface.c:4299:
FILE: drivers/staging/wilc1000/host_interface.c:4309:
FILE: drivers/staging/wilc1000/host_interface.c:4315:
--- drivers/staging/wilc1000/host_interface.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -4
@@ -4296,7 +4296,6 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *wfi_drv, u8 index)int result =0 ;struct host_if_msg msg; -if (wfi_drv ==NULL ) { result = -EFAULT ;PRINT_ER ("Failed to send setup multicast config packet\n" );
@@ -4306,14 +4305,11 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *wfi_drv, u8 index)/* prepare the Remove Wep Key Message */ memset (&msg,0 ,sizeof (struct host_if_msg )); - msg.id =HOST_IF_MSG_KEY ; msg.body.key_info.enuKeyType =WEP ; msg.body.key_info.u8KeyAction =REMOVEKEY ; msg.drvHandler = wfi_drv; - - msg.body.key_info. uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = index;
Signature · 1 line
2.6.0
PATCH 19/20 staging: wilc1000: fix NULL comparison in host_int_remove_wep_key
In reply to Chaehyun LimThis patch fixes NULL comparison style in host_int_remove_wep_key found by checkpatch.
CHECK: Comparison to NULL could be written "!wfi_drv"
FILE: drivers/staging/wilc1000/host_interface.c:4300
--- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -4296,7 +4296,7 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *wfi_drv, u8 index)int result =0 ;struct host_if_msg msg; -if (wfi_drv ==NULL ) { +if (!wfi_drv) { result = -EFAULT ;PRINT_ER ("Failed to send setup multicast config packet\n" );return result;
Signature · 1 line
2.6.0
PATCH 20/20 staging: wilc1000: remove unnecessary parentheses in host_int_remove_wep_key
In reply to Chaehyun LimThis patch removes unnecessary parentheses in host_int_remove_wep_key found by checkpatch.
CHECK: Unnecessary parentheses around wfi_drv->hSemTestKeyBlock
FILE: drivers/staging/wilc1000/host_interface.c:4320:
--- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -4317,7 +4317,7 @@ int host_int_remove_wep_key(tstrWILC_WFIDrv *wfi_drv, u8 index) result =wilc_mq_send (&gMsgQHostIF, &msg,sizeof (struct host_if_msg ));if (result)PRINT_ER ("Error in sending message queue : Request to remove WEP key\n" ); -down (&(wfi_drv->hSemTestKeyBlock)); +down (&wfi_drv->hSemTestKeyBlock);return result; }
Signature · 1 line
2.6.0