staging: r8188eu: use the tid in delba processing
authorMartin Kaiser <martin@kaiser.cx>
Sat, 14 May 2022 16:47:40 +0000 (18:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2022 15:41:56 +0000 (17:41 +0200)
Extract the tid from the delba frame regardless of the recipient/initiator
setting. Use the extracted tid when we process the delba frame.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220514164740.282552-8-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_mlme_ext.c

index af525d6..b24c6a7 100644 (file)
@@ -1517,12 +1517,13 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
                }
                break;
        case WLAN_ACTION_DELBA:
+               tid = u16_get_bits(le16_to_cpu(mgmt->u.action.u.delba.params),
+                                  IEEE80211_DELBA_PARAM_TID_MASK);
                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));
+                       psta->htpriv.agg_enable_bitmap &= ~BIT(tid);
+                       psta->htpriv.candidate_tid_bitmap &= ~BIT(tid);
                } else {
-                       tid = (frame_body[3] >> 4) & 0x0F;
                        preorder_ctrl =  &psta->recvreorder_ctrl[tid];
                        preorder_ctrl->enable = false;
                        preorder_ctrl->indicate_seq = 0xffff;