mac80211: fix struct ieee80211_tx_info size

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.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220202104617.0ff363d4fa56.I45792c0187034a6d0e1c99a7db741996ef7caba3@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Avraham Stern
2022-02-02 10:49:47 +02:00
committed by Johannes Berg
parent 97634ef4bf
commit ea5907db2a
5 changed files with 28 additions and 12 deletions

View File

@@ -7,7 +7,7 @@
* Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2015 - 2017 Intel Deutschland GmbH
* Copyright (C) 2018 - 2021 Intel Corporation
* Copyright (C) 2018 - 2022 Intel Corporation
*/
#ifndef MAC80211_H
@@ -883,6 +883,17 @@ enum mac80211_tx_control_flags {
IEEE80211_TX_CTRL_DONT_REORDER = BIT(8),
};
/**
* enum mac80211_tx_status_flags - flags to describe transmit status
*
* @IEEE80211_TX_STATUS_ACK_SIGNAL_VALID: ACK signal is valid
*
* These flags are used in tx_info->status.flags.
*/
enum mac80211_tx_status_flags {
IEEE80211_TX_STATUS_ACK_SIGNAL_VALID = BIT(0),
};
/*
* This definition is used as a mask to clear all temporary flags, which are
* 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)
* @status.antenna: (legacy, kept only for iwlegacy)
* @status.tx_time: airtime consumed for transmission; note this is only
* used for WMM AC, not for airtime fairness
* @status.is_valid_ack_signal: ACK signal is valid
* @status.flags: status flags, see &enum mac80211_tx_status_flags
* @status.status_driver_data: driver use area
* @ack: union part for pure ACK data
* @ack.cookie: cookie for the ACK
@@ -1099,8 +1110,8 @@ struct ieee80211_tx_info {
u8 ampdu_len;
u8 antenna;
u16 tx_time;
bool is_valid_ack_signal;
void *status_driver_data[19 / sizeof(void *)];
u8 flags;
void *status_driver_data[18 / sizeof(void *)];
} status;
struct {
struct ieee80211_tx_rate driver_rates[