mac80211: move txrate_idx into RC algorithms
The sta_info->txrate_idx member isn't used by all RC algorithms in the way it was intended to be used, move it into those that require it (only PID) and keep track in the core code of which rate was last used for reporting to userspace and the mesh MLME. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
323ce79a9c
commit
ae17e98609
@ -636,8 +636,8 @@ static int ieee80211_ioctl_giwrate(struct net_device *dev,
|
||||
|
||||
sta = sta_info_get(local, sdata->u.sta.bssid);
|
||||
|
||||
if (sta && sta->txrate_idx < sband->n_bitrates)
|
||||
rate->value = sband->bitrates[sta->txrate_idx].bitrate;
|
||||
if (sta && sta->last_txrate_idx < sband->n_bitrates)
|
||||
rate->value = sband->bitrates[sta->last_txrate_idx].bitrate;
|
||||
else
|
||||
rate->value = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user