Search Linux Wireless

Re: [PATCH v11 2/4] mac80211: Import airtime calculation code from mt76

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

 



Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes:

> On Mon, 2019-11-18 at 22:06 -0800, Kan Yan wrote:
>> From: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
>> 
>> Felix recently added code to calculate airtime of packets to the mt76
>> driver. Import this into mac80211 so we can use it for airtime queue limit
>> calculations.
>> 
>> The airtime.c file is copied verbatim from the mt76 driver, and adjusted to
>> be usable in mac80211. This involves:
>> 
>> - Switching to mac80211 data structures.
>> - Adding support for 160 MHz channels and HE mode.
>> - Moving the symbol and duration calculations around a bit to avoid
>>   rounding with the higher rates and longer symbol times used for HE rates.
>
> :)
>
> I'll apply this, I guess,

Great!

> but I do wonder to what extent it overlaps with
> cfg80211_calculate_bitrate()?

Well, one calculates bitrates while the other calculates airtime? ;)

But yeah, I get what you mean. I think Felix went through quite some
pains to structure this code to avoid divisions in the fast path. I
guess that is the main blocker for cfg80211_calculate_bitrate() to be
used instead (assuming we do want to consolidate them eventually). Not
sure if that can be fixed easily though?

-Toke





[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