Search Linux Wireless

[PATCH 3/5] wifi: ath9k: add extra options to of_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is in preparation for removing platform_data support from ath9k.
Except for led-active-high, these are already present downstream in
OpenWrt and never upstreamed.

For tx_gain_buffalo, just set it based on the device. The flag was made
for a single device. Instead of adding an extra option, just look for
the compatible string.

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
 drivers/net/wireless/ath/ath9k/init.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 7fad7e75af6a..88db51ec7e55 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -670,6 +670,7 @@ static int ath9k_of_init(struct ath_softc *sc)
 	struct ath_common *common = ath9k_hw_common(ah);
 	enum ath_bus_type bus_type = common->bus_ops->ath_bus_type;
 	char eeprom_name[100];
+	u8 led_pin;
 	int ret;
 
 	if (!of_device_is_available(np))
@@ -691,6 +692,12 @@ static int ath9k_of_init(struct ath_softc *sc)
 		ah->ah_flags |= AH_NO_EEP_SWAP;
 	}
 
+	if (!of_property_read_u8(np, "qca,led-pin", &led_pin))
+		ah->led_pin = led_pin;
+
+	ah->config.led_active_high = of_property_read_bool(np, "qca,led-active-high");
+	ah->config.tx_gain_buffalo = of_device_is_compatible(np, "buffalo,wzr-hp-g450h");
+
 	of_get_mac_address(np, common->macaddr);
 
 	return 0;
-- 
2.46.0





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux