linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_*.
@ 2018-03-24  4:10 Quytelda Kahja
  2018-03-24  4:10 ` [PATCH 2/3] ieee80211: Replace bit shifts with the BIT() macro for measurement masks Quytelda Kahja
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Quytelda Kahja @ 2018-03-24  4:10 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, linux-kernel, Quytelda Kahja

It is neater and more consistent with the rest of the document to use the
BIT() macro from 'linux/bitops.h' to define the WLAN_CAPABILITY_*
bitmasks.  In the case of WLAN_CAPABILITY_DMG_TYPE_{IBSS, PBSS, AP},
bitshifting integers by 0 does nothing, so there is no reason to do it in
the code; replace these values with plain integers.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
---
 include/linux/ieee80211.h | 56 +++++++++++++++++++++++------------------------
 1 file changed, 28 insertions(+), 28 deletions(-)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index ee6657a0ed69..58069176b432 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1588,8 +1588,8 @@ struct ieee80211_vht_operation {
 
 #define WLAN_AUTH_CHALLENGE_LEN 128
 
-#define WLAN_CAPABILITY_ESS		(1<<0)
-#define WLAN_CAPABILITY_IBSS		(1<<1)
+#define WLAN_CAPABILITY_ESS		BIT(0)
+#define WLAN_CAPABILITY_IBSS		BIT(1)
 
 /*
  * A mesh STA sets the ESS and IBSS capability bits to zero.
@@ -1599,37 +1599,37 @@ struct ieee80211_vht_operation {
 #define WLAN_CAPABILITY_IS_STA_BSS(cap)	\
 	(!((cap) & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS)))
 
-#define WLAN_CAPABILITY_CF_POLLABLE	(1<<2)
-#define WLAN_CAPABILITY_CF_POLL_REQUEST	(1<<3)
-#define WLAN_CAPABILITY_PRIVACY		(1<<4)
-#define WLAN_CAPABILITY_SHORT_PREAMBLE	(1<<5)
-#define WLAN_CAPABILITY_PBCC		(1<<6)
-#define WLAN_CAPABILITY_CHANNEL_AGILITY	(1<<7)
+#define WLAN_CAPABILITY_CF_POLLABLE	BIT(2)
+#define WLAN_CAPABILITY_CF_POLL_REQUEST	BIT(3)
+#define WLAN_CAPABILITY_PRIVACY		BIT(4)
+#define WLAN_CAPABILITY_SHORT_PREAMBLE	BIT(5)
+#define WLAN_CAPABILITY_PBCC		BIT(6)
+#define WLAN_CAPABILITY_CHANNEL_AGILITY	BIT(7)
 
 /* 802.11h */
-#define WLAN_CAPABILITY_SPECTRUM_MGMT	(1<<8)
-#define WLAN_CAPABILITY_QOS		(1<<9)
-#define WLAN_CAPABILITY_SHORT_SLOT_TIME	(1<<10)
-#define WLAN_CAPABILITY_APSD		(1<<11)
-#define WLAN_CAPABILITY_RADIO_MEASURE	(1<<12)
-#define WLAN_CAPABILITY_DSSS_OFDM	(1<<13)
-#define WLAN_CAPABILITY_DEL_BACK	(1<<14)
-#define WLAN_CAPABILITY_IMM_BACK	(1<<15)
+#define WLAN_CAPABILITY_SPECTRUM_MGMT	BIT(8)
+#define WLAN_CAPABILITY_QOS		BIT(9)
+#define WLAN_CAPABILITY_SHORT_SLOT_TIME	BIT(10)
+#define WLAN_CAPABILITY_APSD		BIT(11)
+#define WLAN_CAPABILITY_RADIO_MEASURE	BIT(12)
+#define WLAN_CAPABILITY_DSSS_OFDM	BIT(13)
+#define WLAN_CAPABILITY_DEL_BACK	BIT(14)
+#define WLAN_CAPABILITY_IMM_BACK	BIT(15)
 
 /* DMG (60gHz) 802.11ad */
 /* type - bits 0..1 */
-#define WLAN_CAPABILITY_DMG_TYPE_MASK		(3<<0)
-#define WLAN_CAPABILITY_DMG_TYPE_IBSS		(1<<0) /* Tx by: STA */
-#define WLAN_CAPABILITY_DMG_TYPE_PBSS		(2<<0) /* Tx by: PCP */
-#define WLAN_CAPABILITY_DMG_TYPE_AP		(3<<0) /* Tx by: AP */
-
-#define WLAN_CAPABILITY_DMG_CBAP_ONLY		(1<<2)
-#define WLAN_CAPABILITY_DMG_CBAP_SOURCE		(1<<3)
-#define WLAN_CAPABILITY_DMG_PRIVACY		(1<<4)
-#define WLAN_CAPABILITY_DMG_ECPAC		(1<<5)
-
-#define WLAN_CAPABILITY_DMG_SPECTRUM_MGMT	(1<<8)
-#define WLAN_CAPABILITY_DMG_RADIO_MEASURE	(1<<12)
+#define WLAN_CAPABILITY_DMG_TYPE_MASK   (BIT(0) | BIT(1))
+#define WLAN_CAPABILITY_DMG_TYPE_IBSS   1 /* Tx by: STA */
+#define WLAN_CAPABILITY_DMG_TYPE_PBSS   2 /* Tx by: PCP */
+#define WLAN_CAPABILITY_DMG_TYPE_AP     3 /* Tx by: AP */
+
+#define WLAN_CAPABILITY_DMG_CBAP_ONLY		BIT(2)
+#define WLAN_CAPABILITY_DMG_CBAP_SOURCE		BIT(3)
+#define WLAN_CAPABILITY_DMG_PRIVACY		BIT(4)
+#define WLAN_CAPABILITY_DMG_ECPAC		BIT(5)
+
+#define WLAN_CAPABILITY_DMG_SPECTRUM_MGMT	BIT(8)
+#define WLAN_CAPABILITY_DMG_RADIO_MEASURE	BIT(12)
 
 /* measurement */
 #define IEEE80211_SPCT_MSR_RPRT_MODE_LATE	(1<<0)
-- 
2.16.2

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

* [PATCH 2/3] ieee80211: Replace bit shifts with the BIT() macro for measurement masks.
  2018-03-24  4:10 [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Quytelda Kahja
@ 2018-03-24  4:10 ` Quytelda Kahja
  2018-03-24  4:10 ` [PATCH 3/3] ieee80211: Replace bit shifts with the BIT() macro for 802.11g ERP IEs Quytelda Kahja
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Quytelda Kahja @ 2018-03-24  4:10 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, linux-kernel, Quytelda Kahja

It is neater and more consistent with the rest of the document to use the
BIT() macro from 'linux/bitops.h' to define the
IEEE80211_SPCT_MSR_RPRT_MODE_* bitmasks.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
---
 include/linux/ieee80211.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 58069176b432..dc361ed2fb7e 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1632,9 +1632,9 @@ struct ieee80211_vht_operation {
 #define WLAN_CAPABILITY_DMG_RADIO_MEASURE	BIT(12)
 
 /* measurement */
-#define IEEE80211_SPCT_MSR_RPRT_MODE_LATE	(1<<0)
-#define IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE	(1<<1)
-#define IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED	(1<<2)
+#define IEEE80211_SPCT_MSR_RPRT_MODE_LATE	BIT(0)
+#define IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE	BIT(1)
+#define IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED	BIT(2)
 
 #define IEEE80211_SPCT_MSR_RPRT_TYPE_BASIC	0
 #define IEEE80211_SPCT_MSR_RPRT_TYPE_CCA	1
-- 
2.16.2

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

* [PATCH 3/3] ieee80211: Replace bit shifts with the BIT() macro for 802.11g ERP IEs.
  2018-03-24  4:10 [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Quytelda Kahja
  2018-03-24  4:10 ` [PATCH 2/3] ieee80211: Replace bit shifts with the BIT() macro for measurement masks Quytelda Kahja
@ 2018-03-24  4:10 ` Quytelda Kahja
  2018-03-24 21:23 ` [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Larry Finger
  2018-03-25 14:05 ` kbuild test robot
  3 siblings, 0 replies; 9+ messages in thread
From: Quytelda Kahja @ 2018-03-24  4:10 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, linux-kernel, Quytelda Kahja

It is neater and more consistent with the rest of the document to use the
BIT() macro from 'linux/bitops.h' to define the WLAN_ERP_* bitmasks.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
---
 include/linux/ieee80211.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index dc361ed2fb7e..bc68d542f082 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -1641,9 +1641,9 @@ struct ieee80211_vht_operation {
 #define IEEE80211_SPCT_MSR_RPRT_TYPE_RPI	2
 
 /* 802.11g ERP information element */
-#define WLAN_ERP_NON_ERP_PRESENT (1<<0)
-#define WLAN_ERP_USE_PROTECTION (1<<1)
-#define WLAN_ERP_BARKER_PREAMBLE (1<<2)
+#define WLAN_ERP_NON_ERP_PRESENT BIT(0)
+#define WLAN_ERP_USE_PROTECTION  BIT(1)
+#define WLAN_ERP_BARKER_PREAMBLE BIT(2)
 
 /* WLAN_ERP_BARKER_PREAMBLE values */
 enum {
-- 
2.16.2

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

* Re: [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_*.
  2018-03-24  4:10 [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Quytelda Kahja
  2018-03-24  4:10 ` [PATCH 2/3] ieee80211: Replace bit shifts with the BIT() macro for measurement masks Quytelda Kahja
  2018-03-24  4:10 ` [PATCH 3/3] ieee80211: Replace bit shifts with the BIT() macro for 802.11g ERP IEs Quytelda Kahja
@ 2018-03-24 21:23 ` Larry Finger
  2018-03-24 23:02   ` Quytelda Kahja
  2018-03-25 14:05 ` kbuild test robot
  3 siblings, 1 reply; 9+ messages in thread
From: Larry Finger @ 2018-03-24 21:23 UTC (permalink / raw)
  To: Quytelda Kahja, johannes; +Cc: linux-wireless, linux-kernel

On 03/23/2018 11:10 PM, Quytelda Kahja wrote:
> It is neater and more consistent with the rest of the document to use the
> BIT() macro from 'linux/bitops.h' to define the WLAN_CAPABILITY_*
> bitmasks.  In the case of WLAN_CAPABILITY_DMG_TYPE_{IBSS, PBSS, AP},
> bitshifting integers by 0 does nothing, so there is no reason to do it in
> the code; replace these values with plain integers.
> 
> Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>

In the commit message for all of these, what is the "document" to which you refer?

I'm not quite sure why you split these changes into 3 parts, but I guess that is OK.

Larry

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

* Re: [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_*.
  2018-03-24 21:23 ` [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Larry Finger
@ 2018-03-24 23:02   ` Quytelda Kahja
  2018-03-27 13:16     ` Johannes Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Quytelda Kahja @ 2018-03-24 23:02 UTC (permalink / raw)
  To: Larry Finger; +Cc: johannes, linux-wireless, linux-kernel

The "document" refers to the file in which the changes were made
('include/linux/ieee80211.h').

I tend to try to split my commits into the smallest logically related
changes possible, hence the three patch series.  This particular case
may be a little on the extreme side, but if the maintainer desires,
they can always squash them together or ask me to resubmit as one
patch.

On 3/24/18, Larry Finger <Larry.Finger@lwfinger.net> wrote:
> On 03/23/2018 11:10 PM, Quytelda Kahja wrote:
>> It is neater and more consistent with the rest of the document to use the
>> BIT() macro from 'linux/bitops.h' to define the WLAN_CAPABILITY_*
>> bitmasks.  In the case of WLAN_CAPABILITY_DMG_TYPE_{IBSS, PBSS, AP},
>> bitshifting integers by 0 does nothing, so there is no reason to do it in
>> the code; replace these values with plain integers.
>>
>> Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
>
> In the commit message for all of these, what is the "document" to which you
> refer?
>
> I'm not quite sure why you split these changes into 3 parts, but I guess
> that is OK.
>
> Larry
>
-- 
Thank you,
Quytelda Kahja

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

* Re: [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_*.
  2018-03-24  4:10 [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Quytelda Kahja
                   ` (2 preceding siblings ...)
  2018-03-24 21:23 ` [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Larry Finger
@ 2018-03-25 14:05 ` kbuild test robot
  2018-03-26  9:15   ` Quytelda Kahja
  3 siblings, 1 reply; 9+ messages in thread
From: kbuild test robot @ 2018-03-25 14:05 UTC (permalink / raw)
  To: Quytelda Kahja
  Cc: kbuild-all, johannes, linux-wireless, linux-kernel,
	Quytelda Kahja

[-- Attachment #1: Type: text/plain, Size: 7752 bytes --]

Hi Quytelda,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mac80211-next/master]
[also build test WARNING on v4.16-rc6 next-20180323]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Quytelda-Kahja/ieee80211-Replace-bit-shifts-with-the-BIT-macro-for-WLAN_CAPABILITY_/20180325-211645
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: i386-randconfig-s1-03251817 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>> drivers/staging/rtl8723bs/include/ieee80211.h:444:0: warning: "WLAN_CAPABILITY_IBSS" redefined
    #define WLAN_CAPABILITY_IBSS (1<<1)
    
   In file included from include/net/cfg80211.h:23:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
   include/linux/ieee80211.h:1593:0: note: this is the location of the previous definition
    #define WLAN_CAPABILITY_IBSS  BIT(1)
    
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>> drivers/staging/rtl8723bs/include/ieee80211.h:445:0: warning: "WLAN_CAPABILITY_CF_POLLABLE" redefined
    #define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
    
   In file included from include/net/cfg80211.h:23:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
   include/linux/ieee80211.h:1603:0: note: this is the location of the previous definition
    #define WLAN_CAPABILITY_CF_POLLABLE BIT(2)
    
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>> drivers/staging/rtl8723bs/include/ieee80211.h:446:0: warning: "WLAN_CAPABILITY_CF_POLL_REQUEST" redefined
    #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
    
   In file included from include/net/cfg80211.h:23:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
   include/linux/ieee80211.h:1604:0: note: this is the location of the previous definition
    #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3)
    
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>> drivers/staging/rtl8723bs/include/ieee80211.h:447:0: warning: "WLAN_CAPABILITY_PRIVACY" redefined
    #define WLAN_CAPABILITY_PRIVACY (1<<4)
    
   In file included from include/net/cfg80211.h:23:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
   include/linux/ieee80211.h:1605:0: note: this is the location of the previous definition
    #define WLAN_CAPABILITY_PRIVACY  BIT(4)
    
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>> drivers/staging/rtl8723bs/include/ieee80211.h:448:0: warning: "WLAN_CAPABILITY_SHORT_PREAMBLE" redefined
    #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
    
   In file included from include/net/cfg80211.h:23:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
   include/linux/ieee80211.h:1606:0: note: this is the location of the previous definition
    #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
    
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>> drivers/staging/rtl8723bs/include/ieee80211.h:449:0: warning: "WLAN_CAPABILITY_PBCC" redefined
    #define WLAN_CAPABILITY_PBCC (1<<6)
    
   In file included from include/net/cfg80211.h:23:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
   include/linux/ieee80211.h:1607:0: note: this is the location of the previous definition
    #define WLAN_CAPABILITY_PBCC  BIT(6)
    
   In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>> drivers/staging/rtl8723bs/include/ieee80211.h:450:0: warning: "WLAN_CAPABILITY_CHANNEL_AGILITY" redefined
    #define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
    
   In file included from include/net/cfg80211.h:23:0,
                    from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
                    from drivers/staging/rtl8723bs/include/osdep_service.h:23,
                    from drivers/staging/rtl8723bs/include/drv_types.h:29,
                    from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
   include/linux/ieee80211.h:1608:0: note: this is the location of the previous definition
    #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7)
    

vim +/WLAN_CAPABILITY_IBSS +444 drivers/staging/rtl8723bs/include/ieee80211.h

554c0a3a Hans de Goede 2017-03-29  442  
554c0a3a Hans de Goede 2017-03-29  443  #define WLAN_CAPABILITY_BSS (1<<0)
554c0a3a Hans de Goede 2017-03-29 @444  #define WLAN_CAPABILITY_IBSS (1<<1)
554c0a3a Hans de Goede 2017-03-29 @445  #define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
554c0a3a Hans de Goede 2017-03-29 @446  #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
554c0a3a Hans de Goede 2017-03-29 @447  #define WLAN_CAPABILITY_PRIVACY (1<<4)
554c0a3a Hans de Goede 2017-03-29 @448  #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
554c0a3a Hans de Goede 2017-03-29 @449  #define WLAN_CAPABILITY_PBCC (1<<6)
554c0a3a Hans de Goede 2017-03-29 @450  #define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
554c0a3a Hans de Goede 2017-03-29  451  #define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
554c0a3a Hans de Goede 2017-03-29  452  

:::::: The code at line 444 was first introduced by commit
:::::: 554c0a3abf216c991c5ebddcdb2c08689ecd290b staging: Add rtl8723bs sdio wifi driver

:::::: TO: Hans de Goede <hdegoede@redhat.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26075 bytes --]

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

* Re: [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_*.
  2018-03-25 14:05 ` kbuild test robot
@ 2018-03-26  9:15   ` Quytelda Kahja
  2018-03-26  9:18     ` [PATCH] staging: rtl8723bs: Remove duplicate #defines Quytelda Kahja
  0 siblings, 1 reply; 9+ messages in thread
From: Quytelda Kahja @ 2018-03-26  9:15 UTC (permalink / raw)
  To: kbuild test robot, Greg KH
  Cc: kbuild-all, Johannes Berg, linux-wireless, linux-kernel

This is a problem with the rtl8723bs driver in staging; it's source
tree has a custom IEEE80211 header which imports 'linux/ieee80211.h',
but redefines many of the #define's from the original header.
Functionally, they are the same, but I will submit a patch in reply to
this email which removes the duplicate #defines from
drivers/staging/rtl8723bs/include/ieee80211.h.  It looks like there's
also some #defines there that shadow enum members in
'linux/ieee80211.h', but I will address that in separate patch(es)
when I have a chance.

Thank you,
Quytelda Kahja

On Sun, Mar 25, 2018 at 7:05 AM, kbuild test robot <lkp@intel.com> wrote:
> Hi Quytelda,
>
> Thank you for the patch! Perhaps something to improve:
>
> [auto build test WARNING on mac80211-next/master]
> [also build test WARNING on v4.16-rc6 next-20180323]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url:    https://github.com/0day-ci/linux/commits/Quytelda-Kahja/ieee80211-Replace-bit-shifts-with-the-BIT-macro-for-WLAN_CAPABILITY_/20180325-211645
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
> config: i386-randconfig-s1-03251817 (attached as .config)
> compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=i386
>
> All warnings (new ones prefixed by >>):
>
>    In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>>> drivers/staging/rtl8723bs/include/ieee80211.h:444:0: warning: "WLAN_CAPABILITY_IBSS" redefined
>     #define WLAN_CAPABILITY_IBSS (1<<1)
>
>    In file included from include/net/cfg80211.h:23:0,
>                     from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
>                     from drivers/staging/rtl8723bs/include/osdep_service.h:23,
>                     from drivers/staging/rtl8723bs/include/drv_types.h:29,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>    include/linux/ieee80211.h:1593:0: note: this is the location of the previous definition
>     #define WLAN_CAPABILITY_IBSS  BIT(1)
>
>    In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>>> drivers/staging/rtl8723bs/include/ieee80211.h:445:0: warning: "WLAN_CAPABILITY_CF_POLLABLE" redefined
>     #define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
>
>    In file included from include/net/cfg80211.h:23:0,
>                     from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
>                     from drivers/staging/rtl8723bs/include/osdep_service.h:23,
>                     from drivers/staging/rtl8723bs/include/drv_types.h:29,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>    include/linux/ieee80211.h:1603:0: note: this is the location of the previous definition
>     #define WLAN_CAPABILITY_CF_POLLABLE BIT(2)
>
>    In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>>> drivers/staging/rtl8723bs/include/ieee80211.h:446:0: warning: "WLAN_CAPABILITY_CF_POLL_REQUEST" redefined
>     #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
>
>    In file included from include/net/cfg80211.h:23:0,
>                     from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
>                     from drivers/staging/rtl8723bs/include/osdep_service.h:23,
>                     from drivers/staging/rtl8723bs/include/drv_types.h:29,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>    include/linux/ieee80211.h:1604:0: note: this is the location of the previous definition
>     #define WLAN_CAPABILITY_CF_POLL_REQUEST BIT(3)
>
>    In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>>> drivers/staging/rtl8723bs/include/ieee80211.h:447:0: warning: "WLAN_CAPABILITY_PRIVACY" redefined
>     #define WLAN_CAPABILITY_PRIVACY (1<<4)
>
>    In file included from include/net/cfg80211.h:23:0,
>                     from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
>                     from drivers/staging/rtl8723bs/include/osdep_service.h:23,
>                     from drivers/staging/rtl8723bs/include/drv_types.h:29,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>    include/linux/ieee80211.h:1605:0: note: this is the location of the previous definition
>     #define WLAN_CAPABILITY_PRIVACY  BIT(4)
>
>    In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>>> drivers/staging/rtl8723bs/include/ieee80211.h:448:0: warning: "WLAN_CAPABILITY_SHORT_PREAMBLE" redefined
>     #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
>
>    In file included from include/net/cfg80211.h:23:0,
>                     from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
>                     from drivers/staging/rtl8723bs/include/osdep_service.h:23,
>                     from drivers/staging/rtl8723bs/include/drv_types.h:29,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>    include/linux/ieee80211.h:1606:0: note: this is the location of the previous definition
>     #define WLAN_CAPABILITY_SHORT_PREAMBLE BIT(5)
>
>    In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>>> drivers/staging/rtl8723bs/include/ieee80211.h:449:0: warning: "WLAN_CAPABILITY_PBCC" redefined
>     #define WLAN_CAPABILITY_PBCC (1<<6)
>
>    In file included from include/net/cfg80211.h:23:0,
>                     from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
>                     from drivers/staging/rtl8723bs/include/osdep_service.h:23,
>                     from drivers/staging/rtl8723bs/include/drv_types.h:29,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>    include/linux/ieee80211.h:1607:0: note: this is the location of the previous definition
>     #define WLAN_CAPABILITY_PBCC  BIT(6)
>
>    In file included from drivers/staging/rtl8723bs/include/drv_types.h:33:0,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>>> drivers/staging/rtl8723bs/include/ieee80211.h:450:0: warning: "WLAN_CAPABILITY_CHANNEL_AGILITY" redefined
>     #define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
>
>    In file included from include/net/cfg80211.h:23:0,
>                     from drivers/staging/rtl8723bs/include/osdep_service_linux.h:50,
>                     from drivers/staging/rtl8723bs/include/osdep_service.h:23,
>                     from drivers/staging/rtl8723bs/include/drv_types.h:29,
>                     from drivers/staging/rtl8723bs/hal/rtl8723b_dm.c:20:
>    include/linux/ieee80211.h:1608:0: note: this is the location of the previous definition
>     #define WLAN_CAPABILITY_CHANNEL_AGILITY BIT(7)
>
>
> vim +/WLAN_CAPABILITY_IBSS +444 drivers/staging/rtl8723bs/include/ieee80211.h
>
> 554c0a3a Hans de Goede 2017-03-29  442
> 554c0a3a Hans de Goede 2017-03-29  443  #define WLAN_CAPABILITY_BSS (1<<0)
> 554c0a3a Hans de Goede 2017-03-29 @444  #define WLAN_CAPABILITY_IBSS (1<<1)
> 554c0a3a Hans de Goede 2017-03-29 @445  #define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
> 554c0a3a Hans de Goede 2017-03-29 @446  #define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
> 554c0a3a Hans de Goede 2017-03-29 @447  #define WLAN_CAPABILITY_PRIVACY (1<<4)
> 554c0a3a Hans de Goede 2017-03-29 @448  #define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
> 554c0a3a Hans de Goede 2017-03-29 @449  #define WLAN_CAPABILITY_PBCC (1<<6)
> 554c0a3a Hans de Goede 2017-03-29 @450  #define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
> 554c0a3a Hans de Goede 2017-03-29  451  #define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
> 554c0a3a Hans de Goede 2017-03-29  452
>
> :::::: The code at line 444 was first introduced by commit
> :::::: 554c0a3abf216c991c5ebddcdb2c08689ecd290b staging: Add rtl8723bs sdio wifi driver
>
> :::::: TO: Hans de Goede <hdegoede@redhat.com>
> :::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

* [PATCH] staging: rtl8723bs: Remove duplicate #defines.
  2018-03-26  9:15   ` Quytelda Kahja
@ 2018-03-26  9:18     ` Quytelda Kahja
  0 siblings, 0 replies; 9+ messages in thread
From: Quytelda Kahja @ 2018-03-26  9:18 UTC (permalink / raw)
  To: lkp, gregkh
  Cc: kbuild-all, johannes, linux-wireless, linux-kernel,
	Quytelda Kahja

The modified file includes 'linux/ieee80211.h', but redefines many
constants that already exist in the header.  This will create a conflict
if the values are ever changed in the kernel.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
---
 drivers/staging/rtl8723bs/include/ieee80211.h | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
index 73ce63770c3c..a2402495f447 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -435,19 +435,7 @@ struct ieee80211_snap_hdr {
 #define WLAN_GET_SEQ_SEQ(seq)  ((seq) & RTW_IEEE80211_SCTL_SEQ)
 
 /* Authentication algorithms */
-#define WLAN_AUTH_OPEN 0
-#define WLAN_AUTH_SHARED_KEY 1
-
-#define WLAN_AUTH_CHALLENGE_LEN 128
-
 #define WLAN_CAPABILITY_BSS (1<<0)
-#define WLAN_CAPABILITY_IBSS (1<<1)
-#define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
-#define WLAN_CAPABILITY_CF_POLL_REQUEST (1<<3)
-#define WLAN_CAPABILITY_PRIVACY (1<<4)
-#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
-#define WLAN_CAPABILITY_PBCC (1<<6)
-#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
 #define WLAN_CAPABILITY_SHORT_SLOT (1<<10)
 
 /* Status codes */
-- 
2.16.2

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

* Re: [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_*.
  2018-03-24 23:02   ` Quytelda Kahja
@ 2018-03-27 13:16     ` Johannes Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2018-03-27 13:16 UTC (permalink / raw)
  To: Quytelda Kahja, Larry Finger; +Cc: linux-wireless, linux-kernel

On Sat, 2018-03-24 at 16:02 -0700, Quytelda Kahja wrote:
> The "document" refers to the file in which the changes were made
> ('include/linux/ieee80211.h').

You're the first person ever to do that, to my knowledge :)

Either way, I don't really want to merge this since it would break
staging, and I don't want to merge a staging fix either... so you'd have
to get that sorted out first.

johannes

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

end of thread, other threads:[~2018-03-27 13:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-24  4:10 [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Quytelda Kahja
2018-03-24  4:10 ` [PATCH 2/3] ieee80211: Replace bit shifts with the BIT() macro for measurement masks Quytelda Kahja
2018-03-24  4:10 ` [PATCH 3/3] ieee80211: Replace bit shifts with the BIT() macro for 802.11g ERP IEs Quytelda Kahja
2018-03-24 21:23 ` [PATCH 1/3] ieee80211: Replace bit shifts with the BIT() macro for WLAN_CAPABILITY_* Larry Finger
2018-03-24 23:02   ` Quytelda Kahja
2018-03-27 13:16     ` Johannes Berg
2018-03-25 14:05 ` kbuild test robot
2018-03-26  9:15   ` Quytelda Kahja
2018-03-26  9:18     ` [PATCH] staging: rtl8723bs: Remove duplicate #defines Quytelda Kahja

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