lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6f57da7c547f424194b2cf1d03fadfeb@realtek.com>
Date:   Thu, 23 Mar 2023 02:28:34 +0000
From:   Ping-Ke Shih <pkshih@...ltek.com>
To:     Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC:     Yan-Hsuan Chuang <tony0620emma@...il.com>,
        Kalle Valo <kvalo@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        Chris Morgan <macroalpha82@...il.com>,
        "Nitin Gupta" <nitin.gupta981@...il.com>,
        Neo Jou <neojou@...il.com>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Larry Finger <Larry.Finger@...inger.net>
Subject: RE: [PATCH v3 5/9] wifi: rtw88: main: Reserve 8 bytes of extra TX headroom for SDIO cards



> -----Original Message-----
> From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
> Sent: Tuesday, March 21, 2023 5:35 AM
> To: linux-wireless@...r.kernel.org
> Cc: Yan-Hsuan Chuang <tony0620emma@...il.com>; Kalle Valo <kvalo@...nel.org>; Ulf Hansson
> <ulf.hansson@...aro.org>; linux-kernel@...r.kernel.org; netdev@...r.kernel.org;
> linux-mmc@...r.kernel.org; Chris Morgan <macroalpha82@...il.com>; Nitin Gupta <nitin.gupta981@...il.com>;
> Neo Jou <neojou@...il.com>; Ping-Ke Shih <pkshih@...ltek.com>; Jernej Skrabec <jernej.skrabec@...il.com>;
> Larry Finger <Larry.Finger@...inger.net>; Martin Blumenstingl <martin.blumenstingl@...glemail.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@...glemail.com>

Reviewed-by: Ping-Ke Shih <pkshih@...ltek.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ