diff options
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x2_tx.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x2_tx.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_tx.c b/drivers/net/wireless/mediatek/mt76/mt76x2_tx.c index 1a32e1fb8743..534e4bf9a34c 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_tx.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_tx.c @@ -36,7 +36,9 @@ void mt76x2_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, msta = (struct mt76x2_sta *) control->sta->drv_priv; wcid = &msta->wcid; - } else if (vif) { + } + + if (vif || (!info->control.hw_key && wcid->hw_key_idx != -1)) { struct mt76x2_vif *mvif; mvif = (struct mt76x2_vif *) vif->drv_priv; @@ -166,7 +168,7 @@ int mt76x2_tx_prepare_skb(struct mt76_dev *mdev, void *txwi, *tx_info = FIELD_PREP(MT_TXD_INFO_QSEL, qsel) | MT_TXD_INFO_80211; - if (!wcid || wcid->hw_key_idx == 0xff) + if (!wcid || wcid->hw_key_idx == 0xff || wcid->sw_iv) *tx_info |= MT_TXD_INFO_WIV; return 0; |