From: Ivan Safonov <insafonov@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Aishwarya Pant <aishpant@gmail.com>,
Yamanappagouda Patil <goudapatilk@gmail.com>,
Luca Ceresoli <luca@lucaceresoli.net>,
Jarod Wilson <jarod@redhat.com>,
"David S . Miller" <davem@davemloft.net>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Ivan Safonov <insafonov@gmail.com>
Subject: [PATCH 5/7] staging:r8188eu: remove ieee80211_get_hdrlen()
Date: Tue, 2 May 2017 09:01:43 +0300 [thread overview]
Message-ID: <20170502060145.26766-5-insafonov@gmail.com> (raw)
In-Reply-To: <20170502060145.26766-1-insafonov@gmail.com>
ieee80211_get_hdrlen is unused, remove it and all corresponding code.
Signed-off-by: Ivan Safonov <insafonov@gmail.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
next prev parent reply other threads:[~2017-05-02 6:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-02 6:01 [PATCH 1/7] staging:r8188eu: move IV/ICV trimming into decrypt() and also place it after rtl88eu_mon_recv_hook() Ivan Safonov
2017-05-02 6:01 ` [PATCH 2/7] staging:r8188eu: use different mon_recv_decrypted() inside rtl88eu_mon_recv_hook() and rtl88eu_mon_xmit_hook() Ivan Safonov
2017-05-02 6:01 ` [PATCH 3/7] staging:r8188eu: inline unprotect_frame() in mon_recv_decrypted_recv() Ivan Safonov
2017-05-02 6:01 ` [PATCH 4/7] staging:r8188eu: trim IV/ICV fields in validate_recv_data_frame() Ivan Safonov
2017-05-02 6:01 ` Ivan Safonov [this message]
2017-05-02 6:01 ` [PATCH 6/7] staging:r8188eu: remove ieee80211_is_empty_essid() Ivan Safonov
2017-05-02 6:01 ` [PATCH 7/7] staging:r8188eu: remove unused definitions from include/ieee80211.h Ivan Safonov
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=20170502060145.26766-5-insafonov@gmail.com \
--to=insafonov@gmail.com \
--cc=aishpant@gmail.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=goudapatilk@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jarod@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@lucaceresoli.net \
/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
all inboxes | Powered by JetHome®