Search Linux Wireless

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

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

 



On 05/09/2024 20:09, Rosen Penev wrote:
> 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.
> 

Bindings are before users.

> 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");

There is no such compatible.

Please run scripts/checkpatch.pl and fix reported warnings. Then please
run `scripts/checkpatch.pl --strict` and (probably) fix more warnings.
Some warnings can be ignored, especially from --strict run, but the code
here looks like it needs a fix. Feel free to get in touch if the warning
is not clear.

Best regards,
Krzysztof





[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