[2/9] staging: r8188eu: get reason code from mgmt struct
Commit Message
Read the deauth reson code from the newly added mgmt structure instead of
calculating the offset ourselves.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -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;