Skip to content

Commit

Permalink
mac80211: add rt2x00 5.19 kernel support
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Aug 14, 2022
1 parent 347559c commit 9a16693
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -586,10 +586,18 @@ static void rt2x00usb_assign_endpoint(struct data_queue *queue,

if (queue->qid == QID_RX) {
pipe = usb_rcvbulkpipe(usb_dev, queue->usb_endpoint);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)
queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe, 0);
+#else
+ queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe);
+#endif
} else {
pipe = usb_sndbulkpipe(usb_dev, queue->usb_endpoint);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)
queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe, 1);
+#else
+ queue->usb_maxpacket = usb_maxpacket(usb_dev, pipe);
+#endif
}

if (!queue->usb_maxpacket)
3 changes: 0 additions & 3 deletions target/linux/rockchip/armv8/config-5.19
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,6 @@ CONFIG_I2C_CHARDEV=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_RK3X=y
CONFIG_IGB=y
CONFIG_IGB_HWMON=y
CONFIG_IGC=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_INDIRECT_PIO=y
CONFIG_INPUT=y
Expand Down

0 comments on commit 9a16693

Please sign in to comment.