summaryrefslogtreecommitdiff
path: root/backport/backport-include/linux
AgeCommit message (Collapse)Author
2017-06-30backport: handle change in netdevice destructor usageArend Van Spriel
This patch deals with changes made in struct net_device by commit cf124db566e6 ("net: Fix inconsistent teardown and release of private netdev state."). Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-06-16backports: add lockdep_rtnl_is_held() for < 3.13 without CONFIG_PROVE_LOCKINGLuca Coelho
In kernels earlier than 3.13, lockdep_rtnl_is_held() is only declared in rtnetlink.h when CONFIG_PROVE_LOCKING is not set. Backport this function if that's the case. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-04-26backports: add the necessary backports for netlink extackJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-03-31backports: provide backport for setup_deferrable_timer()Arend Van Spriel
Since commit f8f118ceaa56 ("mac80211: Use setup_timer instead of init_timer") mac80211 needs setup_deferrable_timer() which is not available in older kernels. Provide a backport in linux/timer.h. Really need two flavors of backport to support up to 3.0 kernel. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-03-31backports: add dummy include/linux/sched/signal.hArend Van Spriel
Simply including linux/sched.h for older kernels not carrying this file. This new include file was introduced by commit 3f07c0144132 ("sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h>"). Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-03-31backports: copy average.h from original kernelJohannes Berg
Instead of maintaining our own version of average.h, just copy the upstream version while generating the backport. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-03-31backports: add backport for idr_removeArend Van Spriel
Since commit d3e709e63e97 ("idr: Return the deleted entry from idr_remove") the function signature changed so provide a backport which does a idr_find() and subsequent idr_remove(). Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-23backports: add definitions S32_MAX and S32_MINArend Van Spriel
Since commit 20e32810bcf4 ("cfg80211: Accept multiple RSSI thresholds for CQM") the backports need to have S32_MAX and S32_MIN which were introduced in kernel.h since v3.14. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-14backports: add "MBIM Extended Functional Descriptor" structure definitionArend Van Spriel
commit 477c6d345604 ("backports: add USB_CDC_MBIM_EXTENDED_TYPE if needed") added define but the structure definition that goes with it is also needed. As they were introduced in the same kernel version we can add the structure with the same #ifndef USB_CDC_MBIM_EXTENDED_TYPE. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-09backports: always use new version compare macrosJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add USB_CDC_MBIM_EXTENDED_TYPE if neededJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: fix version checks for debugfs_real_fops()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: remove some stray whitespaceJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add dev_coredumpsg() where neededJohannes Berg
Add dev_coredumpsg() on kernels where dev_coredumpm() is present but _sg() isn't, and restrict building appropriately. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add cdc_parse_cdc_header()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add linux/gpio/driver.hJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add READ_ONCE and WRITE_ONCEJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add devm_gpio_free()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add strscpy()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: suppress led_set_brightness redefinition warningsJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: always add netdev_rss_key_fill()Johannes Berg
In case we can't do the _once thing, just always get new randomness... it's likely going to happen anyway, and if it's not exposed to userspace we don't have much value in sharing it to start with. While at it, clean it up a bit. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add more OF functionsJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: disable thermal for kernels < 3.8Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add sg_nents()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: include of_device.h into of_platform.hJohannes Berg
Upstream does this now, and people rely on it. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add idr_for_each_entry()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07Revert "backports: only backport kconfig.h macros for < v3.4"Johannes Berg
This reverts commit c154481c1cfa25da4955eaa4a71523cb2abeda58. With Arend's patch, this is no longer needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: restore config_enabled() macroArend van Spriel
Attempted a backport to FC25 4.9.5 kernel and hit issue with IS_BUILTIN() using config_enabled() macro in backport-include/linux/kconfig.h. Fix this by using #ifndef. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add dummy of_dma_configure()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add BUILD_BUG_ON_MSGJohannes Berg
Add it without the message, since that's easier. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: bump rhashtable requirementJohannes Berg
We can no longer use the rhashtable that's built into the kernel in version >4.1, only in versions >4.9 that have the rhltable API. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add __BUILD_BUG_ON_NOT_POWER_OF_2Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add debugfs_real_fops()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add version compare macrosJohannes Berg
The whole version comparison mess is getting bigger and bigger, add new macros to contain it a bit: * LINUX_VERSION_IS_LESS * LINUX_VERSION_IS_GEQ * LINUX_VERSION_IN_RANGE Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: backport hrtimer_start() with scalar argumentJohannes Berg
ktime_t changed from a union to a simple s64, so backport the only function that we seem to use with it. Since the hrtimer.h is closely integrated with interrupt.h we need to also have that file. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add ETH_MIN_MTUJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add USB_SPEED_SUPER_PLUSJohannes Berg
This will cause a compiler warning in some places, but there's no really nice way to work around that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add netif_trans_update()Johannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add ETH_MAX_MTUJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add compiler-gcc{5,6,7}.hJohannes Berg
They all just include compiler-gccN.h, with the contents taken from the upstream commit merging them all back into compiler-gcc.h. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add sg_pcopy_from_bufferJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add definition for dev_of_node()Arend Van Spriel
Since 4.10-rc1 there is use of dev_of_node() added to cfg80211, which was introduced in 4.1 kernel. So backport the function for older kernels. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-07backports: add CLASS_ATTR_RW/CLASS_ATTR_ROJohannes Berg
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06backports: empty define for __ro_after_initArend van Spriel
nl80211 now uses section qualifier __ro_after_init. However, this is not available in kernels before v4.6. Neither is the section itself hence adding an empty define in backports. Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06backports: only backport kconfig.h macros for < v3.4Luca Coelho
In kernel v4.9-rc3, config_enabled() was removed, so we can't use it anymore. The IS_BUILTIN macro is undefined then redefined using config_enabled(), which doesn't work anymore. Additionally, it's not necessary to include all these macros if the kernel is >= v3.4. To fix the config_enabled() problem and to avoid backporting unnecessarily, simply gate the backports on < v3.4. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06backport: remove current_user_ns backportLuca Coelho
In v4.6, the current_user_ns macro was changed to a function, so the ifdef doesn't work. To make things easy, this backport is not needed anymore, since current_user_ns was introduced before v3.0 and we don't support anything earlier than that. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06backports: add reciprocal_scale() to kernels < 3.14Luca Coelho
This is now needed by the fair queue code. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06[NOUPSTREAM] backports: add dummy skb_get_hash_perturb() backportLuca Coelho
In kernels < 4.2, we don't have skb_get_hash_perturb(), which is needed by the new fq code. We don't need it in stack-dev, so just add a dummy function that returns 0. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06backports: use codel and fq headers from the kernel sourcesLuca Coelho
We don't need to have a local copy of codel.h anymore, so it can be removed and copied from the kernel sources. Additionally, it was split into 3 different headers, so copy the other 2 as well. Also copy the fq header files, which are used by newer wireless subsystem versions, from the kernel sources. Additionally, remove pkt_sched.h since it is not necessary anymore. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2017-02-06backport: improve thermal backportLuca Coelho
There were some API changes in the thermal framework in kernel version 4.3 and also earlier in 3.10. Backport what is needed to support older kernels. The 4.3 change is a bit tricky, because it changes the prototypes of some ops. The solution for that is to add hook functions that will intercept the calls from the thermal framework and convert them to calls that the backported driver provides (namely convert unsigned longs to ints). Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>