* [PATCH 02/18] staging: wilc1000: rename WILC_WFI_WiphyRegister
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 03/18] staging: wilc1000: fix NULL comparison style Chaehyun Lim
` (15 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces WILC_WFI_WiphyRegister with wilc_create_wiphy to
avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
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(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index ed6044e..4534fb9 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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 */
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 239d0fc..e51745e 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index 67b8de3..579bf2b 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -92,7 +92,7 @@ static const struct ieee80211_txrx_stypes
#define WILC_WFI_DWELL_ACTIVE 40
struct 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);
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 03/18] staging: wilc1000: fix NULL comparison style
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
2015-09-20 6:51 ` [PATCH 02/18] staging: wilc1000: rename WILC_WFI_WiphyRegister Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 04/18] staging: wilc1000: remove blank line after an open brace '{' Chaehyun Lim
` (14 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This 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"
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index e51745e..af11af3 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
}
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 04/18] staging: wilc1000: remove blank line after an open brace '{'
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
2015-09-20 6:51 ` [PATCH 02/18] staging: wilc1000: rename WILC_WFI_WiphyRegister Chaehyun Lim
2015-09-20 6:51 ` [PATCH 03/18] staging: wilc1000: fix NULL comparison style Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 05/18] staging: wilc1000: remove blank line before a close " Chaehyun Lim
` (13 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch removes blank line after an open brace '{' found by checkpatch.pl.
CHECK: Blank lines aren't necessary after an open brace '{'
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index af11af3..8107420 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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) {
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 05/18] staging: wilc1000: remove blank line before a close brace '{'
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (2 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 04/18] staging: wilc1000: remove blank line after an open brace '{' Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 06/18] staging: wilc1000: replace PRINT_D with netdev_info Chaehyun Lim
` (12 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch removes blank line before a close brace '{' found by checkpatch.pl
CHECK: Blank lines aren't necessary before a close brace '}'
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 8107420..fbe8643 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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);
-
}
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 06/18] staging: wilc1000: replace PRINT_D with netdev_info
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (3 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 05/18] staging: wilc1000: remove blank line before a close " Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-21 2:00 ` Greg KH
2015-09-20 6:51 ` [PATCH 07/18] staging: wilc1000: replaces PRINT_D with netdev_err Chaehyun Lim
` (11 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces PRINT_D with netdev_info in wilc_free_wiphy function.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index fbe8643..216da0c 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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);
}
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 06/18] staging: wilc1000: replace PRINT_D with netdev_info
2015-09-20 6:51 ` [PATCH 06/18] staging: wilc1000: replace PRINT_D with netdev_info Chaehyun Lim
@ 2015-09-21 2:00 ` Greg KH
0 siblings, 0 replies; 28+ messages in thread
From: Greg KH @ 2015-09-21 2:00 UTC (permalink / raw)
To: Chaehyun Lim
Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
tony.cho, leo.kim
On Sun, Sep 20, 2015 at 03:51:13PM +0900, Chaehyun Lim wrote:
> This patch replaces PRINT_D with netdev_info in wilc_free_wiphy function.
>
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index fbe8643..216da0c 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -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
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 07/18] staging: wilc1000: replaces PRINT_D with netdev_err
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (4 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 06/18] staging: wilc1000: replace PRINT_D with netdev_info Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-21 2:00 ` Greg KH
2015-09-20 6:51 ` [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register Chaehyun Lim
` (10 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces PRINT_D with netdev_err which is used at error
checking.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 216da0c..bf9d9ee 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
}
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 07/18] staging: wilc1000: replaces PRINT_D with netdev_err
2015-09-20 6:51 ` [PATCH 07/18] staging: wilc1000: replaces PRINT_D with netdev_err Chaehyun Lim
@ 2015-09-21 2:00 ` Greg KH
0 siblings, 0 replies; 28+ messages in thread
From: Greg KH @ 2015-09-21 2:00 UTC (permalink / raw)
To: Chaehyun Lim
Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
tony.cho, leo.kim
On Sun, Sep 20, 2015 at 03:51:14PM +0900, Chaehyun Lim wrote:
> This patch replaces PRINT_D with netdev_err which is used at error
> checking.
>
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index 216da0c..bf9d9ee 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -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
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (5 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 07/18] staging: wilc1000: replaces PRINT_D with netdev_err Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-21 2:01 ` Greg KH
2015-09-21 2:06 ` Greg KH
2015-09-20 6:51 ` [PATCH 09/18] staging: wilc1000: rename WILC_WFI_frame_register Chaehyun Lim
` (9 subsequent siblings)
16 siblings, 2 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This 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.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/linux_wlan.c | 7 ++-----
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 ++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 4534fb9..fd5cfd3 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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++;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index 579bf2b..0bd23b4 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -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
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
2015-09-20 6:51 ` [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register Chaehyun Lim
@ 2015-09-21 2:01 ` Greg KH
2015-09-21 5:54 ` Tony Cho
2015-09-21 2:06 ` Greg KH
1 sibling, 1 reply; 28+ messages in thread
From: Greg KH @ 2015-09-21 2:01 UTC (permalink / raw)
To: Chaehyun Lim
Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
tony.cho, leo.kim
On Sun, Sep 20, 2015 at 03:51:15PM +0900, Chaehyun Lim wrote:
> This 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.
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
2015-09-21 2:01 ` Greg KH
@ 2015-09-21 5:54 ` Tony Cho
2015-09-21 6:07 ` Greg KH
0 siblings, 1 reply; 28+ messages in thread
From: Tony Cho @ 2015-09-21 5:54 UTC (permalink / raw)
To: Greg KH, Chaehyun Lim
Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
leo.kim
On 2015년 09월 21일 11:01, Greg KH wrote:
> On Sun, Sep 20, 2015 at 03:51:15PM +0900, Chaehyun Lim wrote:
>> This 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.
> 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
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.
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
2015-09-21 5:54 ` Tony Cho
@ 2015-09-21 6:07 ` Greg KH
2015-09-21 6:20 ` Tony Cho
0 siblings, 1 reply; 28+ messages in thread
From: Greg KH @ 2015-09-21 6:07 UTC (permalink / raw)
To: Tony Cho
Cc: Chaehyun Lim, rachel.kim, devel, chris.park, linux-wireless,
johnny.kim, leo.kim
On Mon, Sep 21, 2015 at 02:54:28PM +0900, Tony Cho wrote:
>
>
> On 2015년 09월 21일 11:01, Greg KH wrote:
> >On Sun, Sep 20, 2015 at 03:51:15PM +0900, Chaehyun Lim wrote:
> >>This 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.
> >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
>
> 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.
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
2015-09-21 6:07 ` Greg KH
@ 2015-09-21 6:20 ` Tony Cho
2015-09-21 6:50 ` Greg KH
0 siblings, 1 reply; 28+ messages in thread
From: Tony Cho @ 2015-09-21 6:20 UTC (permalink / raw)
To: Greg KH
Cc: Chaehyun Lim, rachel.kim, devel, chris.park, linux-wireless,
johnny.kim, leo.kim
On 2015년 09월 21일 15:07, Greg KH wrote:
> On Mon, Sep 21, 2015 at 02:54:28PM +0900, Tony Cho wrote:
>>
>> On 2015년 09월 21일 11:01, Greg KH wrote:
>>> On Sun, Sep 20, 2015 at 03:51:15PM +0900, Chaehyun Lim wrote:
>>>> This 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.
>>> 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
>> 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.
> 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.
> Please, someone do that instead.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 28+ messages in thread* Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
2015-09-21 6:20 ` Tony Cho
@ 2015-09-21 6:50 ` Greg KH
0 siblings, 0 replies; 28+ messages in thread
From: Greg KH @ 2015-09-21 6:50 UTC (permalink / raw)
To: Tony Cho
Cc: Chaehyun Lim, rachel.kim, devel, chris.park, linux-wireless,
johnny.kim, leo.kim
On Mon, Sep 21, 2015 at 03:20:12PM +0900, Tony Cho wrote:
>
>
> On 2015년 09월 21일 15:07, Greg KH wrote:
> >On Mon, Sep 21, 2015 at 02:54:28PM +0900, Tony Cho wrote:
> >>
> >>On 2015년 09월 21일 11:01, Greg KH wrote:
> >>>On Sun, Sep 20, 2015 at 03:51:15PM +0900, Chaehyun Lim wrote:
> >>>>This 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.
> >>>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
> >>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.
> >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.
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register
2015-09-20 6:51 ` [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register Chaehyun Lim
2015-09-21 2:01 ` Greg KH
@ 2015-09-21 2:06 ` Greg KH
1 sibling, 0 replies; 28+ messages in thread
From: Greg KH @ 2015-09-21 2:06 UTC (permalink / raw)
To: Chaehyun Lim
Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
tony.cho, leo.kim
On Sun, Sep 20, 2015 at 03:51:15PM +0900, Chaehyun Lim wrote:
> This 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.
>
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 09/18] staging: wilc1000: rename WILC_WFI_frame_register
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (6 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 08/18] staging: wilc1000: remove declaration of WILC_WFI_frame_register Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 10/18] staging: wilc1000: rename WILC_WFI_set_power_mgmt Chaehyun Lim
` (8 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces WILC_WFI_frame_register with
wilc_mgmt_frame_register to avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
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(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index fd5cfd3..d7c28f3 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index bf9d9ee..c8e286d 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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,
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index 0bd23b4..4730128 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -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
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 10/18] staging: wilc1000: rename WILC_WFI_set_power_mgmt
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (7 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 09/18] staging: wilc1000: rename WILC_WFI_frame_register Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-21 2:03 ` Greg KH
2015-09-20 6:51 ` [PATCH 11/18] staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config Chaehyun Lim
` (7 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces WILC_WFI_set_power_mgmt with set_power_mgmt to avoid
CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index c8e286d..e6e437f 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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,
};
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 10/18] staging: wilc1000: rename WILC_WFI_set_power_mgmt
2015-09-20 6:51 ` [PATCH 10/18] staging: wilc1000: rename WILC_WFI_set_power_mgmt Chaehyun Lim
@ 2015-09-21 2:03 ` Greg KH
0 siblings, 0 replies; 28+ messages in thread
From: Greg KH @ 2015-09-21 2:03 UTC (permalink / raw)
To: Chaehyun Lim
Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
tony.cho, leo.kim
On Sun, Sep 20, 2015 at 03:51:17PM +0900, Chaehyun Lim wrote:
> This patch replaces WILC_WFI_set_power_mgmt with set_power_mgmt to avoid
> CamelCase.
>
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> index c8e286d..e6e437f 100644
> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
> @@ -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)
This really should be a static function, especially as you just renamed
it to be a very generic name.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 11/18] staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (8 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 10/18] staging: wilc1000: rename WILC_WFI_set_power_mgmt Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-21 6:52 ` Greg KH
2015-09-20 6:51 ` [PATCH 12/18] staging: wilc1000: remove useless comment Chaehyun Lim
` (6 subsequent siblings)
16 siblings, 1 reply; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces WILC_WFI_set_cqm_rssi_config with
set_cqm_rssi_config to avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index e6e437f..5512dd5 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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,
};
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* Re: [PATCH 11/18] staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config
2015-09-20 6:51 ` [PATCH 11/18] staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config Chaehyun Lim
@ 2015-09-21 6:52 ` Greg KH
0 siblings, 0 replies; 28+ messages in thread
From: Greg KH @ 2015-09-21 6:52 UTC (permalink / raw)
To: Chaehyun Lim
Cc: rachel.kim, devel, chris.park, linux-wireless, johnny.kim,
tony.cho, leo.kim
On Sun, Sep 20, 2015 at 03:51:18PM +0900, Chaehyun Lim wrote:
> This patch replaces WILC_WFI_set_cqm_rssi_config with
> set_cqm_rssi_config to avoid CamelCase.
>
> Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
> ---
> 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 :(
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH 12/18] staging: wilc1000: remove useless comment
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (9 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 11/18] staging: wilc1000: rename WILC_WFI_set_cqm_rssi_config Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 13/18] staging: wilc1000: wilc_msgqueue.c: replace s32RetStatus with result Chaehyun Lim
` (5 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch removes useless comment that is containing "BugXXXX"
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
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(-)
diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
index fdb0b9b..0546f7a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -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 *ps
wid_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 *ps
PRINT_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
diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 4c02b98..b1af421 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -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;
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index d7c28f3..f71f7ea 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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_n
if (!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) */
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 5512dd5..04d64a8 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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,
diff --git a/drivers/staging/wilc1000/wilc_wfi_netdevice.h b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
index ca95728..90fe1e2 100644
--- a/drivers/staging/wilc1000/wilc_wfi_netdevice.h
+++ b/drivers/staging/wilc1000/wilc_wfi_netdevice.h
@@ -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
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 82b32a9..ba502f1 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -547,7 +547,6 @@ static int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, wi
return 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()) {
diff --git a/drivers/staging/wilc1000/wilc_wlan.h b/drivers/staging/wilc1000/wilc_wlan.h
index 9f05b79..60da18c 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -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
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index 473d756..ce16775 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -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);
diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h
index 0e2937b..5f68b6a 100644
--- a/drivers/staging/wilc1000/wilc_wlan_if.h
+++ b/drivers/staging/wilc1000/wilc_wlan_if.h
@@ -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,
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 13/18] staging: wilc1000: wilc_msgqueue.c: replace s32RetStatus with result
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (10 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 12/18] staging: wilc1000: remove useless comment Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 14/18] staging: wilc1000: remove useless #if 1 Chaehyun Lim
` (4 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces s32RetStatus with result to avoid CamelCase in
wilc_msgqueue.c
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_msgqueue.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c b/drivers/staging/wilc1000/wilc_msgqueue.c
index 225bb99..869736a 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -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;
}
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 14/18] staging: wilc1000: remove useless #if 1
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (11 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 13/18] staging: wilc1000: wilc_msgqueue.c: replace s32RetStatus with result Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 15/18] staging: wilc1000: remove braces for single statement blocks Chaehyun Lim
` (3 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch removes #if 1, which is encapsulated some codes.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
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(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 04d64a8..34df5da 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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++) {
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index ba502f1..0a930ec 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -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);
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index ce16775..73a1508 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -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);
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 15/18] staging: wilc1000: remove braces for single statement blocks
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (12 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 14/18] staging: wilc1000: remove useless #if 1 Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 16/18] staging: wilc1000: replace s32 with int Chaehyun Lim
` (2 subsequent siblings)
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch removes braces for single if statement blocks found by
checkpatch.pl
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 34df5da..fce7dac 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
}
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 16/18] staging: wilc1000: replace s32 with int
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (13 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 15/18] staging: wilc1000: remove braces for single statement blocks Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 17/18] staging: wilc1000: rename WILC_WFI_DeInitHostInt Chaehyun Lim
2015-09-20 6:51 ` [PATCH 18/18] staging: wilc1000: rename WILC_WFI_InitHostInt Chaehyun Lim
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This 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.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index fce7dac..ee4cc7f 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 17/18] staging: wilc1000: rename WILC_WFI_DeInitHostInt
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (14 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 16/18] staging: wilc1000: replace s32 with int Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
2015-09-20 6:51 ` [PATCH 18/18] staging: wilc1000: rename WILC_WFI_InitHostInt Chaehyun Lim
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces WILC_WFI_DeInitHostInt with wilc_deinit_host_int to
avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
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(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index f71f7ea..181459f 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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) {
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index ee4cc7f..50e03f1 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index 4730128..859d62a 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -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);
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread* [PATCH 18/18] staging: wilc1000: rename WILC_WFI_InitHostInt
2015-09-20 6:51 [PATCH 01/18] staging: wilc1000: rename WILC_WFI_WiphyFree Chaehyun Lim
` (15 preceding siblings ...)
2015-09-20 6:51 ` [PATCH 17/18] staging: wilc1000: rename WILC_WFI_DeInitHostInt Chaehyun Lim
@ 2015-09-20 6:51 ` Chaehyun Lim
16 siblings, 0 replies; 28+ messages in thread
From: Chaehyun Lim @ 2015-09-20 6:51 UTC (permalink / raw)
To: gregkh
Cc: johnny.kim, rachel.kim, chris.park, tony.cho, glen.lee, leo.kim,
linux-wireless, devel, Chaehyun Lim
This patch replaces WILC_WFI_InitHostInt with wilc_init_host_int to
avoid CamelCase.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
---
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(-)
diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
index 181459f..7857ad2 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -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");
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index 50e03f1..a44d8a0 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -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;
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
index 859d62a..b240a79 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.h
@@ -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);
--
2.5.1
^ permalink raw reply related [flat|nested] 28+ messages in thread