summaryrefslogtreecommitdiff
path: root/backport/backport-include
AgeCommit message (Collapse)Author
2019-02-21Revert "backports: Remove unused parts"Dominik Sliwa
This reverts commit ab3fd3b9a801a9faa2619e2e65207e736f859a6d.
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>
2019-01-26backports: Add nl_set_extack_cookie_u64()Hauke Mehrtens
This was introduced in Linux commit 801f87469ee8 ("netlink: add nl_set_extack_cookie_u64()") and is used by the wireless subsystem. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-01-26backports: Add DEFINE_SHOW_ATTRIBUTE macroHauke Mehrtens
This was introduced in Linux commit a08f06bb7a07 ("seq_file: Introduce DEFINE_SHOW_ATTRIBUTE() helper macro" and is used by the cw1200 and the wil6210 driver. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2019-01-26backports: Remove get_user_pages() functionsHauke Mehrtens
These functions are not used by any driver any more, remove them. They were introduced for the frame vector code which was used by the media subsystem. They also case some compile problems with kernel 4.4 which get fixed by just removing this code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-12-06backports: Add device_get_mac_address()Hauke Mehrtens
This was added in upstream commit 4c96b7dc0d39 ("Add a matching set of device_ functions for determining mac/phy") and is used by ath10k now. In the mainline kernel it uses device_property_read_u8_array(), but that was only introduced in kernel 3.18, use of_property_read_u8_array() only on all kernel versions where this backport is needed which was added much earlier. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-12-06backports: Add page_frag_alloc() and __page_frag_cache_drain()Hauke Mehrtens
This was introduced in kernel commit 8c2dd3e4a4b ("mm: rename __alloc_page_frag to page_frag_alloc and __free_page_frag to page_frag_free") and commit 44fdffd7050 ("mm: add support for releasing multiple instances of a page") and is used by the mt76 driver. Backporting it to kernel older than 4.2 is harder so just do it till that version. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-12-06backports: Add page_ref_count() and page_ref_sub_and_test()Hauke Mehrtens
This was introduced in kernel commit fe896d18789 ("mm: introduce page reference manipulation functions") and will be used by __page_frag_cache_drain() in the next commit. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-12-06backports: Remove BPAUTO_CRYPTO_SKCIPHERHauke Mehrtens
This was added in commit 32751c901728 ("backport: add crypto skcipher interface"), but all the drivers which need it were deactivated in commit cdcec8e6128 ("backports: disable things needing LIB80211 unless SKCIPHER can exist") because it does not compile any more. Remove this code now completely from the tree. lib80211 does not use skcipher any more, but directly uses the crpyto API. since kernel 4.20. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2018-12-03backports: Fix pci_alloc_irq_vectors() backportHauke Mehrtens
This copies the pci_alloc_irq_vectors() function from kernel 4.9 and replaces the __pci_enable_msi{x}_range() calls with calls to pci_enable_msi{x}_range(), these were backported to kernel versions < 3.14, so no need to handle the older kernels specially here. This also adds support for MSIx IRQs and adds the PCI_IRQ_* defines. Fixes: 162a6b312f1b ("add support for pci_alloc_irq_vectors") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: Omer Dagan <omer.dagan@tandemg.com>
2018-11-05add support for pci_alloc_irq_vectorsOmer Dagan
add support for function in kernels under 4.8 function is a wrapper around 'pci_enable_msi_block' or 'pci_enable_msi_range' depending on the kernel version the min\max number of interrupts was overridden to always use the max number of interrupts which seems correct since it was not supported in the old APIs Signed-off-by: Omer Dagan <omer.dagan@tandemg.com> [use GPL expert as everything in backports, remove unused ifdef] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-10-02backports: genetlink: update completelyJohannes Berg
Replace all the different nested versions of generic netlink backport with a single one, covering from < 3.13 all the way to the upcoming netlink policy improvements in 4.20. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-10-02backports: add __skb_peek()Johannes Berg
New API slated to show up in 4.20. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-10-02backports: backport most of improved netlink policy validationJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-10-02backports: fix genlmsg_nlhdr() backportJohannes Berg
Since 4.15 this no longer takes a family argument, so add that to the backports instead of trying to work around the family argument having changed type. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-10-02backports: rename magic functions for netlink parsingJohannes Berg
Make all the magic variable argument calls inlines and rename them so we can override them more easily later. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-10-02Revert "backports: crypto_memneq has been backported to 3.12 and 3.10"Johannes Berg
This reverts commit 1b481348b4564970e3cfa04023f1cc22ce2b6931. It actually broke the build to include this, as memneq.c is always built for kernels < 3.13, and thus we get a duplicate symbol export if we skip the backport definitions. Easier than making the build system depend on the strange versions is to just always use our backported version with symbol rename. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-10-02backport: check Ubuntu kernel for u64_stats_update_begin_irqsave()Luca Coelho
Ubuntu cherry-picked the patch that added u64_stat_update_begin_irqsave() in their 4.15 kernel, so we get a redefinition compilation error if we try to compile against that. To solve this, check UTS_UBUNTU_RELEASE_ABI and don't define our backported function if it's 33 or higher. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-25backports: add pm_runtime_force_suspend/pm_runtime_force_resumeJohannes Berg
We can't really backport those, but add them anyway for compilation, perhaps somebody doesn't want to suspend/resume? Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-25backports: Add 3. parameter to of_dma_configure()Hauke Mehrtens
With commit 3d6ce86ee794 ("drivers: remove force dma flag from buses") in kernel 4.18 of_dma_configure() got the extra parameter force_dma. This is backported by setting the force_dma member which was added in commit d89e2378a97f ("drivers: flag buses which demand DMA configuration") in kernel 4.15. In older kernel versions we just ignore this parameter as the of_dma_configure() function internally takes care of setting this correctly. Since commit 7b07cbefb68d ("iommu: of: Handle IOMMU lookup failure with deferred probing or error") in kernel 4.12 this function returns int and not void any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24Revert "backports: Remove ssb and bcma"Johannes Berg
This reverts commit 1b4e6ad4d927c7998fa578f2d29e0c4ec01a9217. Said commit broke b43 on older kernels (<3.16). Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backports: add kmemleak.hJohannes Berg
This is just a forward include, but earlier versions don't include linux/types.h despite relying on it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backport: add ktime_get_raw_ts64() backport for < 3.19Luca Coelho
The getrawmonotonic64() function that is used by the ktime_get_raw_ts64() backport was only introduced in 3.19. To fix compilation with earlier kernels, do the convertion from getrawmonotonic() manually if the kernel is < 3.19. Additionally, add timespec_to_timespec64() that we need for this conversion (and which was only introduced in 3.17). Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backports: Remove ssb and bcmaHauke Mehrtens
Use the versions shipped with the kernel instead. bcma and ssb didn't change much in the last few years, most of the changes were related to code only used on embedded devices. Removing this reduces the number of parts we have to backport. b43, b43legacy and brcmsmac work well with the in kernel version. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backports: add __alloc_bucket_spinlocks() for < 4.19Luca Coelho
Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backports: improve skb->xmit_more handlingJohannes Berg
Replace the existing skb->xmit_more semantic patch rule with a more generic one that uses a helper inline function. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backport: update u64_stats_init() to a new version in kernels < 4.2Luca Coelho
The u64_stats_init() macro was turned into a static inline function in v4.2 to prevent warnings that happen when its argument is not used elsewhere. Since we started hitting these warnings, undefine the macro and define the static inline to prevent them. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backport: make ktime_get_boottime_seconds() non-inlineLuca Coelho
With kernels < 3.17, we need to include hrtimer.h to get ktime_divns() for the ktime_get_boottime_seconds() backport. But we can't just include htrtimer.h in the backport timekeeping.h because we run into some cyclical inclusions that cause problems. To solve that make ktime_get_boottime_seconds() non-inline and add it to a new backport-4.18.c file. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-24backport: prevent unused subclass variable warning in < 3.18Luca Coelho
In kernels earlier than 3.18, the raw_spin_lock defininition when CONFIG_DEBUG_LOCK_ALLOC is not enabled, was dropping one of the parameters, which caused a few "unused variable" warnings at places where this argument was only used in the call to raw_spin_lock_nested(). Take the latest definition which evaluates the argument to avoid compiler warnings. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> 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-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-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-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-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-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-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-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-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-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>