diff mbox series

[RFC,1/1] wifi: ath10k: reduce timeout for disabling a key

Message ID 20240814164507.996303-2-prestwoj@gmail.com (mailing list archive)
State Deferred
Delegated to: Kalle Valo
Headers show
Series wifi: ath10k: improvement on key removal failure | expand

Commit Message

James Prestwood Aug. 14, 2024, 4:45 p.m. UTC
The QCA6174 experiences random cases of a key failing to be disabled.
The timeout for this currently is 3 seconds. This can happen on
roaming when removing the old key during the transition to the new
BSS. Though the roam will generally succeed (except with
some AP vendors, explained below) it means that it is delayed by 3
seconds until the timeout expires.

Certain AP vendors appear to have issues with this delay and either
ignore the subsequent reassociation, or reject it. This results in
a disconnect.

Since key removal is a non-fatal failure it feels somewhat safe to
reduce this timeout down in order to both reduce the potential
delay and play nice with APs that aren't able to handle the delay
between authentication and association.

Signed-off-by: James Prestwood <prestwoj@gmail.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index ec8d5b29bc72..fd20107abd0f 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -301,6 +301,7 @@  static int ath10k_install_key(struct ath10k_vif *arvif,
 	struct ath10k *ar = arvif->ar;
 	int ret;
 	unsigned long time_left;
+	unsigned long timeout = (cmd == DISABLE_KEY) ? 1 : 3;
 
 	lockdep_assert_held(&ar->conf_mutex);
 
@@ -313,7 +314,8 @@  static int ath10k_install_key(struct ath10k_vif *arvif,
 	if (ret)
 		return ret;
 
-	time_left = wait_for_completion_timeout(&ar->install_key_done, 3 * HZ);
+	time_left = wait_for_completion_timeout(&ar->install_key_done,
+						timeout * HZ);
 	if (time_left == 0)
 		return -ETIMEDOUT;