diff options
author | Philipp Hortmann <philipp.g.hortmann@gmail.com> | 2023-09-12 22:28:25 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-17 10:47:42 +0300 |
commit | a00e00a20e5732811715fa78f3092fc7340301da (patch) | |
tree | d3a416968a8e75ebefefa62a49ed2f41c9efc5f9 /drivers/staging/rtl8192e/rtllib_rx.c | |
parent | dabd8585db95fa4c95d894ff2924e9bb4f1f308b (diff) | |
download | linux-a00e00a20e5732811715fa78f3092fc7340301da.tar.xz |
staging: rtl8192e: Use standard function in rtllib_rx_check_duplicate()
Use standard function ieee80211_is_beacon() to avoid proprietary code and
to increase readability.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/b74b6ef5e266504b9e3d84495bcd8fe4978b4ded.1694546300.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_rx.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_rx.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 89c8d66765fe..7c16d4db67ad 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -904,11 +904,9 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee, { struct rtllib_hdr_4addr *hdr = (struct rtllib_hdr_4addr *)skb->data; u16 fc, sc; - u8 frag, type, stype; + u8 frag; fc = le16_to_cpu(hdr->frame_ctl); - type = WLAN_FC_GET_TYPE(fc); - stype = WLAN_FC_GET_STYPE(fc); sc = le16_to_cpu(hdr->seq_ctl); frag = WLAN_GET_SEQ_FRAG(sc); @@ -916,8 +914,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee, !ieee->current_network.qos_data.active || !IsDataFrame(skb->data) || IsLegacyDataFrame(skb->data)) { - if (!((type == RTLLIB_FTYPE_MGMT) && - (stype == RTLLIB_STYPE_BEACON))) { + if (!ieee80211_is_beacon(hdr->frame_ctl)) { if (is_duplicate_packet(ieee, hdr)) return -1; } |