staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE
The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define IEEE80211_STYPE_xxx from <linux/ieee80211.h> Use theses values to avoid code duplication. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/5a6fdcf0b5eb43c3d5511b5badd60bfac9389628.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
63ee275711
commit
6e2baa44c6
@ -373,7 +373,7 @@ static sint ap2sta_data_frame(struct _adapter *adapter,
|
|||||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) &&
|
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) &&
|
||||||
check_fwstate(pmlmepriv, _FW_LINKED)) {
|
check_fwstate(pmlmepriv, _FW_LINKED)) {
|
||||||
/* if NULL-frame, drop packet */
|
/* if NULL-frame, drop packet */
|
||||||
if ((GetFrameSubType(ptr)) == WIFI_DATA_NULL)
|
if ((GetFrameSubType(ptr)) == IEEE80211_STYPE_NULLFUNC)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
/* drop QoS-SubType Data, including QoS NULL,
|
/* drop QoS-SubType Data, including QoS NULL,
|
||||||
* excluding QoS-Data
|
* excluding QoS-Data
|
||||||
|
@ -30,10 +30,10 @@
|
|||||||
#include <linux/atomic.h>
|
#include <linux/atomic.h>
|
||||||
#include <linux/crc32poly.h>
|
#include <linux/crc32poly.h>
|
||||||
#include <linux/semaphore.h>
|
#include <linux/semaphore.h>
|
||||||
|
#include <linux/ieee80211.h>
|
||||||
|
|
||||||
#include "osdep_service.h"
|
#include "osdep_service.h"
|
||||||
#include "drv_types.h"
|
#include "drv_types.h"
|
||||||
#include "wifi.h"
|
|
||||||
#include "osdep_intf.h"
|
#include "osdep_intf.h"
|
||||||
|
|
||||||
/* =====WEP related===== */
|
/* =====WEP related===== */
|
||||||
@ -1045,9 +1045,9 @@ static void aes_cipher(u8 *key, uint hdrlen,
|
|||||||
else
|
else
|
||||||
a4_exists = 1;
|
a4_exists = 1;
|
||||||
|
|
||||||
if ((frtype == WIFI_DATA_CFACK) ||
|
if ((frtype == IEEE80211_STYPE_DATA_CFACK) ||
|
||||||
(frtype == WIFI_DATA_CFPOLL) ||
|
(frtype == IEEE80211_STYPE_DATA_CFPOLL) ||
|
||||||
(frtype == WIFI_DATA_CFACKPOLL)) {
|
(frtype == IEEE80211_STYPE_DATA_CFACKPOLL)) {
|
||||||
qc_exists = 1;
|
qc_exists = 1;
|
||||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN)
|
if (hdrlen != WLAN_HDR_A3_QOS_LEN)
|
||||||
hdrlen += 2;
|
hdrlen += 2;
|
||||||
@ -1225,9 +1225,9 @@ static void aes_decipher(u8 *key, uint hdrlen,
|
|||||||
a4_exists = 0;
|
a4_exists = 0;
|
||||||
else
|
else
|
||||||
a4_exists = 1;
|
a4_exists = 1;
|
||||||
if ((frtype == WIFI_DATA_CFACK) ||
|
if ((frtype == IEEE80211_STYPE_DATA_CFACK) ||
|
||||||
(frtype == WIFI_DATA_CFPOLL) ||
|
(frtype == IEEE80211_STYPE_DATA_CFPOLL) ||
|
||||||
(frtype == WIFI_DATA_CFACKPOLL)) {
|
(frtype == IEEE80211_STYPE_DATA_CFACKPOLL)) {
|
||||||
qc_exists = 1;
|
qc_exists = 1;
|
||||||
if (hdrlen != WLAN_HDR_A3_QOS_LEN)
|
if (hdrlen != WLAN_HDR_A3_QOS_LEN)
|
||||||
hdrlen += 2;
|
hdrlen += 2;
|
||||||
|
@ -29,38 +29,6 @@ enum WIFI_FRAME_TYPE {
|
|||||||
WIFI_QOS_DATA_TYPE = (BIT(7) | BIT(3)), /*!< QoS Data */
|
WIFI_QOS_DATA_TYPE = (BIT(7) | BIT(3)), /*!< QoS Data */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum WIFI_FRAME_SUBTYPE {
|
|
||||||
/* below is for mgt frame */
|
|
||||||
WIFI_ASSOCREQ = (0 | WIFI_MGT_TYPE),
|
|
||||||
WIFI_ASSOCRSP = (BIT(4) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_REASSOCREQ = (BIT(5) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_REASSOCRSP = (BIT(5) | BIT(4) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_PROBEREQ = (BIT(6) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_PROBERSP = (BIT(6) | BIT(4) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_BEACON = (BIT(7) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_ATIM = (BIT(7) | BIT(4) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_DISASSOC = (BIT(7) | BIT(5) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_AUTH = (BIT(7) | BIT(5) | BIT(4) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_DEAUTH = (BIT(7) | BIT(6) | WIFI_MGT_TYPE),
|
|
||||||
WIFI_ACTION = (BIT(7) | BIT(6) | BIT(4) | WIFI_MGT_TYPE),
|
|
||||||
/* below is for control frame */
|
|
||||||
WIFI_PSPOLL = (BIT(7) | BIT(5) | WIFI_CTRL_TYPE),
|
|
||||||
WIFI_RTS = (BIT(7) | BIT(5) | BIT(4) | WIFI_CTRL_TYPE),
|
|
||||||
WIFI_CTS = (BIT(7) | BIT(6) | WIFI_CTRL_TYPE),
|
|
||||||
WIFI_ACK = (BIT(7) | BIT(6) | BIT(4) | WIFI_CTRL_TYPE),
|
|
||||||
WIFI_CFEND = (BIT(7) | BIT(6) | BIT(5) | WIFI_CTRL_TYPE),
|
|
||||||
WIFI_CFEND_CFACK = (BIT(7) | BIT(6) | BIT(5) | BIT(4) | WIFI_CTRL_TYPE),
|
|
||||||
/* below is for data frame */
|
|
||||||
WIFI_DATA = (0 | WIFI_DATA_TYPE),
|
|
||||||
WIFI_DATA_CFACK = (BIT(4) | WIFI_DATA_TYPE),
|
|
||||||
WIFI_DATA_CFPOLL = (BIT(5) | WIFI_DATA_TYPE),
|
|
||||||
WIFI_DATA_CFACKPOLL = (BIT(5) | BIT(4) | WIFI_DATA_TYPE),
|
|
||||||
WIFI_DATA_NULL = (BIT(6) | WIFI_DATA_TYPE),
|
|
||||||
WIFI_CF_ACK = (BIT(6) | BIT(4) | WIFI_DATA_TYPE),
|
|
||||||
WIFI_CF_POLL = (BIT(6) | BIT(5) | WIFI_DATA_TYPE),
|
|
||||||
WIFI_CF_ACKPOLL = (BIT(6) | BIT(5) | BIT(4) | WIFI_DATA_TYPE),
|
|
||||||
};
|
|
||||||
|
|
||||||
enum WIFI_REG_DOMAIN {
|
enum WIFI_REG_DOMAIN {
|
||||||
DOMAIN_FCC = 1,
|
DOMAIN_FCC = 1,
|
||||||
DOMAIN_IC = 2,
|
DOMAIN_IC = 2,
|
||||||
|
Loading…
Reference in New Issue
Block a user