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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>