The size of the status_driver_data field was not adjusted when the is_valid_ack_signal field was added. Since the size of struct ieee80211_tx_info is limited, replace the is_valid_ack_signal field with a flags field, and adjust the struct size accordingly.
Unified · Split
| @@ -125,7 +125,7 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt, · 124 unmodified lines | |||
| 125 | tx_done->ack_rssi != ATH10K_INVALID_RSSI) { | 125 | tx_done->ack_rssi != ATH10K_INVALID_RSSI) { |
| 126 | info->status.ack_signal = ATH10K_DEFAULT_NOISE_FLOOR + | 126 | info->status.ack_signal = ATH10K_DEFAULT_NOISE_FLOOR + |
| 127 | tx_done->ack_rssi; | 127 | tx_done->ack_rssi; |
| 128 | info->status.is_valid_ack_signal = true; | 128 | info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID; |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | ieee80211_tx_status(htt->ar->hw, msdu); | 131 | ieee80211_tx_status(htt->ar->hw, msdu); |
| @@ -2427,7 +2427,7 @@ wmi_process_mgmt_tx_comp(struct ath10k *ar, struct mgmt_tx_compl_params *param) · 2426 unmodified lines | |||
| 2427 | info->flags |= IEEE80211_TX_STAT_ACK; | 2427 | info->flags |= IEEE80211_TX_STAT_ACK; |
| 2428 | info->status.ack_signal = ATH10K_DEFAULT_NOISE_FLOOR + | 2428 | info->status.ack_signal = ATH10K_DEFAULT_NOISE_FLOOR + |
| 2429 | param->ack_rssi; | 2429 | param->ack_rssi; |
| 2430 | info->status.is_valid_ack_signal = true; | 2430 | info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID; |
| 2431 | } | 2431 | } |
| 2432 | 2432 | ||
| 2433 | ieee80211_tx_status_irqsafe(ar->hw, msdu); | 2433 | ieee80211_tx_status_irqsafe(ar->hw, msdu); |
| @@ -351,7 +351,8 @@ ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab, · 350 unmodified lines | |||
| 351 | info->flags |= IEEE80211_TX_STAT_ACK; | 351 | info->flags |= IEEE80211_TX_STAT_ACK; |
| 352 | info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR + | 352 | info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR + |
| 353 | ts->ack_rssi; | 353 | ts->ack_rssi; |
| 354 | info->status.is_valid_ack_signal = true; | 354 | info->status.flags |= |
| 355 | IEEE80211_TX_STATUS_ACK_SIGNAL_VALID; | ||
| 355 | } else { | 356 | } else { |
| 356 | info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; | 357 | info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED; |
| 357 | } | 358 | } |
| @@ -552,7 +553,7 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar, · 194 unmodified lines | |||
| 552 | info->flags |= IEEE80211_TX_STAT_ACK; | 553 | info->flags |= IEEE80211_TX_STAT_ACK; |
| 553 | info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR + | 554 | info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR + |
| 554 | ts->ack_rssi; | 555 | ts->ack_rssi; |
| 555 | info->status.is_valid_ack_signal = true; | 556 | info->status.flags |= IEEE80211_TX_STATUS_ACK_SIGNAL_VALID; |
| 556 | } | 557 | } |
| 557 | 558 | ||
| 558 | if (ts->status == HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX && | 559 | if (ts->status == HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX && |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | |||
| 7 | * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> | 7 | * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> |
| 8 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 8 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
| 9 | * Copyright (C) 2015 - 2017 Intel Deutschland GmbH | 9 | * Copyright (C) 2015 - 2017 Intel Deutschland GmbH |
| 10 | * Copyright (C) 2018 - 2021 Intel Corporation | 10 | * Copyright (C) 2018 - 2022 Intel Corporation |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #ifndef MAC80211_H | 13 | #ifndef MAC80211_H |
| @@ -883,6 +883,17 @@ enum mac80211_tx_control_flags { · 869 unmodified lines | |||
| 883 | IEEE80211_TX_CTRL_DONT_REORDER = BIT(8), | 883 | IEEE80211_TX_CTRL_DONT_REORDER = BIT(8), |
| 884 | }; | 884 | }; |
| 885 | 885 | ||
| 886 | /** | ||
| 887 | * enum mac80211_tx_status_flags - flags to describe transmit status | ||
| 888 | * | ||
| 889 | * @IEEE80211_TX_STATUS_ACK_SIGNAL_VALID: ACK signal is valid | ||
| 890 | * | ||
| 891 | * These flags are used in tx_info->status.flags. | ||
| 892 | */ | ||
| 893 | enum mac80211_tx_status_flags { | ||
| 894 | IEEE80211_TX_STATUS_ACK_SIGNAL_VALID = BIT(0), | ||
| 895 | }; | ||
| 896 | |||
| 886 | /* | 897 | /* |
| 887 | * This definition is used as a mask to clear all temporary flags, which are | 898 | * This definition is used as a mask to clear all temporary flags, which are |
| 888 | * set by the tx handlers for each transmission attempt by the mac80211 stack. | 899 | * set by the tx handlers for each transmission attempt by the mac80211 stack. |
| @@ -1046,7 +1057,7 @@ ieee80211_rate_get_vht_nss(const struct ieee80211_tx_rate *rate) · 157 unmodified lines | |||
| 1046 | * @status.antenna: (legacy, kept only for iwlegacy) | 1057 | * @status.antenna: (legacy, kept only for iwlegacy) |
| 1047 | * @status.tx_time: airtime consumed for transmission; note this is only | 1058 | * @status.tx_time: airtime consumed for transmission; note this is only |
| 1048 | * used for WMM AC, not for airtime fairness | 1059 | * used for WMM AC, not for airtime fairness |
| 1049 | * @status.is_valid_ack_signal: ACK signal is valid | 1060 | * @status.flags: status flags, see &enum mac80211_tx_status_flags |
| 1050 | * @status.status_driver_data: driver use area | 1061 | * @status.status_driver_data: driver use area |
| 1051 | * @ack: union part for pure ACK data | 1062 | * @ack: union part for pure ACK data |
| 1052 | * @ack.cookie: cookie for the ACK | 1063 | * @ack.cookie: cookie for the ACK |
| @@ -1099,8 +1110,8 @@ struct ieee80211_tx_info { · 46 unmodified lines | |||
| 1099 | u8 ampdu_len; | 1110 | u8 ampdu_len; |
| 1100 | u8 antenna; | 1111 | u8 antenna; |
| 1101 | u16 tx_time; | 1112 | u16 tx_time; |
| 1102 | bool is_valid_ack_signal; | 1113 | u8 flags; |
| 1103 | void *status_driver_data[19 / sizeof(void *)]; | 1114 | void *status_driver_data[18 / sizeof(void *)]; |
| 1104 | } status; | 1115 | } status; |
| 1105 | struct { | 1116 | struct { |
| 1106 | struct ieee80211_tx_rate driver_rates[ | 1117 | struct ieee80211_tx_rate driver_rates[ |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | |||
| 5 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 5 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
| 6 | * Copyright 2008-2010 Johannes Berg <johannes@sipsolutions.net> | 6 | * Copyright 2008-2010 Johannes Berg <johannes@sipsolutions.net> |
| 7 | * Copyright 2013-2014 Intel Mobile Communications GmbH | 7 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
| 8 | * Copyright 2021 Intel Corporation | 8 | * Copyright 2021-2022 Intel Corporation |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/export.h> | 11 | #include <linux/export.h> |
| @@ -629,6 +629,8 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, · 617 unmodified lines | |||
| 629 | u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie; | 629 | u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie; |
| 630 | struct ieee80211_sub_if_data *sdata; | 630 | struct ieee80211_sub_if_data *sdata; |
| 631 | struct ieee80211_hdr *hdr = (void *)skb->data; | 631 | struct ieee80211_hdr *hdr = (void *)skb->data; |
| 632 | bool is_valid_ack_signal = | ||
| 633 | !!(info->status.flags & IEEE80211_TX_STATUS_ACK_SIGNAL_VALID); | ||
| 632 | 634 | ||
| 633 | rcu_read_lock(); | 635 | rcu_read_lock(); |
| 634 | sdata = ieee80211_sdata_from_skb(local, skb); | 636 | sdata = ieee80211_sdata_from_skb(local, skb); |
| @@ -645,7 +647,7 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, · 10 unmodified lines | |||
| 645 | cfg80211_probe_status(sdata->dev, hdr->addr1, | 647 | cfg80211_probe_status(sdata->dev, hdr->addr1, |
| 646 | cookie, acked, | 648 | cookie, acked, |
| 647 | info->status.ack_signal, | 649 | info->status.ack_signal, |
| 648 | info->status.is_valid_ack_signal, | 650 | is_valid_ack_signal, |
| 649 | GFP_ATOMIC); | 651 | GFP_ATOMIC); |
| 650 | else if (ieee80211_is_mgmt(hdr->frame_control)) | 652 | else if (ieee80211_is_mgmt(hdr->frame_control)) |
| 651 | cfg80211_mgmt_tx_status(&sdata->wdev, cookie, | 653 | cfg80211_mgmt_tx_status(&sdata->wdev, cookie, |
| @@ -1102,7 +1104,7 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, · 450 unmodified lines | |||
| 1102 | struct ieee80211_supported_band *sband; | 1104 | struct ieee80211_supported_band *sband; |
| 1103 | struct sta_info *sta = NULL; | 1105 | struct sta_info *sta = NULL; |
| 1104 | int rates_idx, retry_count; | 1106 | int rates_idx, retry_count; |
| 1105 | bool acked, noack_success; | 1107 | bool acked, noack_success, ack_signal_valid; |
| 1106 | u16 tx_time_est; | 1108 | u16 tx_time_est; |
| 1107 | 1109 | ||
| 1108 | if (pubsta) { | 1110 | if (pubsta) { |
| @@ -1133,6 +1135,8 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, · 24 unmodified lines | |||
| 1133 | 1135 | ||
| 1134 | acked = !!(info->flags & IEEE80211_TX_STAT_ACK); | 1136 | acked = !!(info->flags & IEEE80211_TX_STAT_ACK); |
| 1135 | noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); | 1137 | noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); |
| 1138 | ack_signal_valid = | ||
| 1139 | !!(info->status.flags & IEEE80211_TX_STATUS_ACK_SIGNAL_VALID); | ||
| 1136 | 1140 | ||
| 1137 | if (pubsta) { | 1141 | if (pubsta) { |
| 1138 | struct ieee80211_sub_if_data *sdata = sta->sdata; | 1142 | struct ieee80211_sub_if_data *sdata = sta->sdata; |
| @@ -1161,7 +1165,7 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, · 22 unmodified lines | |||
| 1161 | unlikely(sdata->u.mgd.probe_send_count > 0)) | 1165 | unlikely(sdata->u.mgd.probe_send_count > 0)) |
| 1162 | sdata->u.mgd.probe_send_count = 0; | 1166 | sdata->u.mgd.probe_send_count = 0; |
| 1163 | 1167 | ||
| 1164 | if (info->status.is_valid_ack_signal) { | 1168 | if (ack_signal_valid) { |
| 1165 | sta->status_stats.last_ack_signal = | 1169 | sta->status_stats.last_ack_signal = |
| 1166 | (s8)info->status.ack_signal; | 1170 | (s8)info->status.ack_signal; |
| 1167 | sta->status_stats.ack_signal_filled = true; | 1171 | sta->status_stats.ack_signal_filled = true; |