lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170502060145.26766-5-insafonov@gmail.com>
Date:   Tue,  2 May 2017 09:01:43 +0300
From:   Ivan Safonov <insafonov@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Aishwarya Pant <aishpant@...il.com>,
        Yamanappagouda Patil <goudapatilk@...il.com>,
        Luca Ceresoli <luca@...aceresoli.net>,
        Jarod Wilson <jarod@...hat.com>,
        "David S . Miller" <davem@...emloft.net>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Ivan Safonov <insafonov@...il.com>
Subject: [PATCH 5/7] staging:r8188eu: remove ieee80211_get_hdrlen()

ieee80211_get_hdrlen is unused, remove it and all corresponding code.

Signed-off-by: Ivan Safonov <insafonov@...il.com>
---
 drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 27 --------------------------
 drivers/staging/rtl8188eu/include/ieee80211.h  | 13 -------------
 2 files changed, 40 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
index d1dafe0..6fc93fa 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c
@@ -972,33 +972,6 @@ int ieee80211_is_empty_essid(const char *essid, int essid_len)
 	return 1;
 }
 
-int ieee80211_get_hdrlen(u16 fc)
-{
-	int hdrlen = 24;
-
-	switch (WLAN_FC_GET_TYPE(fc)) {
-	case RTW_IEEE80211_FTYPE_DATA:
-		if (fc & RTW_IEEE80211_STYPE_QOS_DATA)
-			hdrlen += 2;
-		if ((fc & RTW_IEEE80211_FCTL_FROMDS) && (fc & RTW_IEEE80211_FCTL_TODS))
-			hdrlen += 6; /* Addr4 */
-		break;
-	case RTW_IEEE80211_FTYPE_CTL:
-		switch (WLAN_FC_GET_STYPE(fc)) {
-		case RTW_IEEE80211_STYPE_CTS:
-		case RTW_IEEE80211_STYPE_ACK:
-			hdrlen = 10;
-			break;
-		default:
-			hdrlen = 16;
-			break;
-		}
-		break;
-	}
-
-	return hdrlen;
-}
-
 static int rtw_get_cipher_info(struct wlan_network *pnetwork)
 {
 	uint wpa_ielen;
diff --git a/drivers/staging/rtl8188eu/include/ieee80211.h b/drivers/staging/rtl8188eu/include/ieee80211.h
index 22ab0c4..6348fcf 100644
--- a/drivers/staging/rtl8188eu/include/ieee80211.h
+++ b/drivers/staging/rtl8188eu/include/ieee80211.h
@@ -308,10 +308,6 @@ enum eap_type {
 
 /* Frame control field constants */
 #define RTW_IEEE80211_FCTL_VERS		0x0003
-#define RTW_IEEE80211_FCTL_FTYPE	0x000c
-#define RTW_IEEE80211_FCTL_STYPE	0x00f0
-#define RTW_IEEE80211_FCTL_TODS		0x0100
-#define RTW_IEEE80211_FCTL_FROMDS	0x0200
 #define RTW_IEEE80211_FCTL_MOREFRAGS	0x0400
 #define RTW_IEEE80211_FCTL_RETRY	0x0800
 #define RTW_IEEE80211_FCTL_PM		0x1000
@@ -321,8 +317,6 @@ enum eap_type {
 #define RTW_IEEE80211_FCTL_CTL_EXT	0x0f00
 
 #define RTW_IEEE80211_FTYPE_MGMT	0x0000
-#define RTW_IEEE80211_FTYPE_CTL		0x0004
-#define RTW_IEEE80211_FTYPE_DATA	0x0008
 #define RTW_IEEE80211_FTYPE_EXT		0x000c
 
 /* management */
@@ -345,8 +339,6 @@ enum eap_type {
 #define RTW_IEEE80211_STYPE_BACK	0x0090
 #define RTW_IEEE80211_STYPE_PSPOLL	0x00A0
 #define RTW_IEEE80211_STYPE_RTS		0x00B0
-#define RTW_IEEE80211_STYPE_CTS		0x00C0
-#define RTW_IEEE80211_STYPE_ACK		0x00D0
 #define RTW_IEEE80211_STYPE_CFEND	0x00E0
 #define RTW_IEEE80211_STYPE_CFENDACK	0x00F0
 
@@ -359,7 +351,6 @@ enum eap_type {
 #define RTW_IEEE80211_STYPE_CFACK	0x0050
 #define RTW_IEEE80211_STYPE_CFPOLL	0x0060
 #define RTW_IEEE80211_STYPE_CFACKPOLL	0x0070
-#define RTW_IEEE80211_STYPE_QOS_DATA	0x0080
 #define RTW_IEEE80211_STYPE_QOS_DATA_CFACK	0x0090
 #define RTW_IEEE80211_STYPE_QOS_DATA_CFPOLL	0x00A0
 #define RTW_IEEE80211_STYPE_QOS_DATA_CFACKPOLL	0x00B0
@@ -408,9 +399,6 @@ struct ieee80211_snap_hdr {
 
 #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
 
-#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE)
-#define WLAN_FC_GET_STYPE(fc) ((fc) & RTW_IEEE80211_FCTL_STYPE)
-
 #define WLAN_QC_GET_TID(qc) ((qc) & 0x0f)
 
 #define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTW_IEEE80211_SCTL_FRAG)
@@ -646,7 +634,6 @@ static inline int is_broadcast_mac_addr(const u8 *addr)
 
 /* Baron move to ieee80211.c */
 int ieee80211_is_empty_essid(const char *essid, int essid_len);
-int ieee80211_get_hdrlen(u16 fc);
 
 /* Action category code */
 enum rtw_ieee80211_category {
-- 
2.10.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ