summaryrefslogtreecommitdiff
path: root/backport
AgeCommit message (Collapse)Author
2020-03-21backports: page_ref.h: Exclude page_ref_count() on kernel >= 4.4.216Hauke Mehrtens
Upstream commit abe05f0c83f5947f84cc0e6408ee0930595389b7 page_ref_count() was backported to kernel version 4.4.216, do not add it in backports for this kernel version any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-03-21backports: suppress attribute((cold)) warnings with gcc 9Johannes Berg
Upstream commit eea7eb88324405d9ed90ff0b430d631f5f25b0e0 Since my last system upgrade I started building with gcc 9, and that complains that a function is cold when the one we create locally here isn't - mark it as cold always, I don't think it would complain the other way around. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-03-21backports: update x509.asn1.[ch]Luca Coelho
Upstream commit 3c6ca332a2ea9e3ebc6c99c5095a7acf14f09b91 In v5.2, x509_cert_parser.c implemented a new function, x509_note_params(). So we need the new generated asn1 files. Update these files from the ones generated with v5.2 Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-03-21backports: significantly speed up buildJohannes Berg
Upstream commit a17ed9f1fcd12d56757bc33a275d5dfa98d7e75e When building with /bin/sh -> bash, things are SUPER slow (at least for me), because bash takes a LOOONG time to look at the environment variables (and we typically have around 6k), adding over a second to each bash invocation for me. The reason we export them is that we need them in all of the sub- makes, and those only read auto.conf, which we can't change. Work around this by overriding 'make' itself, and using --eval to read *our* .config file into each make that gets called. This way, the variables are present in all make invocations in the same way as they would be through the environment, but don't get passed to shell invocations. If --eval is not supported, keep doing what we did before. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-11-21backports: Add kvcalloc()Hauke Mehrtens
kvcalloc() was added in kernel commit 1c542f38ab8d ("mm: Introduce kvcalloc()") and is now used by the fq header filers. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-11-21backports: Add return value to backport_pci_disable_link_state()Hauke Mehrtens
Since Linux upstream commit 4cfd21885592 ("PCI: let pci_disable_link_state propagate errors") The pci_disable_link_state() function can return an error. This return code is now used by the mt76 driver. In case it is not possible to disable ASPM, for example on some ACPI systems, we should return an error and mt76 handles this. Do this by checking the PCI registers if the operation was successfully. The checking of the PCI register was added by Felix Fietkau. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: xfrm: Add skb_ext_reset()Hauke Mehrtens
skb_ext_reset() was added in upstream commit 174e23810cd3 ("sk_buff: drop all skb extensions on free and skb scrubbing") and is now used by mac80211_hwsim. skb_ext_reset() replaced the old call to secpath_reset() in mac80211_hwsim and other places and it also does similar things than this function. Juts call the old secpath_reset() on older kernel versions. This was added to net/xfrm.h and not linux/skbuff.h because secpath_reset() is only available in net/xfrm.h in the upstream kernel and this is not included in linux/skbuff.h. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: skbuff.h: Add nf_reset_ct()Hauke Mehrtens
nf_reset_ct() was added in upstream Linux commit 895b5c9f206e ("netfilter: drop bridge nf reset from nf_reset") and is now used by mac80211_hwsim. The upstream commit renamed nf_reset() to nf_reset_ct() and did some modifications to this inline function, just call the old version on older kernel versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: lib-arc4: Do not build when activated in kernelHauke Mehrtens
Only build the own lib-arc4 version when it is not build as a module or into the kernel. Without this change it was also build when CRYPTO_LIB_ARC4 was build as a module in the kernel. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: io: Add writel_relaxed()Hauke Mehrtens
Add writel_relaxed() from upstream commit 9439eb3ab9d1 ("asm-generic: io: implement relaxed accessor macros as conditional wrappers") which is used by the wil6210 driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: io.h: Add __ioread32_copy()Hauke Mehrtens
Add __ioread32_copy() from usptream Linux commit a9aec5881b9d ("lib/iomap_copy.c: add __ioread32_copy()") which is used by mt76 driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: skbuff.h: Add skb_mac_offset()Hauke Mehrtens
Add skb_mac_offset() from upstream kernel commit ea6da4fd388a ("net/skbuff: Introduce skb_mac_offset()") which is used by the wil6210 driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: skbuff.h: Add skb_frag_off()Hauke Mehrtens
Add skb_frag_off() Which was added in upstream commit 7240b60c98d6 ("linux: Add skb_frag_t page_offset accessors") which is used by the usbnet driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: platform_device.h: Add devm_platform_ioremap_resource()Hauke Mehrtens
Add devm_platform_ioremap_resource() from upstream kernel commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()") which is now used by the mt76 driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: build_bug.h: Add static_assert()Hauke Mehrtens
Add static_assert() from upstream commit 6bab69c65013 ("build_bug.h: add wrapper for _Static_assert") which is used by rtw88. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-10-09backports: pci: Include linux/pci-aspm.hHauke Mehrtens
In upstream commit 7ce2e76a0420 linux/pci-aspm.h was removed and the content included into pci.h. Add an include to have the functions defined in linux/pci-aspm.h available when linux/pci.h is included. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-14kconfig: Update to KConfig to version from kernel 4.17Hauke Mehrtens
This updates the KConfig system used in backports to the version from kernel 4.17. In kernel 4.18 some bigger changes to the KConfig system were introduced which are harder to backport, so start with using this older version. This version now generates the zconf.lex.c and zconf.tab.c files from the original sources, newer kernel versions will delete these files in a make clean, after that they are now regenerated. We do not ship them by default any more, so we need lex and yacc. The Makefile was not copied from the mainline kernel but this is written specifically for the backports project. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: Anthony Wong <yp@anthonywong.net>
2019-08-14backport: Add arc4 libraryHauke Mehrtens
The arc4 library was extracted from the crypto system in commit dc51f25752bf ("crypto: arc4 - refactor arc4 core code into separate library") in kernel 4.20. This is now used by mac80211 and lib80211 for WEP crypto. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-14backport: Add genl_callback_extack() functionHauke Mehrtens
The struct netlink_callback got a new extack attribute in commit 4a19edb60d02 ("netlink: Pass extack to dump handlers") in kernel 4.20. Use a function instead of directly accessing it to return NULL on older kernel versions, the code should handle NULL. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-14header: Remove skb_xmit_more()Hauke Mehrtens
The xmit_more member was removed from struture sk_buff and the skb_xmit_more() function is not used in backports any more, just remove this code as it does not compile any more on kernel 5.2 and more recent. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-14header: Add trace_##name##_enabled()Hauke Mehrtens
This adds the function trace_##name##_enabled to __DECLARE_TRACE() which was added in commit 7c65bbc7dc ("tracing: Add trace_<tracepoint>_enabled() function"). This is now used by ath10k. __DECLARE_TRACE() got other changes wit kernel 3.16, so add two different versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-14header: Add nl80211_validate_nested()Hauke Mehrtens
nl80211_validate_nested() was added in commit 901bb9891855 ("nl80211: require and validate vendor command policy") in kernel 5.3 and is used by nl80211. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-14header: Add ktime_get_boottime_ns()Hauke Mehrtens
ktime_get_boottime_ns() was added in commit 9285ec4c8b61 ("timekeeping: Use proper clock specifier names in functions") in kernel 5.3. This is used by multiple drivers. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-08-14header: Add BITS_PER_TYPE()Hauke Mehrtens
BITS_PER_TYPE was moved in the upstream kernel in commit 9144d75e22ca ("include/linux/bitops.h: introduce BITS_PER_TYPE") in kernel 4.19 and is now used by the ath10k driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: add support for GCC8 and GCC9Hauke Mehrtens
Older kernel versions are missing these files and still try to include them, add them to make compile testing on recent system easier. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: fix of_get_mac_address()Hauke Mehrtens
The behavior of of_get_mac_address() changed in kernel 5.2, it now returns an error code and not NULL in case of an error. This was changed in upstream kernel commit d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06defconfig: update wifi defconfigHauke Mehrtens
This removes the removed driver CPTCFG_R8822BE and adds the newly added drivers CPTCFG_MT7603E, CPTCFG_MT7615E and CPTCFG_RTW88 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: Remove include/net/inet_frag.hHauke Mehrtens
The functions provided by include/net/inet_frag.h are not used by any code in backports any more and this file causes compile warnings with kernel 3.16. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: add hrtimer_forward() and ns_to_ktime()Hauke Mehrtens
ktime_t was converted from the union to s64 in kernel 4.10. hrtimer_start() was already converted some time ago in backports, now mac80211_hwsim uses hrtimer_start() together with the newly added functions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: Make napi_complete_done() return boolHauke Mehrtens
In the current kernel napi_complete_done() returns a bool and this is now used by the mt76 driver. Try to backport this functionality by doing the check which makes the function return false already in backports. This was added in upstream kernel commit 364b6055738b ("net: busy-poll: return busypolling status to drivers") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: Add HRTIMER_MODE_{ABS,REL}_SOFTHauke Mehrtens
mac80211_hwsim uses HRTIMER_MODE_ABS_SOFT and HRTIMER_MODE_REL_SOFT now. These enum entries were added in commit 98ecadd4305d ("hrtimer: Add clock bases and hrtimer mode for softirq context") in kernel 4.16. This will execute the timers in hard interrupt context and not in soft interrupt context like intended. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: Add sdio_retune*() functionsHauke Mehrtens
The brcmfmac driver now uses new sdio_retune*() functions. They are added with kernel 5.2-rc6 and are backported to kernel 4.19.56 and 5.1.15 sdio_retune_hold_now() and sdio_retune_release() should work like in the upstream kernel, the implementation of mmc_retune_release() and mmc_retune_hold() was copied to backports into these functions. On kernel < 4.3 backporting this is not so easy, so just use an empty implementation there. It is not possible to backport sdio_retune_crc_disable() and sdio_retune_crc_enable() because they need an additional member in a structure, just add an empty implementation. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06header: Add backport-include/net/ipv6_stubs.hHauke Mehrtens
ipv6_stubs.h was added in kernel commit 3616d08bcbb5 ("ipv6: Move ipv6 stubs to a separate header file"). Most of its content is from include/net/addrconf.h, so include that file indirectly on older kernel versions. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-07-06backport: Extend netlink parsing with strict validationJohannes Berg
This extends the backported netlink handling with strict parsing. the struct gen_ops now supports the validate member and does the validation inside the backport layer. This is needed to use backports with kernel 5.2. Signed-off-by: Johannes Berg <johannes.berg@intel.com> [Hauke: Remove nla_validate_nested()] [Hauke: Support struct genl_ops on older kernel versions] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-06-30patches: Make patches apply on top of kernel 5.2-rc6Hauke Mehrtens
The cordic.c file was moved and the driver from drivers/staging/rtlwifi/ was removed in mainline kernel. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-06-27backport-include: add empty lockdep_map structure in lockdep.hArend van Spriel
include/linux/rhashtable.h now uses struct lockdep_map unconditionally which is fine for upstream as lockdep.h defines an empty lockdep_map structure if CONFIG_LOCKDEP is not set. However, that is only true since kernel 4.15 so adding such definition in our lockdep.h to cover older kernels. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
2019-06-27backport: check for failure when allocating ops in genetlinkLuca Coelho
We were not checking if the allocation failed in backport_genl_register_family(), which could lead to NULL pointer dereferences later. Fix that. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-06-27backport: rcupdate: add rcu_head_init and rcu_head_after_call_rcuArend van Spriel
Include static inline functions that were added by commit 74de6960c99d ("rcu: Provide functions for determining if call_rcu() has been invoked"). Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> [Activate on < 4.20 only] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-03-28backports: Add smp_acquire__after_ctrl_dep()Hauke Mehrtens
smp_acquire__after_ctrl_dep() was introduced in kernel 4.8 in upstream Linux commit 33ac279677d ("locking/barriers: Introduce smp_acquire__after_ctrl_dep()") and is used by backports lib-refcount.c implementation now. This just adds the default implementation to backports. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-03-28backports: Add rhashtable_lookup_get_insert_fast()Hauke Mehrtens
rhashtable_lookup_get_insert_fast() was added in kernel 4.12 in Linux upstream commit f9fe1c12d12 ("rhashtable: Add rhashtable_lookup_get_insert_fast") It is now used by mac80211. For kernel < 4.9 we already backport the complete rhashtable implementation, so this is only needed for kernels more recent than 4.9. This is copied from upstreamn Linux kernel. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-03-28backports: update backport/backport-include/net/netlink.hAceLan Kao
Add new macros introduced from v5.1-rc1 23323289b154 netlink: reduce NLA_POLICY_NESTED{,_ARRAY} arguments v3: Fix v4.20 compilation error Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
2019-03-28backport: add atomic_fetch_add_unless()Luca Coelho
The iwlwifi driver now needs this function. Backport it. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-03-28backports: genetlink: avoid NULL dereferenceJohannes Berg
If we fail to allocate extack, we fall back to the code path that tries to send an error *with* extack, but that will access our extack pointer. It also doesn't make sense, so just return an error back to netlink immediately and let it handle sending the error message to userspace. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-03-28backport: fix handling of nospec.h for 4.15.0 and 4.15.1Luca Coelho
The patch that introduces nospec.h was cherry-picked for 4.15 only in 4.15.2, so we need to adjust the ifdefs of our stub. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-03-28backport: add include ftrace_event.h back to backport-4.0.cLuca Coelho
At least one function, namely ftrace_print_array_seq(), still needs the ftrace_event.h header file, otherwise sparse may warning that it is declared as non-static without pre-declaration. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-03-20backport: add v5.* to the MakefileLuca Coelho
Now that 4.21 became 5.0, we need to update the Makefile accordingly. Stop looking at 4.19 for the 4.* series and add 5.*. Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
2019-03-01backports: add defconfigs for Marvell wifi driversTamás Szűcs
Enable users to be able to conveniently select the Marvell wifi drivers that they need. Signed-off-by: Tamás Szűcs <tszucs@protonmail.ch> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2019-01-26backports: Rename QTNFMAC_PEARL_PCIE to QTNFMAC_PCIEHauke Mehrtens
The name of this configuration option was changed in Linux commit b7da53cd6cd1 ("qtnfmac_pcie: use single PCIe driver for all platforms"). Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-01-26backports: Add extra parameter to dev_open()Hauke Mehrtens
dev_open() got the extra parameter extack in Linux commit 00f54e68924e ("net: core: dev: Add extack argument to dev_open()"), just ignore it on older kernel versions. This is used by the hostap driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-01-26backports: Add CORDIC_FLOATHauke Mehrtens
This was introduced in Linux commit 58d81d64e06f ("lib: cordic: Move cordic macros and defines to header file") and is used by the b43 and brcmsmac driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>