aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kaiser <[email protected]>2022-10-15 17:24:33 +0200
committerGreg Kroah-Hartman <[email protected]>2022-10-20 17:35:03 +0200
commitf54ded554f04cc0e7f5edcc571d9c09581f67312 (patch)
treea2277c34b8ccd66de1a7d2b2537259f56ed05f16
parentc5997186452ae29b535fd6cb65b4f5534b52ea25 (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.c2
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;