Hi all, On Fri, Apr 05, 2013 at 06:20:01AM -0700, Johannes Berg wrote: > On Fri, 2013-04-05 at 10:39 +0200, Antonio Quartulli wrote: > > > In the batman-adv module (which implements a routing protocol for mesh networks > > on layer 2) we are trying to switch metric from packet loss to throughput and > > the idea is to read the estimation from the rate control component (thanks to > > the API mechanism in cfg/mac80211 this can be eventually changed later). > > While this makes some sense, going into the details of your patchset I > find that it's overly complex. > > I think you should fix minstrel to report the best rate in > txrc.reported_rate. This would also have the effect of not showing > sampling attempts to userspace in the "current TX rate", which generally > makes a lot of sense. But the reported_rate field would just contain the index of the selected rate, not the throughput. As far as I can tell the latter is an RC private information (it not exported anywhere outside of the RC algorithm) and that is why I made this API which would directly talk to minstrel and get this value. > > After doing that, reading the rate becomes a get_station_info() call or > so. > true, but still we have the problem above..unless I alter the ieee8011_tx_rate and rate_info struct..but I don't know if this would make much sense. > One more detail: > > int cfg80211_get_max_tp(struct wireless_dev *wdev, u8 *peer, u32 *tp) > > I really don't think that the wireless_dev should be necessary for this, > it ought to be just a netdev IMHO. well, yes, I can pass the struct net_dev only, even if I need the wdev to obtain the cf80211_register_dev object for the ops. > Also, the peer should be const :) Right Thanks. Cheer, -- Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara
Attachment:
pgpjNqvuSfcW5.pgp
Description: PGP signature