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:
Jakub Kicinski
2015-06-17 10:19:45 +02:00
committed by Felix Fietkau
parent 729de55ad0
commit 72aa1ac1dd
+1 -1
View File
@@ -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);