Message ID | 039543e0-07c4-4e46-9c79-a507a8123467@gmail.com |
---|---|
State | New |
Headers | show |
Series | wifi: rtw89: Add support for USB devices | expand |
Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote: > 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>
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c index a6e67e22349e..0161721bb0e8 100644 --- a/drivers/net/wireless/realtek/rtw89/core.c +++ b/drivers/net/wireless/realtek/rtw89/core.c @@ -5251,6 +5251,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);
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> --- drivers/net/wireless/realtek/rtw89/core.c | 3 +++ 1 file changed, 3 insertions(+)