mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
staging: r8188eu: use ieee80211 helper for protected bit
Use ieee80211_has_protected to check if the "protected" bit is set. Remove the r8188eu driver's internal macro for this check. 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/20221126154253.178275-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
92f1bb5ff1
commit
57a8f00f03
2 changed files with 1 additions and 4 deletions
|
@ -809,7 +809,7 @@ static void OnAuthClient(struct adapter *padapter, struct recv_frame *precv_fram
|
|||
if (!(pmlmeinfo->state & WIFI_FW_AUTH_STATE))
|
||||
return;
|
||||
|
||||
offset = (GetPrivacy(pframe)) ? 4 : 0;
|
||||
offset = ieee80211_has_protected(hdr->frame_control) ? 4 : 0;
|
||||
|
||||
seq = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 2));
|
||||
status = le16_to_cpu(*(__le16 *)((size_t)pframe + WLAN_HDR_A3_LEN + offset + 4));
|
||||
|
|
|
@ -170,9 +170,6 @@ enum WIFI_REG_DOMAIN {
|
|||
#define SetPrivacy(pbuf) \
|
||||
*(__le16 *)(pbuf) |= cpu_to_le16(_PRIVACY_)
|
||||
|
||||
#define GetPrivacy(pbuf) \
|
||||
(((*(__le16 *)(pbuf)) & cpu_to_le16(_PRIVACY_)) != 0)
|
||||
|
||||
#define GetFrameType(pbuf) \
|
||||
(le16_to_cpu(*(__le16 *)(pbuf)) & (BIT(3) | BIT(2)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue