Johannes Berg wrote: > From: Johannes Berg <johannes.berg@xxxxxxxxx> > > Add support for RX rate statistics to mac80211. This tracks the number > of MSDUs received per rate, if rate statistics are enabled. > > As the number of rates is very high (as explained in the commit log of > the cfg80211 patch) mac80211 tracks at most 36 different rates at once. > This is done with a very simple hash table format (3 * index) array to > track three different NSS/SGI/bw combinations, plus a few more entries > acting as "escape" when all three different combinations are filled. > > Counters are limited to 16-bit to reduce memory consumption and when a > limit of 64000 is reached the process to send them out to userspace is > scheduled. The same happens when the escape entries need to be used. > > The data structure itself is stored for each station, accessible under > RCU, and sending them to userspace is combined with freeing so that no > RCU-accessor (really only the synchronized RX path anyway though) can > still see them when they're transmitted out. This ensures a consistent > view is transmitted right before being discarded; it also ensures that > the RX path isn't blocked by any configuration paths for this. > > Note that TX statistics (tx, retries, failures) aren't covered. Those > need tighter integration with the driver or rate scaling as not all > drivers are able to fully encode the necessary information in the TX > status data due to the size limit there. Nice. :) We were doing simple RX statistics collection inside ath9k (CONFIG_ATH9K_STATION_STATISTICS), which can be removed once this goes in. Is there any way a driver can pass custom data, like per-frame antenna details ? Sujith -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html