mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Quytelda Kahja <quytelda@tamalin.org>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Quytelda Kahja <quytelda@tamalin.org>
Subject: [PATCH 03/23] staging: rtl8723bs: Replace RTW_IEEE80211_FCTL_* with IEEE80211_FCTL_*.
Date: Tue, 27 Mar 2018 01:40:55 -0700	[thread overview]
Message-ID: <20180327084115.16129-3-quytelda@tamalin.org> (raw)
In-Reply-To: <20180327084115.16129-1-quytelda@tamalin.org>

This driver defines the constants RTW_IEEE80211_FCTL_* for frame
control constants, but all these values are already defined in
'linux/ieee80211.h' as IEEE80211_FCTL_*.  Remove the locally defined
constants, and substitute the kernel constants.

Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
---
 drivers/staging/rtl8723bs/core/rtw_ieee80211.c    |  2 +-
 drivers/staging/rtl8723bs/include/ieee80211.h     | 18 ++----------------
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c |  6 +++---
 3 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
index 9167900b5f7d..22c219e8a75f 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ieee80211.c
@@ -1380,7 +1380,7 @@ int rtw_action_frame_parse(const u8 *frame, u32 frame_len, u8 *category, u8 *act
 
 	fc = le16_to_cpu(((struct ieee80211_hdr_3addr *)frame)->frame_control);
 
-	if ((fc & (RTW_IEEE80211_FCTL_FTYPE|RTW_IEEE80211_FCTL_STYPE))
+	if ((fc & (IEEE80211_FCTL_FTYPE|IEEE80211_FCTL_STYPE))
 		!= (RTW_IEEE80211_FTYPE_MGMT|RTW_IEEE80211_STYPE_ACTION)
 	) {
 		return false;
diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl8723bs/include/ieee80211.h
index c76466567ecb..746ac7cf3ccd 100644
--- a/drivers/staging/rtl8723bs/include/ieee80211.h
+++ b/drivers/staging/rtl8723bs/include/ieee80211.h
@@ -324,20 +324,6 @@ enum eap_type {
 #define MIN_FRAG_THRESHOLD     256U
 #define	MAX_FRAG_THRESHOLD     2346U
 
-/* Frame control field constants */
-#define RTW_IEEE80211_FCTL_VERS		0x0003
-#define RTW_IEEE80211_FCTL_FTYPE		0x000c
-#define RTW_IEEE80211_FCTL_STYPE		0x00f0
-#define RTW_IEEE80211_FCTL_TODS		0x0100
-#define RTW_IEEE80211_FCTL_FROMDS	0x0200
-#define RTW_IEEE80211_FCTL_MOREFRAGS	0x0400
-#define RTW_IEEE80211_FCTL_RETRY		0x0800
-#define RTW_IEEE80211_FCTL_PM		0x1000
-#define RTW_IEEE80211_FCTL_MOREDATA	0x2000
-#define RTW_IEEE80211_FCTL_PROTECTED	0x4000
-#define RTW_IEEE80211_FCTL_ORDER		0x8000
-#define RTW_IEEE80211_FCTL_CTL_EXT	0x0f00
-
 #define RTW_IEEE80211_FTYPE_MGMT		0x0000
 #define RTW_IEEE80211_FTYPE_CTL		0x0004
 #define RTW_IEEE80211_FTYPE_DATA		0x0008
@@ -426,8 +412,8 @@ struct ieee80211_snap_hdr {
 
 #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
 
-#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE)
-#define WLAN_FC_GET_STYPE(fc) ((fc) & RTW_IEEE80211_FCTL_STYPE)
+#define WLAN_FC_GET_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
+#define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
 
 #define WLAN_QC_GET_TID(qc) ((qc) & 0x0f)
 
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 75a4b230ae6e..a955b94614d0 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -2517,7 +2517,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
 	dot11_hdr = (struct ieee80211_hdr *)skb->data;
 	frame_control = le16_to_cpu(dot11_hdr->frame_control);
 	/* Check if the QoS bit is set */
-	if ((frame_control & RTW_IEEE80211_FCTL_FTYPE) == RTW_IEEE80211_FTYPE_DATA) {
+	if ((frame_control & IEEE80211_FCTL_FTYPE) == RTW_IEEE80211_FTYPE_DATA) {
 		/* Check if this ia a Wireless Distribution System (WDS) frame
 		 * which has 4 MAC addresses
 		 */
@@ -2545,7 +2545,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
 		return ret;
 
 	}
-	else if ((frame_control & (RTW_IEEE80211_FCTL_FTYPE|RTW_IEEE80211_FCTL_STYPE))
+	else if ((frame_control & (IEEE80211_FCTL_FTYPE|IEEE80211_FCTL_STYPE))
 		== (RTW_IEEE80211_FTYPE_MGMT|RTW_IEEE80211_STYPE_ACTION)
 	)
 	{
@@ -2607,7 +2607,7 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb, struct net_de
 	}
 	else
 	{
-		DBG_8192C("frame_control = 0x%x\n", frame_control & (RTW_IEEE80211_FCTL_FTYPE|RTW_IEEE80211_FCTL_STYPE));
+		DBG_8192C("frame_control = 0x%x\n", frame_control & (IEEE80211_FCTL_FTYPE|IEEE80211_FCTL_STYPE));
 	}
 
 
-- 
2.16.3

  parent reply	other threads:[~2018-03-27  8:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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
2018-03-27  8:40     ` [PATCH 01/23] " Quytelda Kahja
2018-03-27  8:40       ` [PATCH 02/23] staging: rtl8723bs: Remove #defines shadowing enums in 'linux/ieee80211.h' Quytelda Kahja
2018-03-27  8:40       ` Quytelda Kahja [this message]
2018-03-27  8:40       ` [PATCH 04/23] staging: rtl8723bs: Replace RTW_IEEE80211_FTYPE_* with IEEE80211_FTYPE_* Quytelda Kahja
2018-03-27  8:40       ` [PATCH 05/23] staging: rtl8723bs: Replace RTW_IEEE80211_STYPE_* with IEEE80211_STYPE_* Quytelda Kahja
2018-03-27  8:40       ` [PATCH 06/23] staging: rtl8723bs: Fix newlines in rtw_wx_set_auth() Quytelda Kahja
2018-03-27  8:40       ` [PATCH 07/23] staging: rtl8723bs: Remove unecessary braces from switch statement Quytelda Kahja
2018-03-27  8:41       ` [PATCH 08/23] staging: rtl8723bs: Remove braces from single statement conditionals Quytelda Kahja
2018-03-27  8:41       ` [PATCH 09/23] staging: rtl8723bs: Fix alignment in rtw_wx_set_auth() Quytelda Kahja
2018-03-27  8:41       ` [PATCH 10/23] staging: rtl8723bs: Fix IEEE80211 authentication algorithm constants Quytelda Kahja
2018-03-27  8:41       ` [PATCH 11/23] staging: rtl8723bs: Remove unnecessary length #define's Quytelda Kahja
2018-03-27  8:41       ` [PATCH 12/23] staging: rtl8723bs: Fix lines with trailing open parentheses Quytelda Kahja
2018-03-27  8:41       ` [PATCH 13/23] staging: rtl8723bs: Add spaces around ternary operators Quytelda Kahja
2018-03-27  8:41       ` [PATCH 14/23] staging: rtl8723bs: Add missing braces in else statement Quytelda Kahja
2018-03-27  8:41       ` [PATCH 15/23] staging: rtl8723bs: Change camel case to snake case in 'rtl8723bs_recv.c' Quytelda Kahja
2018-03-27  8:41       ` [PATCH 16/23] staging: rtl8723bs: Remove unnecessary blank lines " Quytelda Kahja
2018-03-27  8:41       ` [PATCH 17/23] staging: rtl8723bs: Fix lines too long in update_recvframe_attrib() Quytelda Kahja
2018-03-27  8:41       ` [PATCH 18/23] staging: rtl8723bs: Fix function signature that goes over 80 characters Quytelda Kahja
2018-03-27  8:41       ` [PATCH 19/23] staging: rtl8723bs: Factor out rtl8723bs_recv_tasklet() sections Quytelda Kahja
2018-03-27  8:41       ` [PATCH 20/23] staging: rtl8723bs: Replace NULL pointer comparison with '!' Quytelda Kahja
2018-03-27  8:41       ` [PATCH 21/23] staging: rtl8723bs: Rework 'struct _ODM_Per_Pkt_Info_' coding style Quytelda Kahja
2018-03-27  8:41       ` [PATCH 22/23] staging: rtl8723bs: Rework 'struct _ODM_Phy_Status_Info_' " Quytelda Kahja
2018-03-27  8:41       ` [PATCH 23/23] staging: rtl8723bs: Remove unecessary newlines from 'odm.h' Quytelda Kahja

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=20180327084115.16129-3-quytelda@tamalin.org \
    --to=quytelda@tamalin.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®