AgeCommit message (Collapse)Author
2020-03-21patches: Refresh on top of kernel 5.4.27linux-5.4.yHauke Mehrtens
Signed-off-by: Hauke Mehrtens <>
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 <>
2020-03-21backports: patch lib/refcount.c to make sparse happyJohannes Berg
Upstream commit e1e5fc5c84336b1b4e1354895fffafa7b2524bd7 We're testing sparse, so don't want warnings here. Signed-off-by: Johannes Berg <>
2020-03-21backports: Do not access rx_count and rx_list attributesHauke Mehrtens
Upstream commit a4ff4832887a4c2aa3b7599ae784290b3d2ff041 The rx_count and rx_list attributes were only added in kernel 5.4 in commit 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs") Signed-off-by: Hauke Mehrtens <> Link: Signed-off-by: Johannes Berg <>
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 <>
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 <> Signed-off-by: Johannes Berg <>
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 <>
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 <>
2019-11-21backports: Adapt to changes to skb_get_hash_perturb()Hauke Mehrtens
The skb_get_hash_perturb() function now takes a siphash_key_t instead of an u32. This was changed in commit 55667441c84f ("net/flow_dissector: switch to siphash"). Use the correct type in the fq header file depending on the kernel version. Signed-off-by: Hauke Mehrtens <>
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 <>
2019-11-16pycocci: fix error when python is python3David Frey
When running under an Arch Linux system where python is python3, the following error was observed: Traceback (most recent call last): File "/home/dfrey/projects/backports-linux/devel/pycocci", line 172, in <module> ret = _main() File "/home/dfrey/projects/backports-linux/devel/pycocci", line 158, in _main if > 0: TypeError: '>' not supported between instances of 'NoneType' and 'int' The problem is that is None in the case that the -j or --jobs argument wasn't passed to the command. In python3, an exception is generated when performing a comparison between different types. Signed-off-by: David Frey <>
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 <>
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 <>
2019-10-09backports: ckmake: Limit load to number of CPUsHauke Mehrtens
Instead of limiting the maximum load to a fixed number limit it to the number of available CPUs. This should hopefully increase the speed as less task switches are needed. Also reduce the number of treads per build to half the number of available CPUs. Normally multiple builds are done in parallel anyway. Signed-off-by: Hauke Mehrtens <>
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 <>
2019-10-09backports: dependencies: Make ATH9K OWL depend on kernel 3.14Hauke Mehrtens
The ath9k owl driver uses pci_lock_rescan_remove() and pci_unlock_rescan_remove() which was added in kernel 3.14, only compile it on kernel >= 3.14. Signed-off-by: Hauke Mehrtens <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
2019-10-09backports: patches: Refresh against kernel 5.4-rc2Hauke Mehrtens
Manual modifications where needed to make the following patch apply: patches/0013-fix-makefile-includes/rtw88.patch Signed-off-by: Hauke Mehrtens <>
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 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 <> Cc: Anthony Wong <>
2019-08-14dependencies: Make AIRO depend on kernel 4.20Hauke Mehrtens
The airo driver now uses crypto_sync_skcipher() which was introduced in kernel 4.20, just make it depend on this kernel version. Signed-off-by: Hauke Mehrtens <>
2019-08-14patches: Do not use GRO_CONSUMED on kernel < 4.11Hauke Mehrtens
GRO_CONSUMED was added in kernel commit 25393d3fc055 ("net: Prepare gro for packet consuming gro callbacks") in kernel 4.11. Just remove it for older kernel versions. Signed-off-by: Hauke Mehrtens <>
2019-08-14patches: Add include in cfg80211.hHauke Mehrtens
cfg80211.h uses struct nla_policy in two places, but does not include net/netlink.h directly. Because of this missing include the rename to struct nla_backport_policy is not applied and this results in type mismatch errors when compiling backports. With this additional include the type is renamed. Signed-off-by: Hauke Mehrtens <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
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 <>
2019-08-14patches: Refresh patches against kernel 5.3-rc4Hauke Mehrtens
No manual changes needed. Signed-off-by: Hauke Mehrtens <>
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 <>
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 <>
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 <>
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 <>
2019-07-06patches: rtw88: Add missing include on kernel 3.18Hauke Mehrtens
On kernel 3.18 linux/module.h is not indirectly included in this driver. On some other kernel version linux/interrupt.h is not indirectly included, but needed. This fixes some compile problems in the rtw88 driver. Signed-off-by: Hauke Mehrtens <>
2019-07-06dependencies: Add MT7615E dependencyHauke Mehrtens
The MT76 driver does not compile on kernel < 4.2, also add such a dependency to the new driver MT7615E. Signed-off-by: Hauke Mehrtens <>
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 <>
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 <>
2019-07-06patch: Remove usage of DMI_PRODUCT_SKUHauke Mehrtens
DMI_PRODUCT_SKU was added in kernel 4.18, do not use it on older kernel versions. Signed-off-by: Hauke Mehrtens <>
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 <>
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 <>
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 <>
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 <> [Hauke: Remove nla_validate_nested()] [Hauke: Support struct genl_ops on older kernel versions] Signed-off-by: Hauke Mehrtens <>
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 <>