summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-09-24backport: add patch to ignore iwlwifi removal on < 3.14 kernelsLuca Coelho
The iwlwifi driver has a workaround for some PCI bugs that require it to be removed and reinserted. Unfortunately, this doesn'w work on kernels < 3.14, so ignore the actual work function in that case and print out a message instead. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> [rename patch to have a number prefix] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backport: introduce match_string() for kernels < 4.6Luca Coelho
This function was introduced in v4.6 and now the iwlwifi driver uses it. Add the function for kernels older than v4.6. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backports: add wait_event_killable_timeout backport supportShahar S Matityahu
Allow using wait_event_killable_timeout function in kernel older then 4.13 Signed-off-by: Shahar S Matityahu <shahar.s.matityahu@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backport: fix compilation with IPV6 not setLuca Coelho
At least in some older kernel versions (e.g. 3.10), the tcp.h header file is not implicitly included from other headers if CONFIG_IPV6 is not set, so we need to include it in backport-4.4.c. Also, there is an IPv6 structure that is used, so we should ifdef it away when IPv6 is not enabled. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backports: add strreplace()Winnie Chang
wireless-drivers-next.git commit cb18e2e9ec71 (brcmfmac: fix wrong strnchr usage) used strreplace(), which is not available in kernel prior to v4.2. Before this commit proprgates to linux-stable.git, add strreplace() to avoid gentree failure. 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>
2018-09-24backports: use := assignment for subdir-ccflags-y using cc-optionJohannes Berg
In newer kernels, calling cc-option will use KBUILD_CFLAGS, which itself gets subdir-ccflags-y added to it. Thus, we get it referencing itself, since nothing here is evaluated until KBUILD_CFLAGS is used: KBUILD_CFLAGS contains subdir-ccflags-y, that in turn contains cc-option call, containing KBUILD_CFLAGS. To avoid that, use := assignment to subdir-ccflags-y, meaning the cc-option call is done right away and we don't end up with KBUILD_CFLAGS referencing itself. Note that this is the first assignment to subdir-ccflags-y, so the += was never necessary. This fixes build of the driver on kernels 4.15 and higher. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-19header: Add ktime_get_raw_ts64()Hauke Mehrtens
ktime_get_raw_ts64() uses the old function which was renamed. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> [fix typo in commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-19header: Add u64_stats_update_{begin,end}_irqsave()Hauke Mehrtens
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>
2018-09-19header: Add NL_SET_BAD_ATTRHauke Mehrtens
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>
2018-09-19patches: make patches apply with kernel 4.19Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-19patches: Adapt to new select queue APIHauke Mehrtens
The select queue API was changed in upstream commit 4f49dec9075a ("net: allow ndo_select_queue to pass netdev"). This patch adds a new version of the API for kernel < 4.19 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-19header: Add kvzalloc()Hauke Mehrtens
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>
2018-09-19backports: Remove unused partsHauke Mehrtens
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>
2018-09-19backports: speed up netdev destructor spatch by two orders of magnitudeJohannes Berg
As reported by Hauke, and analyzed by Julia, the netdev destructor spatch is really slow because <... ...> means 0 or more hits, and thus the spatch has to be applied on all files. However, we don't really need it to be this way, so use <+... ...+> which allows it to reject almost all files immediately, cutting down the processing time by more than two orders of magnitude as it only has to touch a handful of files, rather than all. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-12gentree: bump coccinelle/spatch requirement to 1.0.7Johannes Berg
The 1.0.6 release was actually not compatible with the attribute name syntax we use, and the confusion around 1.0.7 finally got cleared up, and that should work. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backports: crypto_memneq has been backported to 3.12 and 3.10Alban Bedel
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>
2018-09-10backports: backport sg_init_marker()Felix Fietkau
It is used by new mt76 changes Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backport: add firmware_request_nowarn and firmware_request_cacheFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backport: copy net/rsi_91x.hFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backport-include: backport ktime_get_boottime_secondsFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10patches: remove lib-bucket_locks.patchFelix Fietkau
Obsoleted by kvmalloc/kvmalloc_array backport Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backport-include: backport kvmalloc and kvmalloc_arrayFelix Fietkau
Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10backports: copy linux/overflow.hFelix Fietkau
Overflow macros are useful for further backports Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-08-22backports: add header file for function memcmpWinnie Chang
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>
2018-06-25backports: genl: fix family->family.id accessJohannes Berg
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>
2018-06-04backports: update id field in backports genl familyAaron Komisar
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>
2018-05-09spatch: adjust to and require 1.0.6Johannes Berg
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>
2018-05-02backport-include: deal with struct sock::sk_pacing_shiftArend Van Spriel
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>
2018-05-02backport-include: add ETH_P_PREAUTH definition in if_ether.hArend Van Spriel
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>
2018-05-02patches: update patches for v4.17-rc1Arend Van Spriel
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>
2018-04-26gitignore: add .cache.mkJohannes Berg
This seems to be generated by newer kernels when building, add it to the gitignore. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-04-26backports: rename *-asn1.[ch] to *.asn1.[ch]Winnie Chang
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>
2018-03-21backports: Add staging rtlwifi, rtl8188eu and rtl8723bs driverHauke Mehrtens
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>
2018-03-21dependencies: Make mt76 depend on kernel 4.1Hauke Mehrtens
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>
2018-03-21header: inet_frag.h: Use old version of in sub_frag_mem_limit() for kernel 3.16Hauke Mehrtens
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>
2018-03-21header: netdevice.h: Fix netdev_upper_dev_link on 4.14Hauke Mehrtens
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>
2018-03-21header: timekeeping.h: Add ktime_get_ts64()Hauke Mehrtens
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>
2018-03-21header: timekeeping.h: Add ktime_get_real_seconds()Hauke Mehrtens
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>
2018-03-21header: nospec.h: provide dummy header fileHauke Mehrtens
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>
2018-03-21header: debugfs.h: add DEFINE_DEBUGFS_ATTRIBUTEHauke Mehrtens
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>
2018-03-21header: kernel.h: include bug.hHauke Mehrtens
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>
2018-03-21header: types.h: add __poll_tHauke Mehrtens
__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>
2018-03-21backport: poll.h: add include linux/eventpoll.hHauke Mehrtens
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>
2018-03-21patches: Use old parameter type for DEFINE_TIMERHauke Mehrtens
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>
2018-03-21compat: timer.h: Remove last parameters from DEFINE_TIMERHauke Mehrtens
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>
2018-03-21patches: refresh on kernel v4.16-rc3Hauke Mehrtens
No manual changes needed. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-02-28backport: move percpu.h file to the correct locationLuca Coelho
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>
2018-02-23backport: implement alloc_percpu_gfp() for < 3.18.Sara Sharon
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>
2018-02-23backport: increase max stack frame size compiler check to 1280Luca Coelho
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>
2018-02-23backport: remove stddef.h inclusionsLuca Coelho
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>