openwrt/staging/blogic.git
14 years agoBackport DEFINE_PCI_DEVICE_TABLE for kernels < 2.6.25
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>
14 years agoAdds __dev_addr_delete() and __dev_addr_add() for 2.6.22
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>
14 years agoAdd initial 2.6.22 support
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>
14 years agoSynch up pm-qos implementation completely with linux-next next-20100111
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>
14 years agoMove pm-qos backport comments to 2.6.25 compat header
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>
14 years agoExtract pm-qos code into compat/pm_qos_params.c
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>
14 years agoUpdates the pm-qos array indexes to match upstream
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>
14 years agoAdd the new system bus frequency pm-qos object for older kernels
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>
14 years agoOnly define BITS_TO_LONGS if not defined
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>
14 years agoAdd initial backport support for network namespaces
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>
14 years agoAdd DMA_BIT_MASK() for older kernels
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>
14 years agoAdd missing input key definitions
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>
14 years agoCopy over a few headers from the latest kernel
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>
14 years agoAdd missing headers for 2.6.24
Luis R. Rodriguez [Mon, 11 Jan 2010 22:38:40 +0000 (14:38 -0800)]
Add missing headers for 2.6.24

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoSkip MMC/SDIO backport for kernels <= 2.6.23
Luis R. Rodriguez [Mon, 11 Jan 2010 20:18:59 +0000 (12:18 -0800)]
Skip MMC/SDIO backport for kernels <= 2.6.23

This allows compilation of compat for 2.6.23 for builds
that do not require MMC/SDIO. Anyone interested in MMC/SDIO
backport support should look to see if its possible to
backport/add MMC/SDIO support to older kernels. That's
likeley a project on its own though, not sure.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoFix compilation for 2.6.23 due to missing declaration of sg_init_table()
Luis R. Rodriguez [Mon, 11 Jan 2010 20:11:43 +0000 (12:11 -0800)]
Fix compilation for 2.6.23 due to missing declaration of sg_init_table()

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoRemove duplicate __dev_addr_delete()
Luis R. Rodriguez [Mon, 11 Jan 2010 20:08:54 +0000 (12:08 -0800)]
Remove duplicate __dev_addr_delete()

This is already implemented on compat-2.6.32.c

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoinclude arp.h, required for 2.6.23
Luis R. Rodriguez [Mon, 11 Jan 2010 19:49:33 +0000 (11:49 -0800)]
include arp.h, required for 2.6.23

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoSimple compile warning fix for pm-qos
Luis R. Rodriguez [Mon, 11 Jan 2010 19:27:07 +0000 (11:27 -0800)]
Simple compile warning fix for pm-qos

return 0 on newer kernels.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoBackport pm-qos for kernels <= 2.6.24
Luis R. Rodriguez [Mon, 11 Jan 2010 19:24:27 +0000 (11:24 -0800)]
Backport pm-qos for kernels <= 2.6.24

pm-qos is used by mac80211 and ipw2100. mac80211 uses it for
the dynamic power save to see if to enable it or not upon
recalculation for dynamic ps. It takes the latency registered
to the kernel into account.

Since older kernels do not have pm-qos we simply initialize
pm-qos stuff durng the compat module probe treating pm-qos as if
it were a feature of the compat module. We carry the header file
include/linux/pm_qos_params.h as part of this package, external
kernel drivers just need to ensure they also make use of the
NOSTDINC_FLAGS flag as we do on the top level Makefile to be
able to benefit from a direct port and let external drivers
also inlcude include/linux/pm_qos_params.h as it if it were
in their older kernels.

Cc: Mark Gross <mgross@linux.intel.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoFix compilation warning on iface.c
Luis R. Rodriguez [Wed, 6 Jan 2010 02:42:35 +0000 (18:42 -0800)]
Fix compilation warning on iface.c

This fixes this compilation warning:

  CC [M]  /home/mcgrof/devel/compat-wireless-2.6/net/mac80211/iface.o
/home/mcgrof/devel/compat-wireless-2.6/net/mac80211/iface.c: In function ‘ieee80211_stop’:
/home/mcgrof/devel/compat-wireless-2.6/net/mac80211/iface.c:392: warning: statement with no effect
/home/mcgrof/devel/compat-wireless-2.6/net/mac80211/iface.c:397: warning: statement with no effect

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoRemove duplicate __dev_addr_sync() and __dev_addr_sync() for older kernels
Luis R. Rodriguez [Wed, 6 Jan 2010 02:07:33 +0000 (18:07 -0800)]
Remove duplicate __dev_addr_sync() and __dev_addr_sync() for older kernels

These were implemented eons ago for 2.6.25 backport work but now
2.6.32 exported these again implemented in the exact same way
so just use that.

2.6.24 now compiles with ath9k.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoMake kobject_set_name_vargs() do nothing on <= 2.6.24
Luis R. Rodriguez [Wed, 6 Jan 2010 02:00:04 +0000 (18:00 -0800)]
Make kobject_set_name_vargs() do nothing on <= 2.6.24

The struct kobject does not have a name member on older kernels
so naming something naming a kobject will be futile. This implies
dev_set_name() won't be able to rename the kobject. This may
actually bust 2.6.24, I believe we discussed this particular
issue on the linux-wireless mailing list at some point with
a person trying 2.6.24. If there is an issue with this patch
we can go back and check the list. I'm offline rigtt now though
so trying to get compilation to work at least.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoAdd few missing misc defines for compilation on 2.6.25
Luis R. Rodriguez [Mon, 11 Jan 2010 17:56:43 +0000 (09:56 -0800)]
Add few missing misc defines for compilation on 2.6.25

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoAdd missing headers for 2.6.24 and 2.6.25
Luis R. Rodriguez [Mon, 11 Jan 2010 17:48:04 +0000 (09:48 -0800)]
Add missing headers for 2.6.24 and 2.6.25

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agocompat: Backport eth_mac_addr
Hauke Mehrtens [Sat, 26 Dec 2009 21:44:35 +0000 (22:44 +0100)]
compat: Backport eth_mac_addr

eth_mac_addr is needed by net/mac80211/iface.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: backport kfifo for libertas
Hauke Mehrtens [Sat, 26 Dec 2009 21:44:34 +0000 (22:44 +0100)]
compat: backport kfifo for libertas

Second part of the kfifo backport.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agocompat: Backport pcmcia from 2.6.33
Hauke Mehrtens [Tue, 22 Dec 2009 15:20:00 +0000 (16:20 +0100)]
compat: Backport pcmcia from 2.6.33

This backports the pcmcia_loop_tuple function and change the signature
of pcmcia_request_window and pcmcia_map_mem_page as needed for older
kernels.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
14 years agoBackport netdev_alloc_skb_ip_align
Luis R. Rodriguez [Sat, 12 Dec 2009 05:33:41 +0000 (21:33 -0800)]
Backport netdev_alloc_skb_ip_align

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoAdd a backport for flush_delayed_work()
Luis R. Rodriguez [Fri, 11 Dec 2009 23:36:16 +0000 (15:36 -0800)]
Add a backport for flush_delayed_work()

We can't really *flush* per se, see the code for more
details but we can at least delete and synch the timer.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoAdd some new 2.6.33 backport code for networking
Luis R. Rodriguez [Fri, 11 Dec 2009 07:30:08 +0000 (23:30 -0800)]
Add some new 2.6.33 backport code for networking

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoRename compat.h to compat-2.6.h
Luis R. Rodriguez [Fri, 11 Dec 2009 06:20:43 +0000 (22:20 -0800)]
Rename compat.h to compat-2.6.h

As include/linux/compat.h is already taken upstream.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoFix 2.6.31 build: iw_handler needs asm/compat.h
Luis R. Rodriguez [Thu, 10 Dec 2009 23:30:14 +0000 (15:30 -0800)]
Fix 2.6.31 build: iw_handler needs asm/compat.h

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoRearrange module order for easy placement on external builds
Luis R. Rodriguez [Thu, 10 Dec 2009 21:38:29 +0000 (13:38 -0800)]
Rearrange module order for easy placement on external builds

You will typically cp -a compat/ to your own build and then
cp include/linux/*.h to your own header space on your build
as well. Provided on this Makefile is also a hack to let
you use include/linux without having to add or mucking the
user's header files or directory.

Example compat autoconf is also provided.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoUpdate based on newer stuff on compat-wireless
Luis R. Rodriguez [Thu, 10 Dec 2009 18:20:55 +0000 (10:20 -0800)]
Update based on newer stuff on compat-wireless

Sorry for the large change-in-one to on this commit but
this won't happen often, this is just the final step to
start making use of compat.ko on compat-wireless.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
14 years agoTrailing space nits
Arnaud Lacombe [Tue, 1 Dec 2009 08:38:21 +0000 (03:38 -0500)]
Trailing space nits

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd `enum nf_inet_hooks'
Arnaud Lacombe [Tue, 1 Dec 2009 08:38:20 +0000 (03:38 -0500)]
Add `enum nf_inet_hooks'

Introduced on commit 6e23ae2a by Patrick McHardy in include/linux/netfilter.h in
order to factor common macro value used by IPv6 and IPv4 code.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd more `skb->dst' accessors
Arnaud Lacombe [Tue, 1 Dec 2009 08:38:19 +0000 (03:38 -0500)]
Add more `skb->dst' accessors

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd compatibility call for dev_get_stats()
Arnaud Lacombe [Tue, 1 Dec 2009 08:38:18 +0000 (03:38 -0500)]
Add compatibility call for dev_get_stats()

Added on commit eeda3fd6 by Stephen Hemminger in include/linux/netdevice.h.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd posix SHUT_RD/SHUT_WR/SHUT_RDWR macros
Arnaud Lacombe [Tue, 1 Dec 2009 08:38:17 +0000 (03:38 -0500)]
Add posix SHUT_RD/SHUT_WR/SHUT_RDWR macros

Added on commit 91cf45f0 by Trond Myklebust in include/linux/net.h.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd compatibility macro for register_sysctl_table()
Arnaud Lacombe [Tue, 24 Nov 2009 02:25:09 +0000 (21:25 -0500)]
Add compatibility macro for register_sysctl_table()

The API was changed on commit 0b4d4147. register_sysctl_table() lost its
last
argument.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd skeleton for 2.6.21
Arnaud Lacombe [Tue, 24 Nov 2009 02:24:31 +0000 (21:24 -0500)]
Add skeleton for 2.6.21

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd compatibility call for kmem_cache_destroy()
Arnaud Lacombe [Tue, 24 Nov 2009 02:24:42 +0000 (21:24 -0500)]
Add compatibility call for kmem_cache_destroy()

On commit 133d205a, kmem_cache_destroy() was made returning void, while
older
kernel could return an error value.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd skeleton for 2.6.19
Arnaud Lacombe [Tue, 24 Nov 2009 02:24:23 +0000 (21:24 -0500)]
Add skeleton for 2.6.19

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd roundup() compatibility macro
Arnaud Lacombe [Tue, 24 Nov 2009 02:24:15 +0000 (21:24 -0500)]
Add roundup() compatibility macro

Added on commit b4cac1a0 by David Howells in include/linux/kernel.h.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd skeleton for 2.6.18
Arnaud Lacombe [Tue, 24 Nov 2009 02:24:08 +0000 (21:24 -0500)]
Add skeleton for 2.6.18

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd typedef for `gfp_t'
Arnaud Lacombe [Tue, 24 Nov 2009 02:23:59 +0000 (21:23 -0500)]
Add typedef for `gfp_t'

Added on commit dd0fc66f by Al Viro in include/linux/types.h.

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
14 years agoAdd skeleton for 2.6.14
Arnaud Lacombe [Tue, 24 Nov 2009 02:23:46 +0000 (21:23 -0500)]
Add skeleton for 2.6.14

Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
15 years agoAdd COPYRIGHT from the kernel
Luis R. Rodriguez [Sat, 21 Nov 2009 02:24:05 +0000 (18:24 -0800)]
Add COPYRIGHT from the kernel

This is based on the Linux kernel code anyway.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
15 years agoAdd new kernel compatibilty module code
Luis R. Rodriguez [Sat, 21 Nov 2009 00:54:34 +0000 (16:54 -0800)]
Add new kernel compatibilty module code

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>