On Mon, 2013-02-04 at 13:53 +0200, Vladimir Kondratiev wrote: > In per-station statistics, present 32bit counters are too small > for practical purposes - with gigabit speeds, it get overlapped > every few seconds. > > Expand counters in the struct station_info to be 64-bit. > Driver can still fill only 32-bit and indicate in @filled > only bits like STATION_INFO_[TR]X_BYTES; in case driver provides > full 64-bit counter, it should also set in @filled > bit STATION_INFO_[TR]RX_BYTES64 Applied, but ... > Netlink sends both 32-bit and 64-bit counters, if present, to not break > user space. You didn't quite implement that, so I changed it: > + if ((sinfo->filled & STATION_INFO_RX_BYTES64) && > + nla_put_u64(msg, NL80211_STA_INFO_RX_BYTES64, > + sinfo->rx_bytes)) > + goto nla_put_failure; >[...] + if (sinfo->filled & STATION_INFO_RX_BYTES64) { + if (nla_put_u64(msg, NL80211_STA_INFO_RX_BYTES64, + sinfo->rx_bytes)) + goto nla_put_failure; + if (sinfo->rx_bytes <= UINT_MAX && + nla_put_u32(msg, NL80211_STA_INFO_RX_BYTES, + (u32)sinfo->rx_bytes)) + goto nla_put_failure; + } + if (sinfo->filled & STATION_INFO_TX_BYTES64) { + if (nla_put_u64(msg, NL80211_STA_INFO_TX_BYTES64, + sinfo->tx_bytes)) + goto nla_put_failure; + if (sinfo->tx_bytes <= UINT_MAX && + nla_put_u32(msg, NL80211_STA_INFO_TX_BYTES, + (u32)sinfo->tx_bytes)) + goto nla_put_failure; + } johannes -- 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