lkml.org 
[lkml]   [2021]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH 4/4] staging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_*
Date

> -----Original Message-----
> From: Ivan Safonov <insafonov@gmail.com>
> Sent: Saturday, February 27, 2021 5:23 PM
> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com>; Larry Finger
> <Larry.Finger@lwfinger.net>; Michael Straube <straube.linux@gmail.com>; Pascal
> Terjan <pterjan@google.com>; devel@driverdev.osuosl.org; linux-
> kernel@vger.kernel.org; Ivan Safonov <insafonov@gmail.com>
> Subject: [PATCH 4/4] staging:rtl8712: replace cap_* definitions with native kernel
> WLAN_CAPABILITY_*
>
> cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions,
> improve code consistency.
>
> Signed-off-by: Ivan Safonov <insafonov@gmail.com>
> ---
> drivers/staging/rtl8712/ieee80211.c | 6 +++---
> drivers/staging/rtl8712/wifi.h | 7 -------
> 2 files changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/rtl8712/ieee80211.c
> b/drivers/staging/rtl8712/ieee80211.c
> index b4a099169c7c..13fc3c1ec0db 100644
> --- a/drivers/staging/rtl8712/ieee80211.c
> +++ b/drivers/staging/rtl8712/ieee80211.c
> @@ -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*/
> diff --git a/drivers/staging/rtl8712/wifi.h b/drivers/staging/rtl8712/wifi.h
> index b7889ac3dce9..f941efb1f4e2 100644
> --- a/drivers/staging/rtl8712/wifi.h
> +++ b/drivers/staging/rtl8712/wifi.h
> @@ -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
> *------------------------------------------------------------------------------
> --
> 2.26.2

Reviewed-by: Mike Ximing Chen <mike.ximing.chen@intel.com>

\
 
 \ /
  Last update: 2021-03-01 09:15    [W:0.060 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site