ath9k: merge initval and tx gain table updates, calibration fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39001
This commit is contained in:
		
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -1,6 +1,6 @@
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
@@ -849,6 +849,7 @@ static const struct ieee80211_iface_limi
 | 
			
		||||
@@ -867,6 +867,7 @@ static const struct ieee80211_iface_limi
 | 
			
		||||
 #endif
 | 
			
		||||
 				 BIT(NL80211_IFTYPE_AP) |
 | 
			
		||||
 				 BIT(NL80211_IFTYPE_P2P_GO) },
 | 
			
		||||
 
 | 
			
		||||
@@ -71,7 +71,7 @@
 | 
			
		||||
 
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
@@ -728,6 +728,7 @@ enum ath_cal_list {
 | 
			
		||||
@@ -729,6 +729,7 @@ enum ath_cal_list {
 | 
			
		||||
 #define AH_USE_EEPROM   0x1
 | 
			
		||||
 #define AH_UNPLUGGED    0x2 /* The card has been physically removed. */
 | 
			
		||||
 #define AH_FASTCC       0x4
 | 
			
		||||
@@ -81,7 +81,7 @@
 | 
			
		||||
 	struct ath_ops reg_ops;
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
@@ -700,6 +700,8 @@ static int ath9k_init_softc(u16 devid, s
 | 
			
		||||
@@ -721,6 +721,8 @@ static int ath9k_init_softc(u16 devid, s
 | 
			
		||||
 		ah->is_clk_25mhz = pdata->is_clk_25mhz;
 | 
			
		||||
 		ah->get_mac_revision = pdata->get_mac_revision;
 | 
			
		||||
 		ah->external_reset = pdata->external_reset;
 | 
			
		||||
@@ -98,5 +98,5 @@
 | 
			
		||||
 
 | 
			
		||||
+	bool endian_check;
 | 
			
		||||
 	bool is_clk_25mhz;
 | 
			
		||||
 	int (*get_mac_revision)(void);
 | 
			
		||||
 	int (*external_reset)(void);
 | 
			
		||||
 	bool tx_gain_buffalo;
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
@@ -1092,23 +1092,23 @@ static int __init ath9k_init(void)
 | 
			
		||||
@@ -1110,23 +1110,23 @@ static int __init ath9k_init(void)
 | 
			
		||||
 		goto err_out;
 | 
			
		||||
 	}
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
@@ -162,7 +162,7 @@
 | 
			
		||||
 void ath_fill_led_pin(struct ath_softc *sc)
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
@@ -998,7 +998,7 @@ int ath9k_init_device(u16 devid, struct 
 | 
			
		||||
@@ -1016,7 +1016,7 @@ int ath9k_init_device(u16 devid, struct 
 | 
			
		||||
 
 | 
			
		||||
 #ifdef CPTCFG_MAC80211_LEDS
 | 
			
		||||
 	/* must be initialized before ieee80211_register_hw */
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +1,7 @@
 | 
			
		||||
--- a/include/linux/ath9k_platform.h
 | 
			
		||||
+++ b/include/linux/ath9k_platform.h
 | 
			
		||||
@@ -35,6 +35,9 @@ struct ath9k_platform_data {
 | 
			
		||||
 	bool is_clk_25mhz;
 | 
			
		||||
@@ -37,6 +37,9 @@ struct ath9k_platform_data {
 | 
			
		||||
 
 | 
			
		||||
 	int (*get_mac_revision)(void);
 | 
			
		||||
 	int (*external_reset)(void);
 | 
			
		||||
+
 | 
			
		||||
 
 | 
			
		||||
@@ -62,7 +62,7 @@
 | 
			
		||||
 	debugfs_create_file("interrupt", S_IRUSR, sc->debug.debugfs_phy, sc,
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
@@ -481,6 +481,12 @@ enum {
 | 
			
		||||
@@ -482,6 +482,12 @@ enum {
 | 
			
		||||
 	ATH9K_RESET_COLD,
 | 
			
		||||
 };
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,7 @@
 | 
			
		||||
 struct ath9k_hw_version {
 | 
			
		||||
 	u32 magic;
 | 
			
		||||
 	u16 devid;
 | 
			
		||||
@@ -766,6 +772,8 @@ struct ath_hw {
 | 
			
		||||
@@ -767,6 +773,8 @@ struct ath_hw {
 | 
			
		||||
 	u32 rfkill_polarity;
 | 
			
		||||
 	u32 ah_flags;
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,7 @@
 | 
			
		||||
 	bool reset_power_on;
 | 
			
		||||
 	bool htc_reset_init;
 | 
			
		||||
 
 | 
			
		||||
@@ -1017,6 +1025,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
 | 
			
		||||
@@ -1019,6 +1027,7 @@ void ath9k_hw_check_nav(struct ath_hw *a
 | 
			
		||||
 bool ath9k_hw_check_alive(struct ath_hw *ah);
 | 
			
		||||
 
 | 
			
		||||
 bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
 | 
			
		||||
 
 | 
			
		||||
@@ -1,15 +1,14 @@
 | 
			
		||||
--- a/include/linux/ath9k_platform.h
 | 
			
		||||
+++ b/include/linux/ath9k_platform.h
 | 
			
		||||
@@ -33,6 +33,9 @@ struct ath9k_platform_data {
 | 
			
		||||
 
 | 
			
		||||
@@ -34,6 +34,8 @@ struct ath9k_platform_data {
 | 
			
		||||
 	bool endian_check;
 | 
			
		||||
 	bool is_clk_25mhz;
 | 
			
		||||
 	bool tx_gain_buffalo;
 | 
			
		||||
+	bool disable_2ghz;
 | 
			
		||||
+	bool disable_5ghz;
 | 
			
		||||
+
 | 
			
		||||
 
 | 
			
		||||
 	int (*get_mac_revision)(void);
 | 
			
		||||
 	int (*external_reset)(void);
 | 
			
		||||
 
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
 | 
			
		||||
@@ -2458,17 +2458,25 @@ int ath9k_hw_fill_cap_info(struct ath_hw
 | 
			
		||||
@@ -48,7 +47,7 @@
 | 
			
		||||
 	    AR_SREV_9285(ah) ||
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
@@ -936,6 +936,8 @@ struct ath_hw {
 | 
			
		||||
@@ -938,6 +938,8 @@ struct ath_hw {
 | 
			
		||||
 	bool is_clk_25mhz;
 | 
			
		||||
 	int (*get_mac_revision)(void);
 | 
			
		||||
 	int (*external_reset)(void);
 | 
			
		||||
@@ -59,7 +58,7 @@
 | 
			
		||||
 };
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
@@ -700,6 +700,8 @@ static int ath9k_init_softc(u16 devid, s
 | 
			
		||||
@@ -721,6 +721,8 @@ static int ath9k_init_softc(u16 devid, s
 | 
			
		||||
 		ah->is_clk_25mhz = pdata->is_clk_25mhz;
 | 
			
		||||
 		ah->get_mac_revision = pdata->get_mac_revision;
 | 
			
		||||
 		ah->external_reset = pdata->external_reset;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
 | 
			
		||||
@@ -683,6 +683,7 @@ struct ath_spec_scan {
 | 
			
		||||
@@ -684,6 +684,7 @@ struct ath_spec_scan {
 | 
			
		||||
  * @config_pci_powersave:
 | 
			
		||||
  * @calibrate: periodic calibration for NF, ANI, IQ, ADC gain, ADC-DC
 | 
			
		||||
  *
 | 
			
		||||
@@ -8,7 +8,7 @@
 | 
			
		||||
  * @spectral_scan_config: set parameters for spectral scan and enable/disable it
 | 
			
		||||
  * @spectral_scan_trigger: trigger a spectral scan run
 | 
			
		||||
  * @spectral_scan_wait: wait for a spectral scan run to finish
 | 
			
		||||
@@ -705,6 +706,7 @@ struct ath_hw_ops {
 | 
			
		||||
@@ -706,6 +707,7 @@ struct ath_hw_ops {
 | 
			
		||||
 			struct ath_hw_antcomb_conf *antconf);
 | 
			
		||||
 	void (*antdiv_comb_conf_set)(struct ath_hw *ah,
 | 
			
		||||
 			struct ath_hw_antcomb_conf *antconf);
 | 
			
		||||
@@ -18,7 +18,7 @@
 | 
			
		||||
 	void (*spectral_scan_trigger)(struct ath_hw *ah);
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
 | 
			
		||||
@@ -1760,6 +1760,26 @@ static void ar9003_hw_tx99_set_txpower(s
 | 
			
		||||
@@ -1766,6 +1766,26 @@ static void ar9003_hw_tx99_set_txpower(s
 | 
			
		||||
 		  ATH9K_POW_SM(p_pwr_array[ALL_TARGET_HT40_14],  0));
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
@@ -45,7 +45,7 @@
 | 
			
		||||
 void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
 | 
			
		||||
 {
 | 
			
		||||
 	struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
 | 
			
		||||
@@ -1790,6 +1810,7 @@ void ar9003_hw_attach_phy_ops(struct ath
 | 
			
		||||
@@ -1796,6 +1816,7 @@ void ar9003_hw_attach_phy_ops(struct ath
 | 
			
		||||
 	priv_ops->set_radar_params = ar9003_hw_set_radar_params;
 | 
			
		||||
 	priv_ops->fast_chan_change = ar9003_hw_fast_chan_change;
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@
 | 
			
		||||
 	ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
 | 
			
		||||
--- a/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
 | 
			
		||||
@@ -829,7 +829,8 @@ static void ath9k_init_txpower_limits(st
 | 
			
		||||
@@ -847,7 +847,8 @@ static void ath9k_init_txpower_limits(st
 | 
			
		||||
 	if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
 | 
			
		||||
 		ath9k_init_band_txpower(sc, IEEE80211_BAND_5GHZ);
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 void ath9k_reload_chainmask_settings(struct ath_softc *sc)
 | 
			
		||||
@@ -960,6 +961,18 @@ void ath9k_set_hw_capab(struct ath_softc
 | 
			
		||||
@@ -978,6 +979,18 @@ void ath9k_set_hw_capab(struct ath_softc
 | 
			
		||||
 	SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
@@ -84,7 +84,7 @@
 | 
			
		||||
 int ath9k_init_device(u16 devid, struct ath_softc *sc,
 | 
			
		||||
 		    const struct ath_bus_ops *bus_ops)
 | 
			
		||||
 {
 | 
			
		||||
@@ -1005,6 +1018,8 @@ int ath9k_init_device(u16 devid, struct 
 | 
			
		||||
@@ -1023,6 +1036,8 @@ int ath9k_init_device(u16 devid, struct 
 | 
			
		||||
 		ARRAY_SIZE(ath9k_tpt_blink));
 | 
			
		||||
 #endif
 | 
			
		||||
 
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,7 @@
 | 
			
		||||
#include <linux/gpio.h>
 | 
			
		||||
#include <linux/mtd/mtd.h>
 | 
			
		||||
#include <linux/mtd/partitions.h>
 | 
			
		||||
#include <linux/ath9k_platform.h>
 | 
			
		||||
 | 
			
		||||
#include <asm/mach-ath79/ath79.h>
 | 
			
		||||
 | 
			
		||||
@@ -153,6 +154,8 @@ static void __init wzrhpg450h_init(void)
 | 
			
		||||
	ath79_register_usb();
 | 
			
		||||
 | 
			
		||||
	ap91_pci_init(ee, NULL);
 | 
			
		||||
	ap9x_pci_get_wmac_data(0)->tx_gain_buffalo = true;
 | 
			
		||||
	ap9x_pci_get_wmac_data(1)->tx_gain_buffalo = true;
 | 
			
		||||
	ap9x_pci_setup_wmac_led_pin(0, 15);
 | 
			
		||||
	ap9x_pci_setup_wmac_leds(0, wzrhpg450h_wmac_leds_gpio,
 | 
			
		||||
				 ARRAY_SIZE(wzrhpg450h_wmac_leds_gpio));
 | 
			
		||||
 
 | 
			
		||||
@@ -33,6 +33,7 @@ struct ath9k_platform_data {
 | 
			
		||||
 | 
			
		||||
	bool endian_check;
 | 
			
		||||
	bool is_clk_25mhz;
 | 
			
		||||
	bool tx_gain_buffalo;
 | 
			
		||||
	bool disable_2ghz;
 | 
			
		||||
	bool disable_5ghz;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user