Commit 9120436a authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman
Browse files

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: default avatarPavel Skripkin <paskripkin@gmail.com>
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220602193726.280922-8-martin@kaiser.cx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c5727d76
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -5366,8 +5366,6 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int
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;