summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-11-29 21:51:49 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-12-05 13:29:07 +0100
commite70cac829d63f24aac0ea858a5407d25cf55b85a (patch)
treea8285a859170424b160d5f26af9abb6af593000c /drivers/staging
parent4de531ce41e5aab9d3c5884e8360faaec82fb62e (diff)
downloadlinux-e70cac829d63f24aac0ea858a5407d25cf55b85a.tar.bz2
staging: r8188eu: read reason code from ieee80211_mgmt
Use the struct ieee80211_mgmt to read the reason code instead of parsing the message manually. Remove the pframe pointer, it's no longer used. 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/20221129205152.128172-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/r8188eu/core/rtw_mlme_ext.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index b2b2cb57ed04..fe58d4e3e260 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -1432,7 +1432,6 @@ static void OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
- u8 *pframe = precv_frame->rx_data;
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
if (memcmp(mgmt->bssid, get_my_bssid(&pmlmeinfo->network), ETH_ALEN))
@@ -1443,7 +1442,7 @@ static void OnDisassoc(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;