openwrt/package/kernel/mac80211/patches/build/230-fix-init_vqs-build-error-on-kernel-6.6.patch
Christian Marangi 52a0873742
mac80211: update to version 6.18
Drop all upstreamed patch and refresh all affected patch.

Minor changes were needed to the
350-mac80211-allow-scanning-while-on-radar-channel due to changes in
6.18.

Also some changes were needed to downstream patch due to upstream commit
b74947b4f6ff ("wifi: cfg80211/mac80211: Add support to get radio index")

Link: https://github.com/openwrt/openwrt/pull/20964
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-12-08 00:37:06 +01:00

30 lines
991 B
Diff

--- a/drivers/net/wireless/virtual/mac80211_hwsim.c
+++ b/drivers/net/wireless/virtual/mac80211_hwsim.c
@@ -6927,6 +6927,7 @@ static void hwsim_virtio_rx_done(struct
static int init_vqs(struct virtio_device *vdev)
{
+#if LINUX_VERSION_IS_GEQ(6,11,0)
struct virtqueue_info vqs_info[HWSIM_NUM_VQS] = {
[HWSIM_VQ_TX] = { "tx", hwsim_virtio_tx_done },
[HWSIM_VQ_RX] = { "rx", hwsim_virtio_rx_done },
@@ -6934,6 +6935,19 @@ static int init_vqs(struct virtio_device
return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
hwsim_vqs, vqs_info, NULL);
+#else /* Using the old ABI, copied from kernel 6.6 */
+ vq_callback_t *callbacks[HWSIM_NUM_VQS] = {
+ [HWSIM_VQ_TX] = hwsim_virtio_tx_done,
+ [HWSIM_VQ_RX] = hwsim_virtio_rx_done,
+ };
+ const char *names[HWSIM_NUM_VQS] = {
+ [HWSIM_VQ_TX] = "tx",
+ [HWSIM_VQ_RX] = "rx",
+ };
+
+ return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
+ hwsim_vqs, callbacks, names, NULL);
+#endif
}
static int fill_vq(struct virtqueue *vq)