Holger Schurig [Fri, 7 Dec 2007 15:30:44 +0000 (15:30 +0000)]
libertas: endianness fixes
Recently I found that that sparse by default doesn't endianness
checks. So I changed my compilation habit to be
make modules C=1 SUBDIRS=drivers/net/wireless/libertas
CHECKFLAGS="-D__CHECK_ENDIAN__"
so that I get the little-endian checks from sparse as well. That
showed up a good bunch of problems.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 7 Dec 2007 15:52:10 +0000 (16:52 +0100)]
libertas: implement new scanning logic
This changes the code that is used for scanning and makes it hopefully
easier to understand:
* move function into logical blocks
* create a bunch of lbs_scan_add_XXXX_tlv() functions, that
help to create the TLV parameter of CMD_802_11_SCAN
* all of them are now called from the much simpler lbs_do_scan()
* no **puserscancfg double-pointers :-)
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Thu, 6 Dec 2007 12:50:30 +0000 (13:50 +0100)]
libertas: fix data packet size errors
I wondered about junk bytes at the end when using "lbsdebug +hex +host"
until I noticed that firmware for the CF card sends my extranous bytes.
It says "I have 20 bytes", I take 20 bytes, but the last 8 bytes of this
are just data junk.
Also, in the new lbs_cmd() where was a size miscalulation
that made itself clear after fixing this bug.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Li Zefan [Thu, 6 Dec 2007 12:01:21 +0000 (13:01 +0100)]
libertas: don't cast a pointer to pointer of
Don't cast struct foo * to struct list_head *, it's safe only when
the list member is the first member of struct foo.
Also don't cast struct list_head * to struct foo *.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 5 Dec 2007 16:58:11 +0000 (17:58 +0100)]
libertas: handy function to call firmware commands
Using an arbitrary firmware command was actually very painful. One
had to change big switch() statements in cmd.c, cmdresp.c, add
structs to the big union in "struct cmd_ds_command" and add the
define for the CMD_802_11_xxx to the proper place.
With this function, this is now much easier. For now, it implements
a blocking (a.k.a. CMD_OPTION_WAITFORRSP) way where one deals directly
with command requests and response buffers. You can do everything in
one place:
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 5 Dec 2007 16:58:06 +0000 (17:58 +0100)]
libertas: make more functions static
These functions were used in the old debugfs code for events, but
as this code is now gone, there's no need to export those functions.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 5 Dec 2007 16:57:58 +0000 (17:57 +0100)]
libertas: remove cmd_ctrl_node->status
There was no code that ever did set this variable.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 5 Dec 2007 16:57:56 +0000 (17:57 +0100)]
libertas: remove cmd_ctrl_node->cmdflags
There was no code that ever did set this flag.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
As we move towards having this done by a state machine, start by having
a single 'stuff sent' function, which is called by if_usb/if_sdio/if_cs
after sending both data and commands.
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
I'm not sure if the dummy read is really required.
The old code does it. I think it can't hurt and can possibly
fix some write posting problems (hardware bugs or whatever. Who knows).
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
It incorrectly removed the writing of the high 16bits for
a 32bit table write and initialized the direction identifier
too late.
This patch does also some cleanups to make the code much more
readable and adds a few comments, so non rocket scientists are
also able to understand what this address caching is all about.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Reinette Chatre [Wed, 5 Dec 2007 18:59:57 +0000 (20:59 +0200)]
iwlwifi: remove HT code from iwl-3945.h
This pach removes HT code from iwl-3945.h - it is not needed here as 3945
does not support HT. The code ended up here during the header file split
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Wed, 5 Dec 2007 16:01:23 +0000 (11:01 -0500)]
orinoco: always use latest BSS info when caching scan results
Always copy the latest BSS information from the firmware's results to
the driver's BSS table to ensure that everything is up-to-date (IEs,
supported rates, encryption status, etc).
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Grant Likely [Sun, 2 Dec 2007 05:12:45 +0000 (22:12 -0700)]
gianfar driver: eliminate compiler warnings and unnecessary macros
This patch eliminates the warning of unused return values when the driver
registers it sysfs files. Now the driver will print an error if it is
unable to register the sysfs files.
It also eliminates the macros used to wrap the DEVICE_ATTR macro and the
device_create_file function call. The macros don't reduce the number of
lines of source code in the file and the name munging makes is so that
cscope and friends don't see the references to the functions. It's better
to just call the kernel API directly.
While we're at it, the DEVICE_ATTR instances have been moved down to
be grouped with the functions they depend on.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Andrea Merello [Sun, 2 Dec 2007 22:17:51 +0000 (17:17 -0500)]
rtl8187: fix tx power reading
CCK and OFDM power levels are stored in adjacent bytes, not nibbles.
Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: Andrea Merello <andreamrl@tiscali.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ron Rindjunsky [Mon, 26 Nov 2007 14:14:42 +0000 (16:14 +0200)]
iwlwifi: 802.11n add support to 8K A-MSDU Rx frames
This patch give the iwlwifi the ability to support A-MSDU up to 8K
Please notice - in order to work in 8K A-MSDU ucode support is needed,
version 4.44.1.19 (soon to be published). 4K A-MSDU works in current ucode
version as well.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohamed Abbas [Thu, 29 Nov 2007 03:10:15 +0000 (11:10 +0800)]
iwlwifi: avoid firmware command sending if rfkill is enabled
This patch fixed a ucode timeout issue and worked code with suspend
to disk.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohamed Abbas [Thu, 29 Nov 2007 03:10:14 +0000 (11:10 +0800)]
iwlwifi: fix ucode assertion for RX queue overrun
This patch allows the driver to restock the RX queue early if the RX
queue is almost empty. This will help on avoiding any ucode assert
for the RX overrun problem.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohamed Abbas [Thu, 29 Nov 2007 03:10:13 +0000 (11:10 +0800)]
iwlwifi: enhance WPA authenication stability
This patch enhanced WPA authenication stability by avoiding scan
immediately followed by association. We don't do any scanning right
after association in next several seconds. This will allow WPA
authentication to take place without any interruption.
Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cahill, Ben M [Thu, 29 Nov 2007 03:09:55 +0000 (11:09 +0800)]
iwlwifi: add comments to iwl*-base.c
Add comments to iwlXXXX-base.c
Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cahill, Ben M [Thu, 29 Nov 2007 03:09:54 +0000 (11:09 +0800)]
iwlwifi: add comments, mostly on Tx queues
Add comments, mostly on Tx queues
Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
- Remove HT code from iwl-3945.h - it is not needed here as 3945
does not support HT. The code ended up here during the header file
split.
- Modify a few places where the CONFIG variables were named
incorrectly: all changes are to comments only.
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Thu, 29 Nov 2007 03:09:41 +0000 (11:09 +0800)]
iwlwifi: Support for uCode without init and bsm section
This patch enables loading fw w/o init and bsm section. It also provides
general cleanup of the rutine.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 27 Nov 2007 20:51:57 +0000 (21:51 +0100)]
rt2x00: Cleanup rfkill
The label exit_free_polldev is no longer used and can be removed.
input_free_polled_device() also calls input_free_device(), so
don't call it seperatly.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 27 Nov 2007 20:51:39 +0000 (21:51 +0100)]
rt2x00: Remove redundant code in rfkill setup
In rt2x00rfkill.c, routine input_allocate_device() is called even though
input_allocate_polled_device(), which was just called, includes a call to
that routine. This patch, which has not been tested, removes the redundant code.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mattias Nissler [Tue, 27 Nov 2007 20:50:26 +0000 (21:50 +0100)]
rt2x00: Only update rssi average approximation on receiving beacon frames.
Restrict rssi average updating to beacon frames of the bssid the
interface is
associated with. Without this restriction, strong signals belonging to other
BSS, e.g. beacon frames coming from a nearby AP, would cause incorrectly high
rssi approximation values. This would then cause the link tuner to reduce
sensitivity, resulting in transmissions from the BSS associated to to be
missed.
Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Tue, 27 Nov 2007 20:49:29 +0000 (21:49 +0100)]
rt2x00: Add TX/RX frame dumping facility
This adds TX/RX frame dumping capabilities through debugfs.
The intention is that with this approach debugging of rt2x00 is
simplified since _all_ frames going in and out of the device
are send to debugfs as well along with additional information
like the hardware descriptor.
Based on the patch by Mattias Nissler.
Mattias also has some tools that will make the dumped frames
available to wireshark: http://www-user.rhrk.uni-kl.de/~nissler/rt2x00/
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Thu, 24 Jan 2008 09:56:25 +0000 (01:56 -0800)]
rt2x00: Add skb descriptor
Use the skb->cb field to add a frame description that can be used
to transfer information passed each rt2x00 layer. This reduces the
required arguments for rt2x00lib_write_tx_desc().
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ivo van Doorn [Tue, 27 Nov 2007 20:47:56 +0000 (21:47 +0100)]
rt2x00: Extend PLCP descriptor definition for rt2400pci
Extend word field definitions for the PLCP words
in the TX descriptor to contain the BBP fields as well.
This will remove rt2400pci_write_tx_desc() from the
checkstack script.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 24 Nov 2007 20:11:09 +0000 (21:11 +0100)]
b43legacy: include full 64-bit timestamp in monitor mode
When monitor mode is enabled, this will make b43legacy read out
the full 64-bit MAC time from the chip for each received packet.
This patch has been ported from b43.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Use initialized_var() to properly fix a bogus gcc warning.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Cc: Frank Lichtenheld <frank@lichtenheld.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>