staging: rtl8723bs: Replace RTW_IEEE80211_FCTL_* with IEEE80211_FCTL_*.
authorQuytelda Kahja <quytelda@tamalin.org>
Tue, 27 Mar 2018 08:40:55 +0000 (01:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Mar 2018 09:59:27 +0000 (11:59 +0200)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ieee80211.c
drivers/staging/rtl8723bs/include/ieee80211.h
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c

index 9167900b5f7d9579f40e9e22c1eae4c0c41debc7..22c219e8a75fc81bb7e5985f6f269748dbea530d 100644 (file)
@@ -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;
index c76466567ecbf03d4f4521508b28f2fc0e92e519..746ac7cf3ccd63097aeb08f1f1918652efc3dc62 100644 (file)
@@ -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)
 
index 75a4b230ae6e3ebed5f0f23ebe08244b91d584f0..a955b94614d0e8ae593dc51c3128185ad524b75b 100644 (file)
@@ -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));
        }