]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mt76: mt7615: fix key set/delete issues
authorFelix Fietkau <nbd@nbd.name>
Mon, 8 Feb 2021 16:07:27 +0000 (17:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 May 2021 08:29:31 +0000 (10:29 +0200)
commitba70bf2a1b08a0eea5f8b668cef63221e7bdde9b
tree8739ad243a8bb5a1657a9ce4f1f534c2c4bc9e5c
parent334180e4657764b290db4a92e81ef130a2a13fd2
mt76: mt7615: fix key set/delete issues

[ Upstream commit 730d6d0da8d8f5905faafe645a5b3c08ac3f5a8f ]

There were multiple issues in the current key set/remove code:
- deleting a key with the previous key index deletes the current key
- BIP key would only be uploaded correctly initially and corrupted on rekey

Rework the code to better keep track of multiple keys and check for the
key index before deleting the current key

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7615/main.c