mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
don't compare .hw_key_idx to negative values
.hw_key_idx is defined as u8 and set to -1 when there is no key. However, we cannot compare to -1 because of the unsigned type. Signed-off-by: Jakub Kicinski <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
729de55ad0
commit
72aa1ac1dd
@@ -238,7 +238,7 @@ int mt76_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
|
||||
MT76_SET(MT_TXD_INFO_QSEL, qsel) |
|
||||
MT_TXD_INFO_80211;
|
||||
|
||||
if (!wcid || wcid->hw_key_idx < 0)
|
||||
if (!wcid || wcid->hw_key_idx == 0xff)
|
||||
tx_info |= MT_TXD_INFO_WIV;
|
||||
|
||||
addr = dma_map_single(dev->dev, skb->data, skb->len, DMA_TO_DEVICE);
|
||||
|
||||
Reference in New Issue
Block a user