summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/545-ath9k_timing_settings.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-07-09 04:19:41 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2011-07-09 04:19:41 +0000
commit0942258e0599bd62056ec95b178e359bec2d8426 (patch)
tree38d989701b67372a0583c46e89dc66474bcd50a8 /package/mac80211/patches/545-ath9k_timing_settings.patch
parentbbcb89034365702b3135ebcf852306111d94bbde (diff)
ath9k: fix sifs time for half/quarter and remove some unnecessary defines
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27565 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/545-ath9k_timing_settings.patch')
-rw-r--r--package/mac80211/patches/545-ath9k_timing_settings.patch19
1 files changed, 17 insertions, 2 deletions
diff --git a/package/mac80211/patches/545-ath9k_timing_settings.patch b/package/mac80211/patches/545-ath9k_timing_settings.patch
index 90a575a68b..d83b150825 100644
--- a/package/mac80211/patches/545-ath9k_timing_settings.patch
+++ b/package/mac80211/patches/545-ath9k_timing_settings.patch
@@ -1,6 +1,20 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -951,25 +951,60 @@ static bool ath9k_hw_set_global_txtimeou
+@@ -914,6 +914,13 @@ static void ath9k_hw_init_interrupt_mask
+ }
+ }
+
++static void ath9k_hw_set_sifs_time(struct ath_hw *ah, u32 us)
++{
++ u32 val = ath9k_hw_mac_to_clks(ah, us - 2);
++ val = min(val, (u32) 0xFFFF);
++ REG_WRITE(ah, AR_D_GBL_IFS_SIFS, val);
++}
++
+ static void ath9k_hw_setslottime(struct ath_hw *ah, u32 us)
+ {
+ u32 val = ath9k_hw_mac_to_clks(ah, us);
+@@ -951,25 +958,60 @@ static bool ath9k_hw_set_global_txtimeou
void ath9k_hw_init_global_settings(struct ath_hw *ah)
{
@@ -68,11 +82,12 @@
/*
* Workaround for early ACK timeouts, add an offset to match the
-@@ -981,11 +1016,19 @@ void ath9k_hw_init_global_settings(struc
+@@ -981,11 +1023,20 @@ void ath9k_hw_init_global_settings(struc
if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ)
acktimeout += 64 - sifstime - ah->slottime;
- ath9k_hw_setslottime(ah, ah->slottime);
++ ath9k_hw_set_sifs_time(ah, sifstime);
+ ath9k_hw_setslottime(ah, slottime);
ath9k_hw_set_ack_timeout(ah, acktimeout);
ath9k_hw_set_cts_timeout(ah, acktimeout);