staging: wilc1000: fix return type of wilc_flush_join_req
PATCH 1/21 staging: wilc1000: fix return type of wilc_flush_join_req
This patch changes return type of wilc_flush_join_req 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
@@ -3432,9 +3432,9 @@ s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid,return result; } -s32 wilc_flush_join_req (struct wilc_vif *vif) +int wilc_flush_join_req (struct wilc_vif *vif) { -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
@@ -331,7 +331,7 @@ s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid, wilc_connect_result pfConnectResult, void *pvUserArg, u8 u8security, enum AUTHTYPE tenuAuth_type, u8 u8channel, void *pJoinParams); -s32 wilc_flush_join_req (struct wilc_vif *vif); +int wilc_flush_join_req (struct wilc_vif *vif);s32 wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode);int wilc_set_mac_chnl_num (struct wilc_vif *vif,u8 channel);s32 wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi);
Signature · 1 line
2.6.4
PATCH 2/21 staging: wilc1000: fix return type of wilc_set_join_req
This patch changes return type of wilc_set_join_req 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
@@ -3365,13 +3365,13 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)return result; } -s32 wilc_set_join_req (struct wilc_vif *vif,u8 *pu8bssid,const u8 *pu8ssid, +int wilc_set_join_req (struct wilc_vif *vif,u8 *pu8bssid,const u8 *pu8ssid,size_t ssidLen,const u8 *pu8IEs,size_t IEsLen,wilc_connect_result pfConnectResult,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams) { -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
@@ -326,7 +326,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,int wilc_get_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_set_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_wait_msg_queue_idle (void ); -s32 wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid, +int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, wilc_connect_result pfConnectResult, void *pvUserArg, u8 u8security, enum AUTHTYPE tenuAuth_type,
Signature · 1 line
2.6.4
PATCH 3/21 staging: wilc1000: rename pu8bssid in wilc_set_join_req
In reply to Chaehyun LimThis patch renames pu8bssid to bssid to remove pu8 prefix. There is no need to add this prefix in order to show data type of this variable.
--- 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
@@ -3365,7 +3365,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)return result; } -int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid, +int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, wilc_connect_result pfConnectResult, void *pvUserArg, u8 u8security, enum AUTHTYPE tenuAuth_type,
@@ -3397,9 +3397,9 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid, msg.body.con_info.params = pJoinParams; msg.vif = vif; -if (pu8bssid) { +if (bssid) { msg.body.con_info.bssid =kmalloc (6 ,GFP_KERNEL ); -memcpy (msg.body.con_info.bssid, pu8bssid,6 ); +memcpy (msg.body.con_info.bssid, bssid,6 ); }if (pu8ssid) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -326,7 +326,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,int wilc_get_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_set_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_wait_msg_queue_idle (void ); -int wilc_set_join_req(struct wilc_vif *vif, u8 *pu8bssid, const u8 *pu8ssid, +int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, wilc_connect_result pfConnectResult, void *pvUserArg, u8 u8security, enum AUTHTYPE tenuAuth_type,
Signature · 1 line
2.6.4
PATCH 4/21 staging: wilc1000: rename pu8ssid in wilc_set_join_req
In reply to Chaehyun LimThis patch renames pu8ssid to ssid to remove pu8 prefix. There is no need to add this prefix in order to show data type of this variable.
--- 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
@@ -3365,7 +3365,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)return result; } -int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid, +int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, wilc_connect_result pfConnectResult, void *pvUserArg, u8 u8security, enum AUTHTYPE tenuAuth_type,
@@ -3402,10 +3402,10 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid,memcpy (msg.body.con_info.bssid, bssid,6 ); } -if (pu8ssid) { +if (ssid) { msg.body.con_info.ssid_len = ssidLen; msg.body.con_info.ssid =kmalloc (ssidLen,GFP_KERNEL ); -memcpy (msg.body.con_info.ssid, pu8ssid, ssidLen); +memcpy (msg.body.con_info.ssid, ssid, ssidLen); }if (pu8IEs) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -326,7 +326,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif,int wilc_get_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_set_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_wait_msg_queue_idle (void ); -int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *pu8ssid, +int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssidLen, const u8 *pu8IEs, size_t IEsLen, wilc_connect_result pfConnectResult, void *pvUserArg, u8 u8security, enum AUTHTYPE tenuAuth_type,
Signature · 1 line
2.6.4
PATCH 5/21 staging: wilc1000: rename ssidLen in wilc_set_join_req
In reply to Chaehyun LimThis patch renames ssidLen to ssid_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
@@ -3366,7 +3366,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr) }int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid, -size_t ssidLen,const u8 *pu8IEs,size_t IEsLen, +size_t ssid_len,const u8 *pu8IEs,size_t IEsLen,wilc_connect_result pfConnectResult,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams)
@@ -3403,9 +3403,9 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, }if (ssid) { - msg.body.con_info.ssid_len = ssidLen; - msg.body.con_info.ssid =kmalloc (ssidLen,GFP_KERNEL ); -memcpy (msg.body.con_info.ssid, ssid, ssidLen); + msg.body.con_info.ssid_len = ssid_len; + msg.body.con_info.ssid =kmalloc (ssid_len,GFP_KERNEL ); +memcpy (msg.body.con_info.ssid, ssid, ssid_len); }if (pu8IEs) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -327,7 +327,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);int wilc_set_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_wait_msg_queue_idle (void );int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid, -size_t ssidLen,const u8 *pu8IEs,size_t IEsLen, +size_t ssid_len,const u8 *pu8IEs,size_t IEsLen,wilc_connect_result pfConnectResult,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams);
Signature · 1 line
2.6.4
PATCH 6/21 staging: wilc1000: rename pu8IEs in wilc_set_join_req
In reply to Chaehyun LimThis patch renames pu8IEs to ies 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
@@ -3366,7 +3366,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr) }int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid, -size_t ssid_len,const u8 *pu8IEs,size_t IEsLen, +size_t ssid_len,const u8 *ies,size_t IEsLen,wilc_connect_result pfConnectResult,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams)
@@ -3408,10 +3408,10 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,memcpy (msg.body.con_info.ssid, ssid, ssid_len); } -if (pu8IEs) { +if (ies) { msg.body.con_info.ies_len = IEsLen; msg.body.con_info.ies =kmalloc (IEsLen,GFP_KERNEL ); -memcpy (msg.body.con_info.ies, pu8IEs, IEsLen); +memcpy (msg.body.con_info.ies, ies, IEsLen); }if (hif_drv->hif_state <HOST_IF_CONNECTING ) hif_drv->hif_state =HOST_IF_CONNECTING ;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -327,7 +327,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);int wilc_set_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_wait_msg_queue_idle (void );int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid, -size_t ssid_len,const u8 *pu8IEs,size_t IEsLen, +size_t ssid_len,const u8 *ies,size_t IEsLen,wilc_connect_result pfConnectResult,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams);
Signature · 1 line
2.6.4
PATCH 7/21 staging: wilc1000: rename IEsLen in wilc_set_join_req
In reply to Chaehyun LimThis patch renames IEsLen to ies_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
@@ -3366,7 +3366,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr) }int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid, -size_t ssid_len,const u8 *ies,size_t IEsLen, +size_t ssid_len,const u8 *ies,size_t ies_len,wilc_connect_result pfConnectResult,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams)
@@ -3409,9 +3409,9 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, }if (ies) { - msg.body.con_info.ies_len = IEsLen; - msg.body.con_info.ies =kmalloc (IEsLen,GFP_KERNEL ); -memcpy (msg.body.con_info.ies, ies, IEsLen); + msg.body.con_info.ies_len = ies_len; + msg.body.con_info.ies =kmalloc (ies_len,GFP_KERNEL ); +memcpy (msg.body.con_info.ies, ies, ies_len); }if (hif_drv->hif_state <HOST_IF_CONNECTING ) hif_drv->hif_state =HOST_IF_CONNECTING ;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -327,7 +327,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr);int wilc_set_mac_address (struct wilc_vif *vif,u8 *mac_addr);int wilc_wait_msg_queue_idle (void );int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid, -size_t ssid_len,const u8 *ies,size_t IEsLen, +size_t ssid_len,const u8 *ies,size_t ies_len,wilc_connect_result pfConnectResult,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams);
Signature · 1 line
2.6.4
PATCH 8/21 staging: wilc1000: rename pfConnectResult in wilc_set_join_req
In reply to Chaehyun LimThis patch renames pfConnectResult to connect_result 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
@@ -3367,7 +3367,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len, -wilc_connect_result pfConnectResult,void *pvUserArg, +wilc_connect_result connect_result,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams) {
@@ -3375,7 +3375,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,struct host_if_msg msg;struct host_if_drv *hif_drv = vif->hif_drv; -if (!hif_drv || !pfConnectResult) { +if (!hif_drv || !connect_result) {PRINT_ER ("Driver is null\n" );return -EFAULT ; }
@@ -3392,7 +3392,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, msg.body.con_info.security = u8security; msg.body.con_info.auth_type = tenuAuth_type; msg.body.con_info.ch = u8channel; - msg.body.con_info.result = pfConnectResult; + msg.body.con_info.result = connect_result; msg.body.con_info.arg = pvUserArg; msg.body.con_info.params = pJoinParams; msg.vif = vif;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -328,7 +328,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);int wilc_wait_msg_queue_idle (void );int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len, -wilc_connect_result pfConnectResult,void *pvUserArg, +wilc_connect_result connect_result,void *pvUserArg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams);int wilc_flush_join_req (struct wilc_vif *vif);
Signature · 1 line
2.6.4
PATCH 9/21 staging: wilc1000: rename pvUserArg in wilc_set_join_req
In reply to Chaehyun LimThis 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
@@ -3367,7 +3367,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len, -wilc_connect_result connect_result,void *pvUserArg, +wilc_connect_result connect_result,void *user_arg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams) {
@@ -3393,7 +3393,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, msg.body.con_info.auth_type = tenuAuth_type; msg.body.con_info.ch = u8channel; msg.body.con_info.result = connect_result; - msg.body.con_info.arg = pvUserArg; + msg.body.con_info.arg = user_arg; msg.body.con_info.params = pJoinParams; msg.vif = vif;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -328,7 +328,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr);int wilc_wait_msg_queue_idle (void );int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len, -wilc_connect_result connect_result,void *pvUserArg, +wilc_connect_result connect_result,void *user_arg,u8 u8security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams);int wilc_flush_join_req (struct wilc_vif *vif);
Signature · 1 line
2.6.4
PATCH 10/21 staging: wilc1000: rename u8security in wilc_set_join_req
In reply to Chaehyun LimThis patch renames u8security to security to remove u8 prefix. There is no need to add prefix in order 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
@@ -3368,7 +3368,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len,wilc_connect_result connect_result,void *user_arg, -u8 u8security,enum AUTHTYPE tenuAuth_type, +u8 security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams) {int result =0 ;
@@ -3389,7 +3389,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, msg.id =HOST_IF_MSG_CONNECT ; - msg.body.con_info.security = u8security; + msg.body.con_info.security = security; msg.body.con_info.auth_type = tenuAuth_type; msg.body.con_info.ch = u8channel; msg.body.con_info.result = connect_result;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -329,7 +329,7 @@ int wilc_wait_msg_queue_idle(void);int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len,wilc_connect_result connect_result,void *user_arg, -u8 u8security,enum AUTHTYPE tenuAuth_type, +u8 security,enum AUTHTYPE tenuAuth_type,u8 u8channel,void *pJoinParams);int wilc_flush_join_req (struct wilc_vif *vif);s32 wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode);
Signature · 1 line
2.6.4
PATCH 11/21 staging: wilc1000: rename tenuAuth_type in wilc_set_join_req
In reply to Chaehyun LimThis patch renames tenuAuth_type to auth_type 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
@@ -3368,7 +3368,7 @@ int wilc_set_mac_address(struct wilc_vif *vif, u8 *mac_addr)int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len,wilc_connect_result connect_result,void *user_arg, -u8 security,enum AUTHTYPE tenuAuth_type, +u8 security,enum AUTHTYPE auth_type,u8 u8channel,void *pJoinParams) {int result =0 ;
@@ -3390,7 +3390,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, msg.id =HOST_IF_MSG_CONNECT ; msg.body.con_info.security = security; - msg.body.con_info.auth_type = tenuAuth_type; + msg.body.con_info.auth_type = auth_type; msg.body.con_info.ch = u8channel; msg.body.con_info.result = connect_result; msg.body.con_info.arg = user_arg;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -329,7 +329,7 @@ int wilc_wait_msg_queue_idle(void);int wilc_set_join_req (struct wilc_vif *vif,u8 *bssid,const u8 *ssid,size_t ssid_len,const u8 *ies,size_t ies_len,wilc_connect_result connect_result,void *user_arg, -u8 security,enum AUTHTYPE tenuAuth_type, +u8 security,enum AUTHTYPE auth_type,u8 u8channel,void *pJoinParams);int wilc_flush_join_req (struct wilc_vif *vif);s32 wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode);
Signature · 1 line
2.6.4
PATCH 12/21 staging: wilc1000: rename u8channel in wilc_set_join_req
In reply to Chaehyun LimThis patch renames u8channel to channel to remove u8 prefix. There is no need to add prefix in order 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
@@ -3369,7 +3369,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *ies, size_t ies_len, wilc_connect_result connect_result, void *user_arg, u8 security, enum AUTHTYPE auth_type, - u8 u8channel, void *pJoinParams) + u8 channel, void *pJoinParams) { int result = 0;struct host_if_msg msg;
@@ -3391,7 +3391,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, msg.body.con_info.security = security; msg.body.con_info.auth_type = auth_type; - msg.body.con_info.ch = u8channel; + msg.body.con_info.ch = channel; msg.body.con_info.result = connect_result; msg.body.con_info.arg = user_arg; msg.body.con_info.params = pJoinParams;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -330,7 +330,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *ies, size_t ies_len, wilc_connect_result connect_result, void *user_arg, u8 security, enum AUTHTYPE auth_type, - u8 u8channel, void *pJoinParams); + u8 channel, void *pJoinParams);int wilc_flush_join_req (struct wilc_vif *vif);s32 wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode);int wilc_set_mac_chnl_num (struct wilc_vif *vif,u8 channel);
Signature · 1 line
2.6.4
PATCH 13/21 staging: wilc1000: rename pJoinParams in wilc_set_join_req
In reply to Chaehyun LimThis patch renames pJoinParams to join_params 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
@@ -3369,7 +3369,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *ies, size_t ies_len, wilc_connect_result connect_result, void *user_arg, u8 security, enum AUTHTYPE auth_type, - u8 channel, void *pJoinParams) + u8 channel, void *join_params) { int result = 0;struct host_if_msg msg;
@@ -3380,7 +3380,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,return -EFAULT ; } -if (!pJoinParams) { +if (!join_params) {PRINT_ER ("Unable to Join - JoinParams is NULL\n" );return -EFAULT ; }
@@ -3394,7 +3394,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, msg.body.con_info.ch = channel; msg.body.con_info.result = connect_result; msg.body.con_info.arg = user_arg; - msg.body.con_info.params = pJoinParams; + msg.body.con_info.params = join_params; msg.vif = vif;if (bssid) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -330,7 +330,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, size_t ssid_len, const u8 *ies, size_t ies_len, wilc_connect_result connect_result, void *user_arg, u8 security, enum AUTHTYPE auth_type, - u8 channel, void *pJoinParams); + u8 channel, void *join_params);int wilc_flush_join_req (struct wilc_vif *vif);s32 wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode);int wilc_set_mac_chnl_num (struct wilc_vif *vif,u8 channel);
Signature · 1 line
2.6.4
PATCH 14/21 staging: wilc1000: use kmemdup instead of kmalloc and memcpy
In reply to Chaehyun LimThis patch changes kmalloc/memcpy to kmemdup.
It is also added error checking to return -ENOMEM if kmemdup is failed.
--- drivers/staging/wilc1000/host_interface.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/host_interface.c +9 -6
@@ -3398,20 +3398,23 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, msg.vif = vif;if (bssid) { - msg.body.con_info.bssid =kmalloc (6 ,GFP_KERNEL ); -memcpy (msg.body.con_info.bssid, bssid,6 ); + msg.body.con_info.bssid =kmemdup (bssid,6 ,GFP_KERNEL ); +if (!msg.body.con_info.bssid) +return -ENOMEM ; }if (ssid) { msg.body.con_info.ssid_len = ssid_len; - msg.body.con_info.ssid =kmalloc (ssid_len,GFP_KERNEL ); -memcpy (msg.body.con_info.ssid, ssid, ssid_len); + msg.body.con_info.ssid =kmemdup (ssid, ssid_len,GFP_KERNEL ); +if (!msg.body.con_info.ssid) +return -ENOMEM ; }if (ies) { msg.body.con_info.ies_len = ies_len; - msg.body.con_info.ies =kmalloc (ies_len,GFP_KERNEL ); -memcpy (msg.body.con_info.ies, ies, ies_len); + msg.body.con_info.ies =kmemdup (ies, ies_len,GFP_KERNEL ); +if (!msg.body.con_info.ies) +return -ENOMEM ; }if (hif_drv->hif_state <HOST_IF_CONNECTING ) hif_drv->hif_state =HOST_IF_CONNECTING ;
Signature · 1 line
2.6.4
PATCH 15/21 staging: wilc1000: fix return type of wilc_disconnect
In reply to Chaehyun LimThis patch changes return type of wilc_disconnect from s32 to int. The result variable gets return value from wilc_disconnect 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
@@ -3461,9 +3461,9 @@ int wilc_flush_join_req(struct wilc_vif *vif)return result; } -s32 wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode) +int wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode) { -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
@@ -332,7 +332,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, u8 security, enum AUTHTYPE auth_type, u8 channel, void *join_params);int wilc_flush_join_req (struct wilc_vif *vif); -s32 wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode); +int wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode);int wilc_set_mac_chnl_num (struct wilc_vif *vif,u8 channel);s32 wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi); s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
Signature · 1 line
2.6.4
PATCH 16/21 staging: wilc1000: rename u16ReasonCode in wilc_disconnect
In reply to Chaehyun LimThis patch renames u16ReasonCode to reason_code to avoid camelcase.
--- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -3461,7 +3461,7 @@ int wilc_flush_join_req(struct wilc_vif *vif)return result; } -int wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode) +int wilc_disconnect (struct wilc_vif *vif,u16 reason_code) {int result =0 ;struct host_if_msg msg;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -332,7 +332,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid, u8 security, enum AUTHTYPE auth_type, u8 channel, void *join_params);int wilc_flush_join_req (struct wilc_vif *vif); -int wilc_disconnect (struct wilc_vif *vif,u16 u16ReasonCode); +int wilc_disconnect (struct wilc_vif *vif,u16 reason_code);int wilc_set_mac_chnl_num (struct wilc_vif *vif,u8 channel);s32 wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi); s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,
Signature · 1 line
2.6.4
PATCH 17/21 staging: wilc1000: remove wilc_free_join_params
In reply to Chaehyun Limwilc_free_join_params call kfree. There is no need to use wrapper function, so use kfree directly.
--- drivers/staging/wilc1000/host_interface.c | 8 -------- drivers/staging/wilc1000/host_interface.h | 3 --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 3 files changed, 3 insertions(+), 14 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -8
@@ -4609,14 +4609,6 @@ static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo)return (void *)pNewJoinBssParam; } -void wilc_free_join_params (void *pJoinParams) -{ -if ((struct bss_param *)pJoinParams) -kfree ((struct bss_param *)pJoinParams); -else -PRINT_ER ("Unable to FREE null pointer\n" ); -} -s32 wilc_del_all_rx_ba_session (struct wilc_vif *vif,char *pBSSID,char TID ) {s32 result =0 ;
drivers/staging/wilc1000/host_interface.h +0 -3
@@ -365,9 +365,6 @@ 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_set_wfi_drv_handler (struct wilc_vif *vif,int index);int wilc_set_operation_mode (struct wilc_vif *vif,u32 mode); - -void wilc_free_join_params (void *pJoinParams); -s32 wilc_get_statistics (struct wilc_vif *vif,struct rf_info *pstrStatistics);void wilc_resolve_disconnect_aberration (struct wilc_vif *vif);int wilc_get_vif_idx (struct wilc_vif *vif);
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +3 -3
@@ -196,7 +196,7 @@ static void clear_shadow_scan(void) last_scanned_shadow[last_scanned_cnt].pu8IEs =NULL ; } -wilc_free_join_params (last_scanned_shadow[i].pJoinParams); +kfree (last_scanned_shadow[i].pJoinParams); last_scanned_shadow[i].pJoinParams =NULL ; } last_scanned_cnt =0 ;
@@ -282,7 +282,7 @@ static void remove_network_from_shadow(unsigned long arg)kfree (last_scanned_shadow[i].pu8IEs); last_scanned_shadow[i].pu8IEs =NULL ; -wilc_free_join_params (last_scanned_shadow[i].pJoinParams); +kfree (last_scanned_shadow[i].pJoinParams);for (j = i; (j < last_scanned_cnt -1 ); j++) last_scanned_shadow[j] = last_scanned_shadow[j +1 ];
@@ -376,7 +376,7 @@ static void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, last_scanned_shadow[ap_index].u32TimeRcvdInScanCached = jiffies; last_scanned_shadow[ap_index].u8Found =1 ;if (ap_found !=-1 ) -wilc_free_join_params (last_scanned_shadow[ap_index].pJoinParams); +kfree (last_scanned_shadow[ap_index].pJoinParams); last_scanned_shadow[ap_index].pJoinParams = pJoinParams; }
Signature · 1 line
2.6.4
PATCH 18/21 staging: wilc1000: fix return type of wilc_get_rssi
In reply to Chaehyun LimThis patch changes return type of wilc_get_rssi 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
@@ -3628,9 +3628,9 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,return result; } -s32 wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi) +int wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi) { -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
@@ -334,7 +334,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,int wilc_flush_join_req (struct wilc_vif *vif);int wilc_disconnect (struct wilc_vif *vif,u16 reason_code);int wilc_set_mac_chnl_num (struct wilc_vif *vif,u8 channel); -s32 wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi); +int wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi); s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType, u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs, size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg,
Signature · 1 line
2.6.4
PATCH 19/21 staging: wilc1000: rename ps8Rssi in wilc_get_rssi
In reply to Chaehyun LimThis patch renames ps8Rssi to rssi_level 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
@@ -3628,7 +3628,7 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac,return result; } -int wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi) +int wilc_get_rssi (struct wilc_vif *vif,s8 *rssi_level) {int result =0 ;struct host_if_msg msg;
@@ -3646,12 +3646,12 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *ps8Rssi)down (&hif_drv->sem_get_rssi); -if (!ps8Rssi) { +if (!rssi_level) {PRINT_ER ("RSS pointer value is null" );return -EFAULT ; } - *ps8Rssi = rssi; + *rssi_level = rssi;return result; }
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -334,7 +334,7 @@ int wilc_set_join_req(struct wilc_vif *vif, u8 *bssid, const u8 *ssid,int wilc_flush_join_req (struct wilc_vif *vif);int wilc_disconnect (struct wilc_vif *vif,u16 reason_code);int wilc_set_mac_chnl_num (struct wilc_vif *vif,u8 channel); -int wilc_get_rssi (struct wilc_vif *vif,s8 *ps8Rssi); +int wilc_get_rssi (struct wilc_vif *vif,s8 *rssi_level); s32 wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType, u8 *pu8ChnlFreqList, u8 u8ChnlListLen, const u8 *pu8IEs, size_t IEsLen, wilc_scan_result ScanResult, void *pvUserArg,
Signature · 1 line
2.6.4
PATCH 20/21 staging: wilc1000: fix return type of wilc_get_statistics
In reply to Chaehyun LimThis patch changes return type of wilc_get_statistics 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
@@ -3656,9 +3656,9 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)return result; } -s32 wilc_get_statistics (struct wilc_vif *vif,struct rf_info *pstrStatistics) +int wilc_get_statistics (struct wilc_vif *vif,struct rf_info *pstrStatistics) { -s32 result =0 ; +int result =0 ;struct host_if_msg msg;memset (&msg,0 ,sizeof (struct host_if_msg ));
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -365,7 +365,7 @@ 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_set_wfi_drv_handler (struct wilc_vif *vif,int index);int wilc_set_operation_mode (struct wilc_vif *vif,u32 mode); -s32 wilc_get_statistics (struct wilc_vif *vif,struct rf_info *pstrStatistics); +int wilc_get_statistics (struct wilc_vif *vif,struct rf_info *pstrStatistics);void wilc_resolve_disconnect_aberration (struct wilc_vif *vif);int wilc_get_vif_idx (struct wilc_vif *vif);
Signature · 1 line
2.6.4
PATCH 21/21 staging: wilc1000: rename pstrStatistics in wilc_get_statistics
In reply to Chaehyun LimThis patch renames pstrStatistics to stats 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
@@ -3656,14 +3656,14 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level)return result; } -int wilc_get_statistics (struct wilc_vif *vif,struct rf_info *pstrStatistics) +int wilc_get_statistics (struct wilc_vif *vif,struct rf_info *stats) {int result =0 ;struct host_if_msg msg;memset (&msg,0 ,sizeof (struct host_if_msg )); msg.id =HOST_IF_MSG_GET_STATISTICS ; - msg.body.data = (char *)pstrStatistics; + msg.body.data = (char *)stats; msg.vif = vif; result =wilc_mq_send (&hif_msg_q, &msg,sizeof (struct host_if_msg ));
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -365,7 +365,7 @@ 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_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 *pstrStatistics); +int wilc_get_statistics (struct wilc_vif *vif,struct rf_info *stats);void wilc_resolve_disconnect_aberration (struct wilc_vif *vif);int wilc_get_vif_idx (struct wilc_vif *vif);
Signature · 1 line
2.6.4