diff options
author | Martin Kaiser <[email protected]> | 2022-10-15 17:24:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2022-10-20 17:35:03 +0200 |
commit | f54ded554f04cc0e7f5edcc571d9c09581f67312 (patch) | |
tree | a2277c34b8ccd66de1a7d2b2537259f56ed05f16 | |
parent | c5997186452ae29b535fd6cb65b4f5534b52ea25 (diff) |
staging: r8188eu: get reason code from mgmt struct
Read the deauth reson code from the newly added mgmt structure instead of
calculating the offset ourselves.
Signed-off-by: Martin Kaiser <[email protected]>
Tested-by: Philipp Hortmann <[email protected]> # Edimax N150
Acked-by: Pavel Skripkin <[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_mlme_ext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 0c4b3b99150d..5c59fc91ecae 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1473,7 +1473,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) _set_timer(&pwdinfo->reset_ch_sitesurvey, 10); } - reason = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN)); + reason = le16_to_cpu(mgmt->u.disassoc.reason_code); if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { struct sta_info *psta; |