Skip to content

Commit

Permalink
staging: r8188eu: use ieee80211 define for version check
Browse files Browse the repository at this point in the history
Use the IEEE80211_FCTL_VERS define to check the version number
of a received frame.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
  • Loading branch information
martin-kaiser authored and intel-lab-lkp committed Mar 23, 2022
1 parent 41197a5 commit ab58316
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/r8188eu/core/rtw_recv.c
Expand Up @@ -1063,7 +1063,6 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
struct rx_pkt_attrib *pattrib = &precv_frame->attrib;
u8 *ptr = precv_frame->rx_data;
__le16 fc = *(__le16 *)ptr;
u8 ver = (unsigned char)(*ptr) & 0x3;
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;

if (pmlmeext->sitesurvey_res.state == SCAN_PROCESS) {
Expand All @@ -1072,8 +1071,7 @@ static int validate_recv_frame(struct adapter *adapter, struct recv_frame *precv
pmlmeext->channel_set[ch_set_idx].rx_count++;
}

/* add version chk */
if (ver != 0)
if ((fc & IEEE80211_FCTL_VERS) != 0)
return _FAIL;

pattrib->to_fr_ds = get_tofr_ds(ptr);
Expand Down

0 comments on commit ab58316

Please sign in to comment.