linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
@ 2015-06-24  5:23 Jakub Sitnicki
  2015-07-23 18:11 ` Jakub Sitnicki
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Sitnicki @ 2015-06-24  5:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger; +Cc: linux-kernel, devel, Jakub Sitnicki

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>
---

This patch depends on commit 04fbf979b39b ("rtl8188eu: don't duplicate
ieee80211 constants for status/reason") in staging-next branch.

 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 0bde2887..3aeb00a 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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  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
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-23 18:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Larry Finger, linux-kernel, devel

On Wed, Jun 24, 2015 at 07:23 AM CEST, Jakub Sitnicki <jsitnicki@gmail.com> wrote:
> 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>
> ---

Looks like this patch got lost in the noise.  It still applies & builds.

Cheers,
Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  2015-07-23 18:11 ` Jakub Sitnicki
@ 2015-07-23 18:37   ` Greg Kroah-Hartman
  2015-07-24 15:12     ` [PATCH RESEND] " Jakub Sitnicki
  0 siblings, 1 reply; 13+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-23 18:37 UTC (permalink / raw)
  To: Jakub Sitnicki; +Cc: Larry Finger, linux-kernel, devel

On Thu, Jul 23, 2015 at 08:11:03PM +0200, Jakub Sitnicki wrote:
> On Wed, Jun 24, 2015 at 07:23 AM CEST, Jakub Sitnicki <jsitnicki@gmail.com> wrote:
> > 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>
> > ---
> 
> Looks like this patch got lost in the noise.  It still applies & builds.

Again, please resend, I don't have it in my queue anywhere.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH RESEND] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  2015-07-23 18:37   ` Greg Kroah-Hartman
@ 2015-07-24 15:12     ` Jakub Sitnicki
  2015-07-24 20:39       ` Greg Kroah-Hartman
                         ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-24 15:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger; +Cc: linux-kernel, devel, Jakub Sitnicki

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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH RESEND] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  2015-07-24 15:12     ` [PATCH RESEND] " Jakub Sitnicki
@ 2015-07-24 20:39       ` Greg Kroah-Hartman
  2015-07-25 14:05         ` Jakub Sitnicki
  2015-07-29  8:15       ` [PATCH v2 0/4] staging: rtl8188eu: clean up duplicated WLAN_* constants Jakub Sitnicki
                         ` (4 subsequent siblings)
  5 siblings, 1 reply; 13+ messages in thread
From: Greg Kroah-Hartman @ 2015-07-24 20:39 UTC (permalink / raw)
  To: Jakub Sitnicki; +Cc: Larry Finger, linux-kernel, devel

On Fri, Jul 24, 2015 at 05:12:38PM +0200, Jakub Sitnicki wrote:
> 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.

This patch doesn't apply at all.

Also, don't do more than one thing in a single patch, this should be
broken up into multiple ones.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH RESEND] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  2015-07-24 20:39       ` Greg Kroah-Hartman
@ 2015-07-25 14:05         ` Jakub Sitnicki
  2015-07-25 14:30           ` Dan Carpenter
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-25 14:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Larry Finger, linux-kernel, devel

On Fri, Jul 24, 2015 at 10:39 PM CEST, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> On Fri, Jul 24, 2015 at 05:12:38PM +0200, Jakub Sitnicki wrote:
>> 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.
>
> This patch doesn't apply at all.

My mistake, sorry.  I've generated it against v4.2-rc3.

> Also, don't do more than one thing in a single patch, this should be
> broken up into multiple ones.

OK, I'll redo it with style fixes split out into a separate patch.

Cheers,
Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH RESEND] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  2015-07-25 14:05         ` Jakub Sitnicki
@ 2015-07-25 14:30           ` Dan Carpenter
  2015-07-25 21:24             ` Jakub Sitnicki
  0 siblings, 1 reply; 13+ messages in thread
From: Dan Carpenter @ 2015-07-25 14:30 UTC (permalink / raw)
  To: Jakub Sitnicki; +Cc: Greg Kroah-Hartman, devel, linux-kernel, Larry Finger

On Sat, Jul 25, 2015 at 04:05:52PM +0200, Jakub Sitnicki wrote:
> On Fri, Jul 24, 2015 at 10:39 PM CEST, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> > On Fri, Jul 24, 2015 at 05:12:38PM +0200, Jakub Sitnicki wrote:
> >> 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.
> >
> > This patch doesn't apply at all.
> 
> My mistake, sorry.  I've generated it against v4.2-rc3.
> 

Do it against

git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH RESEND] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  2015-07-25 14:30           ` Dan Carpenter
@ 2015-07-25 21:24             ` Jakub Sitnicki
  0 siblings, 0 replies; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-25 21:24 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Greg Kroah-Hartman, devel, linux-kernel, Larry Finger

On Sat, Jul 25, 2015 at 04:30 PM CEST, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> On Sat, Jul 25, 2015 at 04:05:52PM +0200, Jakub Sitnicki wrote:
>> On Fri, Jul 24, 2015 at 10:39 PM CEST, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>> > On Fri, Jul 24, 2015 at 05:12:38PM +0200, Jakub Sitnicki wrote:
>> >> 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.
>> >
>> > This patch doesn't apply at all.
>> 
>> My mistake, sorry.  I've generated it against v4.2-rc3.
>> 
>
> Do it against
>
> git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next

Will do. Thanks,

Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 0/4] staging: rtl8188eu: clean up duplicated WLAN_* constants
  2015-07-24 15:12     ` [PATCH RESEND] " Jakub Sitnicki
  2015-07-24 20:39       ` Greg Kroah-Hartman
@ 2015-07-29  8:15       ` Jakub Sitnicki
  2015-07-29  8:15       ` [PATCH v2 1/4] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants Jakub Sitnicki
                         ` (3 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-29  8:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger
  Cc: Dan Carpenter, devel, linux-kernel, Jakub Sitnicki

This short series was initially a patch[1] that had to be rebased and
split (patches 1 & 2).

Since then it has been extended to clean up other WLAN_* constants
duplicated in rtl8188eu driver's headers (patches 3 & 4).

[1] http://lkml.kernel.org/g/1437750758-17120-1-git-send-email-jsitnicki@gmail.com

Jakub Sitnicki (4):
  staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  staging: rtl8188eu: wrap a long if condition and remove extra
    parenthesis
  staging: rtl8188eu: don't duplicate ieee80211 WLAN_AUTH_* constants
  staging: rtl8188eu: don't duplicate ieee80211 WLAN_HT_CAP_SM_PS_*
    constants

 drivers/staging/rtl8188eu/core/rtw_ieee80211.c |  2 +-
 drivers/staging/rtl8188eu/include/ieee80211.h  | 44 --------------------------
 drivers/staging/rtl8188eu/include/wifi.h       |  7 ----
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c |  3 +-
 4 files changed, 3 insertions(+), 53 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 1/4] staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
  2015-07-24 15:12     ` [PATCH RESEND] " Jakub Sitnicki
  2015-07-24 20:39       ` Greg Kroah-Hartman
  2015-07-29  8:15       ` [PATCH v2 0/4] staging: rtl8188eu: clean up duplicated WLAN_* constants Jakub Sitnicki
@ 2015-07-29  8:15       ` Jakub Sitnicki
  2015-07-29  8:15       ` [PATCH v2 2/4] staging: rtl8188eu: wrap a long if condition and remove extra parenthesis Jakub Sitnicki
                         ` (2 subsequent siblings)
  5 siblings, 0 replies; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-29  8:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger
  Cc: Dan Carpenter, devel, linux-kernel, Jakub Sitnicki

linux/ieee80211.h already defines constants for information element IDs.
Resolve discrepancies in naming and remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
---
 drivers/staging/rtl8188eu/core/rtw_ieee80211.c |  2 +-
 drivers/staging/rtl8188eu/include/ieee80211.h  | 38 --------------------------
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c |  2 +-
 3 files changed, 2 insertions(+), 40 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index d43e867..c3c5828 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -1044,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 fabb959..cf3f64d 100644
--- a/drivers/staging/rtl8188eu/include/ieee80211.h
+++ b/drivers/staging/rtl8188eu/include/ieee80211.h
@@ -486,44 +486,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 2db86fb..554c04d 100644
--- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
@@ -2666,7 +2666,7 @@ 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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/4] staging: rtl8188eu: wrap a long if condition and remove extra parenthesis
  2015-07-24 15:12     ` [PATCH RESEND] " Jakub Sitnicki
                         ` (2 preceding siblings ...)
  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       ` 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
  5 siblings, 0 replies; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-29  8:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger
  Cc: Dan Carpenter, devel, linux-kernel, Jakub Sitnicki

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
---
 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
index 554c04d..844ed6f 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_VENDOR_SPECIFIC)) {
+		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


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] staging: rtl8188eu: don't duplicate ieee80211 WLAN_AUTH_* constants
  2015-07-24 15:12     ` [PATCH RESEND] " Jakub Sitnicki
                         ` (3 preceding siblings ...)
  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       ` 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
  5 siblings, 0 replies; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-29  8:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger
  Cc: Dan Carpenter, devel, linux-kernel, Jakub Sitnicki

linux/ieee80211.h already defines constants for authentication
algorithms.  Remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
---
 drivers/staging/rtl8188eu/include/ieee80211.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h
index cf3f64d..6400f75 100644
--- a/drivers/staging/rtl8188eu/include/ieee80211.h
+++ b/drivers/staging/rtl8188eu/include/ieee80211.h
@@ -477,12 +477,6 @@ struct ieee80211_snap_hdr {
 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG)
 #define WLAN_GET_SEQ_SEQ(seq)  ((seq) & RTW_IEEE80211_SCTL_SEQ)
 
-/* Authentication algorithms */
-#define WLAN_AUTH_OPEN 0
-#define WLAN_AUTH_SHARED_KEY 1
-
-#define WLAN_AUTH_CHALLENGE_LEN 128
-
 /* Non standard?  Not in <linux/ieee80211.h> */
 #define WLAN_REASON_EXPIRATION_CHK 65535
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 4/4] staging: rtl8188eu: don't duplicate ieee80211 WLAN_HT_CAP_SM_PS_* constants
  2015-07-24 15:12     ` [PATCH RESEND] " Jakub Sitnicki
                         ` (4 preceding siblings ...)
  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       ` Jakub Sitnicki
  5 siblings, 0 replies; 13+ messages in thread
From: Jakub Sitnicki @ 2015-07-29  8:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger
  Cc: Dan Carpenter, devel, linux-kernel, Jakub Sitnicki

linux/ieee80211.h already defines constants for spatial multiplexing
power save modes.  Remove the duplicated definitions.

Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com>
---
 drivers/staging/rtl8188eu/include/wifi.h | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h
index a08a2e0..dba8af1 100644
--- a/drivers/staging/rtl8188eu/include/wifi.h
+++ b/drivers/staging/rtl8188eu/include/wifi.h
@@ -649,13 +649,6 @@ enum ht_cap_ampdu_factor {
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
 
-/* Spatial Multiplexing Power Save Modes */
-#define WLAN_HT_CAP_SM_PS_STATIC	0
-#define WLAN_HT_CAP_SM_PS_DYNAMIC	1
-#define WLAN_HT_CAP_SM_PS_INVALID	2
-#define WLAN_HT_CAP_SM_PS_DISABLED	3
-
-
 #define OP_MODE_PURE                    0
 #define OP_MODE_MAY_BE_LEGACY_STAS      1
 #define OP_MODE_20MHZ_HT_STA_ASSOCED    2
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-07-29  8:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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     ` [PATCH RESEND] " Jakub Sitnicki
2015-07-24 20:39       ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).