mt76: connac: fix GTK rekey offload failure on WPA mixed mode
authorLeon Yen <Leon.Yen@mediatek.com>
Tue, 27 Jul 2021 22:59:16 +0000 (06:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:36 +0000 (19:16 +0100)
commit30dc676d4b0203a72cbebaecc7c0634a06ffd304
treec4507f63ee4db9b647bcb4e011a10688413f32b0
parentc8c0958687c7ab9fdbb96d31f32b254fcf9b2d06
mt76: connac: fix GTK rekey offload failure on WPA mixed mode

[ Upstream commit 781f62960c635cfed55a8f8c0f909bdaf8268257 ]

Update the proper firmware programming sequence to fix GTK rekey
offload failure on WPA mixed mode.

In the mt76_connac_mcu_key_iter,
gtk_tlv->proto should be only set up on pairwise key
and gtk_tlk->group_cipher should be only set up on the group key.

Otherwise, those parameters required by firmware would be set
incorrectly to cause GTK rekey offload failure on WPA mixed mode
and then disconnection follows.

Fixes: b47e21e75c80 ("mt76: mt7615: add gtk rekey offload support")
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Leon Yen <Leon.Yen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c