History log of /drivers/net/wireless/hostap/hostap_pci.c
Revision Date Author Comments
9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1 08-Aug-2014 Benoit Taine <benoit.taine@lip6.fr> PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use

We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines. This issue was reported by checkpatch.

A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):

// <smpl>

@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@

- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;

// </smpl>

[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
c8bf40ad4f8f5d26f6744020ad51be420a707385 03-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com> wireless: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5b0a3b7eb37730c369cc47783549dcf6f54a1cd0 14-Apr-2012 Axel Lin <axel.lin@gmail.com> net/wireless: use module_pci_driver

This patch converts the drivers in drivers/net/wireless/* to use
module_pci_driver() macro which makes the code smaller and a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Nick Kossifidis <mickflemm@gmail.com>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Simon Kelley <simon@thekelleys.org.uk>
Cc: Jouni Malinen <j@w1.fi>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linux-wireless@vger.kernel.org
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0f4da2d77e1bf424ac36424081afc22cbfc3ff2b 13-Jul-2010 John W. Linville <linville@tuxdriver.com> hostap_pci: set dev->base_addr during probe

"hostap: Protect against initialization interrupt" (which reinstated
"wireless: hostap, fix oops due to early probing interrupt")
reintroduced Bug 16111. This is because hostap_pci wasn't setting
dev->base_addr, which is now checked in prism2_interrupt. As a result,
initialization was failing for PCI-based hostap devices. This corrects
that oversight.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
a3aa18842a5303fc28fcc4d57dbd16618bd830a0 07-Jan-2010 Alexey Dobriyan <adobriyan@gmail.com> drivers/net/: use DEFINE_PCI_DEVICE_TABLE()

Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section
in every case.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
275f165fa970174f8a98205529750e8abb6c0a33 21-Oct-2008 Arjan van de Ven <arjan@infradead.org> pci: use pci_ioremap_bar() in drivers/net

Use the newly introduced pci_ioremap_bar() function in drivers/net.
pci_ioremap_bar() just takes a pci device and a bar number, with the goal
of making it really hard to get wrong, while also having a central place
to stick sanity checks.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
8a9faf3cd08b91aca1502dbe18e3b5063fda2e87 21-Dec-2007 Al Viro <viro@zeniv.linux.org.uk> hostap annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2493d8e4166fa75ccb8e49fdd000f9ef67e570ae 29-Oct-2007 Randy Dunlap <randy.dunlap@oracle.com> hostap: fix section mismatch warning

Fix section mismatch warning:

WARNING: vmlinux.o(.data+0x36fcc): Section mismatch: reference to .init.data:prism2_pci_id_table (between 'prism2_pci_drv_id' and 'prism2_pci_funcs')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
56906c612e10b5e32a48ccbe8a3c08ab6acf5a28 07-May-2007 David Brownell <david-b@pacbell.net> PCI: remove useless pci driver method

Remove pointless and never-called enable_wake() hook from pci_driver and
from documentation. Evidently this was introduced in the 2.4.6 kernel,
but there's no evidence it was ever called; and it was rarely implemented.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bd5824f138153f407e300728919e814ab7dcfadb 28-May-2007 Jouni Malinen <j@w1.fi> [PATCH] hostap: Remove driver version number

The driver version number has not been updated since the driver was
included in the main kernel tree and there is no plan on updating this
in the future either. At this point, the only correct way to refer to
the version is to use the kernel version. The 0.4.4 version is
confusing since there are external version with higher version number
even though they are not actually any newer than the in-tree version.

Let's get rid of the version number in the kernel tree in order to
avoid this kind of confusion.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
85d32e7b0ea53a11d2a4018d8ad2605052778df7 25-Mar-2007 Jouni Malinen <j@w1.fi> [PATCH] Update my email address from jkmaline@cc.hut.fi to j@w1.fi

After 13 years of use, it looks like my email address is finally going
to disappear. While this is likely to drop the amount of incoming spam
greatly ;-), it may also affect more appropriate messages, so let's
update my email address in various places. In addition, Host AP mailing
list is subscribers-only and linux-wireless can also be used for
discussing issues related to this driver which is now shown in
MAINTAINERS.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b0471bb7b779f5deea109e5bfdfe8c18d4a06241 02-Dec-2006 Yan Burman <burman.yan@gmail.com> [PATCH] hostap: replace kmalloc+memset with kzalloc

Replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
02e0e5e935cad59a2d30a004df9065e8697543e3 08-Nov-2006 John W. Linville <linville@tuxdriver.com> [PATCH] wireless: clean-up some "check return code" warnings

Clean-up some warnings from missing return code checks, mostly from
calling pci_enable_device during a PCI resume.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
1fb9df5d3069064c037c81c0ab8bf783ffa5e373 02-Jul-2006 Thomas Gleixner <tglx@linutronix.de> [PATCH] irq-flags: drivers/net: Use the new IRQF_ constants

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
9320199957cebc39ccef372fa1fccf5ba3d3fd7d 20-Mar-2006 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Fix memory leak on PCI probe error path

The Coverity checker (CID: 659, 660) spotted this resource leak on
PCI probe error path. Free private data structure if pci_enable_device()
fails.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
733482e445ca4450cf41381b1c95e2b8c7145114 09-Nov-2005 Olaf Hering <olh@suse.de> [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason

This patch removes almost all inclusions of linux/version.h. The 3
#defines are unused in most of the touched files.

A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is
unfortunatly in linux/version.h.

There are also lots of #ifdef for long obsolete kernels, this was not
touched. In a few places, the linux/version.h include was move to where
the LINUX_VERSION_CODE was used.

quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'`

search pattern:
/UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
c355184cd3cd58c9ffc78f2a17e0ac3563312ea7 03-Oct-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Do not free local->hw_priv before unregistering netdev

local->hw_priv was being freed and set to NULL just before calling
prism2_free_local_data(). However, this may expose a race condition in
which something ends up trying to use hw_priv during shutdown. I
haven't noticed this happening, but better be safe than sorry, so
let's postpone hw_priv freeing to happen only after
prism2_free_local_data() has returned.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
f7a74447553d698795ba74b7e17e916000b0cb08 03-Oct-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Fix hostap_pci build with PRISM2_IO_DEBUG

The debug version of I/O functions in hostap_pci had not survived the
change to start using hw_priv pointer, so let's fix them to actually
define the local hw_priv variable.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
bab76198b3111bd0328be3c1fa208237eb12f86e 03-Oct-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Remove hw specific dev_open/close handlers

Host AP driver used hardware model specific dev_open/close handlers
that were called on dev_open/close if the hardware driver had
registered the handler. These were only used for hostap_cs and only
for tracking whether any of the netdevs were UP. This information is
already available from local->num_dev_open, so there is not need for
the special open/close handler.

Let's get rid of these handlers. In addition to cleaning up the code,
this fixes a module refcounting issue for hostap_cs where ejecting the
card while any of the netdevs were open did not decrement refcount
properly.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
7a716536c602be6050b4f3ece30f1fc3b64362b0 24-Sep-2005 Pavel Roskin <proski@gnu.org> [PATCH] hostap: Fix pci_driver name for hostap_plx and hostap_pci

hostap_pci and hostap_plx drivers still use PCI driver names
"prism2_pci" and "prism2_plx" respectively. This is unfriendly to
linux-wlan-ng, which uses the same names. So, if e.g. hostap_pci and
prism2_pci are loaded, they will "share" /sys/bus/pci/drivers/prism2_plx
directory.

Change PCI driver names of hostap_pci and hostap_plx to be equal to
their module names.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
583a4e88db1eadc52116e1f97b4519de655b2b80 04-Sep-2005 Pavel Machek <pavel@ucw.cz> [PATCH] fix pm_message_t stuff in -mm tree

This should bits from -mm tree that are affected by pm_message_t
conversion. [I'm not 100% sure I got all of them, but I certainly got all
the errors on make allyesconfig build, and most of warnings, too. I'll go
through the buildlog tommorow and fix any remaining bits].

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
b2dabd5aadae6a93026f35269e1e53c1a0c6de2d 13-Jul-2005 Andrew Morton <akpm@osdl.org> [PATCH] more-u32-vs-pm_message_t-fixes-6

Cc: Pavel Machek <pavel@ucw.cz>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
67e0e473fb54e7657f6604236e42ef07fd7a2768 15-Aug-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Use void *hw_priv instead of #ifdef in local data

Replace hardware model specific #ifdef's in struct local_info with
void *hw_priv that is pointing to cs/pci/plx specific data
structure. This removes unneeded #ifdef's and as such, is a step
towards making it possible to share objects for hostap_hw.c and
hostap_download.c with cs/pci/plx drivers without having to compile
and link the same code separately for each one.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
ea3f1865f33bd328bf043f47492f401a42de5edb 15-Aug-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Remove experimental PCI bus master/DMA code

PCI version of Prism2.5/3 has undocumented DMA support for TX/RX data,
but this seems to have some hardware bugs that prevent it from being
used properly for TX. RX side could possibly be made to work reliably.

Even though DMA support would be very useful for saving host CPU (from
about 40% to 5-10% when operating at maximum throughput), it seems to
be best to just remove this code finally. The implementation has
always been commented out by default and has received very limited
testing. The code may have already been broken number of times and I
don't have much interested in trying to verify whether it works or
not. Getting this out makes it easier to maintain the driver and
allows some cleanups that have been partly postponed because of this
experimental bus master/DMA code.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
f06ac319c05c6822f878f201ae80e54fbbe8be8c 30-Jul-2005 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap update

Add MODULE_VERSION information for the Host AP kernel modules and
update the version string to indicate which version of the external
Host AP driver is included in the kernel tree.

Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
0cd545d6ba0e0138782eb0ec287d0eb3db529b69 30-Jul-2005 Dave Hansen <haveblue@us.ibm.com> [PATCH] hostap update

Create sysfs "device" files for hostap

I was writing some scripts to automatically build kismet source lines,
and I noticed that hostap devices don't have device files, unlike my
prism54 and ipw2200 cards:

$ ls -l /sys/class/net/eth0/device
/sys/class/net/eth0/device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:02:01.0
$ ls -l /sys/class/net/wifi0
ls: /sys/class/net/wifi0/device: No such file or directory
$ ls -l /sys/class/net/wlan0
ls: /sys/class/net/wlan0/device: No such file or directory

The following (quite small) patch makes sure that both the wlan and wifi
net devices have that pointer to the bus device.

This way, I can do things like

for i in /sys/class/net/*; do
if ! [ -e $i/device/drive ]; then
continue;
fi;
driver=$(basename $(readlink $i/device/driver))
case $driver in
hostap*)
echo -- hostap,$i,$i-$driver
break;
ipw2?00)
echo -- $driver,$i,$i-$driver
break;
prism54)
echo prism54g,$i
esac
done

Which should generate a working set of source lines for kismet no matter
what order I plug the cards in.

It might also be handy to have a link between the two net devices, but
that's a patch for another day.

That patch is against 2.6.13-rc1-mm1.

-- Dave

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
ff1d2767d5a43c85f944e86a45284b721f66196c 13-May-2005 Jouni Malinen <jkmaline@cc.hut.fi> Add HostAP wireless driver.

Includes minor cleanups from Adrian Bunk <bunk@stusta.de>.