openwrt/staging/blogic.git
6 years agopatches: brcmfmac: Fix netdev_set_priv_destructor
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>
6 years agopatches: export bp_usbnet_get_stats64() only if function is added
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>
6 years agobackports: add trace_seq_buffer_ptr() where needed
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>
6 years agobackport: add some ethtool conversion functions
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>
6 years agoRevert to using pycocci
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>
6 years agogentree: remove --use-coccigrep
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>
6 years agocompat: avoid usage of kvzalloc() in rhashtable.c
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>
6 years agopatches: brcmfmac: fix netdev destructor
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>
6 years agobackports-update-manager: split --force into --yes and --no-keep
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>
6 years agobackport-update-manager: automatically get list of ubuntu kernels
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>
6 years agoadd (automatic) refcount backport
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>
6 years agoheaders: atomic: add atomic_try_cmpxchg()
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>
6 years agouse spatch's built-in concurrency
Johannes Berg [Fri, 8 Sep 2017 10:40:48 +0000 (12:40 +0200)]
use spatch's built-in concurrency

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agochange protection of module_param_hw_array
Johannes Berg [Fri, 8 Sep 2017 11:13:20 +0000 (13:13 +0200)]
change protection of module_param_hw_array

Some (distro) kernels backported this, so simply protect the
backport definition with #ifndef.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: acpi: fix version comment
Johannes Berg [Fri, 8 Sep 2017 09:27:08 +0000 (11:27 +0200)]
header: acpi: fix version comment

I intended to not even apply the patch, but did anyway...
Fix the comment now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agocopy-list: add quantenna qtnfmac driver
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:17 +0000 (00:28 +0200)]
copy-list: add quantenna qtnfmac driver

This driver was compile tested on kernel 3.18 and 4.9.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: add dma_wmb()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:16 +0000 (00:28 +0200)]
header: add dma_wmb()

This is used by the qtnfmac driver.
This was added in commit 1077fa36f23e259 ("arch: Add lightweight memory
barriers dma_rmb() and dma_wmb()")

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agopatches: adapt signature of proto_ops->accept
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:14 +0000 (00:28 +0200)]
patches: adapt signature of proto_ops->accept

In commit cdfbabfb2f0ce ("net: Work around lockdep limitation in sockets
that use sockets") a extra parameter was added to proto_ops->accept(),
do not assume it on older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agopatches: backport the probe_new for i2c drivers
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:13 +0000 (00:28 +0200)]
patches: backport the probe_new for i2c drivers

I2C got a new probe function which does not take the struct
i2c_device_id any more, backport this to older kernel versions with a
spatch.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agodependencies: add deps for struct acpi_gpio_mapping
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:11 +0000 (00:28 +0200)]
dependencies: add deps for struct acpi_gpio_mapping

These NFC drivers are using struct acpi_gpio_mapping which was added in
kernel 3.19. Do not try to build them on older kernel versions where
this structures is not available.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: add offsetofend()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:10 +0000 (00:28 +0200)]
header: add offsetofend()

offsetofend() was moved from vfio.h to stddef.h in commit
3876488444e7123 ("include/stddef.h: Move offsetofend() from vfio.h to a
generic kernel header") for kernel 4.1. Add it again to stddef.h so it
is available in more include paths.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agopatch: Allow usage of pci_error_handlers->reset_notify
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:09 +0000 (00:28 +0200)]
patch: Allow usage of pci_error_handlers->reset_notify

The member reset_notify in the struct pci_error_handlers was divided
into reset_prepare and reset_done in upstream commit 775755ed3c65fb
("PCI: Split ->reset_notify() method into ->reset_prepare() and
->reset_done()"). Make new code also work with old kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agobackport: add __print_array()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:07 +0000 (00:28 +0200)]
backport: add __print_array()

This is used in the tracing system and needed by wireless now, it was
introduced in commit 6ea22486ba46bc ("tracing: Add array printing
helper").
This code is copied from kernel 4.0.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: rename wait_queue_entry_t to wait_queue_t
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:06 +0000 (00:28 +0200)]
header: rename wait_queue_entry_t to wait_queue_t

In kernel 4.13 wait_queue_t was renamed to wait_queue_entry_t, reverse
this for older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: add get_random_u32()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:05 +0000 (00:28 +0200)]
header: add get_random_u32()

This was renamed in upstream kernel and changed from unsigned int to u32.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: backport devm_acpi_dev_add_driver_gpios()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:04 +0000 (00:28 +0200)]
header: backport devm_acpi_dev_add_driver_gpios()

This is used by some NFC drivers to get information from the ACPI.
This was added in kernel 4.13, but backporting it to older kernel
versions than 3.19 is hard because such old kernel versions do not even
have struct acpi_gpio_mapping. This only adds the empty version of this
function as this normally needed some extra support in the generic ACPI
code and I do not care about this functionality.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: add module_param_hw_array()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:03 +0000 (00:28 +0200)]
header: add module_param_hw_array()

This macro is used for some module parameters.

This hwtype was newly introduced for module parameters in kernel 4.12,
just ignore it on older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agopatches: adapt the stat64 usage for usbnet
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:02 +0000 (00:28 +0200)]
patches: adapt the stat64 usage for usbnet

The usbnet driver shares the stat64 implementation over multiple drivers
and file, the spatch is not able to handle this, add a manual patch to
work around this problem.

The spatch is still modifying all usbnet drivers, but the function gets
exported by the usbnet main driver now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: backport mii_ethtool_{get,set}_link_ksettings()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:01 +0000 (00:28 +0200)]
header: backport mii_ethtool_{get,set}_link_ksettings()

This function was added in kernel 4.10 and is needed by the usbnet
drivers.

These functions were added in upstream commit: bc8ee596afe8f3 ("net:
mii: add generic function to support ksetting support")

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: skbuff: fix signature of skb_put(), skb_push() and __skb_push()
Hauke Mehrtens [Mon, 21 Aug 2017 22:28:00 +0000 (00:28 +0200)]
header: skbuff: fix signature of skb_put(), skb_push() and __skb_push()

In older kernel versions these functions returned a unsigned char*, now
they return a void *.

This change was done in upstream commit d58ff35122847a8 ("networking:
make skb_push & __skb_push return void pointers")

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agoheader: skbuff: add skb_put_zero(), skb_put_data() and skb_put_u8()
Hauke Mehrtens [Mon, 21 Aug 2017 22:27:59 +0000 (00:27 +0200)]
header: skbuff: add skb_put_zero(), skb_put_data() and skb_put_u8()

These functions were added in kernel 4.13 and are used by many driver
now.

This was added in the following upsteram comits:
e45a79da863c19 ("skbuff/mac80211: introduce and use skb_put_zero()")
59ae1d127ac0ae ("networking: introduce and use skb_put_data()")
634fef61076d64 ("networking: add and use skb_put_u8()")

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agocopy-list: remove st-nci.h and patch
AceLan Kao [Fri, 14 Jul 2017 03:07:54 +0000 (11:07 +0800)]
copy-list: remove st-nci.h and patch

>From below commit, st-nci.h has been removed
   61a0410 NFC: st-nci: Get rid of platform data
And we don't need st-nci-spi.patch, either. The patch is included in
upstream kernel source.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agocopy-list: remove wil6210_uapi.h
AceLan Kao [Fri, 14 Jul 2017 03:07:53 +0000 (11:07 +0800)]
copy-list: remove wil6210_uapi.h

>From below commit, the file has been removed
   a520b49 wil6210: remove ioctl interface

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agobackports: remove 802.15.4 entirely
AceLan Kao [Tue, 8 Aug 2017 13:14:51 +0000 (21:14 +0800)]
backports: remove 802.15.4 entirely

802.15.4 has been removed by this commit,
   15a3df8 backports: remove 802.15.4 entirely
but there are some files left behind.
Remove them all.

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agobackport: fix netdev destructor backport for v4.11.9
Luca Coelho [Tue, 5 Sep 2017 06:50:39 +0000 (09:50 +0300)]
backport: fix netdev destructor backport for v4.11.9

The patch that changed the netdev destructor code was backported to
v4.11.9, so handle that in the backport.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agobackport: fix netdev destructor backport
Luca Coelho [Tue, 18 Jul 2017 12:58:34 +0000 (15:58 +0300)]
backport: fix netdev destructor backport

The commit that changed the netdev destructor was also applied in
v4.12-rc6, so we need to update the backport.

Another issue was that when the default free_netdev() destructor was supposed to be used, we would get compilation errors, such as this one in hwsim:

In file included from ./include/net/dst.h:12:0,
                 from /home/luca/iwlwifi/stack-dev/drivers/net/wireless/mac80211_hwsim.c:22:
/home/luca/iwlwifi/stack-dev/drivers/net/wireless/mac80211_hwsim.c: In function hwsim_mon_setup':
/home/luca/iwlwifi/stack-dev/backport-include/linux/netdevice.h:325:23: error: '__free_netdev' undeclared (first use in this function)
  (_dev)->destructor = __ ## _destructor
                       ^
/home/luca/iwlwifi/stack-dev/drivers/net/wireless/mac80211_hwsim.c:2977:2: note: in expansion of macro 'netdev_set_priv_destructor'
  netdev_set_priv_destructor(dev, free_netdev);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luca/iwlwifi/stack-dev/backport-include/linux/netdevice.h:325:23: note: each undeclared identifier is reported only once for each function it appears in
  (_dev)->destructor = __ ## _destructor
                       ^
/home/luca/iwlwifi/stack-dev/drivers/net/wireless/mac80211_hwsim.c:2977:2: note: in expansion of macro 'netdev_set_priv_destructor'
  netdev_set_priv_destructor(dev, free_netdev);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/Makefile.build:300: recipe for target '/home/luca/iwlwifi/stack-dev/drivers/net/wireless/mac80211_hwsim.o' failed

To fix this, add a new macro, netdev_set_def_destructor(), that
handles this special case.

Change-Id: Ifcf1f19690487aee67e776b5700ff496c779e86c
Fixes: 721ae78f9355 ("backport: handle change in netdevice destructor usage")
Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
6 years agocopy-list: remove nfc platform data headers
Arend Van Spriel [Thu, 22 Jun 2017 07:33:21 +0000 (08:33 +0100)]
copy-list: remove nfc platform data headers

These files got removed from upstream kernel so they result in
backport failure.

Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
6 years agobackport: handle change in netdevice destructor usage
Arend Van Spriel [Thu, 22 Jun 2017 07:31:04 +0000 (08:31 +0100)]
backport: handle change in netdevice destructor usage

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>
7 years agobackports: add lockdep_rtnl_is_held() for < 3.13 without CONFIG_PROVE_LOCKING
Luca Coelho [Wed, 31 May 2017 08:30:10 +0000 (11:30 +0300)]
backports: add lockdep_rtnl_is_held() for < 3.13 without CONFIG_PROVE_LOCKING

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>
7 years agobackports: provide backport of devcoredump when disabled in kernels >= 3.18
Luca Coelho [Tue, 30 May 2017 08:09:34 +0000 (11:09 +0300)]
backports: provide backport of devcoredump when disabled in kernels >= 3.18

When devcoredump is not enabled in a kernel that supports it, we would
only use stubs for the devcoredump in the backports.  Allow the
backport to compile when that's the case.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agopatches: add patch for compat/lib-rhashtable.c
Arend Van Spriel [Fri, 19 May 2017 20:46:17 +0000 (21:46 +0100)]
patches: add patch for compat/lib-rhashtable.c

The file compat/lib-rhashtable.c is a copy from the backported kernel
source lib/rhashtable.c. This patch reverts a recent change to that
file, ie. commit 43ca5bc4f72e ("lib/rhashtable.c: simplify a strange
allocation pattern"). It introduced the function gfpflags_allow_blocking()
introduced in 4.4 kernel and kvmalloc() introduced in 4.12-rc1. Looking
at those functions backporting them is complicated so instead add this
patch that reverts the change for kernel prior to 4.12.

Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add the necessary backports for netlink extack
Johannes Berg [Fri, 21 Apr 2017 10:36:12 +0000 (12:36 +0200)]
backports: add the necessary backports for netlink extack

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: extend magic to 6 possible arguments
Johannes Berg [Fri, 21 Apr 2017 10:35:53 +0000 (12:35 +0200)]
backports: extend magic to 6 possible arguments

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: provide backport for setup_deferrable_timer()
Arend Van Spriel [Fri, 10 Mar 2017 10:01:10 +0000 (10:01 +0000)]
backports: provide backport for setup_deferrable_timer()

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>
7 years agobackports: add dummy include/linux/sched/signal.h
Arend Van Spriel [Thu, 9 Mar 2017 12:57:33 +0000 (12:57 +0000)]
backports: add dummy include/linux/sched/signal.h

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>
7 years agobackports: copy average.h from original kernel
Johannes Berg [Fri, 31 Mar 2017 07:27:54 +0000 (09:27 +0200)]
backports: copy average.h from original kernel

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>
7 years agobackports: add backport for idr_remove
Arend Van Spriel [Thu, 9 Mar 2017 12:57:31 +0000 (12:57 +0000)]
backports: add backport for idr_remove

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>
7 years agopatches: update crypto-ccm.patch for v4.11-rc1
Arend Van Spriel [Thu, 9 Mar 2017 12:57:30 +0000 (12:57 +0000)]
patches: update crypto-ccm.patch for v4.11-rc1

Since v4.11-rc1 the patch file for crypto/ccm.c, which is incorporated
in the compat module, no longer applies. Update the patch file to fix
the issue.

Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agogit-tracker: add Change-Id to all types of commits if configured
Johannes Berg [Mon, 27 Feb 2017 09:09:38 +0000 (10:09 +0100)]
git-tracker: add Change-Id to all types of commits if configured

My previous commit to optionally add a Change-Id missed two out
of three types of commits internally created by the tracker, add
the Change-Id to them as well.

Fixes: 7d89b544a1d9 ("git-tracker: add an option to add a Change-Id to commits")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: adjust ndo_get_stats64 change to 4.11
Johannes Berg [Fri, 24 Feb 2017 09:48:52 +0000 (10:48 +0100)]
backports: adjust ndo_get_stats64 change to 4.11

This will only land in kernel 4.11, I mixed up the
versions before. Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add definitions S32_MAX and S32_MIN
Arend Van Spriel [Wed, 22 Feb 2017 22:18:45 +0000 (22:18 +0000)]
backports: add definitions S32_MAX and S32_MIN

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>
7 years agobackports: adjust mwifiex uapi patch for new context
Johannes Berg [Tue, 14 Feb 2017 10:01:11 +0000 (11:01 +0100)]
backports: adjust mwifiex uapi patch for new context

This showed up in wt-2017-02-12.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add "MBIM Extended Functional Descriptor" structure definition
Arend Van Spriel [Sat, 11 Feb 2017 23:14:59 +0000 (23:14 +0000)]
backports: add "MBIM Extended Functional Descriptor" structure definition

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>
7 years agobackports: always use new version compare macros
Johannes Berg [Tue, 7 Feb 2017 22:04:11 +0000 (23:04 +0100)]
backports: always use new version compare macros

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: don't use __ro_after_init with genl families on <=4.9
Johannes Berg [Thu, 9 Feb 2017 13:50:24 +0000 (14:50 +0100)]
backports: don't use __ro_after_init with genl families on <=4.9

4.9 introduced __ro_after_init, but generic netlink family
registration was only changed to allow it in 4.10, otherwise
deregistration will crash due to writing to the RO memory.

Unfortunately, spatch doesn't handle this, so manually patch
the families to replace __ro_after_init with __genl_ro_after_init
which is defined to nothing on kernel version <= 4.9.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add USB_CDC_MBIM_EXTENDED_TYPE if needed
Johannes Berg [Tue, 7 Feb 2017 22:17:50 +0000 (23:17 +0100)]
backports: add USB_CDC_MBIM_EXTENDED_TYPE if needed

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: fix version checks for debugfs_real_fops()
Johannes Berg [Tue, 7 Feb 2017 21:57:58 +0000 (22:57 +0100)]
backports: fix version checks for debugfs_real_fops()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: remove some stray whitespace
Johannes Berg [Tue, 7 Feb 2017 21:32:29 +0000 (22:32 +0100)]
backports: remove some stray whitespace

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: remove thermal patch
Johannes Berg [Tue, 7 Feb 2017 21:26:07 +0000 (22:26 +0100)]
backports: remove thermal patch

We now have a proper backport for this but I forgot to
remove the patch - do that now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: remove erroneously added compiler options
Johannes Berg [Tue, 7 Feb 2017 21:24:26 +0000 (22:24 +0100)]
backports: remove erroneously added compiler options

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add dev_coredumpsg() where needed
Johannes Berg [Tue, 7 Feb 2017 20:00:14 +0000 (21:00 +0100)]
backports: add dev_coredumpsg() where needed

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>
7 years agobackports: add cdc_parse_cdc_header()
Johannes Berg [Tue, 7 Feb 2017 20:12:16 +0000 (21:12 +0100)]
backports: add cdc_parse_cdc_header()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: make NFC_WILINK depend on 4.8
Johannes Berg [Tue, 7 Feb 2017 19:50:50 +0000 (20:50 +0100)]
backports: make NFC_WILINK depend on 4.8

Yes, that's a very recent kernel - if anyone cares they can fix it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: restrict SSB_DRIVER_GPIO to 4.5+
Johannes Berg [Tue, 7 Feb 2017 16:16:48 +0000 (17:16 +0100)]
backports: restrict SSB_DRIVER_GPIO to 4.5+

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add linux/gpio/driver.h
Johannes Berg [Tue, 7 Feb 2017 16:04:25 +0000 (17:04 +0100)]
backports: add linux/gpio/driver.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agockmake: restrict make to load average <50
Johannes Berg [Tue, 7 Feb 2017 15:43:41 +0000 (16:43 +0100)]
ckmake: restrict make to load average <50

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: disable things needing LIB80211 unless SKCIPHER can exist
Johannes Berg [Tue, 7 Feb 2017 15:35:02 +0000 (16:35 +0100)]
backports: disable things needing LIB80211 unless SKCIPHER can exist

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agockmake: don't import *
Johannes Berg [Tue, 7 Feb 2017 14:59:46 +0000 (15:59 +0100)]
ckmake: don't import *

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add READ_ONCE and WRITE_ONCE
Johannes Berg [Tue, 7 Feb 2017 14:28:20 +0000 (15:28 +0100)]
backports: add READ_ONCE and WRITE_ONCE

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: bump NFC_MEI_PHY version requirement
Johannes Berg [Tue, 7 Feb 2017 14:13:14 +0000 (15:13 +0100)]
backports: bump NFC_MEI_PHY version requirement

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add devm_gpio_free()
Johannes Berg [Tue, 7 Feb 2017 14:05:48 +0000 (15:05 +0100)]
backports: add devm_gpio_free()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add strscpy()
Johannes Berg [Tue, 7 Feb 2017 13:57:48 +0000 (14:57 +0100)]
backports: add strscpy()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: suppress led_set_brightness redefinition warnings
Johannes Berg [Tue, 7 Feb 2017 13:45:13 +0000 (14:45 +0100)]
backports: suppress led_set_brightness redefinition warnings

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: always add netdev_rss_key_fill()
Johannes Berg [Tue, 7 Feb 2017 13:32:44 +0000 (14:32 +0100)]
backports: always add netdev_rss_key_fill()

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>
7 years agobackports: add more OF functions
Johannes Berg [Tue, 7 Feb 2017 13:30:13 +0000 (14:30 +0100)]
backports: add more OF functions

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: disable thermal for kernels < 3.8
Johannes Berg [Tue, 7 Feb 2017 13:13:38 +0000 (14:13 +0100)]
backports: disable thermal for kernels < 3.8

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add sg_nents()
Johannes Berg [Tue, 7 Feb 2017 13:13:14 +0000 (14:13 +0100)]
backports: add sg_nents()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: include mutex.h in leds-disabled.h
Johannes Berg [Tue, 7 Feb 2017 13:12:53 +0000 (14:12 +0100)]
backports: include mutex.h in leds-disabled.h

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: include of_device.h into of_platform.h
Johannes Berg [Tue, 7 Feb 2017 13:12:31 +0000 (14:12 +0100)]
backports: include of_device.h into of_platform.h

Upstream does this now, and people rely on it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add idr_for_each_entry()
Johannes Berg [Tue, 7 Feb 2017 13:12:19 +0000 (14:12 +0100)]
backports: add idr_for_each_entry()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add ifdefs to PCI error handler reset_notify
Johannes Berg [Tue, 7 Feb 2017 12:47:16 +0000 (13:47 +0100)]
backports: add ifdefs to PCI error handler reset_notify

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agoRevert "backports: only backport kconfig.h macros for < v3.4"
Johannes Berg [Tue, 7 Feb 2017 12:27:34 +0000 (13:27 +0100)]
Revert "backports: only backport kconfig.h macros for < v3.4"

This reverts commit c154481c1cfa25da4955eaa4a71523cb2abeda58.

With Arend's patch, this is no longer needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: restore config_enabled() macro
Arend van Spriel [Tue, 7 Feb 2017 11:15:24 +0000 (11:15 +0000)]
backports: restore config_enabled() macro

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>
7 years agobackports: add dummy of_dma_configure()
Johannes Berg [Tue, 7 Feb 2017 12:16:16 +0000 (13:16 +0100)]
backports: add dummy of_dma_configure()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add BUILD_BUG_ON_MSG
Johannes Berg [Tue, 7 Feb 2017 12:10:29 +0000 (13:10 +0100)]
backports: add BUILD_BUG_ON_MSG

Add it without the message, since that's easier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add spatch to backport ndo_stats64 prototype change
Johannes Berg [Tue, 7 Feb 2017 10:20:07 +0000 (11:20 +0100)]
backports: add spatch to backport ndo_stats64 prototype change

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: generate ifdefs for arbitrary MTU assignment
Johannes Berg [Tue, 7 Feb 2017 10:11:22 +0000 (11:11 +0100)]
backports: generate ifdefs for arbitrary MTU assignment

After the last patch that changed things so that the MTU
change function will only be declared when the values are
constants, this patch changes it so the ifdefs are always
added regardless.

This means that those drivers that use some expression
will now compile, with loss of MTU setting functionality.

It's necessary to put the new ifdef generation into a
separate spatch since the original one throws errors on
some drivers like airo.c.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: bump rhashtable requirement
Johannes Berg [Tue, 7 Feb 2017 09:28:30 +0000 (10:28 +0100)]
backports: bump rhashtable requirement

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>
7 years agobackports: add __BUILD_BUG_ON_NOT_POWER_OF_2
Johannes Berg [Tue, 7 Feb 2017 09:23:55 +0000 (10:23 +0100)]
backports: add __BUILD_BUG_ON_NOT_POWER_OF_2

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add debugfs_real_fops()
Johannes Berg [Tue, 7 Feb 2017 09:20:10 +0000 (10:20 +0100)]
backports: add debugfs_real_fops()

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add version compare macros
Johannes Berg [Tue, 7 Feb 2017 11:10:44 +0000 (12:10 +0100)]
backports: add version compare macros

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>
7 years agobackports: backport hrtimer_start() with scalar argument
Johannes Berg [Tue, 7 Feb 2017 09:19:08 +0000 (10:19 +0100)]
backports: backport hrtimer_start() with scalar argument

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>
7 years agobackports: improve MTU spatch
Johannes Berg [Tue, 7 Feb 2017 09:03:32 +0000 (10:03 +0100)]
backports: improve MTU spatch

Improve the MTU spatch to
 1) not handle arbitrary expressions, only constants - the one
    case where I found expressions can't actually just move it
    to a function, it won't compile
 2) if min_mtu isn't set, assume 0

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add ETH_MIN_MTU
Johannes Berg [Tue, 7 Feb 2017 08:24:44 +0000 (09:24 +0100)]
backports: add ETH_MIN_MTU

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: update README
Johannes Berg [Tue, 7 Feb 2017 08:03:49 +0000 (09:03 +0100)]
backports: update README

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: get rid of patch directory structure
Johannes Berg [Tue, 7 Feb 2017 07:07:39 +0000 (08:07 +0100)]
backports: get rid of patch directory structure

This directory structure was never really managed well,
simply get rid of it. With the patch system that only
applies patches when the modified file exists, and with
a lot of spatches applying everywhere anyway, it's no
longer really useful either.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: remove media include patch
Johannes Berg [Tue, 7 Feb 2017 07:04:19 +0000 (08:04 +0100)]
backports: remove media include patch

This no longer applies, and it'd probably be a better idea to find
why it's needed (and include idr.h in a backport header) or even to
send it upstream instead.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: remove some media patches
Johannes Berg [Tue, 7 Feb 2017 07:02:41 +0000 (08:02 +0100)]
backports: remove some media patches

These things should instead be done with an spatch combined
with a simple inline that depends on the kernel version.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: remove outdated patch README
Johannes Berg [Tue, 7 Feb 2017 07:00:00 +0000 (08:00 +0100)]
backports: remove outdated patch README

Since we're adding mostly spatches, this isn't right - remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
7 years agobackports: add a simple spatch for skb->wifi_acked[_valid]
Johannes Berg [Tue, 7 Feb 2017 06:55:15 +0000 (07:55 +0100)]
backports: add a simple spatch for skb->wifi_acked[_valid]

Signed-off-by: Johannes Berg <johannes.berg@intel.com>