Johannes Berg <johannes@xxxxxxxxxxxxxxxx> writes: >> 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? > > We could also do it the other way around? as in bitrate = 1/airtime? Dunno, maybe? How important is precision to the bitrate calculations? > Or maybe we should keep both and use them as a sanity check for each > other :P Hmm, yeah, it should be possible to write a selftest to iterate through all rates and compare the output of each calculation, shouldn't it? Where would be a good place to put that? -Toke