From: Ping-Ke Shih <pkshih@realtek.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Yan-Hsuan Chuang <tony0620emma@gmail.com>,
Kalle Valo <kvalo@kernel.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
Chris Morgan <macroalpha82@gmail.com>,
"Nitin Gupta" <nitin.gupta981@gmail.com>,
Neo Jou <neojou@gmail.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>
Subject: RE: [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards
Date: Thu, 23 Mar 2023 02:28:34 +0000 [thread overview]
Message-ID: <6f57da7c547f424194b2cf1d03fadfeb@realtek.com> (raw)
In-Reply-To: <20230320213508.2358213-6-martin.blumenstingl@googlemail.com>
> -----Original Message-----
> From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Sent: Tuesday, March 21, 2023 5:35 AM
> To: linux-wireless@vger.kernel.org
> Cc: Yan-Hsuan Chuang <tony0620emma@gmail.com>; Kalle Valo <kvalo@kernel.org>; Ulf Hansson
> <ulf.hansson@linaro.org>; linux-kernel@vger.kernel.org; netdev@vger.kernel.org;
> linux-mmc@vger.kernel.org; Chris Morgan <macroalpha82@gmail.com>; Nitin Gupta <nitin.gupta981@gmail.com>;
> Neo Jou <neojou@gmail.com>; Ping-Ke Shih <pkshih@realtek.com>; Jernej Skrabec <jernej.skrabec@gmail.com>;
> Larry Finger <Larry.Finger@lwfinger.net>; Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Subject: [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards
>
> For SDIO host controllers with DMA support the TX buffer physical memory
> address need to be aligned at an 8-byte boundary. Reserve 8 bytes of
> extra TX headroom so we can align the data without re-allocating the
> transmit buffer.
>
> While here, also remove the TODO comment regarding extra headroom for
> USB and SDIO. For SDIO the extra headroom is now handled and for USB it
> was not needed so far.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
> ---
> Changes since v2:
> - none
>
> Changes since v1:
> - none
>
>
> drivers/net/wireless/realtek/rtw88/main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index cdc4703ead5f..1cb553485cff 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -2163,9 +2163,11 @@ int rtw_register_hw(struct rtw_dev *rtwdev, struct ieee80211_hw *hw)
> int max_tx_headroom = 0;
> int ret;
>
> - /* TODO: USB & SDIO may need extra room? */
> max_tx_headroom = rtwdev->chip->tx_pkt_desc_sz;
>
> + if (rtw_hci_type(rtwdev) == RTW_HCI_TYPE_SDIO)
> + max_tx_headroom += RTW_SDIO_DATA_PTR_ALIGN;
> +
> hw->extra_tx_headroom = max_tx_headroom;
> hw->queues = IEEE80211_NUM_ACS;
> hw->txq_data_size = sizeof(struct rtw_txq);
> --
> 2.40.0
next prev parent reply other threads:[~2023-03-23 2:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 21:34 [PATCH v3 0/9] rtw88: Add SDIO support Martin Blumenstingl
2023-03-20 21:35 ` [PATCH v3 1/9] wifi: rtw88: Clear RTW_FLAG_POWERON early in rtw_mac_power_switch() Martin Blumenstingl
2023-03-23 2:02 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 2/9] wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets Martin Blumenstingl
2023-03-23 2:23 ` Ping-Ke Shih
2023-03-23 11:16 ` Martin Blumenstingl
2023-03-23 19:03 ` Martin Blumenstingl
2023-03-27 9:11 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 3/9] wifi: rtw88: mac: Support SDIO specific bits in the power on sequence Martin Blumenstingl
2023-03-23 2:27 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 4/9] wifi: rtw88: main: Add the {cpwm,rpwm}_addr for SDIO based chipsets Martin Blumenstingl
2023-03-23 2:28 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards Martin Blumenstingl
2023-03-23 2:28 ` Ping-Ke Shih [this message]
2023-03-20 21:35 ` [PATCH v3 6/9] mmc: sdio: add Realtek SDIO vendor ID and various wifi device IDs Martin Blumenstingl
2023-03-23 2:29 ` Ping-Ke Shih
2023-03-26 14:02 ` Pali Rohár
2023-03-20 21:35 ` [PATCH v3 7/9] wifi: rtw88: Add support for the SDIO based RTL8822BS chipset Martin Blumenstingl
2023-03-23 2:29 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 8/9] wifi: rtw88: Add support for the SDIO based RTL8822CS chipset Martin Blumenstingl
2023-03-23 2:30 ` Ping-Ke Shih
2023-03-20 21:35 ` [PATCH v3 9/9] wifi: rtw88: Add support for the SDIO based RTL8821CS chipset Martin Blumenstingl
2023-03-23 2:33 ` Ping-Ke Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6f57da7c547f424194b2cf1d03fadfeb@realtek.com \
--to=pkshih@realtek.com \
--cc=Larry.Finger@lwfinger.net \
--cc=jernej.skrabec@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=macroalpha82@gmail.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=neojou@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nitin.gupta981@gmail.com \
--cc=tony0620emma@gmail.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).