Skip to content
Commit 4f6b1b3d authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211: fix last RX rate data consistency



When storing the last_rate_* values in the RX code, there's nothing
to guarantee consistency, so a concurrent reader could see, e.g.
last_rate_idx on the new value, but last_rate_flag still on the old,
getting completely bogus values in the end.

To fix this, I lifted the sta_stats_encode_rate() function from my
old rate statistics code, which encodes the entire rate data into a
single 16-bit value, avoiding the consistency issue.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b8da6b6a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment