mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
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 <philipp.g.hortmann@gmail.com> # Edimax N150 Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220704201654.195574-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c82bf6a83e
commit
234cf3971b
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue