From: Ivan Safonov <insafonov@gmail.com>
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_*
Date: Sun, 28 Feb 2021 01:22:37 +0300 [thread overview]
Message-ID: <20210227222236.581490-5-insafonov@gmail.com> (raw)
In-Reply-To: <20210227222236.581490-1-insafonov@gmail.com>
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
next prev parent reply other threads:[~2021-02-27 22:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-27 22:22 [PATCH 0/4] staging:rtl8712: avoid unnecessary definitions in wifi.h Ivan Safonov
2021-02-27 22:22 ` [PATCH 1/4] staging:rtl8712: replace get_(d|s)a with ieee80211_get_(D|S)A Ivan Safonov
2021-02-27 22:22 ` [PATCH 2/4] staging:rtl8712: remove unused definitions from wifi.h Ivan Safonov
2021-02-27 22:22 ` [PATCH 3/4] staging:rtl8712: use IEEE80211_FCTL_* kernel definitions Ivan Safonov
2021-02-27 22:22 ` Ivan Safonov [this message]
2021-03-01 8:11 ` [PATCH 4/4] staging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_* Chen, Mike Ximing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210227222236.581490-5-insafonov@gmail.com \
--to=insafonov@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=florian.c.schilhabel@googlemail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pterjan@google.com \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®