Age | Commit message (Collapse) | Author |
|
These functions are currently used by the usbnet driver.
These functions were introduced in upstream commit 2695578b896ae ("net:
usbnet: fix potential deadlock on 32bit hosts")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
This is used by the mac80211_hwsim driver. The code was copied from the
mainline kernel.
This was introduced in mainline kernel commit c3ab2b4ec8f7 ("net: ipv4:
Add extack messages for route add failures")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
This adds the kvzalloc() function and allows it to remove the
lib-rhashtable.patch patch.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
[fix commit message kzalloc -> kvzalloc]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
This removes parts which were only used by subsystems which are not
included in backports any more, for example media, bluetooth and
Ethernet.
The patches which are removed in this commit are not applied to the
kernel tree anyway with the default configuration because non of the
files get copied. The freezer, media, regulator and sound parts were
only used by the already removed media drivers. The flow dissector file
is not copied any more.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
crypto_memneq has been backported in 3.12.59 and 3.10.106, it
shouldn't be built for these kernels.
Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
It is used by new mt76 changes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
This seems to be generated by newer kernels when building,
add it to the gitignore.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
__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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
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>
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
Adds support for the imply keyword
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|