diff options
author | Martin Kaiser <[email protected]> | 2022-07-04 22:16:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-07-08 14:27:47 +0200 |
commit | 234cf3971b15a140259e31ea4287143f56f2f3b0 (patch) | |
tree | 3f283d41c948992190eb4ff5d4c840254e3d93e1 | |
parent | c82bf6a83e1b57d7783e39450ab899a31c0fff94 (diff) |
staging: r8188eu: use ieee80211 helper to check for nullfunc frame
Use the ieee80211_is_nullfunc function from ieee80211.h to check for a
nullfunc frame. This is a data frame whose subtype has bit6 set.
Tested-by: Philipp Hortmann <[email protected]> # Edimax N150
Signed-off-by: Martin Kaiser <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_recv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index 8b21ec8f111f..32cd452d1f3d 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -649,6 +649,7 @@ static int ap2sta_data_frame( struct sta_info **psta) { u8 *ptr = precv_frame->rx_data; + struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)precv_frame->rx_data; struct rx_pkt_attrib *pattrib = &precv_frame->attrib; int ret = _SUCCESS; struct sta_priv *pstapriv = &adapter->stapriv; @@ -693,8 +694,8 @@ static int ap2sta_data_frame( goto exit; } - if (GetFrameSubType(ptr) & BIT(6)) { - /* No data, will not indicate to upper layer, temporily count it here */ + if (ieee80211_is_nullfunc(hdr->frame_control)) { + /* We count the nullfunc frame, but we'll not pass it on to higher layers. */ count_rx_stats(adapter, precv_frame, *psta); ret = RTW_RX_HANDLED; goto exit; |