mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 21:18:26 +02:00
ath9k: minor fixes for the antenna control patch
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28109 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
57bd894d69
commit
aff0492df7
@ -1,50 +0,0 @@
|
|||||||
--- 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);
|
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
|
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
|
||||||
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
|
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
|
||||||
@@ -692,6 +705,17 @@ void ath9k_set_hw_capab(struct ath_softc
|
@@ -692,6 +705,16 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||||
hw->sta_data_size = sizeof(struct ath_node);
|
hw->sta_data_size = sizeof(struct ath_node);
|
||||||
hw->vif_data_size = sizeof(struct ath_vif);
|
hw->vif_data_size = sizeof(struct ath_vif);
|
||||||
|
|
||||||
@ -32,9 +32,8 @@
|
|||||||
+ hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1;
|
+ hw->wiphy->available_antennas_tx = BIT(ah->caps.max_txchains) - 1;
|
||||||
+
|
+
|
||||||
+ /* single chain devices with rx diversity */
|
+ /* single chain devices with rx diversity */
|
||||||
+ if (ah->caps.max_rxchains == 1 &&
|
+ if (ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB)
|
||||||
+ ath9k_hw_ops(ah)->antdiv_comb_conf_get)
|
+ hw->wiphy->available_antennas_rx = BIT(0) | BIT(1);
|
||||||
+ hw->wiphy->available_antennas_rx = 3;
|
|
||||||
+
|
+
|
||||||
+ sc->ant_rx = hw->wiphy->available_antennas_rx;
|
+ sc->ant_rx = hw->wiphy->available_antennas_rx;
|
||||||
+ sc->ant_tx = hw->wiphy->available_antennas_tx;
|
+ sc->ant_tx = hw->wiphy->available_antennas_tx;
|
||||||
@ -42,7 +41,7 @@
|
|||||||
#ifdef CONFIG_ATH9K_RATE_CONTROL
|
#ifdef CONFIG_ATH9K_RATE_CONTROL
|
||||||
hw->rate_control_algorithm = "ath9k_rate_control";
|
hw->rate_control_algorithm = "ath9k_rate_control";
|
||||||
#endif
|
#endif
|
||||||
@@ -703,12 +727,7 @@ void ath9k_set_hw_capab(struct ath_softc
|
@@ -703,12 +726,7 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||||
hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
|
hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
|
||||||
&sc->sbands[IEEE80211_BAND_5GHZ];
|
&sc->sbands[IEEE80211_BAND_5GHZ];
|
||||||
|
|
||||||
@ -62,7 +61,7 @@
|
|||||||
struct ath_descdma txsdma;
|
struct ath_descdma txsdma;
|
||||||
|
|
||||||
struct ath_ant_comb ant_comb;
|
struct ath_ant_comb ant_comb;
|
||||||
+ u32 ant_tx, ant_rx;
|
+ u8 ant_tx, ant_rx;
|
||||||
};
|
};
|
||||||
|
|
||||||
void ath9k_tasklet(unsigned long data);
|
void ath9k_tasklet(unsigned long data);
|
Loading…
Reference in New Issue
Block a user