diff options
author | Martin Kaiser <martin@kaiser.cx> | 2022-05-08 19:14:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-05-19 18:40:56 +0300 |
commit | 5108b9838a76a9c5cee07b4c4a1bc4bb4024ceeb (patch) | |
tree | bd45c25877c58a11aff002ee14f3de9737444ce1 /drivers/staging | |
parent | 20e7ac6f74bc1142f9f9ca0fa46a13d6c3b4cebb (diff) | |
download | linux-5108b9838a76a9c5cee07b4c4a1bc4bb4024ceeb.tar.xz |
staging: r8188eu: read addr2 from ieee80211_mgmt
Define a struct ieee80211_mgmt variable in the OnAction_back function. Use
it to read addr2. For management frames, addr2 is the source address (sa).
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220508161451.115847-2-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.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index 848b5051aa13..2f67e3c08191 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -1467,7 +1467,7 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_frame) { - u8 *addr; + struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)precv_frame->rx_data; struct sta_info *psta = NULL; struct recv_reorder_ctrl *preorder_ctrl; unsigned char *frame_body; @@ -1485,8 +1485,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr if (!(pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)) return _SUCCESS; - addr = GetAddr2Ptr(pframe); - psta = rtw_get_stainfo(pstapriv, addr); + psta = rtw_get_stainfo(pstapriv, mgmt->sa); if (!psta) return _SUCCESS; @@ -1501,12 +1500,12 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr switch (action) { case RTW_WLAN_ACTION_ADDBA_REQ: /* ADDBA request */ memcpy(&pmlmeinfo->ADDBA_req, &frame_body[2], sizeof(struct ADDBA_request)); - process_addba_req(padapter, (u8 *)&pmlmeinfo->ADDBA_req, addr); + process_addba_req(padapter, (u8 *)&pmlmeinfo->ADDBA_req, mgmt->sa); if (pmlmeinfo->bAcceptAddbaReq) - issue_action_BA(padapter, addr, RTW_WLAN_ACTION_ADDBA_RESP, 0); + issue_action_BA(padapter, mgmt->sa, RTW_WLAN_ACTION_ADDBA_RESP, 0); else - issue_action_BA(padapter, addr, RTW_WLAN_ACTION_ADDBA_RESP, 37);/* reject ADDBA Req */ + issue_action_BA(padapter, mgmt->sa, RTW_WLAN_ACTION_ADDBA_RESP, 37);/* reject ADDBA Req */ break; case RTW_WLAN_ACTION_ADDBA_RESP: /* ADDBA response */ status = get_unaligned_le16(&frame_body[3]); |