backports: wrap dma_set_mask_and_coherent in LINUX_BACKPORT()

Upstream commit: 3443187edd32767c838e5d4f654df474e77fb7ce

To avoid conflicts with any distribution kernel wrap
dma_set_mask_and_coherent with LINUX_BACKPORT().

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Christian Ratzenhofer <christian.ratzenhofer@cdnm.at>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: ifdef code already present in RHEL7.0

Upstream commit: 6dfa96a892c962cda981cda1b2c88e6b1df5c886

Avoid conflicts with RHEL7.0 as DEVICE_ATTR_* defines,
enum pkt_hash_types, skb_set_hash(), dma_common_get_sgtable()
are already present.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: select_queue patch: fix callback kernel version

Upstream commit: 44554cd57d0016c52aeed2ce4f27081b9d9c915f

The callback argument has been passed since kernel 3.14, not
only 3.15 - fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backport: CCM: set correct dependencies

Upstream commit: 816cbc860692cb60bf6e5e16ec2b4532992c7e0a

If these aren't actually compiled in, then the mac80211
code will fail at runtime. Add these dependencies so we
at least get a warning at compile time about this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: Avoid multiple definition of DEVICE_ATTR_RW for older kernels

Upstream commit: dc2c1472a9b05ff5e574d0d14e6251e8af0a025a

This definition may exists on non-vanilla kernels.

Signed-off-by: Jonathan DE CESCO <jonathan.de.cesco@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: backport-3.15: Include fix

Upstream commit: 1b62085572206ee0ad9a89dcc5528d63b432d7fe

In this version the correct linux string.h is included.

Include string.h to avoid compile issues if warnings are treated as errors:

backports-3.14-1/compat/backport-3.15.c: In function 'backport_devm_kstrdup':
backports-3.14-1/compat/backport-3.15.c:33:2: error: implicit declaration of function 'strlen' [-Werror=implicit-function-declaration]
   size = strlen(s) + 1;
   ^
backports-3.14-1/compat/backport-3.15.c:33:9: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
   size = strlen(s) + 1;
          ^
backports-3.14-1/compat/backport-3.15.c:36:3: error: implicit declaration of function 'memcpy' [-Werror=implicit-function-declaration]
    memcpy(buf, s, size);
    ^
backports-3.14-1/compat/backport-3.15.c:36:3: warning: incompatible implicit declaration of built-in function 'memcpy' [enabled by default]

Signed-off-by: Richard Röjfors <richard@puffinpack.se>
[refreshed patch on current master]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: select_queue patch: fix callback kernel version

Upstream commit: d260afa8c4aecde4abdecfa299713bc473c0dba4

The patch changing the callback function signature was backported to
kernel 3.14, this was already fixed in backports for mac80211, but that
commit missed mwifiex.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: fix class/bus attribute group spatch conversion

Upstream commit: 495b6d7968e4ce08fb1371197bce7a8c8a482069

The spatch conversion (commit 05d44557c6a83b4ecb935cb6306f62,
"backports: transform group attribute backport to SmPL form")
added an #ifdef that shouldn't be there - remove it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: move net_device_priv_flags

Upstream commit: 4d1a1850cfb8918fbf190071d1f1f1383814538e

These flags are now defined in linux/netdevice.h and not in linux/if.h
any more. This patch also removed some defined in all kernel versions
since 3.0.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: only add net_get_random_once() when not available

Upstream commit: d787b3dd3b4fcb5f40eb6532163dc3abdca4fd45

net_get_random_once() was added unconditionally also when the kernel we
are compiling against already provided this function, this patch checks
that first.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
backports: refresh on 3.15.1

1   3.0.101             [  OK  ]
2   3.1.10              [  OK  ]
3   3.2.60              [  OK  ]
4   3.3.8               [  OK  ]
5   3.4.93              [  OK  ]
6   3.5.7               [  OK  ]
7   3.6.11              [  OK  ]
8   3.7.10              [  OK  ]
9   3.8.13              [  OK  ]
10  3.9.11              [  OK  ]
11  3.10.43             [  OK  ]
12  3.11.10             [  OK  ]
13  3.12.22             [  OK  ]
14  3.13.11             [  OK  ]
15  3.14.7              [  OK  ]
16  3.15.0              [  OK  ]

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>