Commit 35507aabf0e5e50525de25603328f09a7a629da5
Committed by
Greg Kroah-Hartman
1 parent
ebec37ed21
Exists in
smarc_8mm_imx_4.14.98_2.0.0_ga
and in
4 other branches
mac80211: fix TX status reporting for ieee80211s
[ Upstream commit c42055105785580563535e6d3143cad95c7ac7ee ] TX status reporting to ieee80211s is through ieee80211s_update_metric. There are two problems about ieee80211s_update_metric: 1. The purpose is to estimate the fail probability to a specific link. No need to restrict to data frame. 2. Current implementation does not work if wireless driver does not pass tx_status with skb. Fix this by removing ieee80211_is_data condition, passing ieee80211_tx_status directly to ieee80211s_update_metric, and putting it in both __ieee80211_tx_status and ieee80211_tx_status_ext. Signed-off-by: Yuan-Chi Pang <fu3mo6goo@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Showing 3 changed files with 8 additions and 8 deletions Side-by-side Diff
net/mac80211/mesh.h
... | ... | @@ -217,7 +217,8 @@ |
217 | 217 | int mesh_rmc_init(struct ieee80211_sub_if_data *sdata); |
218 | 218 | void ieee80211s_init(void); |
219 | 219 | void ieee80211s_update_metric(struct ieee80211_local *local, |
220 | - struct sta_info *sta, struct sk_buff *skb); | |
220 | + struct sta_info *sta, | |
221 | + struct ieee80211_tx_status *st); | |
221 | 222 | void ieee80211_mesh_init_sdata(struct ieee80211_sub_if_data *sdata); |
222 | 223 | void ieee80211_mesh_teardown_sdata(struct ieee80211_sub_if_data *sdata); |
223 | 224 | int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata); |
net/mac80211/mesh_hwmp.c
... | ... | @@ -295,14 +295,11 @@ |
295 | 295 | } |
296 | 296 | |
297 | 297 | void ieee80211s_update_metric(struct ieee80211_local *local, |
298 | - struct sta_info *sta, struct sk_buff *skb) | |
298 | + struct sta_info *sta, | |
299 | + struct ieee80211_tx_status *st) | |
299 | 300 | { |
300 | - struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb); | |
301 | - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | |
301 | + struct ieee80211_tx_info *txinfo = st->info; | |
302 | 302 | int failed; |
303 | - | |
304 | - if (!ieee80211_is_data(hdr->frame_control)) | |
305 | - return; | |
306 | 303 | |
307 | 304 | failed = !(txinfo->flags & IEEE80211_TX_STAT_ACK); |
308 | 305 |
net/mac80211/status.c
... | ... | @@ -797,7 +797,7 @@ |
797 | 797 | |
798 | 798 | rate_control_tx_status(local, sband, status); |
799 | 799 | if (ieee80211_vif_is_mesh(&sta->sdata->vif)) |
800 | - ieee80211s_update_metric(local, sta, skb); | |
800 | + ieee80211s_update_metric(local, sta, status); | |
801 | 801 | |
802 | 802 | if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked) |
803 | 803 | ieee80211_frame_acked(sta, skb); |
... | ... | @@ -958,6 +958,8 @@ |
958 | 958 | } |
959 | 959 | |
960 | 960 | rate_control_tx_status(local, sband, status); |
961 | + if (ieee80211_vif_is_mesh(&sta->sdata->vif)) | |
962 | + ieee80211s_update_metric(local, sta, status); | |
961 | 963 | } |
962 | 964 | |
963 | 965 | if (acked || noack_success) { |