Search Linux Wireless

Re: [PATCH] ath10k: Skip sending quiet mode cmd for WCN3990

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

 



Govind Singh <govinds@xxxxxxxxxxxxxx> writes:

> From: Rakesh Pillai <pillair@xxxxxxxxxxxxxx>
>
> HL2.0 firmware does not support setting quiet mode.
> If the host driver sends the quiet mode setting
> command to the HL2.0 firmware, it crashes with the
> below signature.
>
> fatal error received: err_qdi.c:456:EX:wlan_process:1:WLAN RT:207a:PC=b001b4f0
>
> The quiet mode command support is exposed by the firmware
> via thermal throttle wmi service. Enable ath10k thermal
> support if thermal throttle wmi service bit is set.
> 10X firmware version supports this feature by default, hence
> set this service bit by default.
>
> Tested HW: WCN3990
> Tested FW: WLAN.HL.2.0-01188-QCAHLSWMTPLZ-1

So this would also need testing with QCA988X or QCA9884 family of
devices, I don't think this patch would have worked as is.

> Co-developed-by: Govind Singh <govinds@xxxxxxxxxxxxxx>
> Signed-off-by: Rakesh Pillai <pillair@xxxxxxxxxxxxxx>
> Signed-off-by: Govind Singh <govinds@xxxxxxxxxxxxxx>

I had few comments below which I fixed myself. I'll send v2 soon.

> @@ -2621,6 +2621,10 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
>  		goto err_hif_stop;
>  	}
>  
> +	if (test_bit(ATH10K_FW_FEATURE_WMI_10X,
> +		     ar->normal_mode_fw.fw_file.fw_features)) {
> +		set_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map);
> +	}

I don't think testing for ATH10K_FW_FEATURE_WMI_10X works, that's a
really old and deprecated flag. wmi_op_version should be more reliable.

Also I refactored this to it's own function.

>  	/* Some firmware revisions do not properly set up hardware rx filter
>  	 * registers.
>  	 *
> @@ -2919,11 +2923,13 @@ static void ath10k_core_register_work(struct work_struct *work)
>  		goto err_debug_destroy;
>  	}
>  
> -	status = ath10k_thermal_register(ar);
> -	if (status) {
> -		ath10k_err(ar, "could not register thermal device: %d\n",
> -			   status);
> -		goto err_spectral_destroy;
> +	if (test_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map)) {
> +		status = ath10k_thermal_register(ar);
> +		if (status) {
> +			ath10k_err(ar, "could not register thermal device: %d\n",
> +				   status);
> +			goto err_spectral_destroy;
> +		}
>  	}

The code becomes cleaner if the test is in thermal.c so I moved it
there.

> @@ -2964,7 +2970,8 @@ void ath10k_core_unregister(struct ath10k *ar)
>  	if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
>  		return;
>  
> -	ath10k_thermal_unregister(ar);
> +	if (test_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map))
> +		ath10k_thermal_unregister(ar);

Same here.

> --- a/drivers/net/wireless/ath/ath10k/mac.c
> +++ b/drivers/net/wireless/ath/ath10k/mac.c
> @@ -4800,7 +4800,8 @@ static int ath10k_start(struct ieee80211_hw *hw)
>  	ath10k_regd_update(ar);
>  
>  	ath10k_spectral_start(ar);
> -	ath10k_thermal_set_throttling(ar);
> +	if (test_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map))
> +		ath10k_thermal_set_throttling(ar);

And here.

-- 
Kalle Valo



[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