From: Martin Kaiser Date: Thu, 2 Jun 2022 19:37:22 +0000 (+0200) Subject: staging: r8188eu: use mgmt to set delba params X-Git-Tag: v6.1-rc5~722^2~143 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9120436aa9883da6fde9fa66d3afe503df3c44ae;p=platform%2Fkernel%2Flinux-starfive.git staging: r8188eu: use mgmt to set delba params Use the mgmt struct to set the delba parameters. Use the exact same value for the parameters as the current code. Remove a dead increment of pframe, we don't use pframe for the delba message any more. Tested-by: Pavel Skripkin Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220602193726.280922-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c index dd9f7f2..46b770e 100644 --- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c @@ -5366,8 +5366,6 @@ exit: void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned char action, unsigned short status) { u16 start_seq; - u16 BA_para_set; - __le16 le_tmp; u16 BA_starting_seqctrl = 0; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; @@ -5403,7 +5401,6 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch mgmt->seq_ctrl = cpu_to_le16(pmlmeext->mgnt_seq); pmlmeext->mgnt_seq++; - pframe += sizeof(struct ieee80211_hdr_3addr); pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr); mgmt->u.action.category = WLAN_CATEGORY_BACK; @@ -5452,10 +5449,8 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch 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); - + mgmt->u.action.u.delba.params = cpu_to_le16((status & 0x1F) << 3); + pattrib->pktlen += 2; mgmt->u.action.u.delba.reason_code = cpu_to_le16(WLAN_STATUS_REQUEST_DECLINED); pattrib->pktlen += 2; break;