Baochen Qiang <quic_bqiang@xxxxxxxxxxx> writes: > We are seeing a very low TCP throughput testing with some specific > tools. This is because for sub-frames of an AMSDU, MCBC flag in > mpdu_start may be not valid, and as a result those frames would be > dropped by kernel. > > Add a new helper to get it from msdu_end. > > Since original helper is not used for now, add __maybe_unused > attribute to make GCC happy. > > Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4 > > Signed-off-by: Baochen Qiang <quic_bqiang@xxxxxxxxxxx> > --- > v2: > 1. add a new helper according to Vasanth's comment. > 2. change to use __le16_to_cpu instead of __le32_to_cpu > > drivers/net/wireless/ath/ath12k/dp_rx.c | 13 ++++++++++--- > drivers/net/wireless/ath/ath12k/hal.c | 14 ++++++++++++++ > drivers/net/wireless/ath/ath12k/hal.h | 1 + > 3 files changed, 25 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath12k/dp_rx.c b/drivers/net/wireless/ath/ath12k/dp_rx.c > index 8c8162fbe5c6..972034b7f159 100644 > --- a/drivers/net/wireless/ath/ath12k/dp_rx.c > +++ b/drivers/net/wireless/ath/ath12k/dp_rx.c > @@ -193,13 +193,20 @@ static void ath12k_dp_rxdesc_set_msdu_len(struct ath12k_base *ab, > ab->hw_params->hal_ops->rx_desc_set_msdu_len(desc, len); > } > > -static bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab, > - struct hal_rx_desc *desc) > +static __maybe_unused bool ath12k_dp_rx_h_is_mcbc(struct ath12k_base *ab, > + struct hal_rx_desc *desc) > { > return (ath12k_dp_rx_h_first_msdu(ab, desc) && > ab->hw_params->hal_ops->rx_desc_is_mcbc(desc)); > } Using __maybe_unused is usually a bad idea, it should be used only on very special cases. But why do you leave struct hal_ops::rx_desc_is_mcbc? Nobody is using it and we should not have dead code lying around. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches