Kan Yan <[email protected]> writes:

>> > Do you mean we will use airtime reported by FW to calculate
>>
>> > local->airtime_queued in case we have FW reporting airtime?
>> No, the opposite; if the firmware can't report airtime, we can use the
>> estimated values to feed into report_airtime() for the fairness
>> calculation...
> The local->airtime_queued is the 'future' airtime for the packet
> pending the queue. It can't be replaced by the after the fact airtime
> reported from firmware for the frames transmitted.

No, but on tx_completion we could do something like this:

airtime = CB(skb)->tx_time ?: CB(skb)->tx_time_est;
ieee80211_report_airtime(sta, airtime);

That way, if the driver sets the tx_time field to something the firmware
reports, we'll use that, and otherwise we'd fall back to the estimate.

Of course, there would need to be a way for the driver to opt out of
this, for drivers that report out of band airtime like ath10k does :)

-Toke

Reply via email to