OSDN Git Service

staging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_*
authorIvan Safonov <insafonov@gmail.com>
Sat, 27 Feb 2021 22:22:37 +0000 (01:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:25:31 +0000 (09:25 +0100)
cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions,
improve code consistency.

Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.com>
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210227222236.581490-5-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/ieee80211.c
drivers/staging/rtl8712/wifi.h

index b4a0991..13fc3c1 100644 (file)
@@ -173,11 +173,11 @@ int r8712_generate_ie(struct registry_priv *registrypriv)
        ie += 2;
        /*capability info*/
        *(u16 *)ie = 0;
-       *(__le16 *)ie |= cpu_to_le16(cap_IBSS);
+       *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_IBSS);
        if (registrypriv->preamble == PREAMBLE_SHORT)
-               *(__le16 *)ie |= cpu_to_le16(cap_ShortPremble);
+               *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);
        if (dev_network->Privacy)
-               *(__le16 *)ie |= cpu_to_le16(cap_Privacy);
+               *(__le16 *)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
        sz += 2;
        ie += 2;
        /*SSID*/
index b7889ac..f941efb 100644 (file)
@@ -278,13 +278,6 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
 #define AUTH_ODD_TO                            0
 #define AUTH_EVEN_TO                   1
 
-#define cap_ESS BIT(0)
-#define cap_IBSS BIT(1)
-#define cap_CFPollable BIT(2)
-#define cap_CFRequest BIT(3)
-#define cap_Privacy BIT(4)
-#define cap_ShortPremble BIT(5)
-
 /*-----------------------------------------------------------------------------
  *                     Below is the definition for 802.11i / 802.1x
  *------------------------------------------------------------------------------