mac80211: backport firmware_request_nowarn and firmware_request_cache
authorFelix Fietkau <nbd@nbd.name>
Fri, 9 Nov 2018 14:20:21 +0000 (15:20 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 9 Nov 2018 15:26:49 +0000 (16:26 +0100)
Required for an mt76 update to the latest version from master

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/kernel/mac80211/patches/013-backport-firmware_request_nowarn.patch [new file with mode: 0644]

diff --git a/package/kernel/mac80211/patches/013-backport-firmware_request_nowarn.patch b/package/kernel/mac80211/patches/013-backport-firmware_request_nowarn.patch
new file mode 100644 (file)
index 0000000..f71e40b
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/backport-include/linux/firmware.h
++++ b/backport-include/linux/firmware.h
+@@ -5,5 +5,16 @@
+ #if LINUX_VERSION_IS_LESS(3,14,0)
+ #define request_firmware_direct(fw, name, device) request_firmware(fw, name, device)
+ #endif
++#if LINUX_VERSION_IS_LESS(4,18,0)
++#define firmware_request_nowarn(fw, name, device) request_firmware(fw, name, device)
++#endif
++
++#if LINUX_VERSION_IS_LESS(4,17,0)
++#define firmware_request_cache LINUX_BACKPORT(firmware_request_cache)
++static inline int firmware_request_cache(struct device *device, const char *name)
++{
++      return 0;
++}
++#endif
+ #endif /* __BACKPORT_LINUX_FIRMWARE_H */