[PATCH v2 3/3] wifi: ath11k: fix Tx power value during active CAC

Aditya Kumar Singh quic_adisi at quicinc.com
Tue Oct 3 19:09:44 PDT 2023


On 10/3/23 20:01, Kalle Valo wrote:
> Aditya Kumar Singh <quic_adisi at quicinc.com> wrote:
> 
>> Tx power is fetched from firmware's pdev stats. However, during active
>> CAC, firmware does not fill the current Tx power and sends the max
>> initialised value filled during firmware init. If host sends this power
>> to user space, this is wrong since in certain situations, the Tx power
>> could be greater than the max allowed by the regulatory. Hence, host
>> should not be fetching the Tx power during an active CAC.
>>
>> Fix this issue by returning Tx power as 0 during active CAC since it
>> is known that during CAC, there will be no transmission happening.
> 
> The returning as 0 doesn't seem to match the code. Should I change the sentence to:
> 
> "Fix this issue by returning -EAGAIN error so that the user space knows there's
> no value available right now."
Oops. Looks like only in commit message its still zero. Its changed to 
return -EAGAIN in code.

+	if (test_bit(ATH11K_CAC_RUNNING, &ar->dev_flags)) {
+		mutex_unlock(&ar->conf_mutex);
+		return -EAGAIN;
+	}

So could you just rectify while applying or should I resend?



More information about the ath11k mailing list