staging: wilc1000: rename WILC_WFI_WiphyFree
PATCH 1/18 staging: wilc1000: rename WILC_WFI_WiphyFree
This patch replaces WILC_WFI_WiphyFree with wilc_free_wiphy to avoid CamelCase.
--- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +1 -1
@@ -2006,7 +2006,7 @@ static void __exit exit_wilc_driver(void)PRINT_D (INIT_DBG ,"Unregistering netdev %p\n" , g_linux_wlan->strInterfaceInfo[i].wilc_netdev);unregister_netdev (g_linux_wlan->strInterfaceInfo[i].wilc_netdev);PRINT_D (INIT_DBG ,"Freeing Wiphy...\n" ); -WILC_WFI_WiphyFree (g_linux_wlan->strInterfaceInfo[i].wilc_netdev); +wilc_free_wiphy (g_linux_wlan->strInterfaceInfo[i].wilc_netdev);PRINT_D (INIT_DBG ,"Freeing netdev...\n" );free_netdev (g_linux_wlan->strInterfaceInfo[i].wilc_netdev); }
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -1
@@ -3689,7 +3689,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net)* @date 01 MAR 2012 * @version 1.0 */ -void WILC_WFI_WiphyFree (struct net_device *net) +void wilc_free_wiphy (struct net_device *net) {PRINT_D (CFG80211_DBG ,"Unregistering wiphy\n" );
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +1 -1
@@ -93,7 +93,7 @@ static const struct ieee80211_txrx_stypesstruct wireless_dev *WILC_WFI_CfgAlloc (void );struct wireless_dev *WILC_WFI_WiphyRegister (struct net_device *net); -void WILC_WFI_WiphyFree (struct net_device *net); +void wilc_free_wiphy (struct net_device *net);int WILC_WFI_update_stats (struct wiphy *wiphy,u32 pktlen,u8 changed);int WILC_WFI_DeInitHostInt (struct net_device *net);int WILC_WFI_InitHostInt (struct net_device *net);
Signature · 1 line
2.5.1
PATCH 2/18 staging: wilc1000: rename WILC_WFI_WiphyRegister
This patch replaces WILC_WFI_WiphyRegister with wilc_create_wiphy to avoid CamelCase.
--- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +1 -1
@@ -1883,7 +1883,7 @@ int wilc_netdev_init(void) {struct wireless_dev *wdev;/*Register WiFi*/ - wdev =WILC_WFI_WiphyRegister (ndev); + wdev =wilc_create_wiphy (ndev);#ifdef WILC_SDIO /* set netdev, tony */
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +2 -2
@@ -3519,7 +3519,7 @@ _fail_: }/** -* @brief WILC_WFI_WiphyRegister +* @brief wilc_create_wiphy * @details Registering of the wiphy structure and interface modes * @param[in] NONE * @return NONE
@@ -3527,7 +3527,7 @@ _fail_:* @date 01 MAR 2012 * @version 1.0 */ -struct wireless_dev *WILC_WFI_WiphyRegister (struct net_device *net) +struct wireless_dev *wilc_create_wiphy (struct net_device *net) {struct wilc_priv *priv;struct wireless_dev *wdev;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +1 -1
@@ -92,7 +92,7 @@ static const struct ieee80211_txrx_stypes#define WILC_WFI_DWELL_ACTIVE 40struct wireless_dev *WILC_WFI_CfgAlloc (void ); -struct wireless_dev *WILC_WFI_WiphyRegister (struct net_device *net); +struct wireless_dev *wilc_create_wiphy (struct net_device *net);void wilc_free_wiphy (struct net_device *net);int WILC_WFI_update_stats (struct wiphy *wiphy,u32 pktlen,u8 changed);int WILC_WFI_DeInitHostInt (struct net_device *net);
Signature · 1 line
2.5.1
PATCH 3/18 staging: wilc1000: fix NULL comparison style
In reply to Chaehyun LimThis patch fixes NULL comparison style found by checkpatch.pl.
CHECK: Comparison to NULL could be written "!net"
CHECK: Comparison to NULL could be written "!net->ieee80211_ptr"
CHECK: Comparison to NULL could be written "!net->ieee80211_ptr->wiphy"
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +3 -3
@@ -3694,17 +3694,17 @@ void wilc_free_wiphy(struct net_device *net)PRINT_D (CFG80211_DBG ,"Unregistering wiphy\n" ); -if (net ==NULL ) { +if (!net) {PRINT_D (INIT_DBG ,"net_device is NULL\n" );return ; } -if (net->ieee80211_ptr ==NULL ) { +if (!net->ieee80211_ptr) {PRINT_D (INIT_DBG ,"ieee80211_ptr is NULL\n" );return ; } -if (net->ieee80211_ptr->wiphy ==NULL ) { +if (!net->ieee80211_ptr->wiphy) {PRINT_D (INIT_DBG ,"wiphy is NULL\n" );return ; }
Signature · 1 line
2.5.1
PATCH 4/18 staging: wilc1000: remove blank line after an open brace '{'
In reply to Chaehyun LimThis patch removes blank line after an open brace '{' found by checkpatch.pl.
CHECK: Blank lines aren't necessary after an open brace '{'
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -1
@@ -3691,7 +3691,6 @@ int WILC_WFI_DeInitHostInt(struct net_device *net)*/ void wilc_free_wiphy (struct net_device *net) { -PRINT_D (CFG80211_DBG ,"Unregistering wiphy\n" );if (!net) {
Signature · 1 line
2.5.1
PATCH 5/18 staging: wilc1000: remove blank line before a close brace '{'
In reply to Chaehyun LimThis patch removes blank line before a close brace '{' found by checkpatch.pl
CHECK: Blank lines aren't necessary before a close brace '}'
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 - 1 file changed, 1 deletion(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -1
@@ -3713,5 +3713,4 @@ void wilc_free_wiphy(struct net_device *net)PRINT_D (INIT_DBG ,"Freeing wiphy\n" );wiphy_free (net->ieee80211_ptr->wiphy);kfree (net->ieee80211_ptr); - }
Signature · 1 line
2.5.1
PATCH 6/18 staging: wilc1000: replace PRINT_D with netdev_info
In reply to Chaehyun LimThis patch replaces PRINT_D with netdev_info in wilc_free_wiphy function.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +2 -2
@@ -3691,7 +3691,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net)*/ void wilc_free_wiphy (struct net_device *net) { -PRINT_D (CFG80211_DBG ,"Unregistering wiphy\n" ); +netdev_info (net,"Unregistering wiphy\n" );if (!net) {PRINT_D (INIT_DBG ,"net_device is NULL\n" );
@@ -3710,7 +3710,7 @@ void wilc_free_wiphy(struct net_device *net)wiphy_unregister (net->ieee80211_ptr->wiphy); -PRINT_D (INIT_DBG ,"Freeing wiphy\n" ); +netdev_info (net,"Freeing wiphy\n" );wiphy_free (net->ieee80211_ptr->wiphy);kfree (net->ieee80211_ptr); }
Signature · 1 line
2.5.1
Greg KH
maintainerRe: [PATCH 06/18] staging: wilc1000: replace PRINT_D with netdev_info
Quoted 12 lines · Chaehyun Lim
This patch replaces
PRINT_Dwithnetdev_infoinwilc_free_wiphyfunction.Signed-off-by Chaehyun Lim <[email protected]>--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0
-0
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c int WILC_WFI_DeInitHostInt(struct net_device *net) · line 3694
Quoted 5 lines
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1
-1@@ -3691,7 +3691,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net)*/ void wilc_free_wiphy (struct net_device *net) { -PRINT_D (CFG80211_DBG ,"Unregistering wiphy\n" ); +netdev_info (net,"Unregistering wiphy\n" );
these were only getting printed out if you had a specific debug flag set. But you just changed it to always print this message, which isn't good.
As this really is just a debugging statement, can you make it netdev_debug() instead?
thanks,
greg k-h
PATCH 7/18 staging: wilc1000: replaces PRINT_D with netdev_err
In reply to Chaehyun LimThis patch replaces PRINT_D with netdev_err which is used at error checking.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +3 -3
@@ -3694,17 +3694,17 @@ void wilc_free_wiphy(struct net_device *net)netdev_info (net,"Unregistering wiphy\n" );if (!net) { -PRINT_D (INIT_DBG ,"net_device is NULL\n" ); +netdev_err (net,"net_device is NULL\n" );return ; }if (!net->ieee80211_ptr) { -PRINT_D (INIT_DBG ,"ieee80211_ptr is NULL\n" ); +netdev_err (net,"ieee80211_ptr is NULL\n" );return ; }if (!net->ieee80211_ptr->wiphy) { -PRINT_D (INIT_DBG ,"wiphy is NULL\n" ); +netdev_err (net,"wiphy is NULL\n" );return ; }
Signature · 1 line
2.5.1
Greg KH
maintainerRe: [PATCH 07/18] staging: wilc1000: replaces PRINT_D with netdev_err
Quoted 13 lines · Chaehyun Lim
This patch replaces
PRINT_Dwithnetdev_errwhich is used at error checking.Signed-off-by Chaehyun Lim <[email protected]>--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0
-0
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c void wilc_free_wiphy(struct net_device *net) · line 3697
Quoted 5 lines
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1
-1@@ -3694,17 +3694,17 @@ void wilc_free_wiphy(struct net_device *net)netdev_info (net,"Unregistering wiphy\n" );if (!net) { -PRINT_D (INIT_DBG ,"net_device is NULL\n" ); +netdev_err (net,"net_device is NULL\n" );
Same comment as the previous one, this conversion is not correct.
thanks,
greg k-h
PATCH 8/18 staging: wilc1000: remove declaration of WILC_WFI_frame_register
In reply to Chaehyun LimThis patch removes function declaration of WILC_WFI_frame_register in linux_wlan.c file, then adds it in wilc_wfi_cfgoperations.h file.
The compilation warning occurs because it is assigned to incorrect pointer type of second parameter of WILC_WFI_frame_register. It is assigned with struct wireless_dev pointer type.
--- drivers/staging/wilc1000/linux_wlan.c | 7 ++----- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +2 -5
@@ -1400,9 +1400,6 @@ int mac_init_fn(struct net_device *ndev)return 0 ; } -void WILC_WFI_frame_register (struct wiphy *wiphy,struct net_device *dev, -u16 frame_type,bool reg); -/* This fn is called, when this device is setup using ifconfig */ int mac_open (struct net_device *ndev) {
@@ -1464,9 +1461,9 @@ int mac_open(struct net_device *ndev) goto _err_; } -WILC_WFI_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev, +WILC_WFI_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev->ieee80211_ptr, nic->g_struct_frame_reg[0 ].frame_type, nic->g_struct_frame_reg[0 ].reg); -WILC_WFI_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev, +WILC_WFI_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev->ieee80211_ptr, nic->g_struct_frame_reg[1 ].frame_type, nic->g_struct_frame_reg[1 ].reg);netif_wake_queue (ndev); g_linux_wlan->open_ifcs++;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +2 -0
@@ -100,6 +100,8 @@ int WILC_WFI_InitHostInt(struct net_device *net);void WILC_WFI_monitor_rx (u8 *buff,u32 size);int WILC_WFI_deinit_mon_interface (void );struct net_device *WILC_WFI_init_mon_interface (const char *name,struct net_device *real_dev); +void WILC_WFI_frame_register (struct wiphy *wiphy,struct wireless_dev *wdev, +u16 frame_type,bool reg);#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54#define DEFAULT_LINK_SPEED 72
Signature · 1 line
2.5.1
Greg KH
maintainerRe: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
Quoted 6 lines · Chaehyun Lim
This patch removes function declaration of
WILC_WFI_frame_registerinlinux_wlan.cfile, then adds it inwilc_wfi_cfgoperations.hfile.The compilation warning occurs because it is assigned to incorrect pointer type of second parameter of
WILC_WFI_frame_register. It is assigned with structwireless_devpointer type.
How was this code ever even working properly if the wrong pointer was being passed into it?
Tony, what is going on here, is this code just never called? If so, can we just delete the whole function?
thanks,
greg k-h
Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
Quoted 10 lines · Greg KH
Quoted 6 lines · Chaehyun Lim
This patch removes function declaration of
WILC_WFI_frame_registerinlinux_wlan.cfile, then adds it inwilc_wfi_cfgoperations.hfile.The compilation warning occurs because it is assigned to incorrect pointer type of second parameter of
WILC_WFI_frame_register. It is assigned with structwireless_devpointer type.How was this code ever even working properly if the wrong pointer was being passed into it?
Quoted 6 lines
Tony, what is going on here, is this code just never called? If so, can we just delete the whole function?
thanks,
greg k-h
This file with linux_wlan.c file is being fully changed, but at this time, the second parameter which passed as net_device pointer instead of wireless_dev incorrectly is never being used inside the WILC_WFI_frame_register(). That's why no problem is found yet.
As of the patch which Chaehyun Lim made, the second parameter, nic->wilc_netdev should be replaced by nic->wilc_netdev->ieee80211_ptr. Thanks,
Tony.
Greg KH
maintainerRe: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
Quoted 16 lines · Tony Cho
Quoted 13 lines · Greg KH
Quoted 6 lines · Chaehyun Lim
This patch removes function declaration of
WILC_WFI_frame_registerinlinux_wlan.cfile, then adds it inwilc_wfi_cfgoperations.hfile.The compilation warning occurs because it is assigned to incorrect pointer type of second parameter of
WILC_WFI_frame_register. It is assigned with structwireless_devpointer type.How was this code ever even working properly if the wrong pointer was being passed into it?
Tony, what is going on here, is this code just never called? If so, can we just delete the whole function?
Quoted 7 lines
Quoted 3 lines
thanks,
greg k-h
This file with
linux_wlan.cfile is being fully changed, but at this time, the second parameter which passed asnet_devicepointer instead ofwireless_devincorrectly is never being used inside theWILC_WFI_frame_register(). That's why no problem is found yet.
Then we should just delte the parameter entirely, no need to pass something into a function that is never used.
Please, someone do that instead.
thanks,
greg k-h
Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
Quoted 16 lines · Greg KH
Quoted 15 lines · Tony Cho
Quoted 13 lines · Greg KH
Quoted 6 lines · Chaehyun Lim
This patch removes function declaration of
WILC_WFI_frame_registerinlinux_wlan.cfile, then adds it inwilc_wfi_cfgoperations.hfile.The compilation warning occurs because it is assigned to incorrect pointer type of second parameter of
WILC_WFI_frame_register. It is assigned with structwireless_devpointer type.How was this code ever even working properly if the wrong pointer was being passed into it?
Tony, what is going on here, is this code just never called? If so, can we just delete the whole function?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
This file with
linux_wlan.cfile is being fully changed, but at this time, the second parameter which passed asnet_devicepointer instead ofwireless_devincorrectly is never being used inside theWILC_WFI_frame_register(). That's why no problem is found yet.Then we should just delte the parameter entirely, no need to pass something into a function that is never used.
This function is defined in the struct cfg80211_ops as the followings:
void (*mgmt_frame_register)(struct wiphy *wiphy,
struct wireless_dev *wdev,
u16 frame_type, bool reg);
So, the second parameter cannot be removed to connect the cfg80211 structure correctly. The second parameter is not used just in wilc driver. It seems the second parameter is not famous in cfg80211 driver when looking for other cfg80211 driver, just to get the private data, but the wilc driver gets it from struct wiphy.
Quoted 5 lines
Please, someone do that instead.
thanks,
greg k-h
Greg KH
maintainerRe: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
Quoted 33 lines · Tony Cho
Quoted 16 lines · Greg KH
Quoted 15 lines · Tony Cho
Quoted 13 lines · Greg KH
Quoted 6 lines · Chaehyun Lim
This patch removes function declaration of
WILC_WFI_frame_registerinlinux_wlan.cfile, then adds it inwilc_wfi_cfgoperations.hfile.The compilation warning occurs because it is assigned to incorrect pointer type of second parameter of
WILC_WFI_frame_register. It is assigned with structwireless_devpointer type.How was this code ever even working properly if the wrong pointer was being passed into it?
Tony, what is going on here, is this code just never called? If so, can we just delete the whole function?
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
This file with
linux_wlan.cfile is being fully changed, but at this time, the second parameter which passed asnet_devicepointer instead ofwireless_devincorrectly is never being used inside theWILC_WFI_frame_register(). That's why no problem is found yet.Then we should just delte the parameter entirely, no need to pass something into a function that is never used.
This function is defined in the struct
cfg80211_opsas the followings:void (*mgmt_frame_register)(struct wiphy *wiphy,
Quoted 8 lines
struct
wireless_dev*wdev,u16
frame_type, bool reg);So, the second parameter cannot be removed to connect the cfg80211 structure correctly. The second parameter is not used just in wilc driver. It seems the second parameter is not famous in cfg80211 driver when looking for other cfg80211 driver, just to get the private data, but the wilc driver gets it from struct wiphy.
Ah, ok, that makes a bit more sense, thanks for explaining it, I'll go try to queue up the patch now...
thanks,
greg k-h
Greg KH
maintainerRe: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
In reply to Chaehyun LimQuoted 8 lines · Chaehyun Lim
This patch removes function declaration of
WILC_WFI_frame_registerinlinux_wlan.cfile, then adds it inwilc_wfi_cfgoperations.hfile.The compilation warning occurs because it is assigned to incorrect pointer type of second parameter of
WILC_WFI_frame_register. It is assigned with structwireless_devpointer type.Signed-off-by Chaehyun Lim <[email protected]>
I've skipped patches 08, 09, and 11 in this series, please rebase and resend once Tony replies with what is really going on with this function...
thanks,
greg k-h
PATCH 9/18 staging: wilc1000: rename WILC_WFI_frame_register
In reply to Chaehyun LimThis patch replaces WILC_WFI_frame_register withwilc_mgmt_frame_register to avoid CamelCase.
--- drivers/staging/wilc1000/linux_wlan.c | 8 ++++---- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 9 ++++----- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +4 -4
@@ -1461,10 +1461,10 @@ int mac_open(struct net_device *ndev) goto _err_; } -WILC_WFI_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev->ieee80211_ptr, - nic->g_struct_frame_reg[0 ].frame_type, nic->g_struct_frame_reg[0 ].reg); -WILC_WFI_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev->ieee80211_ptr, - nic->g_struct_frame_reg[1 ].frame_type, nic->g_struct_frame_reg[1 ].reg); +wilc_mgmt_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev->ieee80211_ptr, + nic->g_struct_frame_reg[0 ].frame_type, nic->g_struct_frame_reg[0 ].reg); +wilc_mgmt_frame_register (nic->wilc_netdev->ieee80211_ptr->wiphy, nic->wilc_netdev->ieee80211_ptr, + nic->g_struct_frame_reg[1 ].frame_type, nic->g_struct_frame_reg[1 ].reg);netif_wake_queue (ndev); g_linux_wlan->open_ifcs++; nic->mac_opened =1 ;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +4 -5
@@ -2541,7 +2541,7 @@ int mgmt_tx_cancel_wait(struct wiphy *wiphy, }/** -* @brief WILC_WFI_frame_register +* @brief wilc_mgmt_frame_register * @details Notify driver that a management frame type was * registered. Note that this callback may not sleep, and cannot run * concurrently with itself.
@@ -2551,9 +2551,8 @@ int mgmt_tx_cancel_wait(struct wiphy *wiphy,* @date 01 JUL 2012 * @version */ -void WILC_WFI_frame_register (struct wiphy *wiphy, -struct wireless_dev *wdev, -u16 frame_type,bool reg) +void wilc_mgmt_frame_register (struct wiphy *wiphy,struct wireless_dev *wdev, +u16 frame_type,bool reg) {struct wilc_priv *priv;
@@ -3416,7 +3415,7 @@ static struct cfg80211_ops wilc_cfg80211_ops = { .cancel_remain_on_channel = cancel_remain_on_channel, .mgmt_tx_cancel_wait = mgmt_tx_cancel_wait, .mgmt_tx = mgmt_tx, - .mgmt_frame_register = WILC_WFI_frame_register, + .mgmt_frame_register = wilc_mgmt_frame_register, .set_power_mgmt = WILC_WFI_set_power_mgmt, .set_cqm_rssi_config = WILC_WFI_set_cqm_rssi_config,
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +2 -2
@@ -100,8 +100,8 @@ int WILC_WFI_InitHostInt(struct net_device *net);void WILC_WFI_monitor_rx (u8 *buff,u32 size);int WILC_WFI_deinit_mon_interface (void );struct net_device *WILC_WFI_init_mon_interface (const char *name,struct net_device *real_dev); -void WILC_WFI_frame_register (struct wiphy *wiphy,struct wireless_dev *wdev, -u16 frame_type,bool reg); +void wilc_mgmt_frame_register (struct wiphy *wiphy,struct wireless_dev *wdev, +u16 frame_type,bool reg);#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54#define DEFAULT_LINK_SPEED 72
Signature · 1 line
2.5.1
PATCH 10/18 staging: wilc1000: rename WILC_WFI_set_power_mgmt
In reply to Chaehyun LimThis patch replaces WILC_WFI_set_power_mgmt with set_power_mgmt to avoid CamelCase.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +4 -4
@@ -2653,7 +2653,7 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,/** -* @brief WILC_WFI_set_power_mgmt +* @brief set_power_mgmt * @details * @param[in] * @return int : Return 0 on Success.
@@ -2661,8 +2661,8 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,* @date 01 JUL 2012 * @version 1.0WILC_WFI_set_cqmWILC_WFI_set_cqm_rssi_configWILC_WFI_set_cqm_rssi_configWILC_WFI_set_cqm_rssi_configWILC_WFI_set_cqm_rssi_config_rssi_config */ -int WILC_WFI_set_power_mgmt (struct wiphy *wiphy,struct net_device *dev, -bool enabled,int timeout) +int set_power_mgmt (struct wiphy *wiphy,struct net_device *dev, +bool enabled,int timeout) {struct wilc_priv *priv;
@@ -3416,7 +3416,7 @@ static struct cfg80211_ops wilc_cfg80211_ops = { .mgmt_tx_cancel_wait = mgmt_tx_cancel_wait, .mgmt_tx = mgmt_tx, .mgmt_frame_register = wilc_mgmt_frame_register, - .set_power_mgmt = WILC_WFI_set_power_mgmt, + .set_power_mgmt = set_power_mgmt, .set_cqm_rssi_config = WILC_WFI_set_cqm_rssi_config, };
Signature · 1 line
2.5.1
Greg KH
maintainerRe: [PATCH 10/18] staging: wilc1000: rename WILC_WFI_set_power_mgmt
Quoted 22 lines · Chaehyun Lim
This patch replaces
WILC_WFI_set_power_mgmtwithset_power_mgmtto avoid CamelCase.Signed-off-by Chaehyun Lim <[email protected]>--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1
-1@@ -2653,7 +2653,7 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,/** -* @brief WILC_WFI_set_power_mgmt +* @brief set_power_mgmt * @details * @param[in] * @return int : Return 0 on Success.
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c static int dump_station(struct wiphy *wiphy, struct net_device *dev, · line 2665
Quoted 7 lines
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +2
-2@@ -2661,8 +2661,8 @@ static int dump_station(struct wiphy *wiphy, struct net_device *dev,* @date 01 JUL 2012 * @version 1.0WILC_WFI_set_cqmWILC_WFI_set_cqm_rssi_configWILC_WFI_set_cqm_rssi_configWILC_WFI_set_cqm_rssi_configWILC_WFI_set_cqm_rssi_config_rssi_config */ -int WILC_WFI_set_power_mgmt (struct wiphy *wiphy,struct net_device *dev, -bool enabled,int timeout) +int set_power_mgmt (struct wiphy *wiphy,struct net_device *dev, +bool enabled,int timeout)
This really should be a static function, especially as you just renamed it to be a very generic name.
thanks,
greg k-h
PATCH 11/18 staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config
In reply to Chaehyun LimThis patch replaces WILC_WFI_set_cqm_rssi_config with set_cqm_rssi_config to avoid CamelCase.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +4 -4
@@ -2600,7 +2600,7 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev, }/** -* @brief WILC_WFI_set_cqm_rssi_config +* @brief set_cqm_rssi_config * @details Configure connection quality monitor RSSI threshold. * @param[in] struct wiphy *wiphy: * @param[in] struct net_device *dev:
@@ -2611,8 +2611,8 @@ void wilc_mgmt_frame_register(struct wiphy *wiphy, struct wireless_dev *wdev,* @date 01 MAR 2012 * @version 1.0 */ -static int WILC_WFI_set_cqm_rssi_config (struct wiphy *wiphy, -struct net_device *dev,s32 rssi_thold,u32 rssi_hyst) +static int set_cqm_rssi_config (struct wiphy *wiphy,struct net_device *dev, +s32 rssi_thold,u32 rssi_hyst) {PRINT_D (CFG80211_DBG ,"Setting CQM RSSi Function\n" );return 0 ;
@@ -3417,7 +3417,7 @@ static struct cfg80211_ops wilc_cfg80211_ops = { .mgmt_tx = mgmt_tx, .mgmt_frame_register = wilc_mgmt_frame_register, .set_power_mgmt = set_power_mgmt, - .set_cqm_rssi_config = WILC_WFI_set_cqm_rssi_config, + .set_cqm_rssi_config = set_cqm_rssi_config, };
Signature · 1 line
2.5.1
Greg KH
maintainerRe: [PATCH 11/18] staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config
Quoted 7 lines · Chaehyun Lim
This patch replaces
WILC_WFI_set_cqm_rssi_configwithset_cqm_rssi_configto avoid CamelCase.Signed-off-by Chaehyun Lim <[email protected]>--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Doesn't apply as I didn't take patch 10 :(
PATCH 12/18 staging: wilc1000: remove useless comment
In reply to Chaehyun LimThis patch removes useless comment that is containing "BugXXXX"
--- drivers/staging/wilc1000/host_interface.c | 14 -------------- drivers/staging/wilc1000/linux_mon.c | 2 -- drivers/staging/wilc1000/linux_wlan.c | 5 ++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 -- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 17 ++--------------- drivers/staging/wilc1000/wilc_wlan.h | 6 ++---- drivers/staging/wilc1000/wilc_wlan_cfg.c | 1 - drivers/staging/wilc1000/wilc_wlan_if.h | 4 ---- 9 files changed, 7 insertions(+), 46 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -14
@@ -244,7 +244,6 @@ typedef struct _tstrHostIFGetChan {u8 u8GetChan; } tstrHostIFGetChan; -/*bug3819: Add Scan acomplete notification to host*/ /*! * @struct tstrScanComplete * @brief hold received Async. Scan Complete message body
@@ -472,7 +471,6 @@ typedef struct _tstrWidJoinReqExt { } tstrWidJoinReqExt;#endif -/*Bug4218: Parsing Join Param*/ #ifdef WILC_PARSE_SCAN_IN_HOST /*Struct containg joinParam of each AP*/ typedef struct _tstrJoinBssParam {
@@ -504,7 +502,6 @@ typedef struct _tstrJoinBssParam {u8 au8Interval[4 ];u8 au8StartTime[4 ]; } tstrJoinBssParam; -/*Bug4218: Parsing Join Param*/ /*a linked list table containing needed join parameters entries for each AP found in most recent scan*/ typedef struct _tstrBssTable { u8 u8noBssEntries;
@@ -573,9 +570,7 @@ tstrWILC_WFIDrv *gu8FlushedJoinReqDrvHandler;#define FLUSHED_JOIN_REQ 1#define FLUSHED_BYTE_POS 79/* Position the byte indicating flushing in the flushed request */ -/*Bug4218: Parsing Join Param*/ #ifdef WILC_PARSE_SCAN_IN_HOST -/*Bug4218: Parsing Join Param*/ static void *host_int_ParseJoinBssParam (tstrNetworkInfo *ptstrNetworkInfo);#endif /*WILC_PARSE_SCAN_IN_HOST*/
@@ -843,7 +838,6 @@ s32 Handle_get_IPAddress(tstrWILC_WFIDrv *drvHandler, u8 *pu8IPAddr, u8 idx) } -/*BugId_5077*/ /** * @brief Handle_SetMacAddress * @details Setting mac address
@@ -1376,7 +1370,6 @@ static s32 Handle_Scan(tstrWILC_WFIDrv *drvHandler, tstrHostIFscanAttr *pstrHost strWIDList[u32WidsCount].u16WIDid =WID_SCAN_CHANNEL_LIST ; strWIDList[u32WidsCount].enuWIDtype =WID_BIN_DATA ; -/* Bug 4648: Convert channel numbers to start from 0 not 1. */ if (pstrHostIFscanAttr->pu8ChnlFreqList !=NULL && pstrHostIFscanAttr->u8ChnlListLen >0 ) {int i;
@@ -1528,7 +1521,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *pswid_site_survey_reslts_s *pstrSurveyResults =NULL ;#else u8 *pu8CurrByte =NULL ; -/*Bug4218: Parsing Join Param*/ #ifdef WILC_PARSE_SCAN_IN_HOST tstrJoinBssParam *ptstrJoinBssParam;#endif /*WILC_PARSE_SCAN_IN_HOST*/
@@ -1704,7 +1696,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *psPRINT_INFO (HOSTINF_DBG ,"Saving connection parameters in global structure\n" ); -/*Bug4218: Parsing Join Param*/ #ifdef WILC_PARSE_SCAN_IN_HOST ptstrJoinBssParam = (tstrJoinBssParam *)pstrHostIFconnectAttr->pJoinParams;if (ptstrJoinBssParam ==NULL ) {
@@ -2325,7 +2316,6 @@ static s32 Handle_RcvdNtwrkInfo(tstrWILC_WFIDrv *drvHandler, tstrRcvdNetworkInfo pstrWFIDrv->strWILC_UsrScanReq.u32RcvdChCount++; pstrNetworkInfo->bNewNetwork = true; -/*Bug4218: Parsing Join Param*/ /* add new BSS to JoinBssTable */ #ifdef WILC_PARSE_SCAN_IN_HOST pJoinParams =host_int_ParseJoinBssParam (pstrNetworkInfo);
@@ -3477,7 +3467,6 @@ static void Handle_AddBeacon(tstrWILC_WFIDrv *drvHandler, tstrHostIFSetBeacon *p *pu8CurrByte++ = ((pstrSetBeaconParam->u32TailLen >>16 ) &0xFF ); *pu8CurrByte++ = ((pstrSetBeaconParam->u32TailLen >>24 ) &0xFF ); -/* Bug 4599 : if tail length = 0 skip copying */ if (pstrSetBeaconParam->pu8Tail >0 )memcpy (pu8CurrByte, pstrSetBeaconParam->pu8Tail, pstrSetBeaconParam->u32TailLen); pu8CurrByte += pstrSetBeaconParam->u32TailLen;
@@ -6951,7 +6940,6 @@ s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 u32Interval,memcpy (pstrSetBeaconParam->pu8Head, pu8Head, u32HeadLen); pstrSetBeaconParam->u32TailLen = u32TailLen; -/* Bug 4599 : if tail length = 0 skip allocating & copying */ if (u32TailLen >0 ) { pstrSetBeaconParam->pu8Tail =kmalloc (u32TailLen,GFP_KERNEL );if (pstrSetBeaconParam->pu8Tail ==NULL ) {
@@ -7279,10 +7267,8 @@ s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u -/*Bug4218: Parsing Join Param*/ #ifdef WILC_PARSE_SCAN_IN_HOST -/*Bug4218: Parsing Join Param*/ /** * @brief host_int_ParseJoinBssParam * @details Parse Needed Join Parameters and save it in a new JoinBssParam entry
drivers/staging/wilc1000/linux_mon.c +0 -2
@@ -60,7 +60,6 @@ void WILC_WFI_monitor_rx(u8 *buff, u32 size)PRINT_INFO (HOSTAPD_DBG ,"In monitor interface receive function\n" ); -/* Bug 4601 */ if (wilc_wfi_mon ==NULL )return ;
@@ -222,7 +221,6 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,struct sk_buff *skb2;struct wilc_wfi_radiotap_cb_hdr *cb_hdr; -/* Bug 4601 */ if (wilc_wfi_mon ==NULL )return -EFAULT ;
drivers/staging/wilc1000/linux_wlan.c +2 -3
@@ -615,7 +615,7 @@ int linux_wlan_get_firmware(perInterface_wlan_t *p_nic) goto _fail_; }#endif - g_linux_wlan->wilc_firmware = wilc_firmware;/* Bug 4703 */ + g_linux_wlan->wilc_firmware = wilc_firmware; _fail_:
@@ -736,7 +736,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_nif (!g_linux_wlan->oup.wlan_cfg_set (0 ,WID_BSS_TYPE , c_val,1 ,0 ,0 )) goto _fail_; -/* c_val[0] = RATE_AUTO; / * bug 4275: Enable autorate and limit it to 24Mbps * / */ +/* c_val[0] = RATE_AUTO; */ c_val[0 ] =RATE_AUTO ;if (!g_linux_wlan->oup.wlan_cfg_set (0 ,WID_CURRENT_TX_RATE , c_val,1 ,0 ,0 )) goto _fail_;
@@ -2009,7 +2009,6 @@ static void __exit exit_wilc_driver(void) } } -/* Bug 4600 : WILC_WFI_deinit_mon_interface was already called at mac_close */ /* WILC_WFI_deinit_mon_interface(); */ /* if(g_linux_wlan->open_ifcs==0) */
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -2
@@ -2529,8 +2529,6 @@ int mgmt_tx_cancel_wait(struct wiphy *wiphy, pstrWFIDrv->u64P2p_MgmtTimeout = jiffies;if (priv->bInP2PlistenState == false) { -/* Bug 5504: This is just to avoid connection failure when getting stuck when the supplicant -* considers the driver falsely that it is in Listen state */ cfg80211_remain_on_channel_expired(priv->wdev, priv->strRemainOnChanParams.u64ListenCookie, priv->strRemainOnChanParams.pstrListenChan,
drivers/staging/wilc1000/wilc_wfi_netdevice.h +1 -1
@@ -188,7 +188,7 @@ typedef struct {unsigned char eth_src_address[NUM_CONCURRENT_IFC ][6 ];/* unsigned char eth_dst_address[6]; */ -const struct firmware *wilc_firmware;/* Bug 4703 */ +const struct firmware *wilc_firmware;struct net_device *real_ndev;#ifdef WILC_SDIO
drivers/staging/wilc1000/wilc_wlan.c +2 -15
@@ -547,7 +547,6 @@ static int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, wireturn p->txq_entries; } -/*Bug3959: transmitting mgmt frames received from host*/ int wilc_wlan_txq_add_mgmt_pkt (void *priv,u8 *buffer,u32 buffer_size,wilc_tx_complete_func_t func) {
@@ -870,9 +869,6 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount)if (tqe->type ==WILC_CFG_PKT ) { vmm_sz =ETH_CONFIG_PKT_HDR_OFFSET ; } -/*Bug3959: transmitting mgmt frames received from host*/ -/*vmm_sz will only be equal to tqe->buffer_size + 4 bytes (HOST_HDR_OFFSET)*/ -/* in other cases WILC_MGMT_PKT and WILC_DATA_PKT_MAC_HDR*/ else if (tqe->type ==WILC_NET_PKT ) { vmm_sz =ETH_ETHERNET_HDR_OFFSET ; }
@@ -959,7 +955,7 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount)/** * write to vmm table **/ - ret = p->hif_func.hif_block_tx (WILC_VMM_TBL_RX_SHADOW_BASE , (u8 *)vmm_table, ((i +1 ) *4 ));/* Bug 4477 fix */ + ret = p->hif_func.hif_block_tx (WILC_VMM_TBL_RX_SHADOW_BASE , (u8 *)vmm_table, ((i +1 ) *4 ));if (!ret) {wilc_debug (N_ERR ,"ERR block TX of VMM table.\n" );break ;
@@ -1057,8 +1053,6 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount) vmm_sz = (vmm_table[i] &0x3ff );/* in word unit */ vmm_sz *=4 ; header = (tqe->type <<31 ) | (tqe->buffer_size <<15 ) | vmm_sz; -/*Bug3959: transmitting mgmt frames received from host*/ -/*setting bit 30 in the host header to indicate mgmt frame*/ if (tqe->type ==WILC_MGMT_PKT ) header |= (1 <<30 );else
@@ -1071,9 +1065,6 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount)if (tqe->type ==WILC_CFG_PKT ) { buffer_offset =ETH_CONFIG_PKT_HDR_OFFSET ; } -/*Bug3959: transmitting mgmt frames received from host*/ -/*buffer offset = HOST_HDR_OFFSET in other cases: WILC_MGMT_PKT*/ -/* and WILC_DATA_PKT_MAC_HDR*/ else if (tqe->type ==WILC_NET_PKT ) {char *pBSSID = ((struct tx_complete_data *)(tqe->priv))->pBssid;
@@ -1434,7 +1425,7 @@ static int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size)u8 *dma_buffer;int ret =0 ; - blksz = (1ul <<12 );/* Bug 4703: 4KB Good enough size for most platforms = PAGE_SIZE. */ + blksz = (1ul <<12 );/* Allocate a DMA coherent buffer. */ dma_buffer =kmalloc (blksz,GFP_KERNEL );
@@ -1685,9 +1676,6 @@ static int wilc_wlan_stop(void) }while (timeout);#if 1 -/******************************************************************************/ -/* This was add at Bug 4595 to reset the chip while maintaining the bus state */ -/******************************************************************************/ reg = ((1 <<0 ) | (1 <<1 ) | (1 <<2 ) | (1 <<3 ) | (1 <<8 ) | (1 <<9 ) | (1 <<26 ) | (1 <<29 ) | (1 <<30 ) | (1 <<31 ));/**/ /**/ p->hif_func.hif_write_reg (WILC_GLB_RESET_0 , reg);/**/
@@ -2106,7 +2094,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) oup->wlan_cfg_get = wilc_wlan_cfg_get; oup->wlan_cfg_get_value = wilc_wlan_cfg_get_val; -/*Bug3959: transmitting mgmt frames received from host*/ oup->wlan_add_mgmt_to_tx_que = wilc_wlan_txq_add_mgmt_pkt;if (!init_chip ()) {
drivers/staging/wilc1000/wilc_wlan.h +2 -4
@@ -22,7 +22,6 @@#define ETH_ETHERNET_HDR_OFFSET (MAX_MAC_HDR_LEN + SUB_MSDU_HEADER_LENGTH + \ SNAP_HDR_LEN - ETHERNET_HDR_LEN + WORD_ALIGNMENT_PAD) -/*Bug3959: transmitting mgmt frames received from host*/ #define HOST_HDR_OFFSET 4#define ETHERNET_HDR_LEN 14#define IP_HDR_LEN 20
@@ -104,8 +103,8 @@#define WILC_AHB_DATA_MEM_BASE 0x30000#define WILC_AHB_SHARE_MEM_BASE 0xd0000 -#define WILC_VMM_TBL_RX_SHADOW_BASE WILC_AHB_SHARE_MEM_BASE/* Bug 4477 fix */ -#define WILC_VMM_TBL_RX_SHADOW_SIZE (256)/* Bug 4477 fix */ +#define WILC_VMM_TBL_RX_SHADOW_BASE WILC_AHB_SHARE_MEM_BASE +#define WILC_VMM_TBL_RX_SHADOW_SIZE (256)#define WILC_GP_REG_0 0x149c#define WILC_GP_REG_1 0x14a0
@@ -137,7 +136,6 @@********************************************/ #define WILC_CFG_PKT 1#define WILC_NET_PKT 0 -/*Bug3959: transmitting mgmt frames received from host*/ #define WILC_MGMT_PKT 2#define WILC_CFG_SET 1
drivers/staging/wilc1000/wilc_wlan_cfg.c +0 -1
@@ -541,7 +541,6 @@ static int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, wilc_cfg_rsp_t *rsp)break ;#endif -/*bug3819:*/ case 'S' :PRINT_INFO (RX_DBG ,"Scan Notification Received\n" );host_int_ScanCompleteReceived (frame -4 , size +4 );
drivers/staging/wilc1000/wilc_wlan_if.h +0 -4
@@ -11,7 +11,6 @@#ifndef WILC_WLAN_IF_H #define WILC_WLAN_IF_H -/*bug 3887: [AP] Allow Management frames to be passed to the host*/ /* #define MEMORY_STATIC */ /* #define USE_OLD_SPI_SW */
@@ -171,7 +170,6 @@ typedef struct {int (*wlan_cfg_set)(int ,u32 ,u8 *,u32 ,int ,u32 );int (*wlan_cfg_get)(int ,u32 ,int ,u32 );int (*wlan_cfg_get_value)(u32 ,u8 *,u32 ); -/*Bug3959: transmitting mgmt frames received from host*/ int (*wlan_add_mgmt_to_tx_que)(void *,u8 *,u32 ,wilc_tx_complete_func_t ); } wilc_wlan_oup_t;
@@ -235,7 +233,6 @@ typedef enum {#define MAC_CONNECTED 1#define MAC_DISCONNECTED 0 -/*bug3819: */ #define SCAN_DONE TRUE typedef enum { PASSIVE_SCAN = 0,
@@ -756,7 +753,6 @@ typedef enum {/* Custom Character WID list */ WID_PC_TEST_MODE =0x00C8 , -/*bug3819: */ /* SCAN Complete notification WID*/ WID_SCAN_COMPLETE = 0x00C9,
Signature · 1 line
2.5.1
PATCH 13/18 staging: wilc1000: wilc_msgqueue.c: replace s32RetStatus with result
In reply to Chaehyun LimThis patch replaces s32RetStatus with result to avoid CamelCase in wilc_msgqueue.c
--- drivers/staging/wilc1000/wilc_msgqueue.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
drivers/staging/wilc1000/wilc_msgqueue.c +9 -9
@@ -55,19 +55,19 @@ int wilc_mq_destroy(WILC_MsgQueueHandle *pHandle)int wilc_mq_send (WILC_MsgQueueHandle *pHandle,const void *pvSendBuffer,u32 u32SendBufferSize) { -int s32RetStatus =0 ; +int result =0 ;unsigned long flags;Message *pstrMessage =NULL ;if ((!pHandle) || (u32SendBufferSize ==0 ) || (!pvSendBuffer)) {PRINT_ER ("pHandle or pvSendBuffer is null\n" ); - s32RetStatus = -EFAULT ; + result = -EFAULT ; goto ERRORHANDLER; }if (pHandle->bExiting) {PRINT_ER ("pHandle fail\n" ); - s32RetStatus = -EFAULT ; + result = -EFAULT ; goto ERRORHANDLER; }
@@ -81,7 +81,7 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle, pstrMessage->pstrNext =NULL ; pstrMessage->pvBuffer =kmalloc (u32SendBufferSize,GFP_ATOMIC );if (!pstrMessage->pvBuffer) { - s32RetStatus = -ENOMEM ; + result = -ENOMEM ; goto ERRORHANDLER; }memcpy (pstrMessage->pvBuffer, pvSendBuffer, u32SendBufferSize);
@@ -109,7 +109,7 @@ ERRORHANDLER:kfree (pstrMessage); } -return s32RetStatus; +return result; }/*!
@@ -123,7 +123,7 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle, u32 *pu32ReceivedLength) {Message *pstrMessage; -int s32RetStatus =0 ; +int result =0 ;unsigned long flags; if ((!pHandle) || (u32RecvBufferSize == 0)
@@ -144,9 +144,9 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,down (&pHandle->hSem);/* other non-timeout scenarios */ -if (s32RetStatus) { +if (result) {PRINT_ER ("Non-timeout\n" ); -return s32RetStatus; +return result; }if (pHandle->bExiting) {
@@ -182,5 +182,5 @@ int wilc_mq_recv(WILC_MsgQueueHandle *pHandle,spin_unlock_irqrestore (&pHandle->strCriticalSection, flags); -return s32RetStatus; +return result; }
Signature · 1 line
2.5.1
PATCH 14/18 staging: wilc1000: remove useless #if 1
In reply to Chaehyun LimThis patch removes #if 1, which is encapsulated some codes.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ---- drivers/staging/wilc1000/wilc_wlan.c | 2 -- drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 -- 3 files changed, 8 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -4
@@ -2947,7 +2947,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,PRINT_D (HOSTAPD_DBG ,"Downloading P2P_CONCURRENCY_FIRMWARE\n" ); -#if 1 nic->iftype =GO_MODE ;/* ensure that the message Q is empty */
@@ -2987,7 +2986,6 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, g_key_gtk_params.key[1 ], g_key_gtk_params.key[2 ], g_key_gtk_params.cipher); -#if 1 add_key(g_linux_wlan->strInterfaceInfo[0].wilc_netdev->ieee80211_ptr->wiphy, g_linux_wlan->strInterfaceInfo[0].wilc_netdev, g_add_ptk_key_params.key_idx,
@@ -3001,9 +2999,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev, g_add_gtk_key_params.pairwise, g_add_gtk_key_params.mac_addr, (struct key_params *)(&g_key_gtk_params)); - #endif } -#endif if (g_linux_wlan->wilc1000_initialized) {for (i =0 ; i < num_reg_frame; i++) {
drivers/staging/wilc1000/wilc_wlan.c +0 -2
@@ -1675,7 +1675,6 @@ static int wilc_wlan_stop(void) } }while (timeout); -#if 1 reg = ((1 <<0 ) | (1 <<1 ) | (1 <<2 ) | (1 <<3 ) | (1 <<8 ) | (1 <<9 ) | (1 <<26 ) | (1 <<29 ) | (1 <<30 ) | (1 <<31 ));/**/ /**/ p->hif_func.hif_write_reg (WILC_GLB_RESET_0 , reg);/**/
@@ -1683,7 +1682,6 @@ static int wilc_wlan_stop(void)/**/ ret = p->hif_func.hif_write_reg (WILC_GLB_RESET_0 , reg);/**/ /******************************************************************************/ -#endif release_bus (RELEASE_ALLOW_SLEEP );
drivers/staging/wilc1000/wilc_wlan_cfg.c +0 -2
@@ -534,13 +534,11 @@ static int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, wilc_cfg_rsp_t *rsp)GnrlAsyncInfoReceived (frame -4 , size +4 );break ; -#if 1 case 'N' :NetworkInfoReceived (frame -4 , size +4 ); rsp->type =0 ;break ; -#endif case 'S' :PRINT_INFO (RX_DBG ,"Scan Notification Received\n" );host_int_ScanCompleteReceived (frame -4 , size +4 );
Signature · 1 line
2.5.1
PATCH 15/18 staging: wilc1000: remove braces for single statement blocks
In reply to Chaehyun LimThis patch removes braces for single if statement blocks found by checkpatch.pl
WARNING: braces {} are not necessary for single statement blocks
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +4 -4
@@ -3626,9 +3626,9 @@ int WILC_WFI_InitHostInt(struct net_device *net)sema_init (&(priv->hSemScanReq),1 ); s32Error =host_int_init (&priv->hWILCWFIDrv); -if (s32Error) { +if (s32Error)PRINT_ER ("Error while initializing hostinterface\n" ); - } +return s32Error; }
@@ -3666,9 +3666,9 @@ int WILC_WFI_DeInitHostInt(struct net_device *net) }#endif -if (s32Error) { +if (s32Error)PRINT_ER ("Error while deintializing host interface\n" ); - } +return s32Error; }
Signature · 1 line
2.5.1
PATCH 16/18 staging: wilc1000: replace s32 with int
In reply to Chaehyun LimThis patch changes date type of s32Error as int.
The return type of WILC_WFI_InitHostInt and WILC_WFI_DeInitHostInt is int so that data type of this variable is changed by int.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +2 -2
@@ -3602,7 +3602,7 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net)int WILC_WFI_InitHostInt (struct net_device *net) { -s32 s32Error =0 ; +int s32Error =0 ;struct wilc_priv *priv;
@@ -3643,7 +3643,7 @@ int WILC_WFI_InitHostInt(struct net_device *net)*/ int WILC_WFI_DeInitHostInt (struct net_device *net) { -s32 s32Error =0 ; +int s32Error =0 ;struct wilc_priv *priv;
Signature · 1 line
2.5.1
PATCH 17/18 staging: wilc1000: rename WILC_WFI_DeInitHostInt
In reply to Chaehyun LimThis patch replaces WILC_WFI_DeInitHostInt with wilc_deinit_host_int to avoid CamelCase.
--- drivers/staging/wilc1000/linux_wlan.c | 6 +++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +3 -3
@@ -1434,7 +1434,7 @@ int mac_open(struct net_device *ndev) ret =wilc1000_wlan_init (ndev, nic);if (ret <0 ) {PRINT_ER ("Failed to initialize wilc1000\n" ); -WILC_WFI_DeInitHostInt (ndev); +wilc_deinit_host_int (ndev);return ret; }
@@ -1471,7 +1471,7 @@ int mac_open(struct net_device *ndev)return 0 ; _err_: -WILC_WFI_DeInitHostInt (ndev); +wilc_deinit_host_int (ndev);wilc1000_wlan_deinit (g_linux_wlan);return ret; }
@@ -1664,7 +1664,7 @@ int mac_close(struct net_device *ndev)/* Stop the network interface queue */ netif_stop_queue (nic->wilc_netdev); -WILC_WFI_DeInitHostInt (nic->wilc_netdev); +wilc_deinit_host_int (nic->wilc_netdev); }if (g_linux_wlan->open_ifcs ==0 ) {
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -1
@@ -3641,7 +3641,7 @@ int WILC_WFI_InitHostInt(struct net_device *net)* @date 01 MAR 2012 * @version 1.0 */ -int WILC_WFI_DeInitHostInt (struct net_device *net) +int wilc_deinit_host_int (struct net_device *net) {int s32Error =0 ;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +1 -1
@@ -95,7 +95,7 @@ struct wireless_dev *WILC_WFI_CfgAlloc(void);struct wireless_dev *wilc_create_wiphy (struct net_device *net);void wilc_free_wiphy (struct net_device *net);int WILC_WFI_update_stats (struct wiphy *wiphy,u32 pktlen,u8 changed); -int WILC_WFI_DeInitHostInt (struct net_device *net); +int wilc_deinit_host_int (struct net_device *net);int WILC_WFI_InitHostInt (struct net_device *net);void WILC_WFI_monitor_rx (u8 *buff,u32 size);int WILC_WFI_deinit_mon_interface (void );
Signature · 1 line
2.5.1
PATCH 18/18 staging: wilc1000: rename WILC_WFI_InitHostInt
In reply to Chaehyun LimThis patch replaces WILC_WFI_InitHostInt with wilc_init_host_int to avoid CamelCase.
--- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +1 -1
@@ -1422,7 +1422,7 @@ int mac_open(struct net_device *ndev) priv =wiphy_priv (nic->wilc_netdev->ieee80211_ptr->wiphy);PRINT_D (INIT_DBG ,"MAC OPEN[%p]\n" , ndev); - ret =WILC_WFI_InitHostInt (ndev); + ret =wilc_init_host_int (ndev);if (ret <0 ) {PRINT_ER ("Failed to initialize host interface\n" );
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -1
@@ -3599,7 +3599,7 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net)* @date 01 MAR 2012 * @version 1.0 */ -int WILC_WFI_InitHostInt (struct net_device *net) +int wilc_init_host_int (struct net_device *net) {int s32Error =0 ;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +1 -1
@@ -96,7 +96,7 @@ struct wireless_dev *wilc_create_wiphy(struct net_device *net);void wilc_free_wiphy (struct net_device *net);int WILC_WFI_update_stats (struct wiphy *wiphy,u32 pktlen,u8 changed);int wilc_deinit_host_int (struct net_device *net); -int WILC_WFI_InitHostInt (struct net_device *net); +int wilc_init_host_int (struct net_device *net);void WILC_WFI_monitor_rx (u8 *buff,u32 size);int WILC_WFI_deinit_mon_interface (void );struct net_device *WILC_WFI_init_mon_interface (const char *name,struct net_device *real_dev);
Signature · 1 line
2.5.1