History log of /drivers/net/wireless/hostap/hostap_plx.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>
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>
d3feaf5ad12259927039a675cfb25dc342b403ab 24-Apr-2009 John W. Linville <linville@tuxdriver.com> wireless: remove some (bogus?) 'may be used uninitialized' warnings

net/mac80211/tx.c: In function ‘ieee80211_tx_h_select_key’:
net/mac80211/tx.c:448: warning: ‘key’ may be used uninitialized in this function

drivers/net/wireless/ath/ath9k/rc.c: In function ‘ath_rc_rate_getidx’:
drivers/net/wireless/ath/ath9k/rc.c:815: warning: ‘nextindex’ may be used uninitialized in this function

drivers/net/wireless/hostap/hostap_plx.c: In function ‘prism2_plx_probe’:
drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_index’ may be used uninitialized in this function
drivers/net/wireless/hostap/hostap_plx.c:438: warning: ‘cor_offset’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
e52742deef04ed7babec0f5866c867dd15d449f0 10-Jan-2008 Randy Dunlap <randy.dunlap@oracle.com> hostap: section mismatch warning

Fix section mismatch by changing variable name to match one of the
whitelisted (allowable) names for pointing into init data:

WARNING: vmlinux.o(.data+0xce618): Section mismatch: reference to .init.data:prism2_plx_id_table (between 'prism2_plx_drv_id' and 'dev_info')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
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>
115e222d538e7838bffa0f76409acd9816a0ef32 25-Oct-2006 Pavel Roskin <proski@gnu.org> [PATCH] hostap_plx: fix CIS verification

The length of the manfid CIS should be at least 4, and it's normally 4.
It's incorrect to require it to be at least 5. This breaks support for
most (if not all) cards.

The right place to ensure that we don't access beyond the CIS buffer is
to strengthen another check. Make sure that the next tuple begins at
least at the CIS buffer end (in which case we stop processing) or
before that.

Reported by ph35sm@free.fr

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d3cef4ee2207033b9f231da308d966f357af34da 10-Jun-2006 Faidon Liambotis <faidon@cube.gr> [PATCH] Add two PLX device IDs

This patch adds device IDs for Symbol LA-4123 and Global Sun Tech
GL24110P to the HostAP PLX driver.
This is not tested with real hardware, but there is no reason why it
shouldn't work.
Please test.

Signed-off-by: Faidon Liambotis <faidon@cube.gr>
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>
3a1c42ad98fddab63e62b400ae98e6f609485efc 20-Mar-2006 Jouni Malinen <jkmaline@cc.hut.fi> [PATCH] hostap: Fix unlikely read overrun in CIS parsing

The Coverity checker (CID: 452, 453, 454, 455, 456) spotted this
unlikely read overrun of CIS buffer. Abort if CISTPL_CONFIG or
CISTPL_MANFID would not fit in buffer.

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