mac80211: move station statistics into sub-structs
Group station statistics by where they're (mostly) updated (TX, RX and TX-status) and group them into sub-structs of the struct sta_info. Also rename the variables since the grouping now makes it obvious where they belong. This makes it easier to identify where the statistics are updated in the code, and thus easier to think about them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@ -329,7 +329,7 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,
|
||||
if (sta->mesh->fail_avg >= 100)
|
||||
return MAX_METRIC;
|
||||
|
||||
sta_set_rate_info_tx(sta, &sta->last_tx_rate, &rinfo);
|
||||
sta_set_rate_info_tx(sta, &sta->tx_stats.last_rate, &rinfo);
|
||||
rate = cfg80211_calculate_bitrate(&rinfo);
|
||||
if (WARN_ON(!rate))
|
||||
return MAX_METRIC;
|
||||
|
Reference in New Issue
Block a user