openwrt/staging/blogic.git
14 years agocompat: fix pm_qos_params compile error on 2.6.35
Felix Fietkau [Fri, 12 Nov 2010 19:14:44 +0000 (11:14 -0800)]
compat: fix pm_qos_params compile error on 2.6.35

Linux 2.6.35 pm_qos_params.h is missing a #ifndef/define/endif around
its header file contents, causing a compile error when its functions
are overwritten by macros in the compat header files.
Fix this by adding these to the compat version of this header file.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 years agocompat: backport sign_extend32()
Luis R. Rodriguez [Thu, 11 Nov 2010 00:28:48 +0000 (16:28 -0800)]
compat: backport sign_extend32()

commit 5faec21f3a6973219481394534ce0e5f17507d84
Author: Andreas Herrmann <andreas.herrmann3@amd.com>
Date:   Mon Aug 30 19:04:01 2010 +0000

    bitops: Provide generic sign_extend32 function

    This patch moves code out from wireless drivers where two different
    functions are defined in three code locations for the same purpose and
    provides a common function to sign extend a 32-bit value.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: add a wrapper for rfkill.h
Felix Fietkau [Wed, 10 Nov 2010 23:38:55 +0000 (15:38 -0800)]
compat: add a wrapper for rfkill.h

With this we can get rid of some of the rfkill related patching mess.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 years agocompat: backport pm_qos_request
Felix Fietkau [Wed, 10 Nov 2010 23:02:50 +0000 (15:02 -0800)]
compat: backport pm_qos_request

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 years agocompat: backport pm_qos_*_request
Felix Fietkau [Wed, 10 Nov 2010 22:50:00 +0000 (14:50 -0800)]
compat: backport pm_qos_*_request

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 years agocompat: backport upstream firmware_class bug through f45f3c1f
Luis R. Rodriguez [Tue, 9 Nov 2010 00:53:11 +0000 (16:53 -0800)]
compat: backport upstream firmware_class bug through f45f3c1f

This backports this patch:

commit f45f3c1f3f616ca1d1e1eb5e7a720ca63cb59550
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Wed Aug 18 17:15:18 2010 +0200

    firmware_class: fix typo in error path

    In the error path, _request_firmware sets
    firmware_p to NULL rather than *firmware_p,
    which leads to passing a freed firmware
    struct to drivers when the firmware file
    cannot be found. Fix this.

    Broken by commit f8a4bd3456b988fc73b2c.

Reported-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
All kernels older than 2.6.33 would be affected by this.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: remove unnecessary ifdefs and empty file
Hauke Mehrtens [Fri, 5 Nov 2010 19:27:03 +0000 (20:27 +0100)]
compat: remove unnecessary ifdefs and empty file

The Makefile only builds the needed compat-2.6.XX.c files and not all,
so the ifdefs are not needed.

compat-2.6.30.c did not had any real content so remove it.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix build with kernel 2.6.37rc1
Hauke Mehrtens [Fri, 5 Nov 2010 19:27:02 +0000 (20:27 +0100)]
compat: fix build with kernel 2.6.37rc1

Some backports are also needed when compiling against kernel 2.6.37.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: add empty implementation for usb_enable_autosuspend
Hauke Mehrtens [Sat, 23 Oct 2010 18:14:01 +0000 (20:14 +0200)]
compat: add empty implementation for usb_enable_autosuspend

This is needed by drivers/bluetooth/btusb.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: lock correct mutex in device_lock
Hauke Mehrtens [Sat, 23 Oct 2010 18:14:00 +0000 (20:14 +0200)]
compat: lock correct mutex in device_lock

This seams to be an error as all the other functions are working on the
other struct.

CC: Blaise Gassend <blaise@willowgarage.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix device_lock functions on non rt kernel
Hauke Mehrtens [Sat, 23 Oct 2010 18:13:59 +0000 (20:13 +0200)]
compat: fix device_lock functions on non rt kernel

CONFIG_NONE and CONFIG_PREEMPT_VOLUNTARY are not added by the last RT
patch. I have not found any references to CONFIG_NONE, probably
CONFIG_PREEMPT_NONE was meant, but that is also wrong like
CONFIG_PREEMPT_VOLUNTARY. These two options are also in the normal kernel
config system without the rt patch.

This patch only checks for KConfig options added by the rt patch, but a
rt-patch user could also select PREEMPT_NONE or PREEMPT_VOLUNTARY, and
compat-wireless will not build. I do not think this will hapen often, so leave
it like this.

This patch fixes build with all non rt-kernels.

CC: Blaise Gassend <blaise@willowgarage.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: Fixes missing sem member in struct device for RT PREEMPT prior to 2.6.34
Blaise Gassend [Fri, 22 Oct 2010 09:32:04 +0000 (02:32 -0700)]
compat: Fixes missing sem member in struct device for RT PREEMPT prior to 2.6.34

The RT PREEMPT patch eliminates the sem member in struct device
breaking device_lock, device_unlock and device_trylock in kernels
prior to 2.6.34. The attached patch replaces the use of sem by a use
of mutex.

Signed-off-by: Blaise Gassend <blaise@willowgarage.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: backport sock_recv_ts_and_drops
Hauke Mehrtens [Mon, 18 Oct 2010 20:36:35 +0000 (22:36 +0200)]
compat: backport sock_recv_ts_and_drops

This is needed for bluetooth

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix a crash in the netlink backport
Felix Fietkau [Mon, 11 Oct 2010 17:41:45 +0000 (10:41 -0700)]
compat: fix a crash in the netlink backport

Do not set the .doit wrapper if there is no .doit function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 years agocompat: rename member in struct mmc_host.
Hauke Mehrtens [Thu, 7 Oct 2010 21:22:24 +0000 (23:22 +0200)]
compat: rename member in struct mmc_host.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport some more kfifo stuff
Hauke Mehrtens [Thu, 7 Oct 2010 21:22:23 +0000 (23:22 +0200)]
compat: backport some more kfifo stuff

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport netlink changes used in the nl80211 cleanup
Felix Fietkau [Thu, 7 Oct 2010 21:47:53 +0000 (14:47 -0700)]
compat: backport netlink changes used in the nl80211 cleanup

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 years agocompat: fix build error in init_dummy_netdev
Hauke Mehrtens [Sat, 25 Sep 2010 11:22:17 +0000 (13:22 +0200)]
compat: fix build error in init_dummy_netdev

In kernel <= 2.6.28 the member napi_list in struct net_device is only
availabe if CONFIG_NETPOLL is set. We should initialize it only if it
is available.

This should fix the problem reported by Philip.

This should also go into stable.

CC: philipp_subx@redfish-solutions.com
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: pcmcia/cs.h is removed form new kernels
Hauke Mehrtens [Sun, 19 Sep 2010 17:42:11 +0000 (10:42 -0700)]
compat: pcmcia/cs.h is removed form new kernels

On older kernel versions we have to include pcmcia/cs_types.h and
pcmcia/cs.h before pcmcia/cistpl.h.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: move pmcia backport code into compat-2.6.36.h
Hauke Mehrtens [Sun, 19 Sep 2010 17:42:10 +0000 (10:42 -0700)]
compat: move pmcia backport code into compat-2.6.36.h

We have all out backport headers in include/linux/compat-2.6.XX.h also the pcmcia
part there.

CC: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport some usb urb functions
Hauke Mehrtens [Sun, 19 Sep 2010 17:42:09 +0000 (10:42 -0700)]
compat: backport some usb urb functions

These functions have to be backported, because they were thread-unsafe.
This is commit b3e670443b7fb8a2d29831b62b44a039c283e351 in mainline kernel.

CC: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport PCMCIA API changes.
Hauke Mehrtens [Sun, 19 Sep 2010 17:42:08 +0000 (10:42 -0700)]
compat: backport PCMCIA API changes.

This backports the API change to pcmcia_enable_device

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport list_for_each_entry_continue_rcu
Hauke Mehrtens [Wed, 15 Sep 2010 20:42:33 +0000 (13:42 -0700)]
compat: backport list_for_each_entry_continue_rcu

This is needed for new driver carl9170.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport loff_t noop_llseek
Hauke Mehrtens [Wed, 15 Sep 2010 20:42:32 +0000 (13:42 -0700)]
compat: backport loff_t noop_llseek

This is needed by some debug parts of mac80211.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport printk_once
Hauke Mehrtens [Sat, 11 Sep 2010 16:19:59 +0000 (09:19 -0700)]
compat: backport printk_once

This is needed by brcm80211.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport skb_checksum_none_assert
Hauke Mehrtens [Sat, 11 Sep 2010 16:19:58 +0000 (09:19 -0700)]
compat: backport skb_checksum_none_assert

This is needed by atlx, b44, atl1c and atl1e.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport linux/pci-aspm.h
Hauke Mehrtens [Thu, 2 Sep 2010 13:19:13 +0000 (06:19 -0700)]
compat: backport linux/pci-aspm.h

pci-aspm.h was introduced in kernel 2.6.25 and is used by the ath5k and iwlwifi driver.

v2: Do not place the empty functions into pci-aspm.h. Now we do not
have to change pci-aspm.h when it changes in the mainline kernel only
compat-2.6.26.h has to be changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: add support for ndo_init backport
Luis R. Rodriguez [Tue, 31 Aug 2010 01:54:31 +0000 (18:54 -0700)]
compat: add support for ndo_init backport

ath6kl uses this.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: define PM_EVENT_SLEEP only if not defined
Luis R. Rodriguez [Wed, 25 Aug 2010 22:27:51 +0000 (15:27 -0700)]
compat: define PM_EVENT_SLEEP only if not defined

This fixes a compilation warning on Ubuntu's 2.6.24
kernel which added the PM_EVENT_SLEEP even though upstream
Linux 2.6.24.7 (the last 2.6.24) does not have it. Its
a trivial change and I'm willing to support it to avoid
compilation.

Tested against /lib/modules/2.6.24-27-lpia/build

These kernel headers can be foudn here:

http://kernel.org/pub/linux/kernel/people/mcgrof/ubuntu/debs/kernel-headers/

Install with dpkg -i --force-architecture *.deb

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: fix warning in device_rename
Hauke Mehrtens [Tue, 17 Aug 2010 18:32:33 +0000 (20:32 +0200)]
compat: fix warning in device_rename

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport net_ns_type_operations
Hauke Mehrtens [Tue, 17 Aug 2010 18:32:32 +0000 (20:32 +0200)]
compat: backport net_ns_type_operations

net_ns_type_operations needs to be exported. This only works for kernel
>= 2.6.35 because struct kobj_ns_type_operations was introduced in
kernel 2.6.35.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport init_dummy_netdev
Hauke Mehrtens [Tue, 17 Aug 2010 18:32:31 +0000 (20:32 +0200)]
compat: backport init_dummy_netdev

NETREG_DUMMY is not available for older kernels, it should be set to
something not normal. NETREG_DUMMY is set to 5 in new kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport SDIO_CLASS_BT_AMP
Hauke Mehrtens [Tue, 10 Aug 2010 20:21:26 +0000 (22:21 +0200)]
compat: backport SDIO_CLASS_BT_AMP

This is needed by drivers/bluetooth/btsdio.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: update compat_firmware_class.c
Hauke Mehrtens [Sat, 7 Aug 2010 13:32:21 +0000 (15:32 +0200)]
compat: update compat_firmware_class.c

Refresh code based on recent version in linux-next.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix compiler warning
Hauke Mehrtens [Sat, 7 Aug 2010 13:32:20 +0000 (15:32 +0200)]
compat: fix compiler warning

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: move va_format to compat-2.6.36.h
Hauke Mehrtens [Sat, 7 Aug 2010 13:32:19 +0000 (15:32 +0200)]
compat: move va_format to compat-2.6.36.h

This struct was introduced in kernel 2.6.36 and not 2.6.35.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport n_tty_ioctl_helper
Hauke Mehrtens [Sat, 7 Aug 2010 13:32:18 +0000 (15:32 +0200)]
compat: backport n_tty_ioctl_helper

This function is needed by some bluetooth drivers

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: add br_port_exists() and ask for inclusion upstream
Luis R. Rodriguez [Fri, 6 Aug 2010 23:03:42 +0000 (16:03 -0700)]
compat: add br_port_exists() and ask for inclusion upstream

The br_port_exists() call is used internally on private bridge
code on net/bridge/ to check if a netdevice is a bridge port.
The way to check if a netdevice is a bridge port has changed
for 2.6.36 from checking the netdev->br_port pointer to
checking for a IFF_BRIDGE_PORT flag on the netdev->priv_flags.

Instead of requiring backport code to ifdef the checks lets
move the private br_port_exists() to a public header accessible
by drivers and consistantly use it to check for the bridge
port.

I'll submit a patch upstream to move br_port_exists() to a public
header so that we don't have to later even require a patch on
backported code. We'll see if it gets accepted though.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: move struct va_format to 2.6.35 header
Luis R. Rodriguez [Thu, 5 Aug 2010 19:09:22 +0000 (12:09 -0700)]
compat: move struct va_format to 2.6.35 header

This was added as of the 2.6.35-rc1 kernel.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: backport pcmcia_{read,write}_config byte from v2.6.36
Kshitij Kulshreshtha [Wed, 4 Aug 2010 14:18:35 +0000 (16:18 +0200)]
compat: backport pcmcia_{read,write}_config byte from v2.6.36

Signed-off-by: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
14 years agocompat: define struct va_format introduced in v2.6.36
Kshitij Kulshreshtha [Sun, 1 Aug 2010 22:02:51 +0000 (00:02 +0200)]
compat: define struct va_format introduced in v2.6.36

Signed-off-by: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
14 years agocompat: header <pcmcia/cs_types.h> was removed in v2.6.36
Kshitij Kulshreshtha [Sun, 1 Aug 2010 22:02:50 +0000 (00:02 +0200)]
compat: header <pcmcia/cs_types.h> was removed in v2.6.36

the header <pcmcia/cs.h> in versions < 2.6.36 requires types defined
in <pcmcia/cs_types.h> so include it first.

Signed-off-by: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
14 years agocompat: backport hex_to_bin first introduced in v2.6.35
Kshitij Kulshreshtha [Sun, 1 Aug 2010 22:02:49 +0000 (00:02 +0200)]
compat: backport hex_to_bin first introduced in v2.6.35

Signed-off-by: Kshitij Kulshreshtha <kkhere.geo@gmail.com>
14 years agocompat: fix build if CONFIG_PCCARD=y and CONFIG_PCMCIA=n
Hauke Mehrtens [Sun, 18 Jul 2010 19:09:22 +0000 (21:09 +0200)]
compat: fix build if CONFIG_PCCARD=y and CONFIG_PCMCIA=n

The includes are needed for pccard_loop_tuple.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix tracpoint building
Hauke Mehrtens [Thu, 8 Jul 2010 21:11:58 +0000 (23:11 +0200)]
compat: fix tracpoint building

trace/define_trace.h can be included more often and it have to.

This fixes some errors like this:
WARNING: "__tracepoint_iwlwifi_dev_rx" [/home/hauke/compat-wireless/compat-wireless-git/drivers/net/wireless/iwlwifi/iwlcore.ko] undefined!

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: Fix panic caused by NULL pointer derefence in rtnl_fill_ifinfo
Rajkumar Manoharan [Tue, 29 Jun 2010 06:38:07 +0000 (12:08 +0530)]
compat: Fix panic caused by NULL pointer derefence in rtnl_fill_ifinfo

get stats netdev ops is blindy called for older kernels (< 2.6.29) and
so assigning a NULL pointer from netdev_attach_ops causes a NULL pointer
dereference.

By default, netdev alloc provides an internal stats reference. So fill
this only if ndo_get_stats is defined.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
14 years agocompat: backport skb_queue_splice_init
Hauke Mehrtens [Thu, 24 Jun 2010 20:59:23 +0000 (22:59 +0200)]
compat: backport skb_queue_splice_init

This is needed by iwmc3200wifi.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport lockdep_assert_held
Hauke Mehrtens [Tue, 15 Jun 2010 20:57:44 +0000 (22:57 +0200)]
compat: backport lockdep_assert_held

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport sdio_writeb_readb
Hauke Mehrtens [Sun, 13 Jun 2010 19:56:49 +0000 (21:56 +0200)]
compat: backport sdio_writeb_readb

This is needed by wl1251_sdio.c
Use sdio_readb instead of sdio_writeb_readb as long as sdio_writeb_readb was not realy backported.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport dma_set_coherent_mask
Hauke Mehrtens [Sun, 13 Jun 2010 19:56:48 +0000 (21:56 +0200)]
compat: backport dma_set_coherent_mask

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: use kernel pm_qos_params.h
Hauke Mehrtens [Sun, 6 Jun 2010 09:12:27 +0000 (11:12 +0200)]
compat: use kernel pm_qos_params.h

Do not use pm_qos_params.h from compat-wireless if the kernel also
ships this file. In kernel 2.6.35 pm_qos_params.h changed and the in
kernel header file is needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport small functions and defines
Hauke Mehrtens [Sun, 6 Jun 2010 09:12:26 +0000 (11:12 +0200)]
compat: backport small functions and defines

Backport of some functions and defines needed by compat-wireless.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: move kparam_{block,unblock}_sysfs_write
Hauke Mehrtens [Sun, 6 Jun 2010 09:12:25 +0000 (11:12 +0200)]
compat: move kparam_{block,unblock}_sysfs_write

kparam_block_sysfs_write and kparam_unblock_sysfs_write are not in
kernel 2.6.35, move them to backport from kernel 2.6.36.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: update bitops.h and wireless.h
Hauke Mehrtens [Sun, 6 Jun 2010 09:12:24 +0000 (11:12 +0200)]
compat: update bitops.h and wireless.h

copy files from linux-next next-20100604

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport USHRT_MAX, SHRT_MAX and SHRT_MIN
Luis R. Rodriguez [Thu, 27 May 2010 03:01:52 +0000 (20:01 -0700)]
compat: backport USHRT_MAX, SHRT_MAX and SHRT_MIN

This backports this patch:

Author: Alexey Dobriyan <adobriyan@gmail.com>
Date:   Mon May 24 14:33:03 2010 -0700

    kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN

    - C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not
      USHORT_MAX/SHORT_MAX/SHORT_MIN.

    - Make SHRT_MIN of type s16, not int, for consistency.

    [akpm@linux-foundation.org: fix drivers/dma/timb_dma.c]
    [akpm@linux-foundation.org: fix security/keys/keyring.c]
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: create the udev directories for compat_firmware file
Luis R. Rodriguez [Mon, 24 May 2010 16:52:22 +0000 (09:52 -0700)]
compat: create the udev directories for compat_firmware file

In case the directories are non existant create them.

Reported-by: Jaroslav Fojtik <jafojtik@seznam.cz>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoRemove the stupid SET_NETDEVOP
Luis R. Rodriguez [Wed, 19 May 2010 22:31:51 +0000 (15:31 -0700)]
Remove the stupid SET_NETDEVOP

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoFix the syntax for the defines passed for compat
Luis R. Rodriguez [Mon, 17 May 2010 21:39:57 +0000 (14:39 -0700)]
Fix the syntax for the defines passed for compat

Spaces would not have worked without this.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoAdd a COMPAT_PROJECT tag
Luis R. Rodriguez [Mon, 17 May 2010 21:36:43 +0000 (14:36 -0700)]
Add a COMPAT_PROJECT tag

This will be used to identify the backport project
only during initialization, there is no associated
module parameter for this as there is no need for it.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoAdd the COMPAT_BASE_TREE and COMPAT_BASE_TREE_VERSION
Luis R. Rodriguez [Mon, 17 May 2010 21:18:39 +0000 (14:18 -0700)]
Add the COMPAT_BASE_TREE and COMPAT_BASE_TREE_VERSION

These are to be used by projects using this tree for their
own backport projects.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoModify the compat print
Luis R. Rodriguez [Mon, 17 May 2010 19:04:06 +0000 (12:04 -0700)]
Modify the compat print

This uses the COMPAT_VERSION on the print

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: add compat_version read-only module parameter
Luis R. Rodriguez [Mon, 17 May 2010 18:55:06 +0000 (11:55 -0700)]
compat: add compat_version read-only module parameter

This will allow you to supply a version tag for the
backport you use. Compat-wireless will re-use this and
give it its own value based on the kernel we backport
from. It will use either the linux-next git describe
or the stable kernel git describe. Any delta on top of
the git tree should also be reflected then in case of
custom private trees/releases.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: move usb_{alloc,free}_coherent
Hauke Mehrtens [Mon, 10 May 2010 21:22:49 +0000 (23:22 +0200)]
compat: move usb_{alloc,free}_coherent

usb_alloc_coherent and usb_free_coherent were introduced in kernel 2.6.34.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: move kparam_{block,unblock}_sysfs_write
Hauke Mehrtens [Mon, 10 May 2010 21:22:48 +0000 (23:22 +0200)]
compat: move kparam_{block,unblock}_sysfs_write

kparam_block_sysfs_write and kparam_unblock_sysfs_write will introduced
in kernel 2.6.35 and not 2.6.33.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport eth_change_mtu and eth_validate_addr
Hauke Mehrtens [Wed, 5 May 2010 22:27:37 +0000 (00:27 +0200)]
compat: backport eth_change_mtu and eth_validate_addr

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: add the ndo_select_queue for netdev_attach_ops()
Luis R. Rodriguez [Wed, 5 May 2010 00:32:16 +0000 (17:32 -0700)]
compat: add the ndo_select_queue for netdev_attach_ops()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: add the rest of the missing netdev_attach_ops()
Luis R. Rodriguez [Wed, 5 May 2010 00:14:39 +0000 (17:14 -0700)]
compat: add the rest of the missing netdev_attach_ops()

If you don't see your net_device_ops implemented on
netdev_attach_ops() then you are shit out of luck and
you must do the nasty ifdef magic.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: add new way to backport the usage of net_device_ops
Luis R. Rodriguez [Tue, 4 May 2010 23:43:05 +0000 (16:43 -0700)]
compat: add new way to backport the usage of net_device_ops

We tend to #ifdef code that uses the new net_device_ops
on kernels older than 2.6.29. This tends to create a burden
on the upkeeping of the hunks. We can minimize our work by
instead definining a new netdev_attach_ops() which will do
our backport work for the older kernels and simply attach
the ops for newer kernels.

This should simplify backporting of network drivers
considerably.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: backport usb_alloc_coherent() and usb_free_coherent()
Hauke Mehrtens [Mon, 3 May 2010 19:36:41 +0000 (21:36 +0200)]
compat: backport usb_alloc_coherent() and usb_free_coherent()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport sk_sleep
Hauke Mehrtens [Wed, 28 Apr 2010 21:28:12 +0000 (23:28 +0200)]
compat: backport sk_sleep

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: update compat_firmware_class.c to new version
Hauke Mehrtens [Wed, 28 Apr 2010 21:28:11 +0000 (23:28 +0200)]
compat: update compat_firmware_class.c to new version

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix uevent_suppress on 2.6.29 or older kernels
Grazvydas Ignotas [Thu, 22 Apr 2010 13:54:02 +0000 (16:54 +0300)]
compat: fix uevent_suppress on 2.6.29 or older kernels

Missing uevent_suppress is causing two uevents instead of one, which is
confusing udev and sometimes causing firmware load to fail due to race
condition, so let's add it.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
14 years agocompat: backport convert multicast list to list_head.
Hauke Mehrtens [Mon, 19 Apr 2010 20:06:55 +0000 (22:06 +0200)]
compat: backport convert multicast list to list_head.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: Add linux/version.h include before using it.
Hauke Mehrtens [Sun, 18 Apr 2010 13:37:57 +0000 (15:37 +0200)]
compat: Add linux/version.h include before using it.

This causes problems if theses header files are used without including
linux/compat-2.6.h

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: Add definitions needed for libertas sdio driver.
Hauke Mehrtens [Sun, 18 Apr 2010 13:37:56 +0000 (15:37 +0200)]
compat: Add definitions needed for libertas sdio driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: add rcu_dereference_check
Felix Fietkau [Fri, 9 Apr 2010 17:50:22 +0000 (19:50 +0200)]
compat: add rcu_dereference_check

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
14 years agocompat: add net/net_namespace.h stub for Linux 2.6.23 and older
Pavel Roskin [Wed, 7 Apr 2010 05:26:52 +0000 (01:26 -0400)]
compat: add net/net_namespace.h stub for Linux 2.6.23 and older

This obviates a good part of 06-header-changes.patch in compat-wireless.

Signed-off-by: Pavel Roskin <proski@gnu.org>
14 years agocompat: add stub headers linux/tracepoint.h and trace/define_trace.h
Pavel Roskin [Tue, 6 Apr 2010 22:41:15 +0000 (18:41 -0400)]
compat: add stub headers linux/tracepoint.h and trace/define_trace.h

This should make 13-trace.patch in compat-wireless unnecessary.

Signed-off-by: Pavel Roskin <proski@gnu.org>
14 years agocompat: add device_create() implementation for Linux 2.6.26 and older
Pavel Roskin [Tue, 6 Apr 2010 22:41:09 +0000 (18:41 -0400)]
compat: add device_create() implementation for Linux 2.6.26 and older

This should make 25-device_create.patch in compat-wireless unnecessary.

Signed-off-by: Pavel Roskin <proski@gnu.org>
14 years agocompat: Backport clamp
Hauke Mehrtens [Mon, 5 Apr 2010 21:02:38 +0000 (23:02 +0200)]
compat: Backport clamp

This is needed by the ath5k driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: add qdisc_all_tx_empty for Linux 2.6.26 and older
Pavel Roskin [Wed, 24 Mar 2010 21:57:43 +0000 (17:57 -0400)]
compat: add qdisc_all_tx_empty for Linux 2.6.26 and older

14 years agocompat: add compat-2.6.35.h and IW_HANDLER
Pavel Roskin [Wed, 24 Mar 2010 21:23:37 +0000 (17:23 -0400)]
compat: add compat-2.6.35.h and IW_HANDLER

compat: add compat-2.6.35.h and IW_HANDLER

Signed-off-by: Pavel Roskin <proski@gnu.org>
14 years agocompat: backport PCMCIA_DEVICE_PROD_ID3
Hauke Mehrtens [Thu, 11 Mar 2010 21:32:43 +0000 (22:32 +0100)]
compat: backport PCMCIA_DEVICE_PROD_ID3

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: update bitops.h
Hauke Mehrtens [Thu, 11 Mar 2010 21:32:41 +0000 (22:32 +0100)]
compat: update bitops.h

Copy header from recent linux-next

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport device_{lock,trylock,unlock}
Hauke Mehrtens [Sun, 7 Mar 2010 10:20:41 +0000 (11:20 +0100)]
compat: backport device_{lock,trylock,unlock}

This fixes build of ar9170.

CC: Gus Wirth <gwirth79@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix some build problems with kernel 2.6.24
Hauke Mehrtens [Sun, 7 Mar 2010 10:20:40 +0000 (11:20 +0100)]
compat: fix some build problems with kernel 2.6.24

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: define KEY_RFKILL, which appeared in Linux 2.6.33
Pavel Roskin [Fri, 5 Mar 2010 20:58:25 +0000 (15:58 -0500)]
compat: define KEY_RFKILL, which appeared in Linux 2.6.33

It is used in net/rfkill/input.c

Signed-off-by: Pavel Roskin <proski@gnu.org>
14 years agocompat: backport some more of the netdev debug printk
Hauke Mehrtens [Sun, 21 Feb 2010 14:32:18 +0000 (15:32 +0100)]
compat: backport some more of the netdev debug printk

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: move debugfs_remove_recursive() to compat-2.6.27
Pavel Roskin [Sat, 20 Feb 2010 01:17:42 +0000 (20:17 -0500)]
compat: move debugfs_remove_recursive() to compat-2.6.27

debugfs_remove_recursive() appeared in Linux 2.6.27, so it should be in
compat-2.6.27, not in compat-2.6.26.  Don't compile it if
CONFIG_DEBUG_FS is disabled.

Signed-off-by: Pavel Roskin <proski@gnu.org>
14 years agocompat: backport debugfs_remove_recursive()
Pavel Roskin [Thu, 18 Feb 2010 17:45:37 +0000 (09:45 -0800)]
compat: backport debugfs_remove_recursive()

This avoids using the internal globals by the internal
kernel debugfs implementation.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: backport for ARM dma_sync_single_range_*() helpers
Pavel Roskin [Thu, 18 Feb 2010 17:34:36 +0000 (09:34 -0800)]
compat: backport for ARM dma_sync_single_range_*() helpers

This backports for ARM dma_sync_single_range_for_cpu()
and dma_sync_single_range_for_device() needed by the
b44 Ethernet driver.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: backport some netdevice.h defs
Hauke Mehrtens [Tue, 16 Feb 2010 21:03:01 +0000 (22:03 +0100)]
compat: backport some netdevice.h defs

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport genlmsg_unicast
Hauke Mehrtens [Tue, 16 Feb 2010 21:03:00 +0000 (22:03 +0100)]
compat: backport genlmsg_unicast

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix build on arm
Hauke Mehrtens [Thu, 21 Jan 2010 19:32:48 +0000 (20:32 +0100)]
compat: fix build on arm

ARM does not provided the include file asm/compat.h. Use linux/compat.h
instead, it includes asm/compat.h if needed.
This patch is from OpenWRT:
https://dev.openwrt.org/browser/trunk/package/mac80211/patches/020-fix_compat_h.patch?rev=19063

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: fix build with CONFIG_USB=m
Hauke Mehrtens [Wed, 20 Jan 2010 19:33:16 +0000 (20:33 +0100)]
compat: fix build with CONFIG_USB=m

The usb compat code was not build if usb was build as module in kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agoInstall udev rules and scripts needed for compat_firmware_class
Luis R. Rodriguez [Wed, 20 Jan 2010 19:03:49 +0000 (11:03 -0800)]
Install udev rules and scripts needed for compat_firmware_class

If you are a distribution maintainer and your distribution has
lsb_release and if you disagree with the way we handle the
uknown case just go ahead and add a case for yourself in
scripts/compat_firmware_install along with a directory and
your own files.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoFix build with CONFIG_USB disabled
Luis R. Rodriguez [Tue, 19 Jan 2010 23:59:13 +0000 (15:59 -0800)]
Fix build with CONFIG_USB disabled

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoFix build with CONFIG_PCMCIA disabled
Luis R. Rodriguez [Tue, 19 Jan 2010 23:58:56 +0000 (15:58 -0800)]
Fix build with CONFIG_PCMCIA disabled

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoOnly build compat_firmware_class if CONFIG_FW_LOADER was enabled
Luis R. Rodriguez [Tue, 19 Jan 2010 23:57:10 +0000 (15:57 -0800)]
Only build compat_firmware_class if CONFIG_FW_LOADER was enabled

This prevents bothering with building compat_firmware_class if your
kernel lacks CONFIG_FW_LOADER support.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: fix firmware class compile on linux 2.6.32
Felix Fietkau [Tue, 19 Jan 2010 19:19:07 +0000 (11:19 -0800)]
compat: fix firmware class compile on linux 2.6.32

The firmware class API change happened after 2.6.32, so move the compat
code to the 2.6.33 header file.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>