new file mode 100644
@@ -0,0 +1,31 @@
+#ifndef _COMPAT_LINUX_VIRTIO_CONFIG_H
+#define _COMPAT_LINUX_VIRTIO_CONFIG_H
+#include_next <linux/virtio_config.h>
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_LESS(4,11,0)
+struct irq_affinity;
+#endif
+
+#if LINUX_VERSION_IS_LESS(4,12,0)
+static inline
+int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
+ struct virtqueue *vqs[], vq_callback_t *callbacks[],
+#if LINUX_VERSION_IS_LESS(4,10,0)
+ const char * const names[],
+#else
+ const char *names[],
+#endif
+ struct irq_affinity *desc)
+{
+#if LINUX_VERSION_IS_LESS(4,11,0)
+ return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names);
+#else
+ return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, desc);
+#endif
+}
+#endif /* < 4.12 */
+
+
+#endif /* _COMPAT_LINUX_VIRTIO_CONFIG_H */
The virtio_find_vqs() function is now used by the mac80211_hwsim driver. This is just a wrapper around the find_vqs callback. The find_vqs callback changed over the time. With kernel 4.10 the names parameter was changed from "const char *names[]" to "const char * const names[]". With kernel 4.11 the "struct irq_affinity *desc" was added. We have to define struct irq_affinity here for older kernel versions, because it is used in this new parameter in kernel >= 4.12 this is already done in the upstream header file. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- .../backport-include/linux/virtio_config.h | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 backport/backport-include/linux/virtio_config.h