staging: wilc1000: fix return type of wilc_scan
PATCH 1/13 staging: wilc1000: fix return type of wilc_scan
This patch changes return type of wilc_scan 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
@@ -3672,12 +3672,12 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)return result; } -s32 wilc_scan (struct wilc_vif *vif,u8 u8ScanSource,u8 u8ScanType, +int 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,struct hidden_network *pstrHiddenNetwork) { -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
@@ -335,7 +335,7 @@ 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 *rssi_level); -s32 wilc_scan (struct wilc_vif *vif,u8 u8ScanSource,u8 u8ScanType, +int 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,struct hidden_network *pstrHiddenNetwork);
Signature · 1 line
2.6.4
PATCH 2/13 staging: wilc1000: rename u8ScanSource in wilc_scan
This patch renames u8ScanSource to scan_source 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
@@ -3672,7 +3672,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)return result; } -int wilc_scan (struct wilc_vif *vif,u8 u8ScanSource,u8 u8ScanType, +int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 u8ScanType,u8 *pu8ChnlFreqList,u8 u8ChnlListLen,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork)
@@ -3698,7 +3698,7 @@ int wilc_scan(struct wilc_vif *vif, u8 u8ScanSource, u8 u8ScanType,PRINT_D (HOSTINF_DBG ,"pstrHiddenNetwork IS EQUAL TO NULL\n" ); msg.vif = vif; - msg.body.scan_info.src = u8ScanSource; + msg.body.scan_info.src = scan_source; msg.body.scan_info.type = u8ScanType; msg.body.scan_info.result = ScanResult; msg.body.scan_info.arg = pvUserArg;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -335,7 +335,7 @@ 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 *rssi_level); -int wilc_scan (struct wilc_vif *vif,u8 u8ScanSource,u8 u8ScanType, +int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 u8ScanType,u8 *pu8ChnlFreqList,u8 u8ChnlListLen,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork);
Signature · 1 line
2.6.4
PATCH 3/13 staging: wilc1000: rename u8ScanType in wilc_scan
In reply to Chaehyun LimThis patch renames u8ScanType to scan_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
@@ -3672,7 +3672,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)return result; } -int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 u8ScanType, +int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *pu8ChnlFreqList,u8 u8ChnlListLen,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork)
@@ -3699,7 +3699,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 u8ScanType, msg.vif = vif; msg.body.scan_info.src = scan_source; - msg.body.scan_info.type = u8ScanType; + msg.body.scan_info.type = scan_type; msg.body.scan_info.result = ScanResult; msg.body.scan_info.arg = pvUserArg;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -335,7 +335,7 @@ 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 *rssi_level); -int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 u8ScanType, +int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *pu8ChnlFreqList,u8 u8ChnlListLen,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork);
Signature · 1 line
2.6.4
PATCH 4/13 staging: wilc1000: rename pu8ChnlFreqList in wilc_scan
In reply to Chaehyun LimThis patch renames pu8ChnlFreqList to ch_freq_list 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
@@ -3673,7 +3673,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats) }int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type, -u8 *pu8ChnlFreqList,u8 u8ChnlListLen,const u8 *pu8IEs, +u8 *ch_freq_list,u8 u8ChnlListLen,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork) {
@@ -3705,7 +3705,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.body.scan_info.ch_list_len = u8ChnlListLen; msg.body.scan_info.ch_freq_list =kmalloc (u8ChnlListLen,GFP_KERNEL ); -memcpy (msg.body.scan_info.ch_freq_list, pu8ChnlFreqList, u8ChnlListLen); +memcpy (msg.body.scan_info.ch_freq_list, ch_freq_list, u8ChnlListLen); msg.body.scan_info.ies_len = IEsLen; msg.body.scan_info.ies =kmalloc (IEsLen,GFP_KERNEL );
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -336,7 +336,7 @@ 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 *rssi_level);int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type, -u8 *pu8ChnlFreqList,u8 u8ChnlListLen,const u8 *pu8IEs, +u8 *ch_freq_list,u8 u8ChnlListLen,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork); int wilc_hif_set_cfg(struct wilc_vif *vif,
Signature · 1 line
2.6.4
PATCH 5/13 staging: wilc1000: rename u8ChnlListLen in wilc_scan
In reply to Chaehyun LimThis patch renames u8ChnlListLen to ch_list_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
@@ -3673,7 +3673,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats) }int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type, -u8 *ch_freq_list,u8 u8ChnlListLen,const u8 *pu8IEs, +u8 *ch_freq_list,u8 ch_list_len,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork) {
@@ -3703,9 +3703,9 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.body.scan_info.result = ScanResult; msg.body.scan_info.arg = pvUserArg; - msg.body.scan_info.ch_list_len = u8ChnlListLen; - msg.body.scan_info.ch_freq_list =kmalloc (u8ChnlListLen,GFP_KERNEL ); -memcpy (msg.body.scan_info.ch_freq_list, ch_freq_list, u8ChnlListLen); + msg.body.scan_info.ch_list_len = ch_list_len; + msg.body.scan_info.ch_freq_list =kmalloc (ch_list_len,GFP_KERNEL ); +memcpy (msg.body.scan_info.ch_freq_list, ch_freq_list, ch_list_len); msg.body.scan_info.ies_len = IEsLen; msg.body.scan_info.ies =kmalloc (IEsLen,GFP_KERNEL );
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -336,7 +336,7 @@ 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 *rssi_level);int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type, -u8 *ch_freq_list,u8 u8ChnlListLen,const u8 *pu8IEs, +u8 *ch_freq_list,u8 ch_list_len,const u8 *pu8IEs,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork); int wilc_hif_set_cfg(struct wilc_vif *vif,
Signature · 1 line
2.6.4
PATCH 6/13 staging: wilc1000: rename pu8IEs in wilc_scan
In reply to Chaehyun LimThis patch renames pu8IEs to ies 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
@@ -3673,7 +3673,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats) }int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type, -u8 *ch_freq_list,u8 ch_list_len,const u8 *pu8IEs, +u8 *ch_freq_list,u8 ch_list_len,const u8 *ies,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork) {
@@ -3709,7 +3709,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.body.scan_info.ies_len = IEsLen; msg.body.scan_info.ies =kmalloc (IEsLen,GFP_KERNEL ); -memcpy (msg.body.scan_info.ies, pu8IEs, IEsLen); +memcpy (msg.body.scan_info.ies, ies, IEsLen); result =wilc_mq_send (&hif_msg_q, &msg,sizeof (struct host_if_msg ));if (result) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -336,7 +336,7 @@ 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 *rssi_level);int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type, -u8 *ch_freq_list,u8 ch_list_len,const u8 *pu8IEs, +u8 *ch_freq_list,u8 ch_list_len,const u8 *ies,size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork); int wilc_hif_set_cfg(struct wilc_vif *vif,
Signature · 1 line
2.6.4
PATCH 7/13 staging: wilc1000: rename IEsLen in wilc_scan
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
@@ -3674,7 +3674,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies, -size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg, +size_t ies_len,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork) {int result =0 ;
@@ -3707,9 +3707,9 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.body.scan_info.ch_freq_list =kmalloc (ch_list_len,GFP_KERNEL );memcpy (msg.body.scan_info.ch_freq_list, ch_freq_list, ch_list_len); - msg.body.scan_info.ies_len = IEsLen; - msg.body.scan_info.ies =kmalloc (IEsLen,GFP_KERNEL ); -memcpy (msg.body.scan_info.ies, ies, IEsLen); + msg.body.scan_info.ies_len = ies_len; + msg.body.scan_info.ies =kmalloc (ies_len,GFP_KERNEL ); +memcpy (msg.body.scan_info.ies, ies, ies_len); result =wilc_mq_send (&hif_msg_q, &msg,sizeof (struct host_if_msg ));if (result) {
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -337,7 +337,7 @@ int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);int wilc_get_rssi (struct wilc_vif *vif,s8 *rssi_level);int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies, -size_t IEsLen,wilc_scan_result ScanResult,void *pvUserArg, +size_t ies_len,wilc_scan_result ScanResult,void *pvUserArg,struct hidden_network *pstrHiddenNetwork);int wilc_hif_set_cfg (struct wilc_vif *vif,struct cfg_param_val *cfg_param);
Signature · 1 line
2.6.4
PATCH 8/13 staging: wilc1000: rename ScanResult in wilc_scan
In reply to Chaehyun LimThis patch renames ScanResult to scan_result 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
@@ -3674,15 +3674,15 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies, -size_t ies_len,wilc_scan_result ScanResult,void *pvUserArg, +size_t ies_len,wilc_scan_result scan_result,void *pvUserArg,struct hidden_network *pstrHiddenNetwork) {int result =0 ;struct host_if_msg msg;struct host_if_drv *hif_drv = vif->hif_drv; -if (!hif_drv || !ScanResult) { -PRINT_ER ("hif_drv or ScanResult = NULL\n" ); +if (!hif_drv || !scan_result) { +PRINT_ER ("hif_drv or scan_result = NULL\n" );return -EFAULT ; }
@@ -3700,7 +3700,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.vif = vif; msg.body.scan_info.src = scan_source; msg.body.scan_info.type = scan_type; - msg.body.scan_info.result = ScanResult; + msg.body.scan_info.result = scan_result; msg.body.scan_info.arg = pvUserArg; msg.body.scan_info.ch_list_len = ch_list_len;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -337,7 +337,7 @@ int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);int wilc_get_rssi (struct wilc_vif *vif,s8 *rssi_level);int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies, -size_t ies_len,wilc_scan_result ScanResult,void *pvUserArg, +size_t ies_len,wilc_scan_result scan_result,void *pvUserArg,struct hidden_network *pstrHiddenNetwork);int wilc_hif_set_cfg (struct wilc_vif *vif,struct cfg_param_val *cfg_param);
Signature · 1 line
2.6.4
PATCH 9/13 staging: wilc1000: rename pvUserArg in wilc_scan
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
@@ -3674,7 +3674,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies, -size_t ies_len,wilc_scan_result scan_result,void *pvUserArg, +size_t ies_len,wilc_scan_result scan_result,void *user_arg,struct hidden_network *pstrHiddenNetwork) {int result =0 ;
@@ -3701,7 +3701,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.body.scan_info.src = scan_source; msg.body.scan_info.type = scan_type; msg.body.scan_info.result = scan_result; - msg.body.scan_info.arg = pvUserArg; + msg.body.scan_info.arg = user_arg; msg.body.scan_info.ch_list_len = ch_list_len; msg.body.scan_info.ch_freq_list =kmalloc (ch_list_len,GFP_KERNEL );
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -337,7 +337,7 @@ int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel);int wilc_get_rssi (struct wilc_vif *vif,s8 *rssi_level);int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies, -size_t ies_len,wilc_scan_result scan_result,void *pvUserArg, +size_t ies_len,wilc_scan_result scan_result,void *user_arg,struct hidden_network *pstrHiddenNetwork);int wilc_hif_set_cfg (struct wilc_vif *vif,struct cfg_param_val *cfg_param);
Signature · 1 line
2.6.4
PATCH 10/13 staging: wilc1000: rename pstrHiddenNetwork in wilc_scan
In reply to Chaehyun LimThis patch renames pstrHiddenNetwork to hidden_network to avoid camelcase.
--- drivers/staging/wilc1000/host_interface.c | 10 +++++----- drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/host_interface.c +5 -5
@@ -3675,7 +3675,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats)int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies,size_t ies_len,wilc_scan_result scan_result,void *user_arg, -struct hidden_network *pstrHiddenNetwork) +struct hidden_network *hidden_network) {int result =0 ;struct host_if_msg msg;
@@ -3690,12 +3690,12 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.id =HOST_IF_MSG_SCAN ; -if (pstrHiddenNetwork) { - msg.body.scan_info.hidden_network.net_info = pstrHiddenNetwork->net_info; - msg.body.scan_info.hidden_network.n_ssids = pstrHiddenNetwork->n_ssids; +if (hidden_network) { + msg.body.scan_info.hidden_network.net_info = hidden_network->net_info; + msg.body.scan_info.hidden_network.n_ssids = hidden_network->n_ssids; }else -PRINT_D (HOSTINF_DBG ,"pstrHiddenNetwork IS EQUAL TO NULL\n" ); +PRINT_D (HOSTINF_DBG ,"hidden_network IS EQUAL TO NULL\n" ); msg.vif = vif; msg.body.scan_info.src = scan_source;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -338,7 +338,7 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level);int wilc_scan (struct wilc_vif *vif,u8 scan_source,u8 scan_type,u8 *ch_freq_list,u8 ch_list_len,const u8 *ies,size_t ies_len,wilc_scan_result scan_result,void *user_arg, -struct hidden_network *pstrHiddenNetwork); +struct hidden_network *hidden_network);int wilc_hif_set_cfg (struct wilc_vif *vif,struct cfg_param_val *cfg_param);s32 wilc_init (struct net_device *dev,struct host_if_drv **phWFIDrv);
Signature · 1 line
2.6.4
PATCH 11/13 staging: wilc1000: use kmemdup instead of kmalloc/memcpy
In reply to Chaehyun LimThis patch replaces kmalloc followed by memcpy with kmemdup. It is also added error checking to return -ENOMEM when kmemdup is failed.
--- drivers/staging/wilc1000/host_interface.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/host_interface.c +8 -4
@@ -3704,12 +3704,16 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, msg.body.scan_info.arg = user_arg; msg.body.scan_info.ch_list_len = ch_list_len; - msg.body.scan_info.ch_freq_list =kmalloc (ch_list_len,GFP_KERNEL ); -memcpy (msg.body.scan_info.ch_freq_list, ch_freq_list, ch_list_len); + msg.body.scan_info.ch_freq_list =kmemdup (ch_freq_list, + ch_list_len, +GFP_KERNEL ); +if (!msg.body.scan_info.ch_freq_list) +return -ENOMEM ; msg.body.scan_info.ies_len = ies_len; - msg.body.scan_info.ies =kmalloc (ies_len,GFP_KERNEL ); -memcpy (msg.body.scan_info.ies, ies, ies_len); + msg.body.scan_info.ies =kmemdup (ies, ies_len,GFP_KERNEL ); +if (!msg.body.scan_info.ies) +return -ENOMEM ; result =wilc_mq_send (&hif_msg_q, &msg,sizeof (struct host_if_msg ));if (result) {
Signature · 1 line
2.6.4
PATCH 12/13 staging: wilc1000: rename phWFIDrv in wilc_init declaration
In reply to Chaehyun LimThe second argument name is different between wilc_init declaration and definition. This patch renames phWFIDrv to hif_drv_handler to match argument name.
--- drivers/staging/wilc1000/host_interface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -341,7 +341,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, struct hidden_network *hidden_network);int wilc_hif_set_cfg (struct wilc_vif *vif,struct cfg_param_val *cfg_param); -s32 wilc_init (struct net_device *dev,struct host_if_drv **phWFIDrv); +s32 wilc_init (struct net_device *dev,struct host_if_drv **hif_drv_handler);int wilc_deinit (struct wilc_vif *vif);int wilc_add_beacon (struct wilc_vif *vif,u32 interval,u32 dtim_period,u32 head_len,u8 *head,u32 tail_len,u8 *tail);
Signature · 1 line
2.6.4
PATCH 13/13 staging: wilc1000: fix return type of wilc_init
In reply to Chaehyun LimThis patch changes return type of wilc_init from s32 to int. The error code as -ENOMEM or -EFAULT is returned in the wilc_init. It is better to use return type of int in this function, not s32.
--- 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
@@ -3779,9 +3779,9 @@ static void GetPeriodicRSSI(unsigned long arg)mod_timer (&periodic_rssi, jiffies +msecs_to_jiffies (5000 )); } -s32 wilc_init (struct net_device *dev,struct host_if_drv **hif_drv_handler) +int wilc_init (struct net_device *dev,struct host_if_drv **hif_drv_handler) { -s32 result =0 ; +int result =0 ;struct host_if_drv *hif_drv;struct wilc_vif *vif;struct wilc *wilc;
drivers/staging/wilc1000/host_interface.h +1 -1
@@ -341,7 +341,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, struct hidden_network *hidden_network);int wilc_hif_set_cfg (struct wilc_vif *vif,struct cfg_param_val *cfg_param); -s32 wilc_init (struct net_device *dev,struct host_if_drv **hif_drv_handler); +int wilc_init (struct net_device *dev,struct host_if_drv **hif_drv_handler);int wilc_deinit (struct wilc_vif *vif);int wilc_add_beacon (struct wilc_vif *vif,u32 interval,u32 dtim_period,u32 head_len,u8 *head,u32 tail_len,u8 *tail);
Signature · 1 line
2.6.4