wifi: rtw89: Add extra TX headroom for USB

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
This commit is contained in:
Bitterblue Smith
2025-06-30 23:44:28 +03:00
committed by Ping-Ke Shih
parent a3b871a0f7
commit ec542d5e4b

View 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);