Skip to contentSkip to conversation

staging: rtlwifi: add MAC80211 dependency

PATCH In review Arnd Bergmann 4 participants 8 messages Aug 23, 2017 – Aug 24, 2017 1 message not in the archive Staging

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 2/3 staging: rtlwifi: add MAC80211 dependency

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")
---
 drivers/staging/rtlwifi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtlwifi/Kconfig +1 -1
index fc482b49f9aa..cb3a29ae764b 100644
@@ -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
Signature · 1 line
2.9.0
#2 lore raw
Quoted 9 lines · Arnd Bergmann

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.

Quoted 19 lines
Fixes 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
---
 drivers/staging/rtlwifi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtlwifi/Kconfig +1 -1
index fc482b49f9aa..cb3a29ae764b 100644
@@ -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
Signature · 1 line
~Randy
#3 lore raw
Quoted 9 lines · Randy Dunlap
Quoted 8 lines · Arnd Bergmann

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!

Quoted 4 lines
Quoted 1 line

This adds the Kconfig dependency for it.

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

Ick, already took that one :(

#4 lore raw
Quoted 10 lines · Greg Kroah-Hartman
Quoted 9 lines · Randy Dunlap
Quoted 8 lines · Arnd Bergmann

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!

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

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.

#5 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann

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!

Quoted 4 lines

This adds the Kconfig dependency for it.

Fixes 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")

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

Quoted 17 lines
---
  drivers/staging/rtlwifi/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtlwifi/Kconfig +1 -1
index fc482b49f9aa..cb3a29ae764b 100644
@@ -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
#6 lore raw
Quoted 14 lines · Larry Finger
Quoted 8 lines · Arnd Bergmann

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!

Quoted 4 lines

This adds the Kconfig dependency for it.

Fixes 56bde846304e ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
Quoted 8 lines

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

#7 lore raw

PATCH 3/3 staging: rtlwifi: simplify logical operation

In reply to a message not in the archive

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")
---
 drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c +1 -3
index 933d188d52b4..157395b85405 100644
@@ -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:
Signature · 1 line
2.9.0
Acked-by on v1 3/3
#8 lore raw

Re: [PATCH 3/3] staging: rtlwifi: simplify logical operation

Quoted 11 lines · Arnd Bergmann

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 :
          ^
Quoted 5 lines

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")

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.

Larry

Quoted 20 lines
---
  drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c +1 -3
index 933d188d52b4..157395b85405 100644
@@ -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: