wifi: mac80211: fix mesh airtime link metric estimating
ieee80211s_update_metric function uses sta_set_rate_info_tx function to get struct rate_info data from ieee80211_tx_rate struct, present in ieee80211_sta->deflink.tx_stats. However, drivers can skip tx rate calculation by setting rate idx as -1. Such drivers provides rate_info directly and hence ieee80211s metric is updated incorrectly since ieee80211_tx_rate has inconsistent data. Add fix to use rate_info directly if present instead of sta_set_rate_info_tx for updating ieee80211s metric. Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com> Link: https://lore.kernel.org/r/20220701133611.544-1-quic_adisi@quicinc.comSigned-off-by: Johannes Berg <johannes.berg@intel.com>
Showing
Please register or sign in to comment