aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-05-24 11:00:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-06 07:59:47 +0200
commita248ccf6048dd299cb78d596c8bbc4d3b3957efa (patch)
treeae58c2f6ef0eeba75b09adc922e24fe31d492e2d
parentstaging: r8188eu: use mgmt to set the category (diff)
downloadlinux-dev-a248ccf6048dd299cb78d596c8bbc4d3b3957efa.tar.xz
linux-dev-a248ccf6048dd299cb78d596c8bbc4d3b3957efa.zip
staging: r8188eu: use mgmt to set the action codes
Use the mgmt structure in issue_action_BA to set the action codes. We have to distinguish between the different message types. We also have to increment the packet length manually as we're no longer calling rtw_set_fixed_ie, which increments the length. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220524090029.242584-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/r8188eu/core/rtw_mlme_ext.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index d693e0a1396b..aa73afc6e36a 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5409,10 +5409,11 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
mgmt->u.action.category = WLAN_CATEGORY_BACK;
pattrib->pktlen++;
- pframe = rtw_set_fixed_ie(pframe, 1, &(action), &pattrib->pktlen);
switch (action) {
case WLAN_ACTION_ADDBA_REQ:
+ mgmt->u.action.u.addba_req.action_code = WLAN_ACTION_ADDBA_REQ;
+ pattrib->pktlen++;
do {
pmlmeinfo->dialogToken++;
} while (pmlmeinfo->dialogToken == 0);
@@ -5438,6 +5439,8 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&le_tmp, &pattrib->pktlen);
break;
case WLAN_ACTION_ADDBA_RESP:
+ mgmt->u.action.u.addba_resp.action_code = WLAN_ACTION_ADDBA_RESP;
+ pattrib->pktlen++;
pframe = rtw_set_fixed_ie(pframe, 1, &pmlmeinfo->ADDBA_req.dialog_token, &pattrib->pktlen);
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&status, &pattrib->pktlen);
BA_para_set = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f;
@@ -5453,6 +5456,8 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&pmlmeinfo->ADDBA_req.BA_timeout_value, &pattrib->pktlen);
break;
case WLAN_ACTION_DELBA:
+ mgmt->u.action.u.delba.action_code = WLAN_ACTION_DELBA;
+ pattrib->pktlen++;
BA_para_set = (status & 0x1F) << 3;
le_tmp = cpu_to_le16(BA_para_set);
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)&le_tmp, &pattrib->pktlen);