History log of /drivers/net/wireless/libertas/dev.h
Revision Date Author Comments
8f641d93c38ae93c67263d4e03f793092d471b12 03-Oct-2011 Daniel Drake <dsd@laptop.org> libertas: detect TX lockups and reset hardware

Recent patches added support for resetting the SD8686 hardware when
commands time out, which seems to happen quite frequently soon after
resuming the system from a Wake-on-WLAN-triggered resume.

At http://dev.laptop.org/ticket/10969 we see the same thing happen
with transmits. In this case, the hardware will fail to respond to
a frame passed for transmission, and libertas (correctly) will block
all further commands and transmissions as the hardware can only
deal with one thing at a time. This results in a lockup while the
system waits indefinitely for the dead card to respond.

Hook up a TX lockup timer to detect this and reset the hardware.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b4c3f34afffcab01b6eb5155399a0b85b1123ada 21-Sep-2011 Daniel Drake <dsd@laptop.org> libertas: scan behaviour consistency improvements

When scanning for the broadcast SSID, there is no need to add the
SSID TLV (restoring the behaviour of the driver behaviour in the wext
days, confirmed in Marvell specifications).

If bssid is unspecified, the current scan code will usually fire off an
active scan probing for the specific requested SSID. However, if a scan
is ongoing (or has just finished), those scan results will be used
instead (even if that scan is totally different, e.g. a passive scan on
channel 4 for a different SSID). Fix this inconsistency by always
firing off a scan when associating without a bssid.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
bfe2ed8f4df2e7b6991c4039bb624dee5f8b6583 15-Aug-2011 Dan Carpenter <error27@gmail.com> libertas: handle mesh networks in lbs_iface_active()

There was an extra semicolon so the if condition wasn't used. We
checked "priv->dev" twice instead of "priv->mesh_dev".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d2e7b3425c474300318e1d28b10a93c2401b9255 01-Aug-2011 Daniel Drake <dsd@laptop.org> libertas: disable functionality when interface is down

Modify the driver so that it does not function when the interface is
down, in preparation for runtime power management.

No commands can be run while the interface is down, so the ndo_dev_stop
routine now directly does all necessary work (including asking the device
to disconnect from the network and disabling multicast functionality)
directly.

power_save and power_restore hooks are added meaning that card drivers
can take steps to turn the device off when the interface is down.

The MAC address can now only be changed when all interfaces are down;
the new address will be programmed when an interface gets brought up.
This matches mac80211 behaviour.

Also, some small cleanups/simplifications were made in the surrounding
device handling logic.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
49fee69204035247fd2a5828863fc6f633e829f2 21-Jul-2011 Daniel Drake <dsd@laptop.org> libertas: link mesh device to wiphy

The mesh device is now exposed as an interface of the wiphy.
This exposes the mesh device to the cfg80211 interface, allowing
mesh channel selection to be reimplemented, and available to
NetworkManager as it was before.

Some header tweaking was needed in order to implement lbs_mesh_activated().

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d931998669c3e0e917bd9983880f3498c27de0af 20-Jul-2011 Daniel Drake <dsd@laptop.org> libertas: only enable mesh when interface is active

Previously, the mesh was running whenever the appropriate hardware
and firmware was present.

Now we only run the mesh when the interface is running.

Also simplifies interface management a little.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8973a6e770fc891f92daacbc1c92c7cd396fcf7e 27-Apr-2011 Randy Dunlap <randy.dunlap@oracle.com> libertas: use kernel-doc notation, fix comment style

Convert all libertas/ files to use kernel-doc notation instead
of whatever it was (doxygen?).

Add or fix function parameters in several places.

Use expected style for multi-line comments in lots of places.

Remove erroneous /** in multiple places.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
75abde4d193fe300a2c1d3ee7f632eb777aa48b2 21-Jan-2011 Vasily Khoruzhick <anarsoul@gmail.com> libertas: Prepare stuff for if_spi.c pm support

To support suspend/resume in if_spi we need two things:
- re-setup fw in lbs_resume(), because if_spi powercycles card;
- don't touch hwaddr on second lbs_update_hw_spec() call for same
reason;

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ae63a33ec9b598b3454cf0d29077fa17b616c42a 31-Oct-2010 Deepak Saxena <dsaxena@laptop.org> libertas: EHS_REMOVE_WAKEUP is not always supported

Certain firmware versions, particularly the 8388 found on the XO-1,
do not support the EHS_REMOVE_WAKEUP command that is used to disable
WOL. Sending this command to the card will return a failure that
would get propagated up the stack and cause suspend to fail.

Instead, fall back to an all-zero wakeup mask.

This fixes http://dev.laptop.org/ticket/9967

Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Daniel Drake <dsd@laptop.org>
[includes fixups by Paul Fox]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2e30168ba7dba95710aaadf12b2a97163df067b1 04-Nov-2010 Daniel Drake <dsd@laptop.org> libertas: terminate scan when stopping interface

There are currently no provisions in place to ensure that the scanning
task has been stopped when the interface is stopped or removed.

This can result in a WARNING at net/wireless/core.c:643 and other badness
when you remove the module while a scan is happening.

Terminate the scanning task during interface stop.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cc02681923ce09a7c8cfacc6855de259b9d4ef87 04-Aug-2010 Dan Williams <dcbw@redhat.com> libertas: scan before assocation if no BSSID was given

Fix this leftover TODO from the cfg80211 conversion by doing a scan
if cfg80211 didn't pass in the BSSID for us. Since the scan code
uses so much of the cfg80211_scan_request structure to build up the
firmware command, we just fake one when the scan request is triggered
internally. But we need to make sure that internal 'fake' cfg82011
scan request does not get back to cfg82011 via cfg80211_scan_done().

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
97c5e2756e3f0711877c5b6f2323151964229260 27-Jul-2010 Dan Williams <dcbw@redhat.com> libertas: remove unused cmd_pending waitq

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
77ccdcf2e933d61176f67c4976f7ad4cbb9cb82a 27-Jul-2010 Dan Williams <dcbw@redhat.com> libertas: kill unused lbs_prepare_and_send_command()

Remove last bits of indirect command code.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4c7c6e00f17365633638848197c44552dd353d49 27-Jul-2010 Dan Williams <dcbw@redhat.com> libertas: convert register access to direct commands

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cc4b9d3928d682c4a15690c2bd9ed11c2eac5921 27-Jul-2010 Dan Williams <dcbw@redhat.com> libertas: convert 11D_DOMAIN_INFO to a direct command

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1047d5edd4838f27dc86f24676178f2249c446ea 05-Jun-2010 Kiran Divekar <dkiran@marvell.com> Libertas: Added 11d support using cfg80211

Added 11d support for libertas driver using cfg80211. This is based on Holger
Shurig's initial work to add cfg80211 support libertas.
(https://patchwork.kernel.org/patch/64286/)

Please let us know, if there are any improvements comments.

Code is added to send 11d enable command to firmware while
initialisation and pass 11d specific information to firmware
when notifier handler is called by cfg80211.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e86dc1ca4676445d9f0dfe35104efe0eb8a2f566 14-Jun-2010 Kiran Divekar <dkiran@marvell.com> Libertas: cfg80211 support

Holger Schurig's patch (https://patchwork.kernel.org/patch/64286/)
is rebased to latest wireless-testing tree.

(Includes patches from me originally posted as "libertas: fix build
error due to undefined symbol" and "libertas: unmangle capability
value". -- JWL)

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Tested-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
66fceb69b72ff7e9cd8da2ca70033982d5376e0e 19-May-2010 Amitkumar Karwar <akarwar@marvell.com> libertas: Added callback functions to support SDIO suspend/resume.

In suspend() host sleep is activated using already configured
host sleep parameters through wol command, and in resume() host
sleep is cancelled. Earlier priv->fw_ready flag used to reset and
set in suspend and resume handler respectively. Since after suspend
only host goes into sleep state and firmware is always ready, those
changes in flag state are removed.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7371400431389e1df6a2a05ab9882055b8a6ff2c 29-Mar-2010 Daniel Mack <daniel@caiaq.de> net/wireless/libertas: do not call wiphy_unregister() w/o wiphy_register()

The libertas driver calls wiphy_unregister() without a prior
wiphy_register() when a devices fails initialization. Fix this by
introducing a private flag.

[ 9.310000] Unable to handle kernel NULL pointer dereference at virtual address 00000000

[...]

[ 9.330000] [<c0311310>] (wiphy_unregister+0xfc/0x19c) from [<bf00c9ec>] (lbs_cfg_free+0x70/0x9c [libertas])
[ 9.330000] [<bf00c9ec>] (lbs_cfg_free+0x70/0x9c [libertas]) from [<bf014fdc>] (lbs_remove_card+0x180/0x210 [libertas])
[ 9.330000] [<bf014fdc>] (lbs_remove_card+0x180/0x210 [libertas]) from [<bf035394>] (if_sdio_probe+0xdc4/0xef4 [libertas_sdio])
[ 9.330000] [<bf035394>] (if_sdio_probe+0xdc4/0xef4 [libertas_sdio]) from [<c0230d14>] (sdio_bus_probe+0xd4/0xf0)
[ 9.330000] [<c0230d14>] (sdio_bus_probe+0xd4/0xf0) from [<c01a6034>] (driver_probe_device+0xa4/0x174)
[ 9.330000] [<c01a6034>] (driver_probe_device+0xa4/0x174) from [<c01a6164>] (__driver_attach+0x60/0x84)
[ 9.330000] [<c01a6164>] (__driver_attach+0x60/0x84) from [<c01a5854>] (bus_for_each_dev+0x4c/0x8c)
[ 9.330000] [<c01a5854>] (bus_for_each_dev+0x4c/0x8c) from [<c01a50e4>] (bus_add_driver+0xa0/0x228)
[ 9.330000] [<c01a50e4>] (bus_add_driver+0xa0/0x228) from [<c01a6470>] (driver_register+0xc0/0x150)
[ 9.330000] [<c01a6470>] (driver_register+0xc0/0x150) from [<bf03a06c>] (if_sdio_init_module+0x6c/0x108 [libertas_sdio])
[ 9.330000] [<bf03a06c>] (if_sdio_init_module+0x6c/0x108 [libertas_sdio]) from [<c00263ac>] (do_one_initcall+0x5c/0x1bc)
[ 9.330000] [<c00263ac>] (do_one_initcall+0x5c/0x1bc) from [<c0069f80>] (sys_init_module+0xc0/0x1f0)
[ 9.330000] [<c0069f80>] (sys_init_module+0xc0/0x1f0) from [<c0026f00>] (ret_fast_syscall+0x0/0x30)

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Dan Williams <dcbw@redhat.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: Bing Zhao <bzhao@marvell.com>
Cc: libertas-dev@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
921ca03c8f8e982f27fc406bc301caf2196b99f7 26-Feb-2010 Amitkumar Karwar <akarwar@marvell.com> libertas: add auto auth mode feature

Auto auth mode is enabled by default. If user doesn't specify the
auth mode, while association driver will first try with open mode
and then with shared key mode. If user specifies an auth mode,
auto auth is disabled and driver will not try association with
another auth mode.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
40e6fa829a2544c9f8fd5a94844fe502334d6afc 04-Feb-2010 Holger Schurig <holgerschurig@gmail.com> libertas: don't retry commands

Retrying commands seldomly works, most often the firmware is in a
weird state anyway and needs the device to reset. So it's better
to report the broken state back to user-space.

Also rename command_timer_fn() into lbs_cmd_timeout_handler(),
which better reflect it's usage.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
45465487897a1c6d508b14b904dc5777f7ec7e04 21-Dec-2009 Stefani Seibold <stefani@seibold.net> kfifo: move struct kfifo in place

This is a new generic kernel FIFO implementation.

The current kernel fifo API is not very widely used, because it has to
many constrains. Only 17 files in the current 2.6.31-rc5 used it.
FIFO's are like list's a very basic thing and a kfifo API which handles
the most use case would save a lot of development time and memory
resources.

I think this are the reasons why kfifo is not in use:

- The API is to simple, important functions are missing
- A fifo can be only allocated dynamically
- There is a requirement of a spinlock whether you need it or not
- There is no support for data records inside a fifo

So I decided to extend the kfifo in a more generic way without blowing up
the API to much. The new API has the following benefits:

- Generic usage: For kernel internal use and/or device driver.
- Provide an API for the most use case.
- Slim API: The whole API provides 25 functions.
- Linux style habit.
- DECLARE_KFIFO, DEFINE_KFIFO and INIT_KFIFO Macros
- Direct copy_to_user from the fifo and copy_from_user into the fifo.
- The kfifo itself is an in place member of the using data structure, this save an
indirection access and does not waste the kernel allocator.
- Lockless access: if only one reader and one writer is active on the fifo,
which is the common use case, no additional locking is necessary.
- Remove spinlock - give the user the freedom of choice what kind of locking to use if
one is required.
- Ability to handle records. Three type of records are supported:
- Variable length records between 0-255 bytes, with a record size
field of 1 bytes.
- Variable length records between 0-65535 bytes, with a record size
field of 2 bytes.
- Fixed size records, which no record size field.
- Preserve memory resource.
- Performance!
- Easy to use!

This patch:

Since most users want to have the kfifo as part of another object,
reorganize the code to allow including struct kfifo in another data
structure. This requires changing the kfifo_alloc and kfifo_init
prototypes so that we pass an existing kfifo pointer into them. This
patch changes the implementation and all existing users.

[akpm@linux-foundation.org: fix warning]
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
48631de9218a4563a6632e105676f42db3849c57 02-Dec-2009 Holger Schurig <holgerschurig@googlemail.com> libertas: remove priv->ratebitmap

Used to be a write-only-variable :-)

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0e78ff8fcc6dabeda313719deb751afbd20bea41 02-Dec-2009 Holger Schurig <holgerschurig@googlemail.com> libertas: remove priv->capability

This variable was once set to WLAN_CAPABILITY_SHORT_PREAMBLE and
there's no code that could change the variable to something else.
Therefore it seems this is not necessary :-)

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4143a23de096910e3ceb0939f41de6ffb8c59475 02-Dec-2009 Holger Schurig <holgerschurig@googlemail.com> libertas: make mesh configurable

Mostly for the embedded people that know beforehand that they don't need
MESH at all and want to save some bytes, but also helpful for the upcoming
cfg80211 transition.

text data bss dec hex filename
114264 2308 140 116712 1c7e8 libertas.ko with mesh
105026 2000 140 107166 1a29e libertas.ko without mesh
--------------------------------------------------
-9238 -308 -9546

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d6ede678c138061f5202b519f8f8d6372e2cb5bb 02-Dec-2009 Holger Schurig <holgerschurig@googlemail.com> libertas: remove mesh_autostart_enabled and sync_channel

mesh_autostart_enabled was nowhere set. Rumor is that this is used in the
OLPC tree, but they never did submit their code upstream.

After removing this code, it turned out that the sync_channel stuff is now
also unused, so get rid of that as well.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c24ef46e6b1597e54f185e0b48eb9073ef155a8c 02-Dec-2009 Holger Schurig <holgerschurig@googlemail.com> libertas: use priv->mesh_tlv instead of priv->mesh_fw_ver

Both variables contained the same information (no mesh, old mesh, new mesh).
So we can get rid of one variable.

Also move the mesh-version test from cmd.c into mesh.c.

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5e8e8b5759566b76bdf36046ae015796676a423c 25-Nov-2009 Holger Schurig <holgerschurig@gmail.com> libertas: introduce mesh.h

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c14951fec6c292dca60e3cf8ab0edfdf11e6c0e2 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: get current channel out of priv->curbssparams

... as priv->curbssparams won't exist once libertas+cfg80211 lands.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5e047692245c7b8d338ddeece156721d594ca985 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: sort variables in struct lbs_private

Having the variables in logical groups allows us to easier
#ifdef stuff out.

No functional change.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2d46502dce3c79c3c15ac537cb271911f58d12d1 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: move scan/assoc related stuff

Another cfg80211-preparation patch: removes some code/definitions from
main.c and dev.h and put's it into assoc.c/.h, scan.c/.h.

No function change.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
243e84e91ed810f7dca5ba1c2d1a611811948566 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: change IW_ESSID_MAX_SIZE -> IEEE80211_MAX_SSID_LEN

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>
f4228b4c2e5864ee9d2051176beb2bd5a49a15cc 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: remove unused 11d.h as well, priv->countryinfo

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>
d37b4fdd43f7e5686c40181f33a50a7ee03ddbd8 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: remove unused 11d code

Most of the 11d code was protected with an "if (priv->enable11d)" clause.
But there was no code that anywhere that was able to set this
variable to true. So all 11d code was dead for almost a year and no one
complained. That's enought incentive to remove this code.

Besides removing old cruft, we gain back the 11d capability in a common way
when we merge the cfg80211 functionality.

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>
9e66e701d0e42efd548f0f7249af8a56f8e07b67 16-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: cleanup host.h and hostcmd.h

Also remove some unused definitions and make tab usage consistent.

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>
ff9fc791940f9ff51387c35f9332efe5007154f1 06-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: first stab at cfg80211 support

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4912545472d71e3dd546b18b397aec4c89fd7403 01-Oct-2009 Amitkumar Karwar <akarwar@marvell.com> libertas: Add auto deep sleep support for SD8385/SD8686/SD8688

Add timer based auto deep sleep feature in libertas driver which can be
configured using iwconfig command. This is tested on SD8688, SD8686 cards
with firmware versions 10.38.1.p25, 9.70.4.p0 respectively on 32-bit and 64-bit
platforms. Tests have been done for USB/CS cards to make sure that the patch
won't break USB/CS code. We didn't test the if_spi driver.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0fc0b732eaa38beb93a6fb62f77c7bd9622c76ec 02-Sep-2009 Stephen Hemminger <shemminger@vyatta.com> netdev: drivers should make ethtool_ops const

No need to put ethtool_ops in data, they should be const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
e0d6133cba88759bc760b254c27975330fff6519 16-Jun-2009 Andrey Yurovsky <andrey@cozybit.com> libertas: remove ps_supported flag, use fwcapinfo

Power save support depends on the firmware capabilities rather than the
card's hardware interface. Use the FW_CAPINFO_PS bit in the firmware
capabilities mask throughout the driver in place of the redundant
ps_supported flag and don't make decisions about PS support in the
interface drivers (with the exception of a special case in the USB
driver).

V2: put the USB special case in the right place.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6bc61f4d8e2fa3d54017c29b58603e8771158a25 02-Jun-2009 Bing Zhao <bzhao@marvell.com> libertas: improve function init/shutdown handling for SD8688

This patch is to incorporate Dan Williams' comments for commit:
"libertas: implement function init/shutdown commands for SD8688"

1. remove fn_init_required and fn_shutdown_required variables from
lbs_private structure. If required, __lbs_cmd() will be called
directly to send function init/shutdown command for SD8688 in
if_sdio_probe() or if_sdio_remove() callback.

2. add global variable "user_rmmod" to distinguish between the module
removal case and the card removal case. This flag will be checked in
if_sdio_remove() against SD8688 card to determine whether or not the
function shutdown command needs to be sent.

3. remove "card" from if_sdio_model structure as it cannot store
card pointers for multiple cards. Besides, it's no longer needed
to store the "card" pointer with changes #1 & #2 above.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
75b6a61a47353fd404277ae3f2dda03af96a8c1a 23-May-2009 Dan Williams <dcbw@redhat.com> libertas: restyle Marvell & IEEE TLV structure names

Easier to read and more conformant with kernel style.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5fd164e96cb9dc111f75468378de38c67b0fd161 23-May-2009 Dan Williams <dcbw@redhat.com> libertas: simplify and clean up association/start/join setup

Some of the parameters for association/join/start commands aren't
used (like the FH and CF IEs for IBSS, and the FH IE for BSS), so
get rid of their unions to reduce indirection. Also clean up
structure names for kernel style.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d26285f873c3066fefe648b47b9ecf3ec18bcfbc 20-May-2009 Bing Zhao <bzhao@marvell.com> libertas: implement function init/shutdown commands for SD8688

SD8688 is a WLAN/Bluetooth combo chip and both functions are supported
in a single firmware image. FUNC_INIT and FUNC_SHUTDOWN commands are
implemented to utilize the multiple function feature.

When SD8688 card is inserted, the firmware image should be downloaded
only once through either WLAN function (Libertas driver) or Bluetooth
function (Bluetooth driver).

This patch adds function init/shutdown for SD8688 WLAN function only.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
684d6b360222f31b6b9be9a63aa5c6ed5674c890 25-Mar-2009 Bing Zhao <bzhao@marvell.com> libertas: support mesh for various firmware versions

CMD_MESH_CONFIG command ID and a couple of structure members in TxPD,
RxPD have been changed in firmware version 10.x.y.z and newer.

Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
bbfc6b788f63f079fb8eeeb8d397bb1c0a8065a1 20-Mar-2009 Stephen Hemminger <shemminger@vyatta.com> libertas: convert to internal net_device_stats

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2c706002fc147decdba2658ea48e4436faca3af2 30-Oct-2008 Johannes Berg <johannes@sipsolutions.net> don't use net/ieee80211.h

Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h.
Contains a bugfix in libertas where the SSID parsing could overrun the
buffer when the AP sends invalid information.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Dan Williams <dcbw@redhat.com> [airo, libertas]
Acked-by: Pavel Roskin <proski@gnu.org> [orinoco]
Acked-by: David Kilroy <kilroyd@googlemail.com> [orinoco]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9c40fc510a3df3a74731f5f251b9481feffc0ed5 17-Sep-2008 Javier Cardona <javier@cozybit.com> libertas: Reduce the WPA key installation time (fixups)

This patch addresses comments from Dan Williams about the patch
committed as "libertas: Reduce the WPA key installation time."

Signed-off-by: Javier Cardona <javier@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
39fcf7a315e098430e878a5c0c4d39561c93ebf6 10-Sep-2008 Dan Williams <dcbw@redhat.com> libertas: convert SNMP_MIB to a direct command

And support setting both long and short retries independently.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d5db2dfa660de13c3643149b89c7602dd49aa168 21-Aug-2008 Dan Williams <dcbw@redhat.com> libertas: convert CMD_802_11_RADIO_CONTROL to a direct command

and return errors for operations like join & scan that aren't possible
when the radio is turned off.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
87c8c72d532f96257162f978d5945dcf7f0df19e 19-Aug-2008 Dan Williams <dcbw@redhat.com> libertas: convert CMD_802_11_RF_TX_POWER to a direct command

And while we're at it, grab min/max TX power from the firmware and use
that to validate incoming TX power requests from WEXT.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
85319f933a703a92652a8f23339f1ec1694cd594 24-May-2008 Javier Cardona <javier@cozybit.com> libertas: rate adaptation configuration via iwconfig.

Implemented rate adaptation support via 'iwconfig rate' API. It is now
possible to specify a bit-rate value and append 'auto'. That will configure
rate adaptation to use all bit-rates equal or lower than than selected value.

Made lbs_cmd_802_11_rate_adapt_rateset a direct command.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
edf5dabfa86163d589041cccf607b41a7033e9b0 20-May-2008 David Woodhouse <dwmw2@infradead.org> libertas: Add reset_card() callback to hardware driver

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
75bf45a7b4ab81cfa5c5eab68b57bbfee8b8ede2 20-May-2008 David Woodhouse <dwmw2@infradead.org> libertas: fix multicast filtering on eth and msh interfaces

We weren't properly handling multicast on the mesh interface. Fix that,
which involves setting up the hardware to use the union of dev->mc_list
for both eth%d and msh%d devices.

This means we can't do it directly from ->set_multicast_list() because
we'd need to lock the other device to read its list, and we can't do
that because it might deadlock. So punt the actual work to keventd.

Also, invoke the same when taking an interface down; for some reason the
core calls ->set_multicast_list while IFF_UP is still set in dev->flags
when we're taking it down, so its addresses don't get removed then.

We also convert MAC_MULTICAST_ADR to a direct command while we're at it,
removing one more entry from the big switch statement in the deprecated
lbs_prepare_and_send_command() function.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7919b89c8276d657976d4d4d6b7cb58ea1aa08c3 01-Apr-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: convert libertas driver to use an event/cmdresp queue

This patch (co-developed by Dan Williams and Holger Schurig) uses a kfifo
object for events and a swapping buffer scheme for the command response to
preserve the zero-copy semantics of the CF driver and keep memory usage low.
The main thread should only ever touch the buffer indexed by priv->resp_idx,
while the interface code is free to write to the second buffer, then swap
priv->resp_idx under the driver spinlock. The firmware specs only permit
one in-flight command, so there will only ever be one command response to
process at a time.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
245bf20f9c159f8d35befbc038997096b759459c 02-Apr-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: move association code from scan.c into assoc.c

Besides code moving, I did the following changes:

* made some functions static
* removed some unneeded #include's
* made patch checkpatch.pl clean

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>
f539f2efe9fdf9e7db2022a757190858576d34fd 26-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: convert sleep/wake config direct commands

Confirm sleep event: they come very regularly, eventually several times per
second. Therefore we want to send the config command as fast as possible.
The old code pre-set the command in priv->lbs_ps_confirm_sleep. However, the
byte sequence to be sent to the hardware is the same for all interfaces. So
this patch make this an extern structure, initialized at module load time.

Config wake event: normal conversion to a direct command. However, I don't know
how to trigger a "HOST AWAKE" event from the firmware, so this part is
untested.

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>
7460f5a69055357bf97f1890db547aba0c4bf2fa 26-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: convert CMD_802_11_EEPROM_ACCESS to a direct command

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>
c49c3b77c8c611f562ca4e201d88d3e69465f928 17-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: convert GET_LOG to a direct command

Now uses __lbs_cmd() to get the "log" (it's actually more a snapshot of
various counters, not a sequential log). Besides the "mechanical" convertion
the patch add the following logical changes:

* Removes the priv->logmsg variable, it was only used in one place anyway,
also don't blindly get the counters when associating. Getting the
counters then the user asks via WEXT for them is good enought.
* don't set wstats.discard.fragment with log.rxfrag, because the latter is
a counter for successfully received packets, not for fragmented packets.

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>
d9e9778c2ac5bac02fc118e9a2954e4c70f88eb6 12-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: rename packetfilter to mac_control

The CMD_MAC_CONTROL can be used for other things than just filtering
packets, e.g. to enable and disable WMM. This uses the same term mac_control
for the define, the function and the shadow value in struct lbs_private.

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>
52933d815bff78605a490582a2212a8131482e00 05-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: implement SSID scanning for SIOCSIWSCAN

After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported
scanning for a specific SSID. However, wpa_supplicant is a possible user of
this ioctl, so here is code that add's this.

While passing, removed even more of the debugfs-based scanning. You can (and
should) the SIOCSIWSCAN to ask for scans, so there is no need for
proprietary interfaces for scanning. And, besides, the scan result couldn't
be used further, e.g. not for associating.

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>
8816edcea9009b66570bef10acde5a552a9b3b3c 28-Jan-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: rename/document scan_channel

Rename last_scanned_channel to scan_channel, just so that a
grep for struct bss_descriptor's last_scanned element doesn't
show up so many positives.

Also documented the variable and moved it to other scan related
entries in lbs_private.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5a6e04345abf04f543373f45081d109d13d96822 25-Jan-2008 Ihar Hrachyshka <ihar.hrachyshka@promwad.com> libertas: fix memory alignment problems on the blackfin

Fixing unaligned memory access on the blackfin architecture (maybe on the
ARM also).

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@promwad.com>
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
dac10a9f286c75cffa75c7ec8b05d566a6ece95e 16-Jan-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: always show firmware release

Always shows the firmware release.

Also converts the firmware release into something that is easily comparable.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4365929d176b47a78d10aca0d1dee2afdfcbe4f2 16-Jan-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: move cardspecific data to driver

boot2_version is purely USB specific, so move it to struct if_usb_card.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3fbe104cecdb8c812976fdb0cc41be65491b85ee 18-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: convert SLEEP_PARAMS to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b2c57eee66592e22327bf39b42c4e3dc24708213 17-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: allow for PS mode to be disabled when firmware doesn't support it

Otherwise, we go into an endless busy loop trying to enable PS mode when
the command queue is empty, dealing with the error response, and then
trying to enable PS mode again because the command queue is empty.... it
doesn't really save much power.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b47ef2438dea2ddad4561152aa8007a2d95e8157 17-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: handle HOST_AWAKE event by sending WAKEUP_CONFIRM command

lbs_send_confirmwake() is a bit ugly but matches the way we confirm
sleep. We'll deal with that whole thing later.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2a345099a4fbe551a1982630b3d89c85fa5a341d 16-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: handle command timeout in main thread instead of directly in timer

And handle the case where it times out more than once, too, instead of
locking up for ever.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
020f3d0001cb249ceae623c1a7ae0c196326ef3f 13-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: cope with both old and new mesh TLV values

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
506e9025e030c441679fb1ae77fb0d6266c34443 13-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: add ethtool support for wake-on-lan configuration

Also, check that suspend is refused if HOST_SLEEP_CFG hasn't been done.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
23a397ac821ab0aa263bda47131bb0628e49101a 12-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: add lbs_mesh sysfs attribute for enabling mesh

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8552855f9860b222673e86a88de2543f53f83dc2 10-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: make rtap and normal modes mutually exclusive, clean up open/stop

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2eb188a1c57ae79283cee951c317bd191cf1ca56 10-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: Move actual transmission to main thread

The locking issues with TX, especially TX from multiple netdevs, get
_so_ much easier if you do it like this.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d9268fb9a124d067cf93710a85bb6c158d131c97 09-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: stop using ieee80211 for radiotap device

There seems to be no point in doing it as an ieee80211 device instead of
a normal netdev, and when we override its ->priv and then call
free_ieee80211() it has a distressing tendency to crash horribly.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2abdc0b7756ece70b1f0fd65a651bf8ce487a223 09-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: kill internal tx queue for PS mode

It was buggy as hell anyway, since it was just spewing packets at the
device when it wasn't necessarily ready for them (in the USB case, while
the URB was still busy).

We could probably do with a better way of flushing packets to the device
_immediately_, before we stick it back into sleep mode. But we can no
longer just dequeue packets directly, it seems.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
aa21c004f80bdf943736c62dccf0c0398d7824f3 08-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: kill struct lbs_adapter

There seems to be no reason for a separate structure; move it all
into struct lbs_private.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f86a93e1b2d05a7a38a48c91f8fb8fc7e8f1c734 08-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: kill TxLockFlag

We don't need this. We can use adapter->currenttxskb instead.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e7deced05f15693cca71bfae747b8d57eadeb1b2 08-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: fix lbs_rtap attribute in sysfs

At least it doesn't oops when you attempt to read or write it now.
Only when you enable it and then later turn it off. And when it's
enabled I don't see how it actually works.

But one fewer oops is good, for now...

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ac47246e246c183ed68b3fdb307a83d00313a325 08-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: kill adapter->nr_cmd_pending

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ffd074fc78c1053b1f1697ebbe5bcfbb64949d16 07-Dec-2007 Holger Schurig <hs4233@mail.mn-solutions.de> 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>
69f9032d9dfeb763b467fdbe8cf5938f5457083a 23-Nov-2007 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: remove arbitrary typedefs

New typedefs are usually frowned upon. This patch changes
libertas_adapter -> struct libertas_adapter
libertas_priv -> struct libertas_priv

While passing, make everything checkpatch.pl-clean that gets touches.

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>
96287ac4f7b387acbe17e24b5e1bcbf3bc0e75cd 20-Nov-2007 Brajesh Dave <brajeshd@marvell.com> libertas: configurable beacon interval

Requires firmware version 5.110.19.p0 or newer, available here:
http://dev.laptop.org/pub/firmware/libertas/

Signed-off-by: Ashish Shukla <ashishs@marvell.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
01d77d8d4747d73cfb6daf35cdc906a2db8ded9d 20-Nov-2007 Brajesh Dave <brajeshd@marvell.com> libertas: separate mesh connectivity from that of the main interface

The transmit and receive traffic as soon as the mesh interface is
brought up.

Test case 1: Bring up only the mesh interface and ping. No need for
any iwconfig commands on the main interface.

$ ifconfig msh0 192.168.5.3
$ iwconfig msh0 channel X
$ ping 192.168.5.2
If ping succeeds, PASS

Test case 2: Associate with the main interface, and turn off AP. Mesh
interface should not lose connectivity.

$ iwconfig eth0 mode managed essid "my_ssid"
$ ifconfig msh0 192.168.5.3
$ ping 192.168.5.2
<turn off access point>
If ping continues uninterrupted, PASS

This feature requires firmware version 5.110.19.p0 or newer, available
here: http://dev.laptop.org/pub/firmware/libertas/

Signed-off-by: Ashish Shukla <ashishs@marvell.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1007832103d016d1563fab71d4cf2b057a0bcceb 16-Nov-2007 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: move to uniform lbs_/LBS_ namespace

This patch unifies the namespace of variables, functions defines
and structures. It does:

- rename libertas_XXX to lbs_XXX
- rename LIBERTAS_XXX to lbs_XXX
- rename wlan_XXX to lbs_XXX
- rename WLAN_XXX to LBS_XXX (but only those that were
defined in libertas-local *.h files, e.g. not defines
from net/ieee80211.h)

While passing, I fixed some checkpatch.pl errors 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>
954ee164f4f4598afc172c0ec3865d0352e55a0b 20-Aug-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: reorganize and simplify init sequence

This patch moves all firmware load responsibility into the interface-specific
code and gets rid of the firmware pointer in the generic card structure. It
also removes 3 fairly unecessary callbacks: hw_register_dev, hw_unregister_dev,
and hw_prog_firmware. It also makes the init sequence from interface
probe functions more logical, as there are paired add/remove and start/stop
calls into generic libertas code.

Because the USB driver code uses the same TX URB callback for both firmware
upload (where the generic libertas structure isn't initialized yet) and for
normal operation (where it is), some bits of USB code have to deal with
'priv' being NULL. All USB firmware upload bits have been changed to not
require 'priv' at all, but simply the USB card structure.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
63f0023bc34073bea8452a4770540c954f98208f 02-Aug-2007 Luis Carlos Cobo <luisca@cozybit.com> [PATCH] libertas: pass boot2 version to firmware

Boot2 version used to be hardcoded in the uploaded firmware,
this patch preserves the boot2 version before uploading firmware
and sends it to the firmware again on resume.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2afc0c5d71a3dec6d35f3a234ed986d635ef41ad 02-Aug-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: push WEXT scan requests to a work queue

Push WEXT scan requests to a workqueue and have each partial scan queue
the next part, then only report results when the complete scan has finished.
Full scans don't go through the work queue.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
965f8bbc6c92233600b176f4c80299f6766df9bd 02-Aug-2007 Luis Carlos Cobo <luisca@cozybit.com> [PATCH] libertas: monitor mode support for OLPC firmware

Driver support for the monitor mode support that will be available in the next
OLPC 'bleeding edge' Marvell firmware release (most likely, 5.110.16.p2).

To activate monitor mode,

echo mode > /sys/class/net/{ethX,mshX}/device/libertas_rtap

where mode is the hex mask that specifies which frames to sniff (in short, 0x1
for data, 0x2 for all management but beacons, 0x4 for beacons). Any non zero
mode will activate the monitor mode, inhibiting transmission in ethX and mshX
interfaces and routing all the incoming traffic to a new rtapX interface that
will output the packets in 802.11+radiotap headers format.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d21b31fd53626f9c1d14fc676793dbe86b44d1c6 02-Aug-2007 Luis Carlos Cobo <luisca@cozybit.com> [PATCH] libertas: keep mesh autostart enabled while asleep

After loading the firmware, mesh autostart will be disabled. After that, the
user will still be able to enable or disable it at will. On suspend, it will be
always activated and later on resume it will go back to the state it had before
going to sleep.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4f2fdaaf0e4209bff3b18dc14c915b61f5fa5cd2 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->scantype

scantype was initialized with CMD_SCAN_TYPE_ACTIVE, but there is no code
that would ever change it, so we can use that variable directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d65ead886a193682f88b07aaf11d46127735a2b5 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->scanmode

scanmode was initialized with CMD_BSS_TYPE_ANY, but there is no code
that ever can store another value there, so it can go away.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2c85103da3c88a06a7c01eece709482d85eff07f 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->beaconperiod

beaconperiod was initialized with MRVDRV_BEACON_INTERVAL, but there is
no code that would ever change it's value. We can use the define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
85c93e5189b7402b4f9f4324c284bb91e8e8fb85 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->adhoc_grate_enabled

The variable was initialized with 0 (false). There is no code that would
ever change it, so we can use the false-patch directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0aabc0a5d5657df254255c9049a97cc96229bcba 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->listeninterval

listeninterval was initialized with MRVDRV_DEFAULT_LISTEN_INTERVAL, but
there exists that would ever change it. So we can use this define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
956deb867a97ac137c164a5d2d12b0c82fb6776d 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->regiontableindex

The value was computed, but then never used.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ae596ce2f77d1542fe44ea483bd0ca7f61baeccd 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->atimwindow

This varaible was initialized with 0 but there is no code that would ever
change it's value. So it can go away.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
56c4656e84d068ecc4da670799216e5b2aaee50e 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->multipledtim

multipledtim was initialized with MRVDRV_DEFAULT_MULTIPLE_DTIM and then
kept at that value, so we could use that define directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
252cf0d10f76d3edcd808d462dcfbd544875a0be 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->locallisteninterval

locallisteninterval was initialized with 0, but there is no code that
changes it, rendering it rather useless.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
97605c3eb3dee943a45584be92c46be1305b3ef5 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->nullpktinterval

No code ever initialized this variable, so it was 0 because of kzalloc().
But no other code changes it, making it rather useless.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a783f1ee5b112a0258762877ec7c1ce8810f3cd8 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->{data,bcn}_avg_factor

Those two variables were initialized with some default values, but there
is no code that would ever change them. So we could use as well the defaults
directly.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
caef47a0dc2b17ea6fb0119d3678b4b21ae70daa 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->rxpd_rate

No code uses the contents of this variable, so it can go.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
cad9d9b17a4ab80da1593de004a1163b359de268 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->txrate

The value of txrate was only set by a CMD_802_11_TX_RATE_QUERY command,
but there was no code in the driver that ever issued this command.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fcff0e0856351b201016cd9267cadcf6a8e988d5 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->pkttxctrl

The variable was initialized to 0 and nowhere else changed, so basically
the per-packet TX control wasn't used.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e2aa334bee4ae9fe27f26b0732c0443d2f11a8af 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->scanprobes

The variable was initialized to 0 and nowhere else to anything
different.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6e22a855b27ddc0725c134cc428ee668e56ac9f8 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->prescan

The value 1 was assigned to it and there was nowhere any code
that would have changed that to 0.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fdde7084e033263f48d26d5b24ecf626aed29b5b 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove adapter->{rx,tx}antenna

There was nowhere any code that used the values of those
variables.

This patch also removes two static functions that are now unused.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4d4ce1ad02f02e593086fabdad69953ecbd99d9c 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove unused adapter->prev_XXXX variables

There were just used in some debug output, but nowhere else.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f455eb1a4ba2bf0ff1bde7844bf3a811269d2d79 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove debugmode

There is nowhere any place that set's this variable.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8c5127657549d055ac9d709cdea73902a6ef392c 02-Aug-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: simplify and clean up data rate handling

Remove unused/duplicated fields and consolidate static data rate arrays,
for example the libertas_supported_rates[] and datarates[] arrays in
the bss_descriptor structure, and the libertas_supported_rates field
in the wlan_adapter structure.

Introduce libertas_fw_index_to_data_rate and libertas_data_rate_to_fw_index
functions and use them everywhere firmware requires a rate index rather
than a rate array.

The firmware requires the 4 basic rates to have the MSB set, but most
other stuff doesn't, like WEXT and mesh ioctls. Therefore, only set the MSB
on basic rates when pushing rate arrays to firmware instead of doing a ton
of (rate & 0x7f) everywhere.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fe3361507af44d00d5b42b91c1626321765a11bc 02-Aug-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: remove thread.h and make kthread usage clearer

Remove the thread.h abstractions and opencode kthread stuff
to make it clearer.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1443b6530d8db779082dc9fabbd894e2b551b101 02-Aug-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: rename WLAN_802_11_KEY to enc_key and clean up usage

It doesn't touch hardware and therefore doesn't need endian notations
either.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0c9ca690e0117e1bf415d5f3e392e27c0c472c68 02-Aug-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: kill ieeetypes_capinfo bitfield, use ieee80211.h types

Use standard BSS capability field constants from ieee80211.h.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b8bedefd8fe589ff87a681e20583c8317030491d 30-May-2007 Luis Carlos Cobo Rus <luisca@cozybit.com> [PATCH] libertas: pull current channel from firmware on mesh autostart

Signed-off-by: Luis Carlos Cobo Rus <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d8efea254887128d710cc1475505514da004932c 29-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: remove structure WLAN_802_11_SSID and libertas_escape_essid

Replace WLAN_802_11_SSID with direct 'ssid' and 'ssid_len' members
like ieee80211. In the process, remove private libertas_escape_essid
and depend on the ieee80211 implementation of escape_essid instead.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e5b3d472ad4eaa9013fd9f67f7a1b132f3ec910c 26-May-2007 David Woodhouse <dwmw2@infradead.org> [PATCH] libertas: don't byte-swap firmware version number. It's a byte array.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e76850d620a0a26fa807b4fa189c64a94789461e 25-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: make association paths consistent

The BSS to associate with (in either Infrastructure or IBSS join
operations) is now stored in _one_ place in the association request (the
bss member), not two places as before (pattemptedbss and
curbssparams->bssdescriptor).

Association requests are passed to the necessary association functions
to (a) give them access to the bss member and (b) ensure that
association/join/start setup uses settings from the request, not the
current adapter settings (which may not be valid for the requested
settings).

Because the 'bss' member of the association request is used now, the
command return functions from associate and adhoc join/start need access
to the in-progress association request to update curbssparams when
everything is done. The association worker moves the request from
pending to in-progress for the duration of the association attempt.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ef9a264b7a288a07c43ddb244c4f9ab0e8df90e4 25-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: move channel changing into association framework

Handle channel changes through the deferred association framework
rather than directly. Fixes errors when setting channels along
with other parameters like mode and SSID.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fcdb53dbc743f288bf72e485fefb3a967b733686 25-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: make scan result handling more flexible

- use a linked list for scan results
- age scan results
- pass bss_descriptors around instead of indexes into the scan table
- lock access to the scan results
- stop returning EAGAIN from SIOCGIWSCAN handler

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
634b8f49c11f49272b09d13a34b22a17b8c3d419 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: remove unused variables in wlan_dev_t

Actually, this patch removev wlan_dev_t totally and puts the used variables
of it directly into wlan_private. That reduces one level of indirection and
looks a little bit simpler. It's now "priv->card" and not
"priv->wlan_dev.card" and "priv->dev" instead of "priv->wlan_dev.netdev"

Changed two occurences of "((wlan_private *) dev->priv)->wlan_dev.netdev"
into "dev", because I didn't see the point in doing pointer-ping-pong.

The variables "ioport", "upld_rcv" and "upld_type" where unused. They have
been removed.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
208fdd2f447899164bd139452c291b155e53cee9 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: indirect all hardware access via hw_XXXX functions

This functions makes all libertas_sbi_XXX functions static to the
if_usb.c file and renames them to if_usb_XXXX(). The get called from
other places of the source code via priv->hw_XXXX().

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0601e7ee463f2736586de9a24025f8791db7f5a8 25-May-2007 Javier Cardona <javier@cozybit.com> [PATCH] libertas: added transmission failures to mesh statistics

Added transmission failures to mesh statistics.
Removed whitespace before newlines.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
064827edf6901e5fcbd84fc258fb2326a530da9c 25-May-2007 Marcelo Tosatti <mtosatti@redhat.com> [PATCH] libertas: scan two channels per scan command

Scan two channels per each command on set_scan(), then bail out and let
get_scan() continue the scanning work up to the last channel.

This gives time to the firmware so it can go back to the association
channel and keep the connection alive.

Fixes http://dev.laptop.org/ticket/841

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0dc5a29044d56912bf0d4e5cd19127f82b90c29c 11-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: remove WLAN_802_11_NETWORK_INFRASTRUCTURE enum

Use standard IW_MODE_* constants instead.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
889c05bdf3056b029b9fa95096eac4f0dfd3fb6f 11-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: remove WLAN_802_11_WEP_STATUS enum

Also change WEPstatus to "wep_enabled"; it's clearer and consistent with the
WPAenabled and WPA2enabled members.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6affe785aaf983253b27e71e67bf5fceaee6ff88 11-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: remove WLAN_802_11_AUTHENTICATION_MODE

Remove WLAN_802_11_AUTHENTICATION_MODE enum and use IW_AUTH_ALG_* instead.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9408c297f6cee8e91ab2c51ec8d56e8c23c19a53 11-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: remove custom encryption mode stuff

Remove setencryptionmode private ioctl and Encryptionmode variable.

Mostly unused, and its functionality is provided by other internal members
like WEPstatus, WPAenabled, WPA2enabled, and SIOCSIWGENIE.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1d42b8f293c55226d18d97127419157fa4e47b41 11-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: remove 8021xauthalgs private ioctl

Useless; it set an internal variable that was unused anyway.
A supplicant handles all 802.1x authentication, not the driver.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4684c23dd472815755728fe954dfd2944956b4aa 11-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: use <net/ieee80211.h> for MAX_WPA_IE_LEN

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
876c9d3aeb989cf1961f2c228d309ba5dcfb1172 10-Feb-2007 Marcelo Tosatti <marcelo@kvack.org> [PATCH] Marvell Libertas 8388 802.11b/g USB driver

Add the Marvell Libertas 8388 802.11 USB driver.

Signed-off-by: Marcelo Tosatti <marcelo@kvack.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>