rt2x00: clear IV's on start to fix AP mode regression
authorStanislaw Gruszka <sgruszka@redhat.com>
Mon, 19 Aug 2019 11:20:07 +0000 (13:20 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 20 Aug 2019 13:59:22 +0000 (16:59 +0300)
commit95844124385eae4bd9ca5f9514a0fc33d561ac3c
tree4a0382e87f8851fbed3a386ded5da95a965aba7b
parent8f2d163cb26da87e7d8e1677368b8ba1ba4d30b3
rt2x00: clear IV's on start to fix AP mode regression

To do not brake HW restart we should keep initialization vectors data.
I assumed that on start the data is already initialized to zeros, but
that not true on some scenarios and we should clear it. So add
additional flag to check if we are under HW restart and clear IV's
data if we are not.

Patch fixes AP mode regression.

Reported-and-tested-by: Emil Karlson <jekarl@iki.fi>
Fixes: 710e6cc1595e ("rt2800: do not nullify initialization vector data")
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
drivers/net/wireless/ralink/rt2x00/rt2x00.h
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c