mt76: intialize tx queue entry wcid to 0xffff by default
authorFelix Fietkau <nbd@nbd.name>
Sun, 9 May 2021 20:49:07 +0000 (22:49 +0200)
committerFelix Fietkau <nbd@nbd.name>
Thu, 17 Jun 2021 16:33:48 +0000 (18:33 +0200)
Avoid accidentally mapping them to WCID 0 on completion

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/dma.c
drivers/net/wireless/mediatek/mt76/sdio.c
drivers/net/wireless/mediatek/mt76/usb.c

index 72b1cc0ecfda32a51210203fa1daacb27166b37e..75c1f54b1fe514e349f4c5baf1b5ad141912aa8b 100644 (file)
@@ -191,6 +191,7 @@ mt76_dma_add_buf(struct mt76_dev *dev, struct mt76_queue *q,
 
        q->entry[idx].txwi = txwi;
        q->entry[idx].skb = skb;
+       q->entry[idx].wcid = 0xffff;
 
        return idx;
 }
index a18d2896ee1fbfecbd72432621423430517f5021..1665fe88ebb8cd68a7f77f0a1cc3b5008408407f 100644 (file)
@@ -256,6 +256,7 @@ mt76s_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
 
        q->entry[q->head].skb = tx_info.skb;
        q->entry[q->head].buf_sz = len;
+       q->entry[q->head].wcid = 0xffff;
 
        smp_wmb();
 
index 30bc54e98c58ea6d09bf6da63e978bb021d59ebc..1e9f60bb811ad110881e9c5933ae83ef364683b0 100644 (file)
@@ -925,6 +925,7 @@ mt76u_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
 
        q->head = (q->head + 1) % q->ndesc;
        q->entry[idx].skb = tx_info.skb;
+       q->entry[idx].wcid = 0xffff;
        q->queued++;
 
        return idx;