compat: provide INIT_WORK with 2 arguments for kernels before 2.6.20
Also provide work_func_t. Originally implemented and tested in
ndiswrapper.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Also provide work_func_t. Originally implemented and tested in
ndiswrapper.
Signed-off-by: Pavel Roskin <proski@gnu.org>
compat: add lower_32_bits
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add rcu_read_lock_held()
just the version without lock debug support is implemented, if you want
to debug the logs use a more recent kernel version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
just the version without lock debug support is implemented, if you want
to debug the logs use a more recent kernel version.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add kstrtou8_from_user
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add skb_frag_dma_map
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add __always_unused
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add crc8 lib
compat/crc8.c was copied from lib/crc8.c and include/linux/crc8.h was
copied from include/linux/crc8.h
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat/crc8.c was copied from lib/crc8.c and include/linux/crc8.h was
copied from include/linux/crc8.h
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add cordic lib
compat/cordic.c was copied from lib/cordic.c and include/linux/cordic.h was
copied from include/linux/cordic.h
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat/cordic.c was copied from lib/cordic.c and include/linux/cordic.h was
copied from include/linux/cordic.h
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add mac_pton()
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add PMSG_IS_AUTO
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: pm_qos_params.h was renamed to pm_qos.h
pm_qos.h was renamed to pm_qos_params.h in:
commit 1eee4691c3f058d1cf9757947ad9d9e03145a12c
Author: Jean Pihet <j-pihet@ti.com>
Date: Thu Aug 18 10:31:55 2011 +0200
PM QoS: Move and rename the implementation files
For older kernel versions the old header file should be used instead of the new one.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
pm_qos.h was renamed to pm_qos_params.h in:
commit 1eee4691c3f058d1cf9757947ad9d9e03145a12c
Author: Jean Pihet <j-pihet@ti.com>
Date: Thu Aug 18 10:31:55 2011 +0200
PM QoS: Move and rename the implementation files
For older kernel versions the old header file should be used instead of the new one.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The led_lock is never initialised, so there
are warnings/errors. It can also be made
static.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
are warnings/errors. It can also be made
static.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
compat: add support for linux 3.1
br_port_exists is not in mainline, will it ever?
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
br_port_exists is not in mainline, will it ever?
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add round_down
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add linux/atmoic.h
This include is needed by some drivers.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This include is needed by some drivers.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add linux/export.h
Export will be added in linux-3.2, for older kernel versions the stuff
is in linux/module.h.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Export will be added in linux-3.2, for older kernel versions the stuff
is in linux/module.h.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add PCMCIA_DEVICE_MANF_CARD_PROD_ID3
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add IFF_TX_SKB_SHARING
This flag should be ignored by older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This flag should be ignored by older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add skb_walk_frags() and skb_has_frag_list()
These functions are needed for ./net/bluetooth/l2cap_core.c and ./net/bluetooth/af_bluetooth.c.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
These functions are needed for ./net/bluetooth/l2cap_core.c and ./net/bluetooth/af_bluetooth.c.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add include/crypto/aes.h
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport generic pr_fmt
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport ETH_P_LINK_CTL
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add alloc_netdev_mqs
Function was added in 2.6.38 kernel commit:
commit 36909ea43814cba34f7c921e99cba33d770a54e1
Author: Tom Herbert <therbert@google.com>
Date: Sun Jan 9 19:36:31 2011 +0000
net: Add alloc_netdev_mqs function
Emulate it using alloc_netdev_mq(), newer kernels use
opposite emulation method :-)
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Function was added in 2.6.38 kernel commit:
commit 36909ea43814cba34f7c921e99cba33d770a54e1
Author: Tom Herbert <therbert@google.com>
Date: Sun Jan 9 19:36:31 2011 +0000
net: Add alloc_netdev_mqs function
Emulate it using alloc_netdev_mq(), newer kernels use
opposite emulation method :-)
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
compat: add pr_<level>_once macros
Add functions from 2.6.38 kernel commit:
commit 16cb839f13324978bd58082e69de81a711802b11
Author: Joe Perches <joe@perches.com>
Date: Wed Jan 12 16:59:46 2011 -0800
include/linux/printk.h: add pr_<level>_once macros
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Add functions from 2.6.38 kernel commit:
commit 16cb839f13324978bd58082e69de81a711802b11
Author: Joe Perches <joe@perches.com>
Date: Wed Jan 12 16:59:46 2011 -0800
include/linux/printk.h: add pr_<level>_once macros
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
set_irq_probe() and set_irq_probe() are missing on Linux 2.6.24, so the
code won't compile. compat-wireless doesn't need those functions. Keep
the functions for Linux 2.6.25 and newer for other compat packages.
set_irq_probe() and set_irq_probe() are missing on Linux 2.6.24, so the
code won't compile. compat-wireless doesn't need those functions. Keep
the functions for Linux 2.6.25 and newer for other compat packages.
Signed-off-by: Pavel Roskin <proski@gnu.org>
Debian backports netdev_name as a function. As we cannot test if a
function is present, use an equivalent macro.
Reported by Sivaraman V <krusna@gmail.com> and Alex <alex9434@gmail.com>
Debian backports netdev_name as a function. As we cannot test if a
function is present, use an equivalent macro.
Reported by Sivaraman V <krusna@gmail.com> and Alex <alex9434@gmail.com>
compat: replace genl_dump_check_consistent
remove the usage of genl_dump_check_consistent from the code.
This was introduced in:
commit 9720bb3ab0b80659c63ed337eab66104a4156db0
Author: Johannes Berg <johannes.berg@intel.com>
Date: Tue Jun 21 09:45:33 2011 +0200
nl80211: use netlink consistent dump feature for BSS dumps
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
remove the usage of genl_dump_check_consistent from the code.
This was introduced in:
commit 9720bb3ab0b80659c63ed337eab66104a4156db0
Author: Johannes Berg <johannes.berg@intel.com>
Date: Tue Jun 21 09:45:33 2011 +0200
nl80211: use netlink consistent dump feature for BSS dumps
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add bcma
compat: add KEY_WPS_BUTTON
This is needed for carl9170.
Add to compat-3.0-stable
This is needed for carl9170.
Add to compat-3.0-stable
compat: rename CONFIG_COMPAT_KERNEL_
CONFIG_COMPAT_KERNEL_XX was renamed to CONFIG_COMPAT_KERNEL_2_6_XX in
compat-wireless to support kernel 3.XX, do the same in compat.
Add to compat-3.0-stable
CONFIG_COMPAT_KERNEL_XX was renamed to CONFIG_COMPAT_KERNEL_2_6_XX in
compat-wireless to support kernel 3.XX, do the same in compat.
Add to compat-3.0-stable
compat: add device name in register_netdevice(dev)
dev_alloc_name() is not called explicitly in the driver code any more,
but it is done in register_netdevice(). This causes devices getting
wrong names like "wlan%d". With this patch they get names like wlan0
again.
Add to compat-3.0-stable
CC: Ignacy Gawedzki <i@lri.fr>
dev_alloc_name() is not called explicitly in the driver code any more,
but it is done in register_netdevice(). This causes devices getting
wrong names like "wlan%d". With this patch they get names like wlan0
again.
Add to compat-3.0-stable
CC: Ignacy Gawedzki <i@lri.fr>
compat: add support for kernel 3.0
Kernel 2.6.40 is now 3.0. The br_port_exists() is function is not in
3.0 yet, so it should go to compat-3.1.h
Add to compat-3.0-stable
Kernel 2.6.40 is now 3.0. The br_port_exists() is function is not in
3.0 yet, so it should go to compat-3.1.h
Add to compat-3.0-stable
compat: define create_freezable_workqueue
create_freezeable_workqueue() was renamed to
create_freezable_workqueue().
Signed-off-by: Eliad Peller <eliad@wizery.com>
create_freezeable_workqueue() was renamed to
create_freezable_workqueue().
Signed-off-by: Eliad Peller <eliad@wizery.com>
compat: add an empty implementation for pm_wakeup_event()
Needed for wl12xx compilation
Signed-off-by: Eliad Peller <eliad@wizery.com>
Needed for wl12xx compilation
Signed-off-by: Eliad Peller <eliad@wizery.com>
compat: remove wrong backport of kfree_rcu
Backporting kfree_rcu() in compat does not work as
struct rcu_head->func is always interpreted as a pointer in older
kernel versions, but when using kfree_rcu() it is set to an offset.
rcu_head->func is used in some functions in the kernel not backported
by compat-wireless.
In older kernel versions in __rcu_reclaim just the else path is available.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backporting kfree_rcu() in compat does not work as
struct rcu_head->func is always interpreted as a pointer in older
kernel versions, but when using kfree_rcu() it is set to an offset.
rcu_head->func is used in some functions in the kernel not backported
by compat-wireless.
In older kernel versions in __rcu_reclaim just the else path is available.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport RCU_INIT_POINTER
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport rcu_dereference_raw
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport rtnl_dereference
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: backport rcu_access_pointer
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: backport rcu_dereference_protected
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: add an empty definition for __rcu
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: add header linux/printk.h
Some drivers are including linux/printk.h and this is not available for
kernel < 2.6.37, but the needed declared methods are all in
linux/kernel.h.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Some drivers are including linux/printk.h and this is not available for
kernel < 2.6.37, but the needed declared methods are all in
linux/kernel.h.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport ethtool_cmd_speed
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport kfree_rcu
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add missing include
Reported-By: George Nychis <gnychis@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reported-By: George Nychis <gnychis@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: handle fail of vmalloc()
Only memset the memory if we get a valid pointer.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Only memset the memory if we get a valid pointer.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport vzalloc()
vzalloc() is used in rtl8192ce now.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
vzalloc() is used in rtl8192ce now.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: fix TASK_INTERRUPTIBLE missing
When compiling against the Ubuntu Natty kernel (2.6.38-8-generic)
TASK_INTERRUPTIBLE is not defined here.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
When compiling against the Ubuntu Natty kernel (2.6.38-8-generic)
TASK_INTERRUPTIBLE is not defined here.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: do not include kstrto* for kernel >= 2.6.38.4
kstrto* went into kernel 2.6.38.4 and causes conflicts with the version
included in compat-wireless. We use strict_strtol to check if kstrto*
is already available.
kstrto* was not moved to compat-2.6.38.h because kernel version <=
2.6.38.3 needs this backport and some distributions like Ubuntu still
ship an older version of this kernel.
Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
kstrto* went into kernel 2.6.38.4 and causes conflicts with the version
included in compat-wireless. We use strict_strtol to check if kstrto*
is already available.
kstrto* was not moved to compat-2.6.38.h because kernel version <=
2.6.38.3 needs this backport and some distributions like Ubuntu still
ship an older version of this kernel.
Reported-by: Andreas Hartmann <andihartmann@01019freenet.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add time_to_tm
time_to_tm is needed in net/mac80211/debugfs_sta.c now.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
time_to_tm is needed in net/mac80211/debugfs_sta.c now.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: remove sdio_set_host_pm_flags
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add kstrtox
compat/kstrtox.c is copied from lib/kstrtox.c in the Linux kernel.
This is needed by some drivers now.
For kernel < 2.6.26 div_u64 needs to be backported.
We should not copy the files like kstrtox.c, kfifo.c and so on to
compat/ by hand, but copy them when creating compat-wireless along with
the wireless drivers.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat/kstrtox.c is copied from lib/kstrtox.c in the Linux kernel.
This is needed by some drivers now.
For kernel < 2.6.26 div_u64 needs to be backported.
We should not copy the files like kstrtox.c, kfifo.c and so on to
compat/ by hand, but copy them when creating compat-wireless along with
the wireless drivers.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: integrate kfifo into compat.ko
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: semaphore.h mpoved from asm/ to linux/
In kernel <= 2.6.25 linux/semaphore.h does not exist.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
In kernel <= 2.6.25 linux/semaphore.h does not exist.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: fix build for kernel < 2.6.29
get_irq_desc_chip(), get_irq_desc_data(), get_irq_desc_chip_data() and
get_irq_desc_msi() are not available in kernel < 2.6.29.
Luis please add this into the linux-2.6.39.y branch.
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
get_irq_desc_chip(), get_irq_desc_data(), get_irq_desc_chip_data() and
get_irq_desc_msi() are not available in kernel < 2.6.29.
Luis please add this into the linux-2.6.39.y branch.
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add support for kernel 2.6.39
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport netdev_refcnt_read.
Backport of upstream commit:
29b4433d991c88d86ca48a4c1cc33c671475be4b
net: percpu net_device refcount
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Backport of upstream commit:
29b4433d991c88d86ca48a4c1cc33c671475be4b
net: percpu net_device refcount
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport IRQ namespace cleanup
This backports this upstream patch:
commit a0cd9ca2b907d7ee26575e7b63ac92dad768a75e
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Thu Feb 10 11:36:33 2011 +0100
genirq: Namespace cleanup
The irq namespace has become quite convoluted. My bad. Clean it up
and deprecate the old functions. All new functions follow the scheme:
irq number based:
irq_set/get/xxx/_xxx(unsigned int irq, ...)
irq_data based:
irq_data_set/get/xxx/_xxx(struct irq_data *d, ....)
irq_desc based:
irq_desc_get_xxx(struct irq_desc *desc)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
This backports this upstream patch:
commit a0cd9ca2b907d7ee26575e7b63ac92dad768a75e
Author: Thomas Gleixner <tglx@linutronix.de>
Date: Thu Feb 10 11:36:33 2011 +0100
genirq: Namespace cleanup
The irq namespace has become quite convoluted. My bad. Clean it up
and deprecate the old functions. All new functions follow the scheme:
irq number based:
irq_set/get/xxx/_xxx(unsigned int irq, ...)
irq_data based:
irq_data_set/get/xxx/_xxx(struct irq_data *d, ....)
irq_desc based:
irq_desc_get_xxx(struct irq_desc *desc)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
compat: add tty_set_termios only for kernel >= 2.6.27
tty_set_termios does not build with older kernel versions and is only
needed by bluetooth which works only for kernel >= 2.6.27.
Reported-by: Juan Carlos Garza <juancarlosgarza@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
tty_set_termios does not build with older kernel versions and is only
needed by bluetooth which works only for kernel >= 2.6.27.
Reported-by: Juan Carlos Garza <juancarlosgarza@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: Define usleep_range(min, max) as msleep(max/1000) for <2.6.36
ops_flush() of ath9k uses usleep_range().
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
ops_flush() of ath9k uses usleep_range().
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
compat: backport tty_set_termios
This code is copied from the kernel sources.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This code is copied from the kernel sources.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport tty_{lock,unlock,locked}
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport usb_pipe_endpoint()
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add support for kernel 2.6.38
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport alloc_ordered_workqueue
This was moved from a patch in compat-wireless to this place.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This was moved from a patch in compat-wireless to this place.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add check for CONFIG_COMPAT_KFIFO=m
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
compat: backport kfifo
This is a copy of the hole kfifo implementation from a recent kernel
version. When we ship this implementation we do not have to backport
any kfifo related stuff any more.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is a copy of the hole kfifo implementation from a recent kernel
version. When we ship this implementation we do not have to backport
any kfifo related stuff any more.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add generic functions for suspend/resume
This define is used to generate a suspend and a resume function for pci
devices using the old power management interface. The new interface was
introduced in kernel 2.6.29.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This define is used to generate a suspend and a resume function for pci
devices using the old power management interface. The new interface was
introduced in kernel 2.6.29.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport alloc_workqueue
This is needed by rtlwifi.
The function signature of __create_workqueue changed in kernel 2.6.28,
so two different defines are needed.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is needed by rtlwifi.
The function signature of __create_workqueue changed in kernel 2.6.28,
so two different defines are needed.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport pci_wake_from_d3
This is needed by atl1c.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is needed by atl1c.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This has disappeared upstream and is no longer used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
compat: backport pci_is_pcie and pci_pcie_cap
compat_is_pcie already did the same thing as pci_is_pcie, but this
method is now in kernel so the mainline drivers should use this
function instead of accessing the member in the struct directly. We
backported this function for older kernels.
pci_pcie_cap is used in rtlwifi so we also need this.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat_is_pcie already did the same thing as pci_is_pcie, but this
method is now in kernel so the mainline drivers should use this
function instead of accessing the member in the struct directly. We
backported this function for older kernels.
pci_pcie_cap is used in rtlwifi so we also need this.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat backport no_printk
This is needed by brcm80211.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is needed by brcm80211.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport skb_checksum_start_offset
This is needed by atlx, atl1c and atl1e.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is needed by atlx, atl1c and atl1e.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport PCI_EXP_LNKCTL_ES added for on 2.6.29
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
compat: fix build for kernel <= 2.6.29
The max_brightness member in struct led_classdev was added in kernel
2.6.30, so use LED_FULL for older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
The max_brightness member in struct led_classdev was added in kernel
2.6.30, so use LED_FULL for older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: fix build with CONFIG_LEDS_CLASS=m
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Felix's patch backported my software blink emulation,
but if the kernel is 2.6.25 or newer we can also try
the HW offload first.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
but if the kernel is 2.6.25 or newer we can also try
the HW offload first.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
compat: backport LED class software blinking
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: backport pr_warn
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: update wireless.h with new version from linux-next
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: backport Generic exponentially weighted moving average (EWMA)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: add missing pm_runtime.h
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
compat: fix a typo in pm_qos_update_request for 2.6.35
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
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>
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>
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>
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>
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>
With this we can get rid of some of the rfkill related patching mess.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: backport pm_qos_request
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: backport pm_qos_*_request
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
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>
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>
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>
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>
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>
Some backports are also needed when compiling against kernel 2.6.37.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
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>
This is needed by drivers/bluetooth/btusb.c
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
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>
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>
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>
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>
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>
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>
compat: backport sock_recv_ts_and_drops
This is needed for bluetooth
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This is needed for bluetooth
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
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>
Do not set the .doit wrapper if there is no .doit function.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
compat: rename member in struct mmc_host.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>