Revert "mt76: mt7603: store software PN/IV in wcid"

This reverts commit 2660aa98c4.
PN needs to be shared with mac82011 for mgmt frame crypto

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-03-26 11:35:18 +01:00
parent 30a256a438
commit ae166b09cf
2 changed files with 1 additions and 6 deletions
+1 -5
View File
@@ -899,11 +899,7 @@ mt7603_mac_write_txwi(struct mt7603_dev *dev, __le32 *txwi,
txwi[3] = cpu_to_le32(val);
if (key) {
u64 pn;
spin_lock(&dev->mt76.lock);
pn = ++wcid->tx_pn;
spin_unlock(&dev->mt76.lock);
u64 pn = atomic64_inc_return(&key->tx_pn);
txwi[3] |= cpu_to_le32(MT_TXD3_PN_VALID);
txwi[4] = cpu_to_le32(pn & GENMASK(31, 0));
-1
View File
@@ -472,7 +472,6 @@ mt7603_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
if (cmd == SET_KEY) {
key->hw_key_idx = wcid->idx;
wcid->hw_key_idx = idx;
wcid->tx_pn = atomic64_read(&key->tx_pn);
} else {
if (idx == wcid->hw_key_idx)
wcid->hw_key_idx = -1;