diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-01-25 17:59:06 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-02-18 20:27:52 +0100 |
commit | 906d2d3f874a54183df5a609fda180adf0462428 (patch) | |
tree | 84edb7b3aea4b96e7f75ea7eea0069868a8e5247 /drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | |
parent | b231cd7f557d59b7922a3b8dc29ef1f23338f1fc (diff) | |
download | linux-stable-906d2d3f874a54183df5a609fda180adf0462428.tar.gz linux-stable-906d2d3f874a54183df5a609fda180adf0462428.tar.bz2 linux-stable-906d2d3f874a54183df5a609fda180adf0462428.zip |
mt76: fix corrupted software generated tx CCMP PN
Since ccmp_pn is u8 *, the second half needs to start at array index 4
instead of 0. Fixes a connection stall after a certain amount of traffic
Fixes: 23405236460b9 ("mt76: fix transmission of encrypted management frames")
Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76x02_mac.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76x02_mac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c index bf39624c9b98..eab713723b7e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_mac.c @@ -314,7 +314,7 @@ void mt76x02_mac_write_txwi(struct mt76x02_dev *dev, struct mt76x02_txwi *txwi, ccmp_pn[6] = pn >> 32; ccmp_pn[7] = pn >> 40; txwi->iv = *((__le32 *)&ccmp_pn[0]); - txwi->eiv = *((__le32 *)&ccmp_pn[1]); + txwi->eiv = *((__le32 *)&ccmp_pn[4]); } spin_lock_bh(&dev->mt76.lock); |