staging: rtl8723bs: Replace RTW_IEEE80211_FCTL_* with IEEE80211_FCTL_*.

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>
This commit is contained in:
Quytelda Kahja 2018-03-27 01:40:55 -07:00 committed by Greg Kroah-Hartman
parent 15800332d9
commit bea9145ac4
3 changed files with 6 additions and 20 deletions

View 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); 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) != (RTW_IEEE80211_FTYPE_MGMT|RTW_IEEE80211_STYPE_ACTION)
) { ) {
return false; return false;

View File

@ -324,20 +324,6 @@ enum eap_type {
#define MIN_FRAG_THRESHOLD 256U #define MIN_FRAG_THRESHOLD 256U
#define MAX_FRAG_THRESHOLD 2346U #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_MGMT 0x0000
#define RTW_IEEE80211_FTYPE_CTL 0x0004 #define RTW_IEEE80211_FTYPE_CTL 0x0004
#define RTW_IEEE80211_FTYPE_DATA 0x0008 #define RTW_IEEE80211_FTYPE_DATA 0x0008
@ -426,8 +412,8 @@ struct ieee80211_snap_hdr {
#define SNAP_SIZE sizeof(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_TYPE(fc) ((fc) & IEEE80211_FCTL_FTYPE)
#define WLAN_FC_GET_STYPE(fc) ((fc) & RTW_IEEE80211_FCTL_STYPE) #define WLAN_FC_GET_STYPE(fc) ((fc) & IEEE80211_FCTL_STYPE)
#define WLAN_QC_GET_TID(qc) ((qc) & 0x0f) #define WLAN_QC_GET_TID(qc) ((qc) & 0x0f)

View 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; dot11_hdr = (struct ieee80211_hdr *)skb->data;
frame_control = le16_to_cpu(dot11_hdr->frame_control); frame_control = le16_to_cpu(dot11_hdr->frame_control);
/* Check if the QoS bit is set */ /* 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 /* Check if this ia a Wireless Distribution System (WDS) frame
* which has 4 MAC addresses * 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; 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) == (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 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));
} }