From: Jakub Sitnicki <jsitnicki@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Larry Finger <Larry.Finger@lwfinger.net>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
Jakub Sitnicki <jsitnicki@gmail.com>
Subject: [PATCH RESEND] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
Date: Fri, 24 Jul 2015 17:12:38 +0200 [thread overview]
Message-ID: <1437750758-17120-1-git-send-email-jsitnicki@gmail.com> (raw)
In-Reply-To: <20150723183707.GB29830@kroah.com>
linux/ieee80211.h already defines constants for information element IDs.
Include it where needed, resolve discrepancies in naming, and remove the
duplicated definitions.
While at it, wrap a line that was too long and remove extra parentheses
in an expression that mixes only equality and logical operators.
Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 4 ++-
drivers/staging/rtl8188eu/include/ieee80211.h | 38 --------------------------
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 3 +-
3 files changed, 5 insertions(+), 40 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index 11b780d..c3c5828 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -19,6 +19,8 @@
******************************************************************************/
#define _IEEE80211_C
+#include <linux/ieee80211.h>
+
#include <drv_types.h>
#include <osdep_intf.h>
#include <ieee80211.h>
@@ -1042,7 +1044,7 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
elems->timeout_int = pos;
elems->timeout_int_len = elen;
break;
- case WLAN_EID_HT_CAP:
+ case WLAN_EID_HT_CAPABILITY:
elems->ht_capabilities = pos;
elems->ht_capabilities_len = elen;
break;
diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h
index b129ad1..611877c 100644
--- a/drivers/staging/rtl8188eu/include/ieee80211.h
+++ b/drivers/staging/rtl8188eu/include/ieee80211.h
@@ -496,44 +496,6 @@ struct ieee80211_snap_hdr {
/* Non standard? Not in <linux/ieee80211.h> */
#define WLAN_REASON_EXPIRATION_CHK 65535
-/* Information Element IDs */
-#define WLAN_EID_SSID 0
-#define WLAN_EID_SUPP_RATES 1
-#define WLAN_EID_FH_PARAMS 2
-#define WLAN_EID_DS_PARAMS 3
-#define WLAN_EID_CF_PARAMS 4
-#define WLAN_EID_TIM 5
-#define WLAN_EID_IBSS_PARAMS 6
-#define WLAN_EID_CHALLENGE 16
-/* EIDs defined by IEEE 802.11h - START */
-#define WLAN_EID_PWR_CONSTRAINT 32
-#define WLAN_EID_PWR_CAPABILITY 33
-#define WLAN_EID_TPC_REQUEST 34
-#define WLAN_EID_TPC_REPORT 35
-#define WLAN_EID_SUPPORTED_CHANNELS 36
-#define WLAN_EID_CHANNEL_SWITCH 37
-#define WLAN_EID_MEASURE_REQUEST 38
-#define WLAN_EID_MEASURE_REPORT 39
-#define WLAN_EID_QUITE 40
-#define WLAN_EID_IBSS_DFS 41
-/* EIDs defined by IEEE 802.11h - END */
-#define WLAN_EID_ERP_INFO 42
-#define WLAN_EID_HT_CAP 45
-#define WLAN_EID_RSN 48
-#define WLAN_EID_EXT_SUPP_RATES 50
-#define WLAN_EID_MOBILITY_DOMAIN 54
-#define WLAN_EID_FAST_BSS_TRANSITION 55
-#define WLAN_EID_TIMEOUT_INTERVAL 56
-#define WLAN_EID_RIC_DATA 57
-#define WLAN_EID_HT_OPERATION 61
-#define WLAN_EID_SECONDARY_CHANNEL_OFFSET 62
-#define WLAN_EID_20_40_BSS_COEXISTENCE 72
-#define WLAN_EID_20_40_BSS_INTOLERANT 73
-#define WLAN_EID_OVERLAPPING_BSS_SCAN_PARAMS 74
-#define WLAN_EID_MMIE 76
-#define WLAN_EID_VENDOR_SPECIFIC 221
-#define WLAN_EID_GENERIC (WLAN_EID_VENDOR_SPECIFIC)
-
#define IEEE80211_MGMT_HDR_LEN 24
#define IEEE80211_DATA_HDR3_LEN 24
#define IEEE80211_DATA_HDR4_LEN 30
diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 38dba14..dec089d 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -2666,7 +2666,8 @@ static int rtw_get_sta_wpaie(struct net_device *dev, struct ieee_param *param)
psta = rtw_get_stainfo(pstapriv, param->sta_addr);
if (psta) {
- if ((psta->wpa_ie[0] == WLAN_EID_RSN) || (psta->wpa_ie[0] == WLAN_EID_GENERIC)) {
+ if (psta->wpa_ie[0] == WLAN_EID_RSN ||
+ psta->wpa_ie[0] == WLAN_EID_VENDOR_SPECIFIC) {
int wpa_ie_len;
int copy_len;
--
2.1.0
next prev parent reply other threads:[~2015-07-24 15:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-24 5:23 [PATCH] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants Jakub Sitnicki
2015-07-23 18:11 ` Jakub Sitnicki
2015-07-23 18:37 ` Greg Kroah-Hartman
2015-07-24 15:12 ` Jakub Sitnicki [this message]
2015-07-24 20:39 ` [PATCH RESEND] " Greg Kroah-Hartman
2015-07-25 14:05 ` Jakub Sitnicki
2015-07-25 14:30 ` Dan Carpenter
2015-07-25 21:24 ` Jakub Sitnicki
2015-07-29 8:15 ` [PATCH v2 0/4] staging: rtl8188eu: clean up duplicated WLAN_* constants Jakub Sitnicki
2015-07-29 8:15 ` [PATCH v2 1/4] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants Jakub Sitnicki
2015-07-29 8:15 ` [PATCH v2 2/4] staging: rtl8188eu: wrap a long if condition and remove extra parenthesis Jakub Sitnicki
2015-07-29 8:15 ` [PATCH v2 3/4] staging: rtl8188eu: don't duplicate ieee80211 WLAN_AUTH_* constants Jakub Sitnicki
2015-07-29 8:15 ` [PATCH v2 4/4] staging: rtl8188eu: don't duplicate ieee80211 WLAN_HT_CAP_SM_PS_* constants Jakub Sitnicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1437750758-17120-1-git-send-email-jsitnicki@gmail.com \
--to=jsitnicki@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox