Skip to contentSkip to conversation

ath10k: Fix CCK rate definitions.

PATCH In review [email protected] 2 participants 3 messages Sep 16, 2015 – Sep 21, 2015 Qualcomm Atheros ATH10K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath10k: Fix CCK rate definitions.

From: Ben Greear <[email protected]>

The old values did NOT match what is found in 10.1.467 firmware. I figure it is likely it is wrong for the others as well.

---
 drivers/net/wireless/ath/ath10k/hw.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/ath10k/hw.h +7 -7
index 4c5eee4..710ca32 100644
@@ -202,13 +202,13 @@ enum ath10k_hw_rate_ofdm {
 };
 
 enum ath10k_hw_rate_cck {
-	ATH10K_HW_RATE_CCK_LP_11M = 0,
-	ATH10K_HW_RATE_CCK_LP_5_5M,
-	ATH10K_HW_RATE_CCK_LP_2M,
-	ATH10K_HW_RATE_CCK_LP_1M,
-	ATH10K_HW_RATE_CCK_SP_11M,
-	ATH10K_HW_RATE_CCK_SP_5_5M,
-	ATH10K_HW_RATE_CCK_SP_2M,
+	ATH10K_HW_RATE_CCK_LP_11M = 0x40,
+	ATH10K_HW_RATE_CCK_LP_5_5M = 0x41,
+	ATH10K_HW_RATE_CCK_LP_2M = 0x42,
+	ATH10K_HW_RATE_CCK_LP_1M = 0x43,
+	ATH10K_HW_RATE_CCK_SP_11M = ATH10K_HW_RATE_CCK_LP_11M | 0x4,
+	ATH10K_HW_RATE_CCK_SP_5_5M = ATH10K_HW_RATE_CCK_LP_5_5M | 0x4,
+	ATH10K_HW_RATE_CCK_SP_2M = ATH10K_HW_RATE_CCK_LP_2M | 0x4,
 };
 
 /* Target specific defines for MAIN firmware */
Signature · 1 line
2.4.3
#1 lore raw
Quoted 5 lines · On 16 September 2015 at 02:08, <[email protected]> wrote:

From: Ben Greear <[email protected]>

The old values did NOT match what is found in 10.1.467 firmware. I figure it is likely it is wrong for the others as well.

Does this fix anything at all?

Quoted 18 lines
---
 drivers/net/wireless/ath/ath10k/hw.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/net/wireless/ath/ath10k/hw.h +0 -5
index 4c5eee4..710ca32 100644
@@ -202,13 +202,13 @@ enum ath10k_hw_rate_ofdm {
 };
 
 enum ath10k_hw_rate_cck {
-       ATH10K_HW_RATE_CCK_LP_11M = 0,
-       ATH10K_HW_RATE_CCK_LP_5_5M,
-       ATH10K_HW_RATE_CCK_LP_2M,
-       ATH10K_HW_RATE_CCK_LP_1M,
-       ATH10K_HW_RATE_CCK_SP_11M,

drivers/net/wireless/ath/ath10k/hw.h enum ath10k_hw_rate_ofdm { · line 212

Quoted 10 lines
drivers/net/wireless/ath/ath10k/hw.h +7 -2
-       ATH10K_HW_RATE_CCK_SP_5_5M,
-       ATH10K_HW_RATE_CCK_SP_2M,
+       ATH10K_HW_RATE_CCK_LP_11M = 0x40,
+       ATH10K_HW_RATE_CCK_LP_5_5M = 0x41,
+       ATH10K_HW_RATE_CCK_LP_2M = 0x42,
+       ATH10K_HW_RATE_CCK_LP_1M = 0x43,
+       ATH10K_HW_RATE_CCK_SP_11M = ATH10K_HW_RATE_CCK_LP_11M | 0x4,
+       ATH10K_HW_RATE_CCK_SP_5_5M = ATH10K_HW_RATE_CCK_LP_5_5M | 0x4,
+       ATH10K_HW_RATE_CCK_SP_2M = ATH10K_HW_RATE_CCK_LP_2M | 0x4,
 };

This breaks Rx CCK rate decoding/reporting. See code associated with ath10k_mac_hw_rate_to_idx().

Michał

author
#2 lore raw
Quoted 8 lines · Michal Kazior
Quoted 5 lines · On 16 September 2015 at 02:08, <[email protected]> wrote:

From: Ben Greear <[email protected]>

The old values did NOT match what is found in 10.1.467 firmware. I figure it is likely it is wrong for the others as well.

Does this fix anything at all?

I'm adding support to CT firmware to set arbitrary ratectrl masks, and I'm using that enum for part of the implementation.

In the 4.0 kernel, the 'hw-value' for CCK rates is broken since the enum doesn't match firmware.

I'll check what code is using that enum and see if it can be fixed. Otherwise, I can fix it with a new enum with the values I need.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com