]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: rtw89: Add extra TX headroom for USB
authorBitterblue Smith <rtl8821cerfe2@gmail.com>
Mon, 30 Jun 2025 20:44:28 +0000 (23:44 +0300)
committerPing-Ke Shih <pkshih@realtek.com>
Fri, 4 Jul 2025 02:43:46 +0000 (10:43 +0800)
In the case of USB the TX descriptor is transmitted in the same buffer
as the 802.11 frame, so add the required headroom.

Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/91fb7579-60e5-4a06-8007-3312639beea6@gmail.com
drivers/net/wireless/realtek/rtw89/core.c

index fe6b19a078c58d2cb7a21f01f7a6c97a62780f30..776d2e5ce8a0b6b249591243da2a64daee7695a1 100644 (file)
@@ -5591,6 +5591,9 @@ static int rtw89_core_register_hw(struct rtw89_dev *rtwdev)
        int ret;
        int tx_headroom = IEEE80211_HT_CTL_LEN;
 
+       if (rtwdev->hci.type == RTW89_HCI_TYPE_USB)
+               tx_headroom += chip->txwd_body_size + chip->txwd_info_size;
+
        hw->vif_data_size = struct_size_t(struct rtw89_vif, links_inst, n);
        hw->sta_data_size = struct_size_t(struct rtw89_sta, links_inst, n);
        hw->txq_data_size = sizeof(struct rtw89_txq);