Skip to contentSkip to conversation

ath9k: Avoid acktimeout wraps around at bootstrap

PATCH New Lorenzo Bianconi 2 participants 3 messages Apr 27, 2010 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Avoid acktimeout wraps around at bootstrap

Hi all,

I am using ath9k/mac80211 on a PC Engines Alix with a Mikrotik R52n card (AR9280 chipset), OpenWrt r21030 (kernel 2.6.32.10) and compat-wireless-2010-04-21. I am injecting packets using a VAP in monitor mode.
I have a doubt on ath9k_hw_init_defaults() in hw.c. In particular during the bootstrap ah->slottime in ath9k_hw_init_defaults() is set to " (u32) -1", so after a HW reset (for example as a result of a channel change) in the function ath9k_hw_init_global_settings() the acktimeout variable wraps around as ah->slottime is 0xFFFFFFFF and

acktimeout = sifstime + ah->slottime + 3 * ah->coverage_class

In this way we obtain that acktimout is set to 15 us (assuming ah->coverage_class set to 0) in the 5GHZ band so less than one of its summands (sifstime = 16).
I wrote this simple patch in order to set ah->slottime to standard value for OFDM PHY layer during bootstrap.

---

drivers/net/wireless/ath/ath9k/hw.c +1 -1
@@ -425,7 +425,7 @@
 	ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE;
 	ah->beacon_interval = 100;
 	ah->enable_32kHz_clock = DONT_USE_32KHZ;
-	ah->slottime = (u32) -1;
+	ah->slottime = 20;
 	ah->globaltxtimeout = (u32) -1;
 	ah->power_mode = ATH9K_PM_UNDEFINED;
 }

--

Regards

Lorenzo

#1 lore raw

PATCH 1/1 ath9k: Avoid acktimeout wraps around at bootstrap

Lorenzo Bianconi a ?crit :

Quoted 12 lines

Hi all,

I am using ath9k/mac80211 on a PC Engines Alix with a Mikrotik R52n card (AR9280 chipset), OpenWrt r21030 (kernel 2.6.32.10) and compat-wireless-2010-04-21. I am injecting packets using a VAP in monitor mode.
I have a doubt on ath9k_hw_init_defaults() in hw.c. In particular during the bootstrap ah->slottime in ath9k_hw_init_defaults() is set to " (u32) -1", so after a HW reset (for example as a result of a channel change) in the function ath9k_hw_init_global_settings() the acktimeout variable wraps around as ah->slottime is 0xFFFFFFFF and

Quoted 8 lines

acktimeout = sifstime + ah->slottime + 3 * ah->coverage_class

In this way we obtain that acktimout is set to 15 us (assuming ah->coverage_class set to 0) in the 5GHZ band so less than one of its summands (sifstime = 16).
I wrote this simple patch in order to set ah->slottime to standard value for OFDM PHY layer during bootstrap.

Does this have any visible effect or is this patch for strict compliance? I am asking this since I see very strange stuff regarding ACK (delayed, missing, out of order, ...)

Regards,
Benoit

#2 lore raw

PATCH 1/1 ath9k: Avoid acktimeout wraps around at bootstrap

Quoted 23 lines

Lorenzo Bianconi a ?crit :

Quoted 13 lines

Hi all,

I am using ath9k/mac80211 on a PC Engines Alix with a Mikrotik R52n card (AR9280 chipset), OpenWrt r21030 (kernel 2.6.32.10) and compat-wireless-2010-04-21. I am injecting packets using a VAP in monitor mode.
I have a doubt on ath9k_hw_init_defaults() in hw.c. In particular during the bootstrap ah->slottime in ath9k_hw_init_defaults() is set to " (u32) -1", so after a HW reset (for example as a result of a channel change) in the function ath9k_hw_init_global_settings() the acktimeout variable wraps around as ah->slottime is 0xFFFFFFFF and

Quoted 8 lines

acktimeout = sifstime + ah->slottime + 3 * ah->coverage_class

In this way we obtain that acktimout is set to 15 us (assuming ah->coverage_class set to 0) in the 5GHZ band so less than one of its summands (sifstime = 16).
I wrote this simple patch in order to set ah->slottime to standard value for OFDM PHY layer during bootstrap.

Quoted 7 lines

Does this have any visible effect or is this patch for strict compliance? I am asking this since I see very strange stuff regarding ACK (delayed, missing, out of order, ...)

Regards,
Benoit

Hi Benoit,

In the simple network configuration I am testing (just two devices which transmit through VAPs in monitor mode on a 5GHz channel), I found out that stations are not able to ping each other if ack timeout is less than 20us, I have to explicitly set a greater value.

Regards.

Lorenzo