From: Ivan Safonov <insafonov@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Brooke Basile <brookebasile@gmail.com>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Michael Straube <straube.linux@gmail.com>,
Mrinal Pandey <mrinalmni@gmail.com>,
Peilin Ye <yepeilin.cs@gmail.com>,
Shreeya Patel <shreeya.patel23498@gmail.com>,
Simon Fong <simon.fodin@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Ivan Safonov <insafonov@gmail.com>
Subject: [PATCH 4/4] staging:r8188eu: use ieee80211_is_ctl instead IsFrameTypeCtrl
Date: Sun, 14 Mar 2021 12:02:47 +0300 [thread overview]
Message-ID: <20210314090247.21181-5-insafonov@gmail.com> (raw)
In-Reply-To: <20210314090247.21181-1-insafonov@gmail.com>
IsFrameTypeCtrl() duplicate ieee80211_is_ctl().
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
---
drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 8 +++++---
drivers/staging/rtl8188eu/include/wifi.h | 8 --------
2 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
index 4fae75fc3dd5..8669bf097479 100644
--- a/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
+++ b/drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
@@ -133,6 +133,8 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe,
struct rx_pkt_attrib *pattrib = &precvframe->attrib;
struct odm_phy_status_info *pPHYInfo = (struct odm_phy_status_info *)(&pattrib->phy_info);
u8 *wlanhdr;
+ struct ieee80211_hdr *hdr =
+ (struct ieee80211_hdr *)precvframe->pkt->data;
struct odm_per_pkt_info pkt_info;
u8 *sa = NULL;
struct sta_priv *pstapriv;
@@ -144,13 +146,13 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe,
wlanhdr = precvframe->pkt->data;
- pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) &&
+ pkt_info.bPacketMatchBSSID = (!ieee80211_is_ctl(hdr->frame_control) &&
!pattrib->icv_err && !pattrib->crc_err &&
!memcmp(get_hdr_bssid(wlanhdr),
get_bssid(&padapter->mlmepriv), ETH_ALEN));
pkt_info.bPacketToSelf = pkt_info.bPacketMatchBSSID &&
- (!memcmp(ieee80211_get_DA((struct ieee80211_hdr *)wlanhdr),
+ (!memcmp(ieee80211_get_DA(hdr),
myid(&padapter->eeprompriv), ETH_ALEN));
pkt_info.bPacketBeacon = pkt_info.bPacketMatchBSSID &&
@@ -161,7 +163,7 @@ void update_recvframe_phyinfo_88e(struct recv_frame *precvframe,
sa = padapter->mlmepriv.cur_network.network.MacAddress;
/* to do Ad-hoc */
} else {
- sa = ieee80211_get_SA((struct ieee80211_hdr *)wlanhdr);
+ sa = ieee80211_get_SA(hdr);
}
pstapriv = &padapter->stapriv;
diff --git a/drivers/staging/rtl8188eu/include/wifi.h b/drivers/staging/rtl8188eu/include/wifi.h
index d65a0a88a69a..84e17330628e 100644
--- a/drivers/staging/rtl8188eu/include/wifi.h
+++ b/drivers/staging/rtl8188eu/include/wifi.h
@@ -197,14 +197,6 @@ static inline unsigned char *get_hdr_bssid(unsigned char *pframe)
return sa;
}
-static inline int IsFrameTypeCtrl(unsigned char *pframe)
-{
- if (GetFrameType(pframe) == WIFI_CTRL_TYPE)
- return true;
- else
- return false;
-}
-
/*-----------------------------------------------------------------------------
Below is for the security related definition
------------------------------------------------------------------------------*/
--
2.26.2
prev parent reply other threads:[~2021-03-14 9:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-14 9:02 [PATCH 0/4] staging:r8188eu: remove unnecessary definitions from wifi.h Ivan Safonov
2021-03-14 9:02 ` [PATCH 1/4] staging:r8188eu: replace get_(d|s)a with ieee80211_get_(D|S)A Ivan Safonov
2021-03-14 9:02 ` [PATCH 2/4] staging:r8188eu: remove unused definitions from wifi.h Ivan Safonov
2021-03-14 9:02 ` [PATCH 3/4] staging:r8188eu: replace cap_* definitions with native kernel WLAN_CAPABILITY_* Ivan Safonov
2021-03-14 9:02 ` Ivan Safonov [this message]
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=20210314090247.21181-5-insafonov@gmail.com \
--to=insafonov@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=brookebasile@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mrinalmni@gmail.com \
--cc=shreeya.patel23498@gmail.com \
--cc=simon.fodin@gmail.com \
--cc=straube.linux@gmail.com \
--cc=yepeilin.cs@gmail.com \
/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®