diff options
author | Martin Fuzzey <martin.fuzzey@flowbird.group> | 2021-08-30 17:26:45 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2021-09-21 08:42:37 +0300 |
commit | 99ac6018821253ec67f466086afb63fc18ea48e2 (patch) | |
tree | 404b89edb556cd54a9a9abe1d04b35019ce0904e /drivers/net/wireless/rsi/rsi_main.h | |
parent | 9b14ed6e11b72dd4806535449ca6c6962cb2369d (diff) |
rsi: fix key enabled check causing unwanted encryption for vap_id > 0
My previous patch checked if encryption should be enabled by directly
checking info->control.hw_key (like the downstream driver).
However that missed that the control and driver_info members of
struct ieee80211_tx_info are union fields.
Due to this when rsi_core_xmit() updates fields in "tx_params"
(driver_info) it can overwrite the control.hw_key, causing the result
of the later test to be incorrect.
With the current structure layout the first byte of control.hw_key is
overlayed with the vap_id so, since we only test if control.hw_key is
NULL / non NULL, a non zero vap_id will incorrectly enable encryption.
In basic STA and AP modes the vap_id is always zero so it works but in
P2P client mode a second VIF is created causing vap_id to be non zero
and hence encryption to be enabled before keys have been set.
Fix this by extracting the key presence flag to a new field in the driver
private tx_params structure and populating it first.
Fixes: 314538041b56 ("rsi: fix AP mode with WPA failure due to encrypted EAPOL")
Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
CC: stable@vger.kernel.org
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1630337206-12410-3-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.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h index a3e4fd5bd3e9..810485a3c85a 100644 --- a/drivers/net/wireless/rsi/rsi_main.h +++ b/drivers/net/wireless/rsi/rsi_main.h @@ -139,6 +139,7 @@ struct skb_info { u8 internal_hdr_size; struct ieee80211_vif *vif; u8 vap_id; + bool have_key; }; enum edca_queue { |