staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
PATCH 1/1 staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
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 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(-)
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +3 -1
@@ -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 ;
drivers/staging/rtl8188eu/include/ieee80211.h +0 -38
@@ -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
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +2 -1
@@ -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;
Signature · 1 line
2.1.0
Quoted 9 lines · Jakub Sitnicki
linux/ieee80211.halready 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 <[email protected]>---
Looks like this patch got lost in the noise. It still applies & builds.
Cheers,
Jakub
Greg Kroah-Hartman
maintainerQuoted 5 lines · Jakub Sitnicki
Quoted 4 lines · Jakub Sitnicki
linux/ieee80211.halready defines constants for information element IDs. Include it where needed, resolve discrepancies in naming, and remove the duplicated definitions.
Quoted 7 lines
Quoted 5 lines
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 <[email protected]>---
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
PATCH RESEND 1/1 staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
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.
--- 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(-)
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +3 -1
@@ -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 ;
drivers/staging/rtl8188eu/include/ieee80211.h +0 -38
@@ -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
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +2 -1
@@ -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;
Signature · 1 line
2.1.0
Greg Kroah-Hartman
maintainerQuoted 6 lines · Jakub Sitnicki
linux/ieee80211.halready 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
Quoted 9 lines · Greg Kroah-Hartman
Quoted 6 lines · Jakub Sitnicki
linux/ieee80211.halready 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.
Quoted 2 lines
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
Quoted 6 lines · Jakub Sitnicki
Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · Jakub Sitnicki
linux/ieee80211.halready defines constants for information element IDs. Include it where needed, resolve discrepancies in naming, and remove the duplicated definitions.
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
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
Quoted 10 lines · Dan Carpenter
Quoted 9 lines · Jakub Sitnicki
Quoted 8 lines · Greg Kroah-Hartman
Quoted 6 lines · Jakub Sitnicki
linux/ieee80211.halready 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.
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
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.gitstaging-next
Will do. Thanks,
Jakub
v2 cover staging: rtl8188eu: clean up duplicated WLAN_* constants
In reply to Jakub SitnickiThis 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/[email protected]
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(-)
Signature · 1 line
2.1.0
PATCH v2 1/4 staging: rtl8188eu: don't duplicate ieee80211 WLAN_EID_* constants
linux/ieee80211.h already defines constants for information element IDs. Resolve discrepancies in naming and remove the duplicated definitions.
--- 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(-)
drivers/staging/rtl8188eu/core/rtw_ieee80211.c +1 -1
@@ -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 ;
drivers/staging/rtl8188eu/include/ieee80211.h +0 -38
@@ -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
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +1 -1
@@ -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;
Signature · 1 line
2.1.0
PATCH v2 2/4 staging: rtl8188eu: wrap a long if condition and remove extra parenthesis
In reply to Jakub Sitnicki--- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +2 -1
@@ -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;
Signature · 1 line
2.1.0
PATCH v2 3/4 staging: rtl8188eu: don't duplicate ieee80211 WLAN_AUTH_* constants
In reply to Jakub Sitnickilinux/ieee80211.h already defines constants for authentication algorithms. Remove the duplicated definitions.
--- drivers/staging/rtl8188eu/include/ieee80211.h | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/rtl8188eu/include/ieee80211.h +0 -6
@@ -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
Signature · 1 line
2.1.0
PATCH v2 4/4 staging: rtl8188eu: don't duplicate ieee80211 WLAN_HT_CAP_SM_PS_* constants
In reply to Jakub Sitnickilinux/ieee80211.h already defines constants for spatial multiplexing power save modes. Remove the duplicated definitions.
--- drivers/staging/rtl8188eu/include/wifi.h | 7 ------- 1 file changed, 7 deletions(-)
drivers/staging/rtl8188eu/include/wifi.h +0 -7
@@ -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
Signature · 1 line
2.1.0