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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Luis R. Rodriguez [Fri, 15 Jan 2010 00:09:27 +0000 (16:09 -0800)]
Fix loading of compat_firmware_class due to class name conflict
This fixes this warning:
[ 869.248771] ------------[ cut here ]------------
[ 869.248779] WARNING: at fs/sysfs/dir.c:463 sysfs_add_one+0x51/0x60()
[ 869.248784] sysfs: duplicate filename 'firmware' can not be created
[ 869.248788] Modules linked in: compat_firmware_class(+) aes_generic binfmt_misc ppdev i915 drm snd_hda_intel snd_pcm_oss snd_mixer_oss snd_pcm snd_page_alloc snd_hwdep snd_seq_dummy snd_seq_oss snd_seq_midi rfcomm snd_rawmidi sco arc4 snd_seq_midi_event bridge stp snd_seq bnep mac80211 snd_timer pcmcia l2cap ath snd_seq_device btusb iptable_filter yenta_socket bluetooth cfg80211 psmouse snd thinkpad_acpi rfkill_backport ip_tables rsrc_nonstatic video serio_raw compat soundcore output x_tables nvram pcmcia_core led_class joydev lp parport usbhid ohci1394 ieee1394 e1000e intel_agp [last unloaded: ath5k]
[ 869.248885] Pid: 6096, comm: modprobe Not tainted 2.6.27.41 #1
[ 869.248890]
[ 869.248892] Call Trace:
[ 869.248902] [<
ffffffff8024cf18>] warn_slowpath+0x98/0xd0
[ 869.248912] [<
ffffffff803cf518>] ? idr_get_empty_slot+0x108/0x2c0
[ 869.248920] [<
ffffffff803cf780>] ? ida_get_new_above+0xb0/0x220
[ 869.248927] [<
ffffffff80340559>] ? sysfs_ilookup_test+0x9/0x20
[ 869.248934] [<
ffffffff802f8df4>] ? find_inode+0x54/0xa0
[ 869.248940] [<
ffffffff80340550>] ? sysfs_ilookup_test+0x0/0x20
[ 869.248948] [<
ffffffff802f8479>] ? __iget+0x9/0x70
[ 869.248954] [<
ffffffff80340865>] ? sysfs_find_dirent+0x35/0x50
[ 869.248961] [<
ffffffff80341811>] sysfs_add_one+0x51/0x60
[ 869.248967] [<
ffffffff80341888>] create_dir+0x68/0xb0
[ 869.248975] [<
ffffffff80341909>] sysfs_create_dir+0x39/0x50
[ 869.248982] [<
ffffffff803d05ba>] ? kobject_get+0x1a/0x30
[ 869.248989] [<
ffffffff803d0716>] kobject_add_internal+0xb6/0x200
[ 869.248998] [<
ffffffff803d088f>] kset_register+0x2f/0x60
[ 869.249009] [<
ffffffff8046869f>] __class_register+0xcf/0x1b0
[ 869.249020] [<
ffffffffa000b000>] ? firmware_class_init+0x0/0x7e [compat_firmware_class]
[ 869.249029] [<
ffffffffa000b021>] firmware_class_init+0x21/0x7e [compat_firmware_class]
[ 869.249038] [<
ffffffff8020a041>] do_one_initcall+0x41/0x170
[ 869.249047] [<
ffffffff80269411>] ? __blocking_notifier_call_chain+0x21/0x80
[ 869.249059] [<
ffffffff8027974f>] sys_init_module+0xaf/0x1e0
[ 869.249068] [<
ffffffff802116fa>] system_call_fastpath+0x16/0x1b
[ 869.249072]
[ 869.249075] ---[ end trace
c1a363c5ede5a470 ]---
[ 869.249082] kobject_add_internal failed for firmware with -EEXIST, don't try to register things with the same name in the same directory.
[ 869.249092] Pid: 6096, comm: modprobe Tainted: G W 2.6.27.41 #1
[ 869.249096]
[ 869.249097] Call Trace:
[ 869.249104] [<
ffffffff803d07bd>] kobject_add_internal+0x15d/0x200
[ 869.249112] [<
ffffffff803d088f>] kset_register+0x2f/0x60
[ 869.249120] [<
ffffffff8046869f>] __class_register+0xcf/0x1b0
[ 869.249130] [<
ffffffffa000b000>] ? firmware_class_init+0x0/0x7e [compat_firmware_class]
[ 869.249139] [<
ffffffffa000b021>] firmware_class_init+0x21/0x7e [compat_firmware_class]
[ 869.249146] [<
ffffffff8020a041>] do_one_initcall+0x41/0x170
[ 869.249153] [<
ffffffff80269411>] ? __blocking_notifier_call_chain+0x21/0x80
[ 869.249163] [<
ffffffff8027974f>] sys_init_module+0xaf/0x1e0
[ 869.249170] [<
ffffffff802116fa>] system_call_fastpath+0x16/0x1b
[ 869.249174]
[ 869.249178] firmware_class_init: class_register failed
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Thu, 14 Jan 2010 01:38:45 +0000 (17:38 -0800)]
Export CONFIG_COMPAT_FIRMWARE_CLASS
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Thu, 14 Jan 2010 01:37:08 +0000 (17:37 -0800)]
Enable 2.6.33 compatibility
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Thu, 14 Jan 2010 01:35:29 +0000 (17:35 -0800)]
Enable the compat_firmware_class to be built only on < 2.6.32
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Thu, 14 Jan 2010 01:09:24 +0000 (17:09 -0800)]
Backport the new firmware_class from > 2.6.33 down to 2.6.23
My main concern with this backport was the usage of the
core driver "base.h" but as it turns out firmware_class doesn't
even need it. This allowed the backport to go through.
This new backport allows drivers which use the new modified firmware
API request_firmware_nowait() on older kernels. You should not
need to chagne the your request_firmware_nowait() calls at all;
the compat-2.6.32.h header ensures that your calls get mapped
to compat_request_firmware_nowait()
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Wed, 13 Jan 2010 23:13:41 +0000 (15:13 -0800)]
Update for next-
20100113
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Hauke Mehrtens [Wed, 13 Jan 2010 21:20:19 +0000 (22:20 +0100)]
compat: build pccard and pcmcia condituinaly
If the kernel does not include pcmcia, compat.o should not relay on
methods provided by it.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Wed, 13 Jan 2010 21:20:18 +0000 (22:20 +0100)]
compat: autoconf.h moved from linux/ to generated/ with kernel 2.6.33
Changed the headers, because autoconf.h moved from linux/ into
generated/
All compat-2.6.XX.h files are included by compat-2.6.h, so only
compat-2.6.h needs to include autoconf.h. There is no situation known to
me where you want to include any compat-2.6.XX.h file directly.
This fixes build with kernel 2.6.33, without it complains about a
missing import:
/include/linux/compat-2.6.h:4:28: error: linux/autoconf.h: No such file or directory
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Hauke Mehrtens [Wed, 13 Jan 2010 21:20:17 +0000 (22:20 +0100)]
compat: fix two return types
This fixes a build error introduced in
7d2b68df6301937a8299bca8bef135ae951b569c:
/include/linux/compat-2.6.25.h:172: error: two or more data types in declaration specifiers
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Luis R. Rodriguez [Wed, 13 Jan 2010 20:36:32 +0000 (12:36 -0800)]
Add notes about why debugfs_remove_recursive() cannot be backported
You should just disable debugging for older kernels if this is used.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Wed, 13 Jan 2010 17:50:36 +0000 (09:50 -0800)]
Add module load print to know where we backported from
For stable kernels this will be more important. I'll soon start
a branch based on new kernel releases so if anyone wants to
base their code only up to a specific point release they can use
that.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Senthil Balasubramanian [Tue, 12 Jan 2010 10:51:02 +0000 (16:21 +0530)]
Fix dev_set_name() for kernel 2.6.23
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Senthil Balasubramanian [Wed, 13 Jan 2010 00:50:52 +0000 (16:50 -0800)]
Fix cfg80211 panic caused by backported pm-qos support
pm-qos needs to be deregistered upon module unload.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Wed, 13 Jan 2010 00:31:23 +0000 (16:31 -0800)]
Backport DEFINE_PCI_DEVICE_TABLE for kernels < 2.6.25
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 02:13:16 +0000 (18:13 -0800)]
Adds __dev_addr_delete() and __dev_addr_add() for 2.6.22
Not sure how to port this yet though:
CC [M] /home/mcgrof/compat/compat/compat-2.6.32.o
/home/mcgrof/compat/compat/compat-2.6.32.c: In function ‘__dev_addr_sync’:
/home/mcgrof/compat/compat/compat-2.6.32.c:84: error: ‘struct dev_mc_list’ has no member named ‘da_synced’
/home/mcgrof/compat/compat/compat-2.6.32.c:89: error: ‘struct dev_mc_list’ has no member named ‘da_synced’
/home/mcgrof/compat/compat/compat-2.6.32.c: In function ‘__dev_addr_unsync’:
/home/mcgrof/compat/compat/compat-2.6.32.c:111: error: ‘struct dev_mc_list’ has no member named ‘da_synced’
/home/mcgrof/compat/compat/compat-2.6.32.c:114: error: ‘struct dev_mc_list’ has no member named ‘da_synced’
make[3]: *** [/home/mcgrof/compat/compat/compat-2.6.32.o] Error 1
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 01:52:30 +0000 (17:52 -0800)]
Add initial 2.6.22 support
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 01:26:03 +0000 (17:26 -0800)]
Synch up pm-qos implementation completely with linux-next next-
20100111
This should be easier to keep track of and backport now
for older kernels. As we move along each new kernel release
will get a branch and have its own pm-qos implementation,
the master tag will always keep backporting the latest
bleedinge edge (from linux-next).
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 01:13:31 +0000 (17:13 -0800)]
Move pm-qos backport comments to 2.6.25 compat header
We'll be synching the pm-qos implementation to match upstream
pm-qos on linux-next.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 01:07:28 +0000 (17:07 -0800)]
Extract pm-qos code into compat/pm_qos_params.c
This should make it easier to synch with later
version of kernel/pm_qos_params.c
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 00:44:06 +0000 (16:44 -0800)]
Updates the pm-qos array indexes to match upstream
This style is used now upstream for the pm-qos object array
declaration.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 00:40:14 +0000 (16:40 -0800)]
Add the new system bus frequency pm-qos object for older kernels
This adds the new system_bus_freq_pm_qos for older kernels.
This also fixes a compile warning on possible array out of
bounds access on pm-qos, this was due to the fact that the
pm-qos implementation we had on code was out of synch with
the header we were copying over. This synchs up the array
to what is in linux-next as of linux-next tag next-
20100111
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 00:24:09 +0000 (16:24 -0800)]
Only define BITS_TO_LONGS if not defined
This removes this nagging complaint on older kernels:
CC [M] /home/mcgrof/compat/compat/compat-2.6.32.o
In file included from include/asm-i386/cpufeature.h:11,
from include/asm/cpufeature.h:10,
from include/asm/alternative.h:43,
from include/asm/atomic.h:4,
from /home/mcgrof/compat/include/linux/compat-2.6.24.h:10,
from /home/mcgrof/compat/include/linux/compat-2.6.h:15,
from <command-line>:0:
/home/mcgrof/compat/include/linux/bitops.h:10:1: warning: "BITS_TO_LONGS" redefined
In file included from include/asm/alternative.h:6,
from include/asm/atomic.h:4,
from /home/mcgrof/compat/include/linux/compat-2.6.24.h:10,
from /home/mcgrof/compat/include/linux/compat-2.6.h:15,
from <command-line>:0:
include/linux/types.h:6:1: warning: this is the location of the previous definition
In file included from include/asm-i386/cpufeature.h:11,
from include/asm/cpufeature.h:10,
from include/asm/alternative.h:43,
from include/asm/atomic.h:4,
from /home/mcgrof/compat/include/linux/compat-2.6.24.h:10,
from /home/mcgrof/compat/include/linux/compat-2.6.h:15,
from <command-line>:0:
Note that this means we'll have to keep include/linux/bitops.h up to
date on our tree now. Shouldn't be an issue but just worth noting.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Tue, 12 Jan 2010 00:17:04 +0000 (16:17 -0800)]
Add initial backport support for network namespaces
We simply declare the overly used init_net sprinkled all over
the kernel, and declare its. All other code should that uses
network namespaces should be ifdef'd for now as well as
inclusion of net/net_namespace.h as we do not backport
the network namespace implemetnation at all, we simply
try to nullify its effect.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Mon, 11 Jan 2010 23:57:52 +0000 (15:57 -0800)]
Add DMA_BIT_MASK() for older kernels
Old kernels do not have this declared.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Mon, 11 Jan 2010 23:56:12 +0000 (15:56 -0800)]
Add missing input key definitions
Newer rfkill implementations makes use of this. rfkill
for newer kernels has been backported for older kernels
through compat-wireless. Maybe we should bring that in
here?
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis R. Rodriguez [Mon, 11 Jan 2010 23:43:19 +0000 (15:43 -0800)]
Copy over a few headers from the latest kernel
These header files are used regularly by new Linux driver.
Instead of backporting those headers just copy the headers
over. This is typically not recommended unless you know
what you are doing. In this case we do -- we ensure structs
don't change for usage of certain subystems and when they do
change we port the entire subsystem ourselves.
In this case we only copy over bit operations, unaligned helpers.
The only subystem related header we copy over is the wireless header
for which we use to backport the entire 802.11 subsystem using
compat-wireless, and compat-wireless uses this compat module.
We'll synch these on each kernel release.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>