mt76: add 5.19 kernel support

This commit is contained in:
lean 2022-08-17 23:38:06 +08:00
parent 5c200342a7
commit 85c2ce64c5
2 changed files with 15 additions and 1 deletions

View File

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mt76
PKG_RELEASE=4
PKG_RELEASE=5
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=

View File

@ -0,0 +1,14 @@
--- a/usb.c
+++ b/usb.c
@@ -1068,7 +1068,11 @@
INIT_WORK(&usb->stat_work, mt76u_tx_status_data);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)
usb->data_len = usb_maxpacket(udev, usb_sndctrlpipe(udev, 0), 1);
+#else
+ usb->data_len = usb_maxpacket(udev, usb_sndctrlpipe(udev, 0));
+#endif
if (usb->data_len < 32)
usb->data_len = 32;