Commit Graph

33 Commits

Author SHA1 Message Date
Pavel Roskin
8c73cc55b1 Remove support for Linux kernels older than 2.6.13
Linux 2.6.13 introduced Wireless Extension 18 with WPA support.  It was
released in August 2005.  People making changes to MadWifi should not be
required to be software archeologistists to test their changes.
2013-11-12 11:46:06 -05:00
Pavel Roskin
4f4d17ea6e Fix compatibility with procfs API changes in Linux 3.10 2013-11-11 11:57:32 -05:00
Pavel Roskin
f83c3d758e Use netdev_notifier_info_to_dev(), needed for Linux 3.11+
Not using netdev_notifier_info_to_dev() gives no compile warnings but
crashes the kernel, so this patch is intentionally applied before Linux
3.10 procfs support is enabled to avoid a revision that compiles and
crashes on new kernels.
2013-11-08 17:01:34 -05:00
proski
bd86fad851 Don't redefine netdev_for_each_mc_addr()
It's already defined in CentOS 2.6.18-238.19.1.el5 kernel.  Use
parentheses around dev to be safer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4168 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-10-07 21:14:47 +00:00
proski
5890429464 Fix typos found by codespell
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4166 0192ed92-7a03-0410-a25b-9323aeb14dbd
2011-08-26 15:31:01 +00:00
proski
a09a469936 Fix support for Linux 2.6.0 - 2.6.2, which lack netdev_priv()
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4131 0192ed92-7a03-0410-a25b-9323aeb14dbd
2010-06-19 18:26:01 +00:00
proski
eec6650615 Add support for Linux 2.6.35
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4130 0192ed92-7a03-0410-a25b-9323aeb14dbd
2010-06-19 18:24:35 +00:00
proski
4bbde45a51 Don't set ctl_name in Linux 2.6.33+, it was removed
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4102 0192ed92-7a03-0410-a25b-9323aeb14dbd
2010-01-09 08:34:37 +00:00
proski
b424bc2d8b Avoid triggering lockdep checker in ath_hw_reset()
Use spin_lock_irqsave_nested() instead of spin_lock_irqsave().  Use a
separate counter for the locking subclass, so that we don't exceed the
maximal value of 8.  We have 10 queues, but inactive queues don't get a
locking subclass number.

Provide a replacement for spin_lock_irqsave_nested() for kernels older
than 2.6.19.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3995 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-04-12 05:53:23 +00:00
proski
3e70e4f8c1 Compile fixes for Linux 2.6.29
Use netdev_priv() for Linux 2.4.27 and newer.  Provide compatibility
wrapper for older kernels.

Imply CONFIG_KMOD for Linux 2.6.27 and newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3902 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-01-14 02:36:53 +00:00
proski
e21e1740f3 Fix compilation for Linux 2.4 broken by the previous commit
Just because GFP_KERNEL is defined, it doesn't mean that gfp_t is
available.  Define gfp_t as a macro instead.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3855 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-09-02 21:27:51 +00:00
proski
c3307227fb Fix compilation for RHEL 2.6.9 kernel
Don't define gpt_t if GFP_KERNEL is defined.  Define kzalloc() as a
macro.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3854 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-09-02 15:43:42 +00:00
proski
8d74405839 Copy new macros from the DFS branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3823 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-24 02:05:54 +00:00
proski
0844e78686 kzalloc() appeared in Linux 2.6.14, not in Linux 2.6.3
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3771 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-14 21:06:05 +00:00
proski
2dc12013f6 Compile fix for Linux 2.4 - provide request_module() with 2 arguments
It was broken in r3726.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3751 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-05 08:14:57 +00:00
proski
941d62b043 KASSERT should add newline at the end to match FreeBSD behavior
Fix KASSERT calls that add their own newline.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3734 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-19 16:58:07 +00:00
proski
78ddabe0b4 Fix tools compliation described in ticket #1934
Change compat.h to never use KERNEL_VERSION in userspace code.  Move it
to the block only used by the kernel code.  While at that, move KASSERT
to the same block.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3706 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 05:38:29 +00:00
mentor
a5680de2b6 Remove sead ALIGNED_POINTER code
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3705 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 01:40:25 +00:00
mentor
6abd8285aa Whitespace for control statements
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3627 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-14 19:11:57 +00:00
proski
c85c1bb5c7 likely() doesn't take pointers in Linux 2.4, give it an integer
This should fix #1932


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3625 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-12 01:42:34 +00:00
proski
a49a973027 Use __skb_queue_after() instead of __skb_append()
Follow the rule of coding for the latest API.  Use __skb_queue_after()
in the code rather than __skb_append(), which is due to be removed in
Linux 2.6.26.  Provide compatibility definitions for __skb_queue_after()
in include/compat.h.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3605 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 12:12:43 +00:00
proski
75beeeb876 Define gfp_t before it's used
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3597 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-04 23:07:39 +00:00
mentor
63c6adeeb8 Move another header to the top of compat.h - fixes previous commit
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3572 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-24 14:09:57 +00:00
mentor
218abe13a6 Add kzalloc() compatibility function
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3571 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-24 13:51:22 +00:00
mentor
0c14432118 Move a kernel include into __KERNEL__ protected section
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3570 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-24 13:26:00 +00:00
proski
328929d76c Use resource_size_t for physical memory addresses
PCI resource addresses are 64-bit on i386 with PAE, so they won't fit
unsigned long.  Provide compatibility for older kernels.  Reported by
Diego Dujovne.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3399 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-19 21:28:16 +00:00
mentor
0ad2c8981a Linux 2.4 series compatibility fixes
* Based on patches from nbd
 * av_beacon_alloc code has been reimplemented using atomic bit operations; I think this is safe for SMP


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3310 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 20:23:49 +00:00
proski
d7fcb75ea8 Use compatibility definition for IRQF_SHARED
IRQF_SHARED appeared in Linux 2.6.18.  Define it in compat.h for older
kernels.  Stop using obsolete SA_SHIRQ in if_ath_ahb.c and if_ath_pci.c

This fixes compilation of if_ath_ahb.c for Linux 2.6.22 and newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3041 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-12-13 02:18:16 +00:00
proski
7f6072f9ae Remove __printflike definition, it's not used anywhere in the code
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2930 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-23 07:41:07 +00:00
mtaylor
cbc24dce2a Switch back to plain old int for gfp_t definition for pre 2.6.14...
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2923 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 04:46:27 +00:00
mtaylor
f30e5aa80b Add gfp_t for pre 2.6.14 kernels in compat.h
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2921 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-11-22 04:43:06 +00:00
proski
120d309bc3 Fix sysctl support in Linux 2.6.24
Linux 2.6.24 introduces a sysctl checker that disallows using arbitrary
ctl_name values for sysctl entries.  The entries with non-standard
values should set ctl_name to CTL_UNNUMBERED.

On the other hand, using consistent non-zero ctl_name values is required
for older kernels (tested on Linux 2.4.33.3 from Slackware 11).

Thus the solution is to use CTL_UNNUMBERED on Linux 2.6.24+ and the
original values in the older kernels.  Move CTL_AUTO and DEV_ATH to
include/compat.h and define them correspondingly.

When copying sysctl entries, check procname for being non-zero, since
ctl_name is zero (CTL_UNNUMBERED) on Linux 2.6.24 and newer.

For the same reason, don't use ctl_name to distinguish entries in
ath_sysctl_template, use extra2 instead.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2814 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-31 05:39:41 +00:00
mrenzmann
2c0d8db912 Restructuring the repository layout in response to ath5k.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@2721 0192ed92-7a03-0410-a25b-9323aeb14dbd
2007-10-04 13:07:51 +00:00