diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2021-04-08 21:58:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-09 16:14:33 +0200 |
commit | 8b4fa9c356c37f212261ecc2f5396ccc4801e3b4 (patch) | |
tree | f018a95381e409b8e06ff5984d54c577509fb9d1 /drivers/staging/rtl8712/rtl871x_recv.c | |
parent | staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE (diff) | |
download | linux-dev-8b4fa9c356c37f212261ecc2f5396ccc4801e3b4.tar.xz linux-dev-8b4fa9c356c37f212261ecc2f5396ccc4801e3b4.zip |
staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPE
The values defined in enum WIFI_FRAME_TYPE are the same the #define
IEEE80211_FTYPE_xxx from <linux/ieee80211.h>
Use these values to avoid code duplication.
WIFI_QOS_DATA_TYPE is a bit more tricky and doesn't have a direct
equivalence in <linux/ieee80211.h>. So leave this one as-is for now.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/e009a4ee6429a3f79742f9a912e3f6a650fb33ed.1617911201.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_recv.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_recv.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_recv.c b/drivers/staging/rtl8712/rtl871x_recv.c index c13076b0e3d1..db2add576418 100644 --- a/drivers/staging/rtl8712/rtl871x_recv.c +++ b/drivers/staging/rtl8712/rtl871x_recv.c @@ -21,6 +21,7 @@ #include <linux/if_ether.h> #include <linux/kmemleak.h> #include <linux/etherdevice.h> +#include <linux/ieee80211.h> #include <net/cfg80211.h> #include "osdep_service.h" @@ -565,13 +566,13 @@ sint r8712_validate_recv_frame(struct _adapter *adapter, pattrib->privacy = GetPrivacy(ptr); pattrib->order = GetOrder(ptr); switch (type) { - case WIFI_MGT_TYPE: /*mgnt*/ + case IEEE80211_FTYPE_MGMT: retval = validate_recv_mgnt_frame(adapter, precv_frame); break; - case WIFI_CTRL_TYPE:/*ctrl*/ + case IEEE80211_FTYPE_CTL: retval = validate_recv_ctrl_frame(adapter, precv_frame); break; - case WIFI_DATA_TYPE: /*data*/ + case IEEE80211_FTYPE_DATA: pattrib->qos = (subtype & BIT(7)) ? 1 : 0; retval = validate_recv_data_frame(adapter, precv_frame); break; |