Felix Fietkau [Thu, 6 Sep 2018 06:57:46 +0000 (08:57 +0200)]
backport-include: backport kvmalloc and kvmalloc_array
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Felix Fietkau [Thu, 6 Sep 2018 06:57:45 +0000 (08:57 +0200)]
backports: copy linux/overflow.h
Overflow macros are useful for further backports
Signed-off-by: Felix Fietkau <nbd@nbd.name>
John Crispin [Thu, 6 Sep 2018 04:41:11 +0000 (06:41 +0200)]
backport: v4.19 compat patches
Signed-off-by: John Crispin <john@phrozen.org>
John Crispin [Wed, 1 Aug 2018 15:06:15 +0000 (17:06 +0200)]
backport: refresh patches for v4.19.5
Signed-off-by: John Crispin <john@phrozen.org>
Winnie Chang [Wed, 22 Aug 2018 03:06:05 +0000 (22:06 -0500)]
backports: add header file for function memcmp
Function memcmp is implicit declaration on kernel 4.9.88 ARM platform.
backport-include/keys/asymmetric-type.h uses function memcmp but its
caller compat/verification/verify.c and all its related header files
do not include string.h. The header file is usually included from
arch/arm/include/asm, but in this configuration, it doesn't. We need
to be safe and insure string.h is there.
Signed-off-by: Winnie Chang <winnie.chang@cypress.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 25 Jun 2018 16:37:56 +0000 (18:37 +0200)]
backports: genl: fix family->family.id access
If compiling on 3.13, struct genl_family isn't actually
struct backport_genl_family, and then family->family
doesn't exist. In other cases, it's actually necessary
to update it, so add an #ifdef with the same logic as
the override from genl_family -> backport_genl_family.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Aaron Komisar [Thu, 24 May 2018 10:57:33 +0000 (13:57 +0300)]
backports: update id field in backports genl family
Family ID from the original family struct will be used when building
genl messages (sent as nlmsg_type), so the new id should be updated in
the original (older kernel format) family struct too
Signed-off-by: Aaron Komisar <aaron.komisar@tandemg.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 9 May 2018 07:55:12 +0000 (09:55 +0200)]
spatch: adjust to and require 1.0.6
The spatch tool made an incompatible change in the
attribute syntax, adjust to that and require the
new version.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arend Van Spriel [Mon, 30 Apr 2018 11:15:46 +0000 (13:15 +0200)]
backport-include: deal with struct sock::sk_pacing_shift
In kernel 4.15 the field sk_pacing_shift was introduced to allow
(wifi) drivers to change the behaviour of TSQ. In 4.16 a helper
function was added which mac80211 is using. So backport the helper
which is just a stub for kernels prior to 4.15.
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arend Van Spriel [Mon, 30 Apr 2018 11:15:45 +0000 (13:15 +0200)]
backport-include: add ETH_P_PREAUTH definition in if_ether.h
This macro definition was added in 4.17-rc1 and used by mac80211
so add it to backport.
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Arend Van Spriel [Mon, 30 Apr 2018 11:15:44 +0000 (13:15 +0200)]
patches: update patches for v4.17-rc1
Few patches do not apply to source code in v4.17-rc1 so updating
those.
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 26 Apr 2018 10:25:40 +0000 (12:25 +0200)]
gitignore: add .cache.mk
This seems to be generated by newer kernels when building,
add it to the gitignore.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Winnie Chang [Thu, 19 Apr 2018 06:11:58 +0000 (01:11 -0500)]
backports: rename *-asn1.[ch] to *.asn1.[ch]
linux-stable
4fa8bc949de11c99ee2433c602d43f87c452f4f2 renamed
*-asn1.[ch] files to *.asn1.[ch]. Make the corresponding change
for backports.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:17 +0000 (23:57 +0100)]
backports: Add staging rtlwifi, rtl8188eu and rtl8723bs driver
This adds the staging Realtek drivers which are making use of cfg80211
and mac80211.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:16 +0000 (23:57 +0100)]
dependencies: Make mt76 depend on kernel 4.1
The mt76 driver uses the devm_led_classdev_register() function which
was added in kernel 4.1, do not build this driver on older kernel
versions.
It is probably not so hard to make this driver also work on older kernel
versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:15 +0000 (23:57 +0100)]
header: inet_frag.h: Use old version of in sub_frag_mem_limit() for kernel 3.16
In Linux commit
d19c3d91d1cf3 ("Revert "net: use lib/percpu_counter API
for fragmentation mem accounting"") the sub_frag_mem_limit() and
add_frag_mem_limit() functions were changed back to the old versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:14 +0000 (23:57 +0100)]
header: netdevice.h: Fix netdev_upper_dev_link on 4.14
Commit
42ab19ee90292 ("net: Add extack to upper device linking") which
added an extra parameter to netdev_upper_dev_link() was added with
kernel 4.15 and was not backported to kernel 4.14, activate this
backport already for kernel 4.14.
Fixes: 8cdd85766293 ("backports: add netdev_upper_dev_link() extack argument")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:13 +0000 (23:57 +0100)]
header: timekeeping.h: Add ktime_get_ts64()
This function was added in commit
d6d29896c665d ("timekeeping: Provide
timespec64 based interfaces"). We can just use the 32 bit version
instated as the rest was already backported in backports commit
ea8b7cd797ca0c ("backports: deal with struct timespec64 changes)".
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:12 +0000 (23:57 +0100)]
header: timekeeping.h: Add ktime_get_real_seconds()
This function was added in commit
dbe7aa622db96b ("timekeeping: Provide
y2038 safe accessor to the seconds portion of CLOCK_REALTIME") and is
used by multiple realtek drivers.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:11 +0000 (23:57 +0100)]
header: nospec.h: provide dummy header file
Older kernel versions do not have the include linux/nospec.h with the
function array_index_nospec, provide a dummy implementation for these
kernel versions and forward the call the the real version for capable
kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:10 +0000 (23:57 +0100)]
header: debugfs.h: add DEFINE_DEBUGFS_ATTRIBUTE
DEFINE_DEBUGFS_ATTRIBUTE and debugfs_create_file_unsafe() were
introduced in mainline commit
c6468808149 ("debugfs: add support for
self-protecting attribute file fops"), but on older kernel versions
where we do not have this extra security in debugfs we can use the older
functions instead.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:09 +0000 (23:57 +0100)]
header: kernel.h: include bug.h
This prevents some compile problems in rtlwifi.
Without this patch I am getting a compile error in
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/table.c with multiple
kernel versions because BUILD_BUG_ON_ZERO is implicitly defined.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:08 +0000 (23:57 +0100)]
header: types.h: add __poll_t
__poll_t was added for kernel 4.15 in commit
8ced390c2b ("define
__poll_t, annotate constants"), add it here for older kernel versions.
Multiple drivers are using this type.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:07 +0000 (23:57 +0100)]
backport: poll.h: add include linux/eventpoll.h
The POLL constants are getting replaced with the EPOLL constants. In
this process commit
e78cd95bebd9 ("preparation to switching ->poll() to
returning EPOLL...") added an additional include to linux/poll.h. Some
drivers make use of this indirect include now and fail to compile
without it.
Older kernel versions do not define all the EPON constants so add them
if they are not available.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:06 +0000 (23:57 +0100)]
patches: Use old parameter type for DEFINE_TIMER
Use the unsigned long parameters on kernel versions < 4.15 for the
DEFINE_TIMER callback. This was changed in Linux mainline commit
24ed960abf1d ("treewide: Switch DEFINE_TIMER callbacks to struct
timer_list *")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:05 +0000 (23:57 +0100)]
compat: timer.h: Remove last parameters from DEFINE_TIMER
DEFINE_TIMER only has 2 parameters since kernel commit
1d27e3e2252ba
("timer: Remove expires and data arguments from DEFINE_TIMER") which was
added with kernel 4.15. Add a version which translates between the new
and the old API.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 4 Mar 2018 22:57:04 +0000 (23:57 +0100)]
patches: refresh on kernel v4.16-rc3
No manual changes needed.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Wed, 28 Feb 2018 19:24:17 +0000 (21:24 +0200)]
backport: move percpu.h file to the correct location
Mistakenly, the percpu.h file was added to a new backport-include
directory at the root. It should be in the proper location at
backport/backport-include instead. Fix that.
Fixes: a4c44dbee35d ("backport: implement alloc_percpu_gfp() for < 3.18.")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sara Sharon [Sun, 18 Feb 2018 13:24:59 +0000 (15:24 +0200)]
backport: implement alloc_percpu_gfp() for < 3.18.
mac80211 now uses the alloc_percpu_gfp() function, which doesn't exist
in kernels older than 3.18. Backport it accordingly.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:58 +0000 (15:24 +0200)]
backport: increase max stack frame size compiler check to 1280
The verification code has some large data variables that are allocated
in the stack. Increase the maximum stack frame size in the compiler
check slightly (from 1024 to 1280) to prevent harmless warnings.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:57 +0000 (15:24 +0200)]
backport: remove stddef.h inclusions
The verification code was copied from userspace code which includes
stddef.h. In the kernel, this header should not be included, so
remove those cases.
Fixes: 988e2af4b7a0 ("backports: add signature verification code")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:56 +0000 (15:24 +0200)]
backports: fix typo "TIMKEEPING" and fix gfp.h
There is a typo in the timekeeping.h backport, fix that.
Additionally, fix the gfp.h file tha has a copy/paste issue where
__BACKPORT_TIMKEEPING_H is used instead of __BACKPORT_LINUX_GFP_H.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:55 +0000 (15:24 +0200)]
backport: add new build_bug.h file
Some of the code in bug.h was moved into a new build_bug.h file. Add
a backport that includes bug.h in the case of older kernels.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:54 +0000 (15:24 +0200)]
backport: remove pkcs7_verify.c patch hunk
The change that used to be patched into the pkcs7_verify.c file is now
part of newer kernels, so we don't need to patch it anymore. Remove
this hunk from verify.patch accordingly.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:53 +0000 (15:24 +0200)]
backport: update genl_dump_check_consistent() backport
The genl_dump_check_consistent() function was changed in v4.15 to use
only two arguments. The family is not needed anymore, because we were
erroneously subtracting the header size and that was fixed in v4.15.
Since the family was only used to check the header size, we can create
a dummy with hdrsize = 0, which will allow us to call the old version
of the function. There is a good side-effect to doing this: the bug
is going to be fixed, because with hdrsize = 0 we will not subtract
anything and it will have the same effect as the fix.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:52 +0000 (15:24 +0200)]
backport: include lib/bucket_locks.c
The alloc/free_bucket_spinlocks() functions were moved to a new lib
file, namely bucket_locks.c. Add an auto-backport for the
bucket_locks.c file and move the patching of the code that moved from
rhashtable to bucket_locks.c.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:51 +0000 (15:24 +0200)]
backport: add pcie_find_root_port()
This function was introduced in v4.9 and added to 3.12.69, 4.4.37 and
4.8.13.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Sun, 18 Feb 2018 13:24:50 +0000 (15:24 +0200)]
compat: only define thermal backports if CONFIG_THERMAL is enabled
If CONFIG_THERMAL is not enabled, we don't have to add all backports
for the thermal framework. Actually this doesn't even work because we
try to use thermal_zone_device_register/unregister and they are not
present in the outer kernel, causing undefined symbols warnings:
WARNING: "thermal_zone_device_register" [/home/luca/iwlwifi/stack-dev/compat/compat.ko] undefined!
WARNING: "thermal_zone_device_unregister" [/home/luca/iwlwifi/stack-dev/compat/compat.ko] undefined!
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Winnie Chang [Fri, 19 Jan 2018 08:02:21 +0000 (02:02 -0600)]
backports: include linux/err.h in key.c
Function IS_ERR, PTR_ERR and ERR_PTR are not found. Need to include
linux/err.h to fix compiling errors.
Signed-off-by: Winnie Chang <winnie.chang@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Chi-Hsien Lin [Mon, 11 Dec 2017 08:21:14 +0000 (02:21 -0600)]
backports: clean up kconf/conf when doing make mrproper
kconf/ is built during "make defconfig-*" but not cleaned up during
"make mrproper" or "make clean". Add the clean up work to "make clean".
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Mon, 20 Nov 2017 18:01:32 +0000 (19:01 +0100)]
backports: fix nlmsg_type on responses with extack backport
This is filled with family->id, which needs to be set after registering
the copy.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 17 Nov 2017 09:49:10 +0000 (10:49 +0100)]
backports: make extack backport compile on <3.13
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Luca Coelho [Thu, 2 Nov 2017 09:59:35 +0000 (11:59 +0200)]
patches: pre-declare stats64_fn_wrap() to avoid sparse warnings
The stats64_fn_wrap() function was changed to be not-static so it can
be used by usbnet. This causes problems in files that don't export
it. Work around that byt just pre-declaring it before the actual
definition.
Fixes: 5a00d8489c7 ("patches: adapt the stat64 usage for usbnet")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Thu, 16 Nov 2017 14:38:55 +0000 (15:38 +0100)]
backports: fix missing linux/verification.h error on < 4.7
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Thu, 16 Nov 2017 14:38:54 +0000 (15:38 +0100)]
backports: fix events with extack backport
The multicast group offset needs to be synced after registering the
family, otherwise multicast messages will use the wrong id
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Thu, 16 Nov 2017 14:38:53 +0000 (15:38 +0100)]
backport-include: backport skb_get_hash_perturb
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Felix Fietkau [Thu, 16 Nov 2017 14:38:52 +0000 (15:38 +0100)]
kconf: sync with upstream version
37861ffa8c28
Adds support for the imply keyword
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 13 Nov 2017 07:57:05 +0000 (08:57 +0100)]
backports: netlink extack: Allow ext_ack to carry non-error messages
Backport upstream
commit
4f6265d485ea0a2507692ded8ed47b323f49587c
Author: David Ahern <dsahern@gmail.com>
Date: Fri Oct 27 17:37:12 2017 -0700
netlink: Allow ext_ack to carry non-error messages
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 26 Oct 2017 08:22:53 +0000 (10:22 +0200)]
backports: fix the extack backport for dumps
I also never seem to have really tested unload after dumps,
and using the family->attrbuf was causing memory corruption
in the copied family.
Fix this by keeping track of the family copies separately
and actually copying the attrbuf over so the family can use
it from there.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 24 Oct 2017 14:08:48 +0000 (16:08 +0200)]
backports: fix the extack backport
I neglected to take into account that the spatch will also
be applied to the backport-4.12.c file itself, fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 16 Oct 2017 19:48:21 +0000 (21:48 +0200)]
backports: fully add netlink extack for generic netlink
The previous backport just made the code compatible, but removed
the extack functionality entirely.
By ignoring the setsockopt() and just assuming that userspace does
in fact support extack (which is true for all of wifi and in fact
all users of libnl), we can support full extack functionality even
on kernels that don't support it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 13:54:24 +0000 (15:54 +0200)]
ckmake: use white instead of blue
Blue on black is really hard to read, use white on black.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 12:27:32 +0000 (14:27 +0200)]
gentree: mangle $(srctree)/$(src) directly
We used to patch this, before with the genregdb and now with
the shipped-certs.c generation - just fix it in code instead
so we don't have to deal with different patches.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 10:26:23 +0000 (12:26 +0200)]
backports: remove CRYPTO_CCM backport
This never actually worked properly as far as I can tell,
and now it looks like it won't even compile due to the
real crypto_memneq() backport.
Just remove it - distro kernels have it enabled and all
others should just enable it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 10:18:06 +0000 (12:18 +0200)]
backports: reduce mbedtls bignum stack usage
mbedtls_mpi_exp_mod() uses almost 4k of memory, which
really shouldn't be on the stack in the kernel.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 10:03:58 +0000 (12:03 +0200)]
backports: add fixed version of __verify_pcpu_ptr
Some parts of the code (ath_cmn_is_fft_buf_full) use a per-CPU
pointer to an array, so we need to backport the fixed version
or this fails to compile in 3.10/3.11.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 09:25:44 +0000 (11:25 +0200)]
backports: no longer support kernels < 3.10
Since CRYPTO_CMAC was introduced in 3.10, and mac80211
depends on it, we basically get nothing out of it anyway.
I'm not removing the support code (yet) since it actually
compiles, and perhaps somebody has a need for (certain)
kernel versions lower than 3.10.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 09:41:24 +0000 (11:41 +0200)]
backports-update-manager: use KPATH variable
There's already a variable for the URL, use it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 09:02:49 +0000 (11:02 +0200)]
backports: RSI_SDIO depends on 3.13
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 08:49:05 +0000 (10:49 +0200)]
backports: make QTNFMAC_PEARL_PCIE depend on 3.13
It needs pcie_get_mps() which was only exported in that kernel.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 08:48:42 +0000 (10:48 +0200)]
backports: add netdev_upper_dev_link() extack argument
But make it optional (using magic.h) to let this still work
on kernels that didn't change the argument.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Oct 2017 12:10:08 +0000 (14:10 +0200)]
backports: add signature verification code
Uh, this was awful. Because the crypto/ things are completely
impossible to backport, I've actually implemented this by using
mbedtls and embedding the relevant functions it has...
The mbedtls code is taken from mbedtls version 2.6.0 and only
minimally modified (mostly to remove <string.h> and similar).
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Oct 2017 20:53:09 +0000 (22:53 +0200)]
backports: add bin2hex()
This is needed in the key backports in the next patch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 13 Oct 2017 08:38:47 +0000 (10:38 +0200)]
backports: add hex_byte_pack
This was just renamed at some point, needed by bin2hex()
in the next patch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Oct 2017 12:20:35 +0000 (14:20 +0200)]
copy-list: move mpls includes
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Oct 2017 12:36:48 +0000 (14:36 +0200)]
backports: add mktime64()
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Oct 2017 12:08:59 +0000 (14:08 +0200)]
backports: move headers to be clearer
Those uapi header files are always needed, so don't mark them as
being for wwan drivers.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Oct 2017 09:27:55 +0000 (11:27 +0200)]
backports: add -Wno-pointer-sign on <= 4.3
This gives annoyingly many warnings on such kernels.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 12 Oct 2017 08:44:49 +0000 (10:44 +0200)]
gentree: add --git-debug as alias to --gitdebug
I always find myself typing --git-debug, so let's just add that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 11 Oct 2017 14:30:27 +0000 (16:30 +0200)]
backports: add crypto_memneq()
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 11 Oct 2017 14:01:22 +0000 (16:01 +0200)]
backports: add OPTIMIZER_HIDE_VAR
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 11 Oct 2017 13:42:50 +0000 (15:42 +0200)]
backports: remove genregdb Makefile change
This piece of code no longer exists.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 11 Oct 2017 13:41:56 +0000 (15:41 +0200)]
backports: backport from_timer() and timer_setup()
These are needed for Kees's new timer API, and luckily
he already provided them for conversion purposes :-)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 11 Oct 2017 13:32:32 +0000 (15:32 +0200)]
backports: fix some dev_coredumpm() problem
Sometimes the argument is const, sometimes not, just cast
away that difference.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 1 Oct 2017 19:38:23 +0000 (21:38 +0200)]
header: fix compile error on PowerPC (PPC_85xx)
Including linux/interrupt.h in linux/hrtimer.h causes this error message
on PowerPC builds on x86, ARM and MIPS it works:
CC [M] /backports-4.14-rc2-1/compat/main.o
In file included from /backports-4.14-rc2-1/backport-include/linux/printk.h:5:0,
from ./include/linux/kernel.h:13,
from /backports-4.14-rc2-1/backport-include/linux/kernel.h:3,
from ./include/linux/list.h:8,
from /backports-4.14-rc2-1/backport-include/linux/list.h:3,
from ./include/linux/module.h:9,
from /backports-4.14-rc2-1/backport-include/linux/module.h:3,
from /backports-4.14-rc2-1/compat/main.c:1:
./include/linux/ratelimit.h: In function 'ratelimit_state_exit':
./include/linux/ratelimit.h:62:11: error: dereferencing pointer to incomplete type 'struct task_struct'
current->comm, rs->missed);
^
./include/linux/printk.h:279:37: note: in definition of macro 'pr_warning'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^
./include/linux/ratelimit.h:61:3: note: in expansion of macro 'pr_warn'
pr_warn("%s: %d output lines suppressed due to ratelimiting\n",
^
The backport of the hrtimer_start() functions needs the
linux/interrupt.h because some parts are defined there. Fix this by
moving the hrtimer_start() backport to the linux/interrupt.h backport
header file.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 17 Sep 2017 16:58:13 +0000 (18:58 +0200)]
header: add ether_addr_to_u64() and u64_to_ether_addr()
These function were added in commit
5952758101 ("dsa: mv88e6xxx:
Optimise atu_get") and are now used by mwifiex.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 17 Sep 2017 16:58:12 +0000 (18:58 +0200)]
header: add UUID_STRING_LEN
This was added in commit
2b1b0d6670 ("lib/uuid.c: introduce a few more
generic helpers") and is used by ath10k.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 17 Sep 2017 16:58:11 +0000 (18:58 +0200)]
header: add uuid backports
This backports the following upstream commits:
f9727a17db9: ("uuid: rename uuid types")
df33767d9fe: ("uuid: hoist helpers uuid_equal() and uuid_copy() from xfs")
ath10k now makes use of them.
Some parts should go into the uapi/linux/uuid.h file, but
then #include_next hack is not working correctly any more, so place it
all into the normal file.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 17 Sep 2017 16:58:10 +0000 (18:58 +0200)]
patches: refresh patches on v4.14-rc1
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 15 Sep 2017 07:32:09 +0000 (09:32 +0200)]
backports: remove pm_system_wakeup(), add MWIFIEX dependency
Since only MWIFIEX needs pm_system_wakeup(), and that can't be
backported properly, remove it again and add a dependency for
MWIFIEX on kernel 3.18.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 11 Sep 2017 14:50:19 +0000 (16:50 +0200)]
patches: include export.h in lib/refcount.c
This isn't automatically included in all kernels, include
it explicitly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Mon, 11 Sep 2017 14:49:42 +0000 (16:49 +0200)]
backports: add devm_add_action()
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:20 +0000 (00:10 +0200)]
dependencies: make MWIFIEX_PCIE depend on kernel > 3.16
This driver needs the reset_notify member from the struct
pci_error_handlers.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:19 +0000 (00:10 +0200)]
dependencies: make NFC_TRF7970A depend on kernel > 3.17
devm_gpiod_get_index_optional() with flags attribute was added with
kernel 3.17, do not build drivers using it on older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:18 +0000 (00:10 +0200)]
header: add pm_system_wakeup()
This function was added in kernel 3.18 in commit
068765ba7987e ("PM /
sleep: Mechanism for aborting system suspends unconditionally") In our
implementation we only call pm_system_wakeup(() and do not handle the
abortion of the current suspend process.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:17 +0000 (00:10 +0200)]
header: add __get_dynamic_array_len
This was added in kernel 3.16 in commit
beba4bb096201 ("tracing: Add
__get_dynamic_array_len() macro for trace events")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:16 +0000 (00:10 +0200)]
header: add IOMEM_ERR_PTR()
This was added in kernel 3.17 in commit
efd342fb0031a1 ("of: Provide a
function to request and map memory")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:15 +0000 (00:10 +0200)]
backport: add ethtool_convert_legacy_u32_to_link_mode()
This function was added in kernel 4.7 in commit
6d62b4d5fac62 ("net:
ethtool: export conversion function between u32 and link mode") and is
used by mii_ethtool_get_link_ksettings() in the backport-4.10.c file.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:14 +0000 (00:10 +0200)]
patches: brcmfmac: Fix netdev_set_priv_destructor
On kernel > 4.11.9 the new member priv_destructor should be set in
netdev_set_priv_destructor() and not the old destructor member any more,
it was removed.
This fixes the build on >= 4.11.9.
Fixes: 7c827d5ac9c1 ("patches: brcmfmac: fix netdev destructor")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Sun, 10 Sep 2017 22:10:13 +0000 (00:10 +0200)]
patches: export bp_usbnet_get_stats64() only if function is added
Export the bp_usbnet_get_stats64() function only on kernel < 4.11,
because this function is only available on such kernel versions.
Fixes: 5a00d8489c7 ("patches: adapt the stat64 usage for usbnet")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 14:41:14 +0000 (16:41 +0200)]
backports: add trace_seq_buffer_ptr() where needed
Some new code needs this, add it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 14:40:43 +0000 (16:40 +0200)]
backport: add some ethtool conversion functions
These weren't always exported, so we need them on some kernels.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 13:53:30 +0000 (15:53 +0200)]
Revert to using pycocci
This reverts commit
3756f63528b044d6487bac046ad2972bc21583a5
and commit
709e720caa66816f32c6adc6050549fa40b9cf52 since
using built-in concurrency caused problems with --cocci-grep,
and not using that makes things slower.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 13:32:22 +0000 (15:32 +0200)]
gentree: remove --use-coccigrep
This is causing trouble, remove it for now.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:08 +0000 (00:28 +0200)]
compat: avoid usage of kvzalloc() in rhashtable.c
This reverts commit
12e8fd6fd3802 ("lib/rhashtable.c: use kvzalloc() in
bucket_table_alloc() when possible") from upstream kernel.
Kernel versions older that 4.12 do not have kvzalloc() try to avoid the
usage of this.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:12 +0000 (00:28 +0200)]
patches: brcmfmac: fix netdev destructor
brcmfmac uses a complicated netdev destructor handling. The
brcmf_net_attach() function just adds a normal destructor and later the
brcmf_add_if() function sets the needs_free_netdev callback.
The normal spatch was not applied correctly to this file, add a patch
before to try to fx this problem manually.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 13:18:19 +0000 (15:18 +0200)]
backports-update-manager: split --force into --yes and --no-keep
--yes allows skipping the question
--no-keep allows removing all installed data and reinstalling
--force does both (as before)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 12:36:16 +0000 (14:36 +0200)]
backport-update-manager: automatically get list of ubuntu kernels
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 10:04:08 +0000 (12:04 +0200)]
add (automatic) refcount backport
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 8 Sep 2017 11:24:27 +0000 (13:24 +0200)]
headers: atomic: add atomic_try_cmpxchg()
This is needed for the refcount code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>