diff options
author | Ivan Safonov <insafonov@gmail.com> | 2021-03-14 12:02:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-03-14 17:00:07 +0100 |
commit | 97919a5764f8b9570cb6380c3a887a75479d5cd5 (patch) | |
tree | ba74ca3f349e9be17bc982297f61627c2bd378b5 /drivers/staging/rtl8188eu | |
parent | 8aea42ea5f60a10a1e0138cc7f2ee12b853ad41a (diff) | |
download | linux-stable-97919a5764f8b9570cb6380c3a887a75479d5cd5.tar.gz linux-stable-97919a5764f8b9570cb6380c3a887a75479d5cd5.tar.bz2 linux-stable-97919a5764f8b9570cb6380c3a887a75479d5cd5.zip |
staging:r8188eu: use ieee80211_is_ctl instead IsFrameTypeCtrl
IsFrameTypeCtrl() duplicate ieee80211_is_ctl().
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Link: https://lore.kernel.org/r/20210314090247.21181-5-insafonov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu')
-rw-r--r-- | drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c | 8 | ||||
-rw-r--r-- | 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 ------------------------------------------------------------------------------*/ |