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>
Larry Finger [Mon, 26 Nov 2007 16:29:47 +0000 (10:29 -0600)]
b43: Changes to enable BCM4311 rev 02 with wireless core revision 13
The BCM94311MCG rev 02 chip has an 802.11 core with revision 13 and
has not been supported until now. The changes include the following:
(1) Add the 802.11 rev 13 device to the ssb_device_id table to load b43.
(2) Add PHY revision 9 to the supported list.
(3) Change the 2-bit routing code for address extensions to 0b10 rather
than the 0b01 used for the 32-bit case.
(4) Remove some magic numbers in the DMA setup.
The DMA implementation for this chip supports full 64-bit addressing with
one exception. Whenever the Descriptor Ring Buffer is in high memory, a
fatal DMA error occurs. This problem was not present in 2.6.24-rc2 due
to code to "Bias the placement of kernel pages at lower PFNs". When
commit 44048d70 reverted that code, the DMA error appeared. As a "fix",
use the GFP_DMA flag when allocating the buffer for 64-bit DMA. At present,
this problem is thought to arise from a hardware error.
This patch has been tested on my system and by Cédric Caumont
<icare40@hotmail.com>.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Acked-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stefano Brivio [Sun, 25 Nov 2007 10:10:33 +0000 (11:10 +0100)]
b43: reinit on too many PHY TX errors
Restart the hardware on too many PHY TX errors. A thousand PHY TX errors
per 15 seconds means we won't be able to recover for sure.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 24 Nov 2007 14:06:33 +0000 (15:06 +0100)]
b43: include FCS in frames handed to mac80211
Sometimes it can be useful to see the FCS, especially when
bad-FCS frames are shown. Pass the FCS to mac80211 and let
it worry about snipping it off when required.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 23 Nov 2007 13:50:51 +0000 (14:50 +0100)]
b43: include full 64-bit timestamp in monitor mode
When monitor mode is enabled, this will make b43 read out the
full 64-bit MAC time from the chip for each received packet.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 28 Nov 2007 08:15:11 +0000 (09:15 +0100)]
libertas: less eventcause shifts
* only shift eventcause once
* convert mac events to decimal, as this is what the firmware
manual uses in section 6.1, too
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 28 Nov 2007 16:30:21 +0000 (17:30 +0100)]
libertas: remove user-specified channel list
Remove the ability to specify channels to scan via debugfs
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 28 Nov 2007 16:29:36 +0000 (17:29 +0100)]
libertas: remove numprobes
Remove the ability to specify number of probes via debugfs
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 28 Nov 2007 13:08:12 +0000 (14:08 +0100)]
libertas: tweak tx path debugging
Make two functions in the TX packet path emit
their debug messages with LBS_DEB_TX, not LBS_DEB_MAIN.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Wed, 28 Nov 2007 13:05:02 +0000 (14:05 +0100)]
libertas: tweak association debug output
Change debug output codes from LBS_DEB_JOIN to LBS_DEB_ASSOC
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Mon, 26 Nov 2007 09:07:14 +0000 (10:07 +0100)]
libertas: rework event subscription
This patch moves re-works the implementation of event subscription
via debugfs. For this:
* it tells cmd.c and cmdresp.c about CMD_802_11_SUBSCRIBE_EVENT
* removes lots of low-level cmd stuff from debugfs.c
* create unified functions to read/write snr, rssi, bcnmiss and
failcount
* introduces #define's for subscription event bitmask values
* add a function to search for a specific element in an IE
(a.k.a. TLV)
* add a function to find out the size of the TLV. This is needed
because lbs_prepare_and_send_command() has an argument for a
data buffer, but not for it's lengths and TLVs can be, by
definition, vary in size.
* fix a bug where it was not possible to disable an event
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>