On Tue, 2013-02-05 at 09:21 -0800, Ben Greear wrote: > On 02/05/2013 01:56 AM, Johannes Berg wrote: > > From: Johannes Berg <johannes.berg@xxxxxxxxx> > > > > "unsigned long" is already 64-bit on (most?) 64-bit > > machines, use u64 and tell cfg80211 that we provide > > 64-bit counters now. > > From what I can tell, these counters are modified using > += operators. From what I recall, this is non-atomic on > 32-bit systems when the variable is u64. > > Is there any other locking that keeps this from blowing up? Funny you should ask this, we were discussing RX locking in another thread :-) In any case, it's *already* non-atomic since incrementing is always a read-modify-write cycle, and I think that updates can indeed get lost for the TX counter (and only it) if frames for multiple ACs are processed at the same time. The proper way to solve that would probably be having counters for all ACs and summing them only when needed. 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