linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency
       [not found] <20170823132337.517466-1-arnd@arndb.de>
@ 2017-08-23 13:22 ` Arnd Bergmann
  2017-08-23 15:44   ` Randy Dunlap
  2017-08-24 19:23   ` Larry Finger
  2017-08-23 13:22 ` [PATCH 3/3] staging: rtlwifi: simplify logical operation Arnd Bergmann
  1 sibling, 2 replies; 8+ messages in thread
From: Arnd Bergmann @ 2017-08-23 13:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Ping-Ke Shih, Larry Finger, Yan-Hsuan Chuang, Birming Chiu,
	Shaofu, Steven Ting, Arnd Bergmann, devel, linux-kernel

Like the version in drivers/net/wireless, this driver requires the
MAC80211 framework, otherwise we run into a link error:

ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined!
ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined!
ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtlwifi/r8822be.ko] undefined!
ERROR: "ieee80211_resume_disconnect" [drivers/staging/rtlwifi/r8822be.ko] undefined!

This adds the Kconfig dependency for it.

Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/rtlwifi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtlwifi/Kconfig b/drivers/staging/rtlwifi/Kconfig
index fc482b49f9aa..cb3a29ae764b 100644
--- a/drivers/staging/rtlwifi/Kconfig
+++ b/drivers/staging/rtlwifi/Kconfig
@@ -1,6 +1,6 @@
 config R8822BE
 	tristate "Realtek RTL8822BE Wireless Network Adapter"
-	depends on PCI && m
+	depends on PCI && MAC80211 && m
 	select FW_LOADER
 	---help---
 	This is the staging driver for Realtek RTL8822BE 802.11ac PCIe
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] staging: rtlwifi: simplify logical operation
       [not found] <20170823132337.517466-1-arnd@arndb.de>
  2017-08-23 13:22 ` [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency Arnd Bergmann
@ 2017-08-23 13:22 ` Arnd Bergmann
  2017-08-24 19:06   ` Larry Finger
  1 sibling, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2017-08-23 13:22 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Ping-Ke Shih, Larry Finger, Yan-Hsuan Chuang, Birming Chiu,
	Shaofu, Steven Ting, Arnd Bergmann, devel, linux-kernel

gcc notices a very complicated way to check a value
for being equal to one, and warns about it:

drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c: In function 'halbtc8822b1ant_set_ext_ant_switch':
drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: error: '~' on a boolean expression [-Werror=bool-operation]
         ~switch_polatiry_inverse :
         ^
drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: note: did you mean to use logical not?
         ~switch_polatiry_inverse :
         ^

This simplifies this expression to make it more readable
and to make gcc happy.

Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c b/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c
index 933d188d52b4..157395b85405 100644
--- a/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c
+++ b/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c
@@ -2101,9 +2101,7 @@ static void halbtc8822b1ant_set_ext_ant_switch(struct btc_coexist *btcoexist,
 	 * 0xcbd[1:0] = 2b'01 => Ant to BTG,
 	 * 0xcbd[1:0] = 2b'10 => Ant to WLG
 	 */
-	switch_polatiry_inverse = (rfe_type->ext_ant_switch_ctrl_polarity == 1 ?
-					   ~switch_polatiry_inverse :
-					   switch_polatiry_inverse);
+	switch_polatiry_inverse = rfe_type->ext_ant_switch_ctrl_polarity == 1;
 
 	switch (pos_type) {
 	default:
-- 
2.9.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency
  2017-08-23 13:22 ` [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency Arnd Bergmann
@ 2017-08-23 15:44   ` Randy Dunlap
  2017-08-23 23:19     ` Greg Kroah-Hartman
  2017-08-24 19:23   ` Larry Finger
  1 sibling, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2017-08-23 15:44 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: devel, Yan-Hsuan Chuang, linux-kernel, Birming Chiu, Steven Ting,
	Larry Finger

On 08/23/2017 06:22 AM, Arnd Bergmann wrote:
> Like the version in drivers/net/wireless, this driver requires the
> MAC80211 framework, otherwise we run into a link error:
> 
> ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> ERROR: "ieee80211_resume_disconnect" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> 
> This adds the Kconfig dependency for it.

Greg,
Please take this patch instead of my patch from yesterday.

Thanks.

> Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/staging/rtlwifi/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtlwifi/Kconfig b/drivers/staging/rtlwifi/Kconfig
> index fc482b49f9aa..cb3a29ae764b 100644
> --- a/drivers/staging/rtlwifi/Kconfig
> +++ b/drivers/staging/rtlwifi/Kconfig
> @@ -1,6 +1,6 @@
>  config R8822BE
>  	tristate "Realtek RTL8822BE Wireless Network Adapter"
> -	depends on PCI && m
> +	depends on PCI && MAC80211 && m
>  	select FW_LOADER
>  	---help---
>  	This is the staging driver for Realtek RTL8822BE 802.11ac PCIe
> 


-- 
~Randy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency
  2017-08-23 15:44   ` Randy Dunlap
@ 2017-08-23 23:19     ` Greg Kroah-Hartman
  2017-08-23 23:29       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 8+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-23 23:19 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Arnd Bergmann, devel, Yan-Hsuan Chuang, linux-kernel,
	Birming Chiu, Steven Ting, Larry Finger

On Wed, Aug 23, 2017 at 08:44:46AM -0700, Randy Dunlap wrote:
> On 08/23/2017 06:22 AM, Arnd Bergmann wrote:
> > Like the version in drivers/net/wireless, this driver requires the
> > MAC80211 framework, otherwise we run into a link error:
> > 
> > ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > ERROR: "ieee80211_resume_disconnect" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > 
> > This adds the Kconfig dependency for it.
> 
> Greg,
> Please take this patch instead of my patch from yesterday.

Ick, already took that one :(

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency
  2017-08-23 23:19     ` Greg Kroah-Hartman
@ 2017-08-23 23:29       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-23 23:29 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Arnd Bergmann, devel, Yan-Hsuan Chuang, linux-kernel,
	Birming Chiu, Steven Ting, Larry Finger

On Wed, Aug 23, 2017 at 04:19:08PM -0700, Greg Kroah-Hartman wrote:
> On Wed, Aug 23, 2017 at 08:44:46AM -0700, Randy Dunlap wrote:
> > On 08/23/2017 06:22 AM, Arnd Bergmann wrote:
> > > Like the version in drivers/net/wireless, this driver requires the
> > > MAC80211 framework, otherwise we run into a link error:
> > > 
> > > ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > > ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > > ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > > ERROR: "ieee80211_resume_disconnect" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > > 
> > > This adds the Kconfig dependency for it.
> > 
> > Greg,
> > Please take this patch instead of my patch from yesterday.
> 
> Ick, already took that one :(

Fixed it up by hand now, all should be good.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] staging: rtlwifi: simplify logical operation
  2017-08-23 13:22 ` [PATCH 3/3] staging: rtlwifi: simplify logical operation Arnd Bergmann
@ 2017-08-24 19:06   ` Larry Finger
  0 siblings, 0 replies; 8+ messages in thread
From: Larry Finger @ 2017-08-24 19:06 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Ping-Ke Shih, Yan-Hsuan Chuang, Birming Chiu, Shaofu,
	Steven Ting, devel, linux-kernel

On 08/23/2017 08:22 AM, Arnd Bergmann wrote:
> gcc notices a very complicated way to check a value
> for being equal to one, and warns about it:
> 
> drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c: In function 'halbtc8822b1ant_set_ext_ant_switch':
> drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: error: '~' on a boolean expression [-Werror=bool-operation]
>           ~switch_polatiry_inverse :
>           ^
> drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: note: did you mean to use logical not?
>           ~switch_polatiry_inverse :
>           ^
> 
> This simplifies this expression to make it more readable
> and to make gcc happy.
> 
> Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Yes, it should have bee logical not rather than a bitwise inversion. Your 
version is much more readable. In a followup, I will fix the spelling of 
polarity, but yours is fine.

Acked-by: Larry Finger <Larry.Finger@lwfinger.net>

Larry

> ---
>   drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c b/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c
> index 933d188d52b4..157395b85405 100644
> --- a/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c
> +++ b/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c
> @@ -2101,9 +2101,7 @@ static void halbtc8822b1ant_set_ext_ant_switch(struct btc_coexist *btcoexist,
>   	 * 0xcbd[1:0] = 2b'01 => Ant to BTG,
>   	 * 0xcbd[1:0] = 2b'10 => Ant to WLG
>   	 */
> -	switch_polatiry_inverse = (rfe_type->ext_ant_switch_ctrl_polarity == 1 ?
> -					   ~switch_polatiry_inverse :
> -					   switch_polatiry_inverse);
> +	switch_polatiry_inverse = rfe_type->ext_ant_switch_ctrl_polarity == 1;
>   
>   	switch (pos_type) {
>   	default:
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency
  2017-08-23 13:22 ` [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency Arnd Bergmann
  2017-08-23 15:44   ` Randy Dunlap
@ 2017-08-24 19:23   ` Larry Finger
  2017-08-24 23:59     ` Greg Kroah-Hartman
  1 sibling, 1 reply; 8+ messages in thread
From: Larry Finger @ 2017-08-24 19:23 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Ping-Ke Shih, Yan-Hsuan Chuang, Birming Chiu, Shaofu,
	Steven Ting, devel, linux-kernel

On 08/23/2017 08:22 AM, Arnd Bergmann wrote:
> Like the version in drivers/net/wireless, this driver requires the
> MAC80211 framework, otherwise we run into a link error:
> 
> ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> ERROR: "ieee80211_resume_disconnect" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> 
> This adds the Kconfig dependency for it.
> 
> Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Greg,

I lost track of which version of this patch you are taking. The one that Randy 
Dunlap sent that added NETDEVICES was better than the initial version, but this 
one with MAC80211 is the correct one. Randy's patch is in the latest pull I did 
on staging.

Do you want an updated patch?

Larry

> ---
>   drivers/staging/rtlwifi/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtlwifi/Kconfig b/drivers/staging/rtlwifi/Kconfig
> index fc482b49f9aa..cb3a29ae764b 100644
> --- a/drivers/staging/rtlwifi/Kconfig
> +++ b/drivers/staging/rtlwifi/Kconfig
> @@ -1,6 +1,6 @@
>   config R8822BE
>   	tristate "Realtek RTL8822BE Wireless Network Adapter"
> -	depends on PCI && m
> +	depends on PCI && MAC80211 && m
>   	select FW_LOADER
>   	---help---
>   	This is the staging driver for Realtek RTL8822BE 802.11ac PCIe
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency
  2017-08-24 19:23   ` Larry Finger
@ 2017-08-24 23:59     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 8+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-24 23:59 UTC (permalink / raw)
  To: Larry Finger
  Cc: Arnd Bergmann, devel, Yan-Hsuan Chuang, linux-kernel,
	Birming Chiu, Steven Ting

On Thu, Aug 24, 2017 at 02:23:08PM -0500, Larry Finger wrote:
> On 08/23/2017 08:22 AM, Arnd Bergmann wrote:
> > Like the version in drivers/net/wireless, this driver requires the
> > MAC80211 framework, otherwise we run into a link error:
> > 
> > ERROR: "ieee80211_rx_irqsafe" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > ERROR: "cfg80211_unlink_bss" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > ERROR: "ieee80211_beacon_get_tim" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > ERROR: "ieee80211_resume_disconnect" [drivers/staging/rtlwifi/r8822be.ko] undefined!
> > 
> > This adds the Kconfig dependency for it.
> > 
> > Fixes: 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> 
> Greg,
> 
> I lost track of which version of this patch you are taking. The one that
> Randy Dunlap sent that added NETDEVICES was better than the initial version,
> but this one with MAC80211 is the correct one. Randy's patch is in the
> latest pull I did on staging.
> 
> Do you want an updated patch?

Nope, all should be good now, I've fixed it by hand.  Look in my tree
and if it's still wrong there, please send me a fixup.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-08-24 23:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170823132337.517466-1-arnd@arndb.de>
2017-08-23 13:22 ` [PATCH 2/3] staging: rtlwifi: add MAC80211 dependency Arnd Bergmann
2017-08-23 15:44   ` Randy Dunlap
2017-08-23 23:19     ` Greg Kroah-Hartman
2017-08-23 23:29       ` Greg Kroah-Hartman
2017-08-24 19:23   ` Larry Finger
2017-08-24 23:59     ` Greg Kroah-Hartman
2017-08-23 13:22 ` [PATCH 3/3] staging: rtlwifi: simplify logical operation Arnd Bergmann
2017-08-24 19:06   ` Larry Finger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).