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 | 125 | tx_done->ack_rssi != ATH10K_INVALID_RSSI) { |
| 126 | 126 | info->status.ack_signal = ATH10K_DEFAULT_NOISE_FLOOR + |
| 127 | 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 | 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 | 2427 | info->flags |= IEEE80211_TX_STAT_ACK; |
| 2428 | 2428 | info->status.ack_signal = ATH10K_DEFAULT_NOISE_FLOOR + |
| 2429 | 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 | 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 | 351 | info->flags |= IEEE80211_TX_STAT_ACK; |
| 352 | 352 | info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR + |
| 353 | 353 | ts->ack_rssi; |
| 354 | − info->status.is_valid_ack_signal = true; | |
| 354 | + info->status.flags |= | |
| 355 | + IEEE80211_TX_STATUS_ACK_SIGNAL_VALID; | |
| 355 | 356 | } else { |
| 356 | 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 | 553 | info->flags |= IEEE80211_TX_STAT_ACK; |
| 553 | 554 | info->status.ack_signal = ATH11K_DEFAULT_NOISE_FLOOR + |
| 554 | 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 | 559 | if (ts->status == HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX && |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> |
| 8 | 8 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
| 9 | 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 | 13 | #ifndef MAC80211_H |
| @@ -883,6 +883,17 @@ enum mac80211_tx_control_flags { · 869 unmodified lines | ||
| 883 | 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 | 898 | * This definition is used as a mask to clear all temporary flags, which are |
| 888 | 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 | 1057 | * @status.antenna: (legacy, kept only for iwlegacy) |
| 1047 | 1058 | * @status.tx_time: airtime consumed for transmission; note this is only |
| 1048 | 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 | 1061 | * @status.status_driver_data: driver use area |
| 1051 | 1062 | * @ack: union part for pure ACK data |
| 1052 | 1063 | * @ack.cookie: cookie for the ACK |
| @@ -1099,8 +1110,8 @@ struct ieee80211_tx_info { · 46 unmodified lines | ||
| 1099 | 1110 | u8 ampdu_len; |
| 1100 | 1111 | u8 antenna; |
| 1101 | 1112 | u16 tx_time; |
| 1102 | − bool is_valid_ack_signal; | |
| 1103 | − void *status_driver_data[19 / sizeof(void *)]; | |
| 1113 | + u8 flags; | |
| 1114 | + void *status_driver_data[18 / sizeof(void *)]; | |
| 1104 | 1115 | } status; |
| 1105 | 1116 | struct { |
| 1106 | 1117 | struct ieee80211_tx_rate driver_rates[ |
| @@ -5,7 +5,7 @@ · 4 unmodified lines | ||
| 5 | 5 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
| 6 | 6 | * Copyright 2008-2010 Johannes Berg <johannes@sipsolutions.net> |
| 7 | 7 | * Copyright 2013-2014 Intel Mobile Communications GmbH |
| 8 | − * Copyright 2021 Intel Corporation | |
| 8 | + * Copyright 2021-2022 Intel Corporation | |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | 11 | #include <linux/export.h> |
| @@ -629,6 +629,8 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, · 617 unmodified lines | ||
| 629 | 629 | u64 cookie = IEEE80211_SKB_CB(skb)->ack.cookie; |
| 630 | 630 | struct ieee80211_sub_if_data *sdata; |
| 631 | 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 | 635 | rcu_read_lock(); |
| 634 | 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 | 647 | cfg80211_probe_status(sdata->dev, hdr->addr1, |
| 646 | 648 | cookie, acked, |
| 647 | 649 | info->status.ack_signal, |
| 648 | − info->status.is_valid_ack_signal, | |
| 650 | + is_valid_ack_signal, | |
| 649 | 651 | GFP_ATOMIC); |
| 650 | 652 | else if (ieee80211_is_mgmt(hdr->frame_control)) |
| 651 | 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 | 1104 | struct ieee80211_supported_band *sband; |
| 1103 | 1105 | struct sta_info *sta = NULL; |
| 1104 | 1106 | int rates_idx, retry_count; |
| 1105 | − bool acked, noack_success; | |
| 1107 | + bool acked, noack_success, ack_signal_valid; | |
| 1106 | 1108 | u16 tx_time_est; |
| 1107 | 1109 | |
| 1108 | 1110 | if (pubsta) { |
| @@ -1133,6 +1135,8 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, · 24 unmodified lines | ||
| 1133 | 1135 | |
| 1134 | 1136 | acked = !!(info->flags & IEEE80211_TX_STAT_ACK); |
| 1135 | 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 | 1141 | if (pubsta) { |
| 1138 | 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 | 1165 | unlikely(sdata->u.mgd.probe_send_count > 0)) |
| 1162 | 1166 | sdata->u.mgd.probe_send_count = 0; |
| 1163 | 1167 | |
| 1164 | − if (info->status.is_valid_ack_signal) { | |
| 1168 | + if (ack_signal_valid) { | |
| 1165 | 1169 | sta->status_stats.last_ack_signal = |
| 1166 | 1170 | (s8)info->status.ack_signal; |
| 1167 | 1171 | sta->status_stats.ack_signal_filled = true; |