rtl8192u: don't duplicate ieee80211 constants for status/auth/reason
authorPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 27 Apr 2015 05:25:39 +0000 (01:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 07:24:14 +0000 (09:24 +0200)
These are all defined as a part of the standard and should not be
duplicated on a per-driver basis.  Use the global ones and delete the
local ones.

In switching to <linux/ieee80211.h> we have to delete a local copy of
an identical struct that we prepped earlier to have identical field
names, and we add explicit include <...> where needed in order to
preserve getting a successful compile.

This isn't the totality of duplicated data removed, but it is a start.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211.h

index 14ef5e193f2e94e7d40992217d0e9b2802582dd6..960769bfa15f46f995aa570b8c2ff9821518681a 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <linux/delay.h>
 #include <linux/wireless.h>
+#include <linux/ieee80211.h>
 
 #include "rtl819x_HT.h"
 #include "rtl819x_BA.h"
@@ -646,13 +647,6 @@ struct ieee80211_snap_hdr {
 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & IEEE80211_SCTL_FRAG)
 #define WLAN_GET_SEQ_SEQ(seq)  (((seq) & IEEE80211_SCTL_SEQ) >> 4)
 
-/* Authentication algorithms */
-#define WLAN_AUTH_OPEN 0
-#define WLAN_AUTH_SHARED_KEY 1
-#define WLAN_AUTH_LEAP 128
-
-#define WLAN_AUTH_CHALLENGE_LEN 128
-
 #define WLAN_CAPABILITY_BSS (1<<0)
 #define WLAN_CAPABILITY_IBSS (1<<1)
 #define WLAN_CAPABILITY_CF_POLLABLE (1<<2)
@@ -671,69 +665,6 @@ struct ieee80211_snap_hdr {
 #define WLAN_ERP_USE_PROTECTION (1<<1)
 #define WLAN_ERP_BARKER_PREAMBLE (1<<2)
 
-/* Status codes */
-enum ieee80211_statuscode {
-       WLAN_STATUS_SUCCESS = 0,
-       WLAN_STATUS_UNSPECIFIED_FAILURE = 1,
-       WLAN_STATUS_CAPS_UNSUPPORTED = 10,
-       WLAN_STATUS_REASSOC_NO_ASSOC = 11,
-       WLAN_STATUS_ASSOC_DENIED_UNSPEC = 12,
-       WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG = 13,
-       WLAN_STATUS_UNKNOWN_AUTH_TRANSACTION = 14,
-       WLAN_STATUS_CHALLENGE_FAIL = 15,
-       WLAN_STATUS_AUTH_TIMEOUT = 16,
-       WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA = 17,
-       WLAN_STATUS_ASSOC_DENIED_RATES = 18,
-       /* 802.11b */
-       WLAN_STATUS_ASSOC_DENIED_NOSHORTPREAMBLE = 19,
-       WLAN_STATUS_ASSOC_DENIED_NOPBCC = 20,
-       WLAN_STATUS_ASSOC_DENIED_NOAGILITY = 21,
-       /* 802.11h */
-       WLAN_STATUS_ASSOC_DENIED_NOSPECTRUM = 22,
-       WLAN_STATUS_ASSOC_REJECTED_BAD_POWER = 23,
-       WLAN_STATUS_ASSOC_REJECTED_BAD_SUPP_CHAN = 24,
-       /* 802.11g */
-       WLAN_STATUS_ASSOC_DENIED_NOSHORTTIME = 25,
-       WLAN_STATUS_ASSOC_DENIED_NODSSSOFDM = 26,
-       /* 802.11i */
-       WLAN_STATUS_INVALID_IE = 40,
-       WLAN_STATUS_INVALID_GROUP_CIPHER = 41,
-       WLAN_STATUS_INVALID_PAIRWISE_CIPHER = 42,
-       WLAN_STATUS_INVALID_AKMP = 43,
-       WLAN_STATUS_UNSUPP_RSN_VERSION = 44,
-       WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
-       WLAN_STATUS_CIPHER_SUITE_REJECTED = 46,
-};
-
-/* Reason codes */
-enum ieee80211_reasoncode {
-       WLAN_REASON_UNSPECIFIED = 1,
-       WLAN_REASON_PREV_AUTH_NOT_VALID = 2,
-       WLAN_REASON_DEAUTH_LEAVING = 3,
-       WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY = 4,
-       WLAN_REASON_DISASSOC_AP_BUSY = 5,
-       WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA = 6,
-       WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA = 7,
-       WLAN_REASON_DISASSOC_STA_HAS_LEFT = 8,
-       WLAN_REASON_STA_REQ_ASSOC_WITHOUT_AUTH = 9,
-       /* 802.11h */
-       WLAN_REASON_DISASSOC_BAD_POWER = 10,
-       WLAN_REASON_DISASSOC_BAD_SUPP_CHAN = 11,
-       /* 802.11i */
-       WLAN_REASON_INVALID_IE = 13,
-       WLAN_REASON_MIC_FAILURE = 14,
-       WLAN_REASON_4WAY_HANDSHAKE_TIMEOUT = 15,
-       WLAN_REASON_GROUP_KEY_HANDSHAKE_TIMEOUT = 16,
-       WLAN_REASON_IE_DIFFERENT = 17,
-       WLAN_REASON_INVALID_GROUP_CIPHER = 18,
-       WLAN_REASON_INVALID_PAIRWISE_CIPHER = 19,
-       WLAN_REASON_INVALID_AKMP = 20,
-       WLAN_REASON_UNSUPP_RSN_VERSION = 21,
-       WLAN_REASON_INVALID_RSN_IE_CAP = 22,
-       WLAN_REASON_IEEE8021X_FAILED = 23,
-       WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
-};
-
 #define IEEE80211_STATMASK_SIGNAL (1<<0)
 #define IEEE80211_STATMASK_RSSI (1<<1)
 #define IEEE80211_STATMASK_NOISE (1<<2)
@@ -1276,12 +1207,6 @@ struct ieee80211_tim_parameters {
 } __packed;
 
 //#else
-struct ieee80211_wmm_ac_param {
-       u8 aci_aifsn;
-       u8 cw;
-       u16 txop_limit;
-};
-
 struct ieee80211_wmm_ts_info {
        u8 ac_dir_tid;
        u8 ac_up_psb;