aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/582-ath9k_antdiv_comb_cb.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-08-28 18:38:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-08-28 18:38:24 +0000
commit65fbf0f9f04e7773edc8f273ac24afa232bf01d8 (patch)
treee021e922696045c1b0670b2813193c97c89ee969 /package/mac80211/patches/582-ath9k_antdiv_comb_cb.patch
parent293d665351aec1046ecb731795e1777a9d26cdda (diff)
downloadmaster-187ad058-65fbf0f9f04e7773edc8f273ac24afa232bf01d8.tar.gz
master-187ad058-65fbf0f9f04e7773edc8f273ac24afa232bf01d8.tar.bz2
master-187ad058-65fbf0f9f04e7773edc8f273ac24afa232bf01d8.zip
ath9k: implement rx/tx antenna control
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28107 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/582-ath9k_antdiv_comb_cb.patch')
-rw-r--r--package/mac80211/patches/582-ath9k_antdiv_comb_cb.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/package/mac80211/patches/582-ath9k_antdiv_comb_cb.patch b/package/mac80211/patches/582-ath9k_antdiv_comb_cb.patch
new file mode 100644
index 0000000000..92c8ea4b8b
--- /dev/null
+++ b/package/mac80211/patches/582-ath9k_antdiv_comb_cb.patch
@@ -0,0 +1,50 @@
+--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
++++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
+@@ -121,13 +121,15 @@ static inline void ath9k_hw_set_clrdmask
+ static inline void ath9k_hw_antdiv_comb_conf_get(struct ath_hw *ah,
+ struct ath_hw_antcomb_conf *antconf)
+ {
+- ath9k_hw_ops(ah)->antdiv_comb_conf_get(ah, antconf);
++ if (ath9k_hw_ops(ah)->antdiv_comb_conf_get)
++ ath9k_hw_ops(ah)->antdiv_comb_conf_get(ah, antconf);
+ }
+
+ static inline void ath9k_hw_antdiv_comb_conf_set(struct ath_hw *ah,
+ struct ath_hw_antcomb_conf *antconf)
+ {
+- ath9k_hw_ops(ah)->antdiv_comb_conf_set(ah, antconf);
++ if (ath9k_hw_ops(ah)->antdiv_comb_conf_set)
++ ath9k_hw_ops(ah)->antdiv_comb_conf_set(ah, antconf);
+ }
+
+ /* Private hardware call ops */
+--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+@@ -570,8 +570,10 @@ void ar9002_hw_attach_phy_ops(struct ath
+ priv_ops->compute_pll_control = ar9002_hw_compute_pll_control;
+ priv_ops->do_getnf = ar9002_hw_do_getnf;
+
+- ops->antdiv_comb_conf_get = ar9002_hw_antdiv_comb_conf_get;
+- ops->antdiv_comb_conf_set = ar9002_hw_antdiv_comb_conf_set;
++ if (AR_SREV_9285(ah)) {
++ ops->antdiv_comb_conf_get = ar9002_hw_antdiv_comb_conf_get;
++ ops->antdiv_comb_conf_set = ar9002_hw_antdiv_comb_conf_set;
++ }
+
+ ar9002_hw_set_nf_limits(ah);
+ }
+--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+@@ -1283,8 +1283,10 @@ void ar9003_hw_attach_phy_ops(struct ath
+ priv_ops->ani_cache_ini_regs = ar9003_hw_ani_cache_ini_regs;
+ priv_ops->set_radar_params = ar9003_hw_set_radar_params;
+
+- ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get;
+- ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
++ if (AR_SREV_9330(ah) || AR_SREV_9485(ah)) {
++ ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get;
++ ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
++ }
+
+ ar9003_hw_set_nf_limits(ah);
+ ar9003_hw_set_radar_conf(ah);