summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rsi/rsi_main.h
diff options
context:
space:
mode:
authorMartin Fuzzey <martin.fuzzey@flowbird.group>2021-06-01 19:19:53 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-06-15 16:42:18 +0300
commit314538041b5632ffaf64798faaeabaf2793fe029 (patch)
tree779d89053df7de1a2149915648a709190b9243bf /drivers/net/wireless/rsi/rsi_main.h
parent8667ab49a6e0942d64b0dafd30cbf4e0c8b08a8f (diff)
downloadlinux-314538041b5632ffaf64798faaeabaf2793fe029.tar.xz
rsi: fix AP mode with WPA failure due to encrypted EAPOL
In AP mode WPA2-PSK connections were not established. The reason was that the AP was sending the first message of the 4 way handshake encrypted, even though no pairwise key had (correctly) yet been set. Encryption was enabled if the "security_enable" driver flag was set and encryption was not explicitly disabled by IEEE80211_TX_INTFL_DONT_ENCRYPT. However security_enable was set when *any* key, including the AP GTK key, had been set which was causing unwanted encryption even if no key was avaialble for the unicast packet to be sent. Fix this by adding a check that we have a key and drop the old security_enable driver flag which is insufficient and redundant. The Redpine downstream out of tree driver does it this way too. Regarding the Fixes tag the actual code being modified was introduced earlier, with the original driver submission, in dad0d04fa7ba ("rsi: Add RS9113 wireless driver"), however at that time AP mode was not yet supported so there was no bug at that point. So I have tagged the introduction of AP support instead which was part of the patch set "rsi: support for AP mode" [1] It is not clear whether AP WPA has ever worked, I can see nothing on the kernel side that broke it afterwards yet the AP support patch series says "Tests are performed to confirm aggregation, connections in WEP and WPA/WPA2 security." One possibility is that the initial tests were done with a modified userspace (hostapd). [1] https://www.spinics.net/lists/linux-wireless/msg165302.html Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Fixes: 38ef62353acb ("rsi: security enhancements for AP mode") CC: stable@vger.kernel.org Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1622564459-24430-1-git-send-email-martin.fuzzey@flowbird.group
Diffstat (limited to 'drivers/net/wireless/rsi/rsi_main.h')
-rw-r--r--drivers/net/wireless/rsi/rsi_main.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h
index a1065e5a92b4..0f535850a383 100644
--- a/drivers/net/wireless/rsi/rsi_main.h
+++ b/drivers/net/wireless/rsi/rsi_main.h
@@ -151,7 +151,6 @@ enum edca_queue {
};
struct security_info {
- bool security_enable;
u32 ptk_cipher;
u32 gtk_cipher;
};