openwrt/staging/blogic.git
11 years agochange rfkill backport for RFKILL_TYPE_FM
Johannes Berg [Tue, 2 Apr 2013 11:56:41 +0000 (13:56 +0200)]
change rfkill backport for RFKILL_TYPE_FM

RFKILL_TYPE_FM was only added in kernel 2.6.33.

Maybe we should just always add rfkill?

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agofix rfkill backport version
Johannes Berg [Tue, 2 Apr 2013 11:54:35 +0000 (13:54 +0200)]
fix rfkill backport version

The API changes were only done in kernel 2.6.32.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agofix tracing backport
Johannes Berg [Tue, 2 Apr 2013 11:51:40 +0000 (13:51 +0200)]
fix tracing backport

For kernels that didn't have correct tracing, it was broken.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agodisable unused-but-set-variable warning
Johannes Berg [Tue, 2 Apr 2013 11:32:21 +0000 (13:32 +0200)]
disable unused-but-set-variable warning

This warning happens all the time ...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoallow multiple kernel version dependencies
Johannes Berg [Tue, 2 Apr 2013 11:20:30 +0000 (13:20 +0200)]
allow multiple kernel version dependencies

I've been adding a bunch of dependencies that
override earlier ones but could be removed, so
make it more maintainable by allowing multiple
to be listed.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agodisable BT_HIDP on kernels below 2.6.33
Johannes Berg [Tue, 2 Apr 2013 11:18:07 +0000 (13:18 +0200)]
disable BT_HIDP on kernels below 2.6.33

Only 2.6.33 introduced HID_QUIRK_NO_INIT_REPORTS, and
we don't backport that right now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agomake RFKILL_REGULATOR depend on 3.0
Johannes Berg [Tue, 2 Apr 2013 11:06:24 +0000 (13:06 +0200)]
make RFKILL_REGULATOR depend on 3.0

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agodisable BCMA_DRIVER_GPIO until 3.0
Johannes Berg [Tue, 2 Apr 2013 11:01:03 +0000 (13:01 +0200)]
disable BCMA_DRIVER_GPIO until 3.0

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agomake Bluetooth depend on 2.6.29
Johannes Berg [Tue, 2 Apr 2013 09:50:02 +0000 (11:50 +0200)]
make Bluetooth depend on 2.6.29

AMP code requires crypto shash, which was only added in
2.6.29.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd kernel version dependency for BCMA/SSB GPIO
Johannes Berg [Tue, 2 Apr 2013 09:45:39 +0000 (11:45 +0200)]
add kernel version dependency for BCMA/SSB GPIO

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoalways use included rfkill
Johannes Berg [Tue, 2 Apr 2013 09:38:46 +0000 (11:38 +0200)]
always use included rfkill

This isn't really desirable, but for now fixes build on
some kernels.

What we really should do is rename all the rfkill to be
backport symbols, and use it only on kernels that didn't
have a usable rfkill. OTOH, on new kernels one may want
to use a backported rfkill if the base configuration
doesn't include it?

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agocorrect makefile for cordic/crc8
Johannes Berg [Tue, 2 Apr 2013 09:24:54 +0000 (11:24 +0200)]
correct makefile for cordic/crc8

I allowed these to be modules by themselves, so they
need to be in the makefile as obj-$(...).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd rt2x00 LED dependency
Johannes Berg [Tue, 2 Apr 2013 09:00:23 +0000 (11:00 +0200)]
add rt2x00 LED dependency

We don't carry a patch to disable uses of blink_set() in
the LED API, so rt2x00 LED support must depend on 2.6.25.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd LIBIPW_DEBUG 2.6.25 dependency
Johannes Berg [Tue, 2 Apr 2013 08:55:45 +0000 (10:55 +0200)]
add LIBIPW_DEBUG 2.6.25 dependency

due to proc_create()

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agodisable codel on 2.6.24
Johannes Berg [Tue, 2 Apr 2013 08:52:43 +0000 (10:52 +0200)]
disable codel on 2.6.24

It doesn't build there, the old commentry said it was
due to the qdisc API but it also doesn't build because
of is_vmalloc_addr().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agofix COMPAT_USB_URB_THREAD_FIX option
Johannes Berg [Tue, 2 Apr 2013 08:45:54 +0000 (10:45 +0200)]
fix COMPAT_USB_URB_THREAD_FIX option

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoproperly add SSB and BCMA
Johannes Berg [Tue, 2 Apr 2013 08:42:03 +0000 (10:42 +0200)]
properly add SSB and BCMA

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd some non-verbose output
Johannes Berg [Tue, 2 Apr 2013 08:37:10 +0000 (10:37 +0200)]
add some non-verbose output

Now that it prints nothing at all, it's eery, add back some output :)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd kernel version dependencies
Johannes Berg [Tue, 2 Apr 2013 08:33:20 +0000 (10:33 +0200)]
add kernel version dependencies

Some drivers/subsystems/... can only build on certain newer
kernels, or were never tested elsewhere. Insert their version
dependencies into the output Kconfig.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agosuppress patching output (unless in verbose mode)
Johannes Berg [Tue, 2 Apr 2013 08:25:28 +0000 (10:25 +0200)]
suppress patching output (unless in verbose mode)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd dependencies file
Johannes Berg [Mon, 1 Apr 2013 23:02:38 +0000 (01:02 +0200)]
add dependencies file

This will be used to modify the Kconfig that we get to
make some things depend on certain kernel versions.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd a few compile time checks
Johannes Berg [Mon, 1 Apr 2013 23:01:31 +0000 (01:01 +0200)]
add a few compile time checks

Do a few sanity checks at compile time.

Actually it would be possible to do them at Kconfig time
and simply disable mac80211/cfg80211, but that wouldn't
be very discoverable, and it's a corner case anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoproperly backport EWMA functions
Johannes Berg [Mon, 1 Apr 2013 22:31:05 +0000 (00:31 +0200)]
properly backport EWMA functions

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agosimplify and correct backported FW loader
Johannes Berg [Mon, 1 Apr 2013 22:23:35 +0000 (00:23 +0200)]
simplify and correct backported FW loader

The backported loader is selected by drivers
needing it, unless the in-kernel one is used,
so there's no need to provide the functions
for when it isn't built.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agocopy rfkill header
Johannes Berg [Mon, 1 Apr 2013 22:18:39 +0000 (00:18 +0200)]
copy rfkill header

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agofix backported fw loader
Johannes Berg [Mon, 1 Apr 2013 22:14:48 +0000 (00:14 +0200)]
fix backported fw loader

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agofix bluetooth ifdef
Johannes Berg [Mon, 1 Apr 2013 21:36:32 +0000 (23:36 +0200)]
fix bluetooth ifdef

The recent kconfig shuffle broke this.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd ath5k tracing fix
Johannes Berg [Mon, 1 Apr 2013 21:34:53 +0000 (23:34 +0200)]
add ath5k tracing fix

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd kernel license/maintainers file to output
Johannes Berg [Mon, 1 Apr 2013 20:06:15 +0000 (22:06 +0200)]
add kernel license/maintainers file to output

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd ssb/bcma includes
Johannes Berg [Mon, 1 Apr 2013 19:50:37 +0000 (21:50 +0200)]
add ssb/bcma includes

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoupdate .config before generating autoconf header
Johannes Berg [Mon, 1 Apr 2013 19:06:04 +0000 (21:06 +0200)]
update .config before generating autoconf header

Otherwise, an invalid configuration file might be
used to generation the C configuration.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd brcm80211 makefile patch
Johannes Berg [Mon, 1 Apr 2013 17:46:36 +0000 (19:46 +0200)]
add brcm80211 makefile patch

The simple parser doesn't understand the variable
indirection (yet) and right now it's simpler and
faster to patch the makefiles rather than improve
the parser.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agofix --refresh option
Johannes Berg [Mon, 1 Apr 2013 19:01:30 +0000 (21:01 +0200)]
fix --refresh option

The refresh option was only able to correctly handle
patch files that change a single file, fix this.

It's still desirable to have few changes per file,
but when a single patch makes sense for changes to
multiple files in a single driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoallow backported drivers to select backport options
Johannes Berg [Mon, 1 Apr 2013 17:40:33 +0000 (19:40 +0200)]
allow backported drivers to select backport options

This allows to have, for example, CRC8 still selected
by drivers (modified to BACKPORT_CRC8) and then build
the CRC8 code only conditionally on not having it in
the base kernel and being required by a driver.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agodon't include Kconfig file that doesn't exist
Johannes Berg [Sun, 31 Mar 2013 22:57:14 +0000 (00:57 +0200)]
don't include Kconfig file that doesn't exist

The correct location is already included anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoenable all wireless/bluetooth drivers
Johannes Berg [Sun, 31 Mar 2013 22:49:57 +0000 (00:49 +0200)]
enable all wireless/bluetooth drivers

Pretty much like the old compat ...

However, ath5k doesn't build due to tracing, but I haven't
found the bug yet.

Also, brcm80211 make system is a big mess and doesn't quite
work right with the simple makefile parser here.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd BACKPORT_BT_SOCK_CREATE_NEEDS_KERN config symbol
Johannes Berg [Sun, 31 Mar 2013 22:40:42 +0000 (00:40 +0200)]
add BACKPORT_BT_SOCK_CREATE_NEEDS_KERN config symbol

Also need to rename it in the patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoignore patch files ending with ~
Johannes Berg [Sun, 31 Mar 2013 22:38:47 +0000 (00:38 +0200)]
ignore patch files ending with ~

These are typically editor backup files.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoallow renaming while copying
Johannes Berg [Sun, 31 Mar 2013 22:32:52 +0000 (00:32 +0200)]
allow renaming while copying

This will be useful for the rfkill backport.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd Bluetooth Kconfig/Makefile stuff
Johannes Berg [Sun, 31 Mar 2013 22:23:34 +0000 (00:23 +0200)]
add Bluetooth Kconfig/Makefile stuff

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd rfkill
Johannes Berg [Sun, 31 Mar 2013 22:15:42 +0000 (00:15 +0200)]
add rfkill

This doesn't really work yet though ...

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoapply patches more robustly
Johannes Berg [Sun, 31 Mar 2013 21:52:20 +0000 (23:52 +0200)]
apply patches more robustly

Treat each directory with only files as a patchdir.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoapply patches correctly
Johannes Berg [Sun, 31 Mar 2013 21:15:25 +0000 (23:15 +0200)]
apply patches correctly

Not all patch dirs hold an INFO file, so don't require it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agorename patch files to .patch
Johannes Berg [Sun, 31 Mar 2013 21:12:42 +0000 (23:12 +0200)]
rename patch files to .patch

They can be named after the C files they apply to,
but they should still be named .patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agomove orig/rej file removal
Johannes Berg [Sun, 31 Mar 2013 00:47:39 +0000 (01:47 +0100)]
move orig/rej file removal

This needs to be after each patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd -a git commit to catch deleted files in debug
Johannes Berg [Sun, 31 Mar 2013 00:46:41 +0000 (01:46 +0100)]
add -a git commit to catch deleted files in debug

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agouse BACKPORT_PWD variable in makefiles
Johannes Berg [Sun, 31 Mar 2013 00:45:33 +0000 (01:45 +0100)]
use BACKPORT_PWD variable in makefiles

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agodisable impossible symbols
Johannes Berg [Sun, 31 Mar 2013 00:35:19 +0000 (01:35 +0100)]
disable impossible symbols

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agosplit kconfig symbol list
Johannes Berg [Sat, 30 Mar 2013 23:22:22 +0000 (00:22 +0100)]
split kconfig symbol list

The regular expression engine only supports a limited
number of groups, so split the kconfig symbol list
into chunks of 50 for the mangling.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd --refresh option
Johannes Berg [Sat, 30 Mar 2013 23:11:59 +0000 (00:11 +0100)]
add --refresh option

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agomake debug snapshots per applied patchset
Johannes Berg [Sat, 30 Mar 2013 23:00:32 +0000 (00:00 +0100)]
make debug snapshots per applied patchset

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoremove tracing patches
Johannes Berg [Sat, 30 Mar 2013 22:55:32 +0000 (23:55 +0100)]
remove tracing patches

These are causing issues and it seems like the
current approach should work even without them.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoremove orig/rej files after patching
Johannes Berg [Sat, 30 Mar 2013 22:48:43 +0000 (23:48 +0100)]
remove orig/rej files after patching

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoapply patches when creating the output
Johannes Berg [Sat, 30 Mar 2013 22:43:11 +0000 (23:43 +0100)]
apply patches when creating the output

Apply all the patches that are needed according
to the first file in each ... currently all the
patches are split up by file though.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoremove unused os.getcwd()
Johannes Berg [Sat, 30 Mar 2013 22:34:09 +0000 (23:34 +0100)]
remove unused os.getcwd()

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoremove some unneeded patches
Johannes Berg [Sat, 30 Mar 2013 22:16:33 +0000 (23:16 +0100)]
remove some unneeded patches

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agocopy needed includes
Johannes Berg [Sat, 30 Mar 2013 22:06:52 +0000 (23:06 +0100)]
copy needed includes

Copy the necessary include files for the different
components, without them obviously nothing builds.

This necessitated using an own copytree() implementation
that doesn't error when a target directory already exists.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoremove Kconfig.kernel
Johannes Berg [Sat, 30 Mar 2013 21:51:16 +0000 (22:51 +0100)]
remove Kconfig.kernel

It's generated at build time later, no need to copy an
empty file into the output directory.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agocomment copy-list
Johannes Berg [Sat, 30 Mar 2013 21:35:05 +0000 (22:35 +0100)]
comment copy-list

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd "config WIRELESS"
Johannes Berg [Sat, 30 Mar 2013 21:30:27 +0000 (22:30 +0100)]
add "config WIRELESS"

This is needed as we don't copy net/Kconfig and that
has the symbol. It's OK to specify a symbol twice in
Kconfig files so this works even when the base kernel
already has the option enabled.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd debug mode that commits each step in git
Johannes Berg [Sat, 30 Mar 2013 21:28:06 +0000 (22:28 +0100)]
add debug mode that commits each step in git

This allows checking easily what the code generation
scripting did to the copied sources.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoget output's build system mostly working
Johannes Berg [Sat, 30 Mar 2013 21:07:56 +0000 (22:07 +0100)]
get output's build system mostly working

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agorename COMPAT_ to BACKPORT_ in internal Kconfig symbols
Johannes Berg [Sat, 30 Mar 2013 20:50:59 +0000 (21:50 +0100)]
rename COMPAT_ to BACKPORT_ in internal Kconfig symbols

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoparse "menuconfig" as local symbol
Johannes Berg [Sat, 30 Mar 2013 20:04:28 +0000 (21:04 +0100)]
parse "menuconfig" as local symbol

11 years agoalso change CONFIG_*_MODULE
Johannes Berg [Sat, 30 Mar 2013 18:48:20 +0000 (19:48 +0100)]
also change CONFIG_*_MODULE

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agomake codel (fq) user selectable
Johannes Berg [Sat, 30 Mar 2013 00:31:42 +0000 (01:31 +0100)]
make codel (fq) user selectable

needs better descriptions ... :)

11 years agoadd first attempt at new copy script and build infrastructure
Johannes Berg [Fri, 29 Mar 2013 23:37:13 +0000 (00:37 +0100)]
add first attempt at new copy script and build infrastructure

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agosplit patches
Johannes Berg [Fri, 29 Mar 2013 23:53:58 +0000 (00:53 +0100)]
split patches

This splits all patches into per-file patches. I've added the little
tool I wrote as well (but it's hard to use).

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agomove kconfig to plumbing/ directory
Johannes Berg [Fri, 29 Mar 2013 20:52:21 +0000 (21:52 +0100)]
move kconfig to plumbing/ directory

The plumbing/ directory will contain everything
that must go into the output, that includes the
Kconfig infrastructure.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoadd .gitignore
Johannes Berg [Fri, 29 Mar 2013 19:29:27 +0000 (20:29 +0100)]
add .gitignore

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoclean up
Johannes Berg [Fri, 29 Mar 2013 19:11:23 +0000 (20:11 +0100)]
clean up

Clean up all the things this won't use/need.
I'm going to add things back bit by bit instead
of trying to base it on the current version.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agoMerge compat code
Johannes Berg [Fri, 29 Mar 2013 18:57:47 +0000 (19:57 +0100)]
Merge compat code

11 years agodon't ignore compat directory
Johannes Berg [Fri, 29 Mar 2013 18:57:11 +0000 (19:57 +0100)]
don't ignore compat directory

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
11 years agocompat-drivers: fix signature for struct bin_attribute
Hauke Mehrtens [Thu, 28 Mar 2013 19:12:18 +0000 (20:12 +0100)]
compat-drivers: fix signature for struct bin_attribute

The signature for struct bin_attribute.read changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: fix signature for struct rchan_callbacks
Hauke Mehrtens [Thu, 28 Mar 2013 19:12:17 +0000 (20:12 +0100)]
compat-drivers: fix signature for struct rchan_callbacks

the signature for struct rchan_callbacks.create_buf_file changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: fix parameter dereference for drv_set_multicast_list()
Hauke Mehrtens [Thu, 28 Mar 2013 19:12:16 +0000 (20:12 +0100)]
compat-drivers: fix parameter dereference for drv_set_multicast_list()

drv_set_multicast_list() does not take a pinter but the direct
parameter on kernel < 2.6.35.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: refresh patches
Hauke Mehrtens [Thu, 28 Mar 2013 19:12:15 +0000 (20:12 +0100)]
compat-drivers: refresh patches

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: add debug config options
Hauke Mehrtens [Thu, 28 Mar 2013 19:12:14 +0000 (20:12 +0100)]
compat-drivers: add debug config options

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: add config option CONFIG_RT2800USB_RT55XX
Hauke Mehrtens [Thu, 28 Mar 2013 19:12:13 +0000 (20:12 +0100)]
compat-drivers: add config option CONFIG_RT2800USB_RT55XX

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: add config option IWLWIFI_OPMODE_MODULAR
Hauke Mehrtens [Thu, 28 Mar 2013 19:12:11 +0000 (20:12 +0100)]
compat-drivers: add config option IWLWIFI_OPMODE_MODULAR

This is needed to make the common intel driver module export its
symbols.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: build kstrtox for kernel < 2.6.25
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:27 +0000 (20:18 +0100)]
compat: build kstrtox for kernel < 2.6.25

strict_strtol with one l is defined in compat-2.6.25.h code now and
this deactivates this check, use strict_strtoll instead.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: firmware class, remove the compat prefix
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:26 +0000 (20:18 +0100)]
compat: firmware class, remove the compat prefix

This depended on some define changing firmware_* to compat_firmware_*
and this should now be used to generate backport_firmware_*. This makes
it export the expected symbols with the backport prefix.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: do not undef flush_scheduled_work
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:25 +0000 (20:18 +0100)]
compat: do not undef flush_scheduled_work

This caused flush_scheduled_work instead of
backport_flush_scheduled_work being exported.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: fix export of __sg_page_iter*
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:24 +0000 (20:18 +0100)]
compat: fix export of __sg_page_iter*

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: add module_pcmcia_driver
Hauke Mehrtens [Thu, 28 Mar 2013 19:18:23 +0000 (20:18 +0100)]
compat: add module_pcmcia_driver

This is a backport of:
commit 6ed7ffddcf61f668114edb676417e5fb33773b59
Author: H Hartley Sweeten <hsweeten@visionengravers.com>
Date:   Wed Mar 6 11:24:44 2013 -0700

    pcmcia/ds.h: introduce helper for pcmcia_driver module boilerplate

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: make CONFIG_BT_WILINK depend on CONFIG_TI_ST
Luis R. Rodriguez [Thu, 28 Mar 2013 23:28:01 +0000 (16:28 -0700)]
compat-drivers: make CONFIG_BT_WILINK depend on CONFIG_TI_ST

This needs to be carried over to linux-3.9.y.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: fix hunk on vt switch patch
Luis R. Rodriguez [Thu, 28 Mar 2013 12:14:48 +0000 (05:14 -0700)]
compat-drivers: fix hunk on vt switch patch

I manually edited the patch but failed to test it...

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport fb_info->skip_vt_switch using a static inline
Luis R. Rodriguez [Thu, 28 Mar 2013 09:53:23 +0000 (02:53 -0700)]
compat: backport fb_info->skip_vt_switch using a static inline

Commit 3cf2667 as of next-20130301 extended the struct fb_info
with a skip_vt_switch to allow drivers to skip the VT switch
at suspend/resume time. For older kernels we can skip this
as all this switch does is call pm_vt_switch_required() with true
or false depending on this new flag and later
pm_vt_switch_unregister() would not have been made.

compat-drivers was backporting this using #ifdef's but by
integrating a static inline we'd reduce the number of lines
to backport to just 1 line replacement. This would be something
like:

  -       info->skip_vt_switch = true;
  +       fb_enable_skip_vt_switch(info);

For kernels >= 3.10 we'd set the attribute as we do upstream,
for older kernels this would be a no-op.

If this static inline would have been added upstream it would
have meant this collateral evolution would require just adding
a no-op static inline to backport, and no changes as the above
example hunk for every driver that requires the change.

If this static inline ends up upstream *now* it means we do *not*
require the type of hunk above for every driver that requires
the change.

All the code would be left intact !

This is a linux-next 'data structure element collateral evolution'.

Cc: cocci@systeme.lip6.fr
Cc: backports@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: simplify backport fb_info->skip_vt_switch CE
Luis R. Rodriguez [Thu, 28 Mar 2013 10:15:57 +0000 (03:15 -0700)]
compat-drivers: simplify backport fb_info->skip_vt_switch CE

The collateral evolution (CE) on the fb_info data structure
that added the skip_vt_switch element can be simplified
further by replacing the #ifdef hell with a static inline.

Furthermore, if the static inline is added upstream it'd mean
we can get rid of all these static inline replacements for
this data structure element CE.

Cc: cocci@systeme.lip6.fr
Cc: backports@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: backport fb_info->skip_vt_switch using ifdefs
Luis R. Rodriguez [Thu, 28 Mar 2013 09:39:03 +0000 (02:39 -0700)]
compat-drivers: backport fb_info->skip_vt_switch using ifdefs

Commit 3cf2667 as of next-20130301 extended the struct fb_info
with a skip_vt_switch to allow drivers to skip the VT switch
at suspend/resume time. For older kernels we can skip this
as all this switch does is call pm_vt_switch_required() with true
or false depending on this new flag and later
pm_vt_switch_unregister() would not have been made.

This patch cannot be broken down further so I'm pegging
this as the first one with 4 digits under the DRM folder
for collateral evolutions. This reflects its as atomic as
is possible. As we'll see on the next commit, these type
of collateral evolutions can best be backported not by
keeping ifdef's as below but instead by using a wrapper
caller, to help reduce with the amount of lines of code
we need. If a static inline is added upstream for these
changes, then no code is required for backporting, at all,
we'd just implement the static inline later upstream as
a no-op.

The tradeoffs to consider for this is if we can live with
these practices upstream, we may be able to support full
subsystems only with a compat module, and no need for
patches. This also means less code and likely less bugs
on the distribution front when backporting is required.
At least IMHO this may be worthy to consider at least to
support kernels listed as supported on kernel.org. We could
just leave the ifdef hell to older unsupported kernels.

Relevant commits below, starting with the first one that
added this new collateral evolution.

commit 3cf2667b9f8b2c2fe298a427deb399e52321da6b
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Mon Feb 4 13:37:21 2013 +0000

    fb: add support for drivers not needing VT switch at suspend/resume time

    Use the new PM routines to indicate whether we need to VT switch at suspend
    and resume time.  When a new driver is bound, set its flag accordingly,
    and when unbound, remove it from the PM's console tracking list.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
commit 24576d23976746cb52e7700c4cadbf4bc1bc3472
Author: Jesse Barnes <jbarnes@virtuousgeek.org>
Date:   Tue Mar 26 09:25:45 2013 -0700

    drm/i915: enable VT switchless resume v3

    With the other bits in place, we can do this safely.

    v2: disable backlight on suspend to prevent premature enablement on resume
    v3: disable CRTCs on suspend to allow RTD3 (Kristen)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: cocci@systeme.lip6.fr
Cc: backports@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport sg_page_iter_page() and sg_page_iter_dma_address()
Luis R. Rodriguez [Thu, 28 Mar 2013 08:42:42 +0000 (01:42 -0700)]
compat: backport sg_page_iter_page() and sg_page_iter_dma_address()

This should be going into the next kernel release, assuming
this will be called 3.10 we stuff into the 3.10 header.
Although this commit does modify the struct sg_page_iter
data structure that was just done to remove something no
longer needed due to the change. This should not impact
older kernels so just keep the original implementation.

mcgrof@frijol ~/linux-next (git::master)$ git describe --contains 2db76d7c
next-20130328~64^2~6

commit 2db76d7c3c6db93058f983c8240f7c7c25e87ee6
Author: Imre Deak <imre.deak@intel.com>
Date:   Tue Mar 26 15:14:18 2013 +0200

    lib/scatterlist: sg_page_iter: support sg lists w/o backing pages

    The i915 driver uses sg lists for memory without backing 'struct page'
    pages, similarly to other IO memory regions, setting only the DMA
    address for these. It does this, so that it can program the HW MMU
    tables in a uniform way both for sg lists with and without backing pages.

    Without a valid page pointer we can't call nth_page to get the current
    page in __sg_page_iter_next, so add a helper that relevant users can
    call separately. Also add a helper to get the DMA address of the current
    page (idea from Daniel).

    Convert all places in i915, to use the new API.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: backport ktime_get_monotonic_offset()
Luis R. Rodriguez [Thu, 28 Mar 2013 02:16:56 +0000 (19:16 -0700)]
compat: backport ktime_get_monotonic_offset()

The commit a80b83b7 exported ktime_get_monotonic_offset()
but note that this was already in place on the header
files declared as extern, it was just never exported.
To work around the double possible declaration issue
with older kernels fortunately the LINUX_BACKPORT()
macro comes to the rescue by encofring our version
to be declared and used in backport code. Note that
this was added due to commit c61eef72 added as of
v3.8 for DRM drivers that need access to timestamps that
do no do not jump, unfortunately for older kernels we
can't port that since it requires access to a static
variable on the kernel, so just use the timestamps that
jump.

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains a80b83b7
v3.5-rc6~10^2~15^2~30

mcgrof@frijol ~/linux-stable (git::master)$ git describe --contains c61eef72
v3.8-rc1~42^2~170

commit a80b83b7b8456e9b475346c2e01d7e210883208c
Author: John Stultz <john.stultz@linaro.org>
Date:   Fri Feb 3 00:19:07 2012 -0800

    Input: add infrastructure for selecting clockid for event time stamps

    As noted by Arve and others, since wall time can jump backwards, it is
    difficult to use for input because one cannot determine if one event
    occurred before another or for how long a key was pressed.

    However, the timestamp field is part of the kernel ABI, and cannot be
    changed without possibly breaking existing users.

    This patch adds a new IOCTL that allows a clockid to be set in the
    evdev_client struct that will specify which time base to use for event
    timestamps (ie: CLOCK_MONOTONIC instead of CLOCK_REALTIME).

    For now we only support CLOCK_MONOTONIC and CLOCK_REALTIME, but
    in the future we could support other clockids if appropriate.

    The default remains CLOCK_REALTIME, so we don't change the ABI.

Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Daniel Kurtz <djkurtz@google.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
commit c61eef726a78ae77b6ce223d01ea2130f465fe5c
Author: Imre Deak <imre.deak@intel.com>
Date:   Tue Oct 23 18:53:26 2012 +0000

    drm: add support for monotonic vblank timestamps

    Jumps in the vblank and page flip event timestamps cause trouble for
    clients, so we should avoid them. The timestamp we get currently with
    gettimeofday can jump, so use instead monotonic timestamps.

    For backward compatibility use a module flag to revert back to using
    gettimeofday timestamps. Add also a DRM_CAP_TIMESTAMP_MONOTONIC flag
    that is simply a read only version of the module flag, so that clients
    can query this without depending on sysfs.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: declare eth_hw_addr_random() under LINUX_BACKPORT()
Luis R. Rodriguez [Thu, 28 Mar 2013 02:23:27 +0000 (19:23 -0700)]
compat: declare eth_hw_addr_random() under LINUX_BACKPORT()

Debian kernels cherry picked the commit that added this,
so LINUX_BACKPORT() comes to the rescue.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat: declare kmalloc_array() through LINUX_BACKPORT()
Luis R. Rodriguez [Thu, 28 Mar 2013 02:20:32 +0000 (19:20 -0700)]
compat: declare kmalloc_array() through LINUX_BACKPORT()

This fixes compilation with Debian 3.2 kernels that
cherry picked the commit that added that call (a8203725).

commit a8203725dfded5c1f79dca3368a4a273e24b59bb
Author: Xi Wang <xi.wang@gmail.com>
Date:   Mon Mar 5 15:14:41 2012 -0800

    slab: introduce kmalloc_array()

    Introduce a kmalloc_array() wrapper that performs integer overflow
    checking without zeroing the memory.

Suggested-by: Andrew Morton <akpm@linux-foundation.org>
Suggested-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: add initial kconfig development
Luis R. Rodriguez [Wed, 27 Mar 2013 00:31:33 +0000 (17:31 -0700)]
compat-drivers: add initial kconfig development

This adds intial development kconfig support (make menuconfig).
Synching in kconfig from linux-next next-20130326.
Support is still under development so to enable it
if you want to work on it, just run manually:

  make -f scripts/kconfig/Makefile menuconfig

compat already provides its own set of scripts that
computes the kernels you need and spits it out to .config
through the call:

  ./compat/scripts/gen-compat-config.sh > $(COMPAT_CONFIG)

Perhaps something along these lines will do it:

--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ DESTDIR?=
 ifneq ($(KERNELRELEASE),)

 -include $(COMPAT_CONFIG)
+-include $(BACKPORT_CONFIG)
 include $(COMPAT_CONFIG_CW)

 NOSTDINC_FLAGS := \
@@ -86,7 +87,8 @@ export CFLAGS += \
 # These exported as they are used by the scripts
 # to check config and compat autoconf
 export COMPAT_CONFIG_CW=$(PWD)/config.mk
-export COMPAT_CONFIG=$(PWD)/.config
+export COMPAT_CONFIG=$(PWD)/compat/.config
+export BACKPORT_CONFIG=$(PWD)/.config

But I'm done for the day.

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: ignore .o files and .o.d dirs
Luis R. Rodriguez [Wed, 27 Mar 2013 00:31:33 +0000 (17:31 -0700)]
compat-drivers: ignore .o files and .o.d dirs

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: backport mac80211 set_multicast_list() 488b366a
Luis R. Rodriguez [Wed, 27 Mar 2013 00:13:44 +0000 (17:13 -0700)]
compat-drivers: backport mac80211 set_multicast_list() 488b366a

Synchs with next-20130326

The addition of the new mac80211 driver callback
set_multicast_list() uses the struct netdev_hw_addr_list
added as of 2.6.35. We already dealt with backporting
this collateral evolution through the changes that
went in on for the prepare_multicast() callback, as
well as porting Ethernet driver usage of this. This
is all dealt with on the patch:

patches/collateral-evolutions/network/25-multicast-list_head.patch

Reviewing that gave a quick idea of how to backport this
new callback in a similar way.

commit 488b366a452934141959384c7a1b52b22d6154ef
Author: Alexander Bondar <alexander.bondar@intel.com>
Date:   Mon Feb 11 14:56:29 2013 +0200

    mac80211: add driver callback for per-interface multicast filter

    Some devices have multicast filter capability for each individual
    virtual interface rather than just a global one. Add an interface
    specific driver callback allowing such drivers to configure this.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1   2.6.24              [  OK  ]
2   2.6.25              [  OK  ]
3   2.6.26              [  OK  ]
4   2.6.27              [  OK  ]
5   2.6.28              [  OK  ]
6   2.6.29              [  OK  ]
7   2.6.30              [  OK  ]
8   2.6.31              [  OK  ]
9   2.6.32              [  OK  ]
10  2.6.33              [  OK  ]
11  2.6.34              [  OK  ]
12  2.6.35              [  OK  ]
13  2.6.36              [  OK  ]
14  2.6.37              [  OK  ]
15  2.6.38              [  OK  ]
16  2.6.39              [  OK  ]
17  3.0.65              [  OK  ]
18  3.1.10              [  OK  ]
19  3.2.38              [  OK  ]
20  3.3.8               [  OK  ]
21  3.4.32              [  OK  ]
22  3.5.7               [  OK  ]
23  3.6.11              [  OK  ]
24  3.7.9               [  OK  ]
25  3.8.0               [  OK  ]
26  3.9-rc1             [  OK  ]

real    23m32.940s
user    650m11.334s
sys     79m7.021s

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: fix compilation on 2.6.30
Luis R. Rodriguez [Wed, 27 Mar 2013 00:44:01 +0000 (17:44 -0700)]
compat-drivers: fix compilation on 2.6.30

Commit cfe9f9 did indeed fix the new changes on the TI
driver for newer kernels but failed to address the removal
of the wl12xx_hardirq handle no longer required for older
kernels. Fix this.

commit cfe9f97862b7c6eceb25932a6fec32ed0887171b
Author: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Date:   Tue Mar 26 16:14:42 2013 -0700

    compat-drivers: fix collateral-evolutions/network/09-threaded-irq.patch

    Manual edits required due to some context changes. The change
    in question that caused this is

    commit 97236a0656034ef8512ded648cfaa3d7282534e8
    Author: Luciano Coelho <coelho@ti.com>
    Date:   Fri Mar 8 09:41:53 2013 +0200

        wlcore: move handling from hardirq to the irq thread function

        Spin locks and completions are expensive in hard IRQ context and cause
        problems with RT kernels.  In RT kernels, both spin locks and
        completions can schedule(), so we can't use them in hard irq context.

        Move handling code into the irq thread function to avoid that.

Reported-by: Gregoire Gentil <gregoire@alwaysinnovating.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: refresh patches for next-20130326
Luis R. Rodriguez [Tue, 26 Mar 2013 23:21:57 +0000 (16:21 -0700)]
compat-drivers: refresh patches for next-20130326

Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
11 years agocompat-drivers: fix collateral-evolutions/network/09-threaded-irq.patch
Luis R. Rodriguez [Tue, 26 Mar 2013 23:14:42 +0000 (16:14 -0700)]
compat-drivers: fix collateral-evolutions/network/09-threaded-irq.patch

Manual edits required due to some context changes. The change
in question that caused this is

commit 97236a0656034ef8512ded648cfaa3d7282534e8
Author: Luciano Coelho <coelho@ti.com>
Date:   Fri Mar 8 09:41:53 2013 +0200

    wlcore: move handling from hardirq to the irq thread function

    Spin locks and completions are expensive in hard IRQ context and cause
    problems with RT kernels.  In RT kernels, both spin locks and
    completions can schedule(), so we can't use them in hard irq context.

    Move handling code into the irq thread function to avoid that.

Reported-by: Gregoire Gentil <gregoire@alwaysinnovating.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>