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

staging: r8188eu: check for initiator vs recipient



For an incoming delba message, the code checks if the delba was sent by
the data initiator or by the data recipient.

Rewrite this check using the ieee80211 helpers, making the code easier to
understand.

Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220514164740.282552-7-martin@kaiser.cx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 813586de
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1517,10 +1517,11 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
		}
		break;
	case WLAN_ACTION_DELBA:
		if ((frame_body[3] & BIT(3)) == 0) {
		if (u16_get_bits(le16_to_cpu(mgmt->u.action.u.delba.params),
				 IEEE80211_DELBA_PARAM_INITIATOR_MASK) == WLAN_BACK_RECIPIENT) {
			psta->htpriv.agg_enable_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf));
			psta->htpriv.candidate_tid_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf));
		} else if ((frame_body[3] & BIT(3)) == BIT(3)) {
		} else {
			tid = (frame_body[3] >> 4) & 0x0F;
			preorder_ctrl =  &psta->recvreorder_ctrl[tid];
			preorder_ctrl->enable = false;