Skip to contentSkip to conversation

ath10k: Store coverage-class in case firmware is not booted.

PATCH In review [email protected] 2 participants 2 messages Oct 3, 2017 – Oct 13, 2017 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Store coverage-class in case firmware is not booted.

From: Ben Greear <[email protected]>

This way, we can apply the values when the NIC does come up.

---
 drivers/net/wireless/ath/ath10k/hw.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath10k/hw.c +7 -2
index afb0c01..31c0589 100644
@@ -454,8 +454,13 @@ static void ath10k_hw_qca988x_set_coverage_class(struct ath10k *ar,
 
 	/* Only modify registers if the core is started. */
 	if ((ar->state != ATH10K_STATE_ON) &&
-	    (ar->state != ATH10K_STATE_RESTARTED))
+	    (ar->state != ATH10K_STATE_RESTARTED)) {
+		spin_lock_bh(&ar->data_lock);
+		/* Store config value for when radio boots up */
+		ar->fw_coverage.coverage_class = value;
+		spin_unlock_bh(&ar->data_lock);
 		goto unlock;
+	}
 
 	/* Retrieve the current values of the two registers that need to be
 	 * adjusted.
@@ -487,7 +492,7 @@ static void ath10k_hw_qca988x_set_coverage_class(struct ath10k *ar,
 		ar->fw_coverage.reg_ack_cts_timeout_orig = timeout_reg;
 	ar->fw_coverage.reg_phyclk = phyclk_reg;
 
-	/* Calculat new value based on the (original) firmware calculation. */
+	/* Calculate new value based on the (original) firmware calculation. */
 	slottime_reg = ar->fw_coverage.reg_slottime_orig;
 	timeout_reg = ar->fw_coverage.reg_ack_cts_timeout_orig;
 
Signature · 1 line
2.4.11
#1 lore raw
Quoted 4 lines · Ben Greear

This way, we can apply the values when the NIC does come up.

Patch applied to ath-next branch of ath.git, thanks.

0a590a38778d ath10k: store coverage-class in case firmware is not booted

Signature · 3 lines
https://patchwork.kernel.org/patch/9983585/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches