History log of /drivers/net/wireless/libertas/decl.h
Revision Date Author Comments
534111c78c59a8db89c570fd07489243dc366a05 17-Apr-2012 Daniel Drake <dsd@laptop.org> libertas: add asynchronous firmware loading capability

As described at
http://article.gmane.org/gmane.linux.kernel.wireless.general/86084
libertas is taking a long time to load because it loads firmware
during module loading.

Add a new API for interface drivers to load their firmware
asynchronously. The same semantics of the firmware table are followed
like before.

Interface drivers will be converted in follow-up patches, then we can
remove the old, synchronous firmware loading function.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
370803c25dd77332ee4ca97884c3a5e1e1eafbca 17-Apr-2012 Daniel Drake <dsd@laptop.org> libertas: Firmware loading simplifications

Remove the ability to pass module parameters with firmware filenames
for USB and SDIO interfaces.

Remove the ability to pass custom "user" filenames to lbs_get_firmware().

Remove the ability to reprogram internal device memory with a different
firmware from the USB driver (we don't know of any users), and simplify
the OLPC firmware loading quirk to simply placing the OLPC firmware
at the top of the list (we don't know of any users other than OLPC).

Move lbs_get_firmware() into its own file.

These simplifications should have no real-life effect but make the
upcoming transition to asynchronous firmware loading considerably less
painful.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5c1381ac3f3f49ab1e0886ea8f1432c9a5def519 14-Oct-2011 Daniel Drake <dsd@laptop.org> libertas: fix changing interface type when interface is down

The recent changes to only power the device when the interface up
introduced a bug: changing interface type, legal when the interface
is down, performs device I/O.

Fix this functionality by validating and recording the interface
type when the change is requested, but only applying the change
if/when the interface is brought up.

Signed-off-by: Daniel Drake <dsd@laptop.org>
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>
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>
72f7a6671e8a1433467757e94c883d39eeccd4ba 08-Aug-2010 Dan Williams <dcbw@redhat.com> libertas: add two-stage firmware request helper

SDIO, GSPI, and CS all use 2-stage firmware and the loading
process and logic should be the same. Allow module parameters
to override the automatic firmware choice, otherwise just walk
the bus driver's firmware table and pick out the first firmware
pair that exists for the given model.

Some special care is taken to allow overriding of just the helper
or the main firmware, but let the other of the pair be chosen
automatically.

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>
e0e42da3a4df6f487b59dad608db56e25001bcdb 25-Nov-2009 Holger Schurig <holgerschurig@gmail.com> libertas: moveing mesh-related functions into mesh.c

This moves mesh initialization, start/stop and rx/tx handling from
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>
e93156e7c4c3e2be355cac27c58664e4385c58fd 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: sort and categorize entries in decl.h

This now makes decl.h only contain declarations for functions that don't
have their own *.h file.

No function change.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6e85e0b7ab1cafd6ff63c391d231b5a39934802e 22-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: move lbs_send_iwevcustom_event() to wext.c

... because it's purely a WEXT function.

No functional change.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
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>
bca61f8a4df69949cc7426b39daa867f5274a9b8 16-Oct-2009 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: harmonize cmd.h

* move declarations for functions of cmd.c/cmdresp.c into cmd.h
* move declarations from cmd.h that are in main.c to decl.h
* group command functions

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>
63f275df64dc69a46bbc21e6a68d5506d2da9c51 07-Oct-2009 Amitkumar Karwar <akarwar@marvell.com> libertas: Use lbs_is_cmd_allowed() check in command handling routines.

lbs_is_cmd_allowed() check is added in __lbs_cmd_async() and
lbs_prepare_and_send_command(). The check is removed from other places.

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>
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>
d0cf9c0dadcdc89a755bcb301cfc9c796eb28ccf 31-Aug-2009 Stephen Hemminger <shemminger@vyatta.com> wireless: convert drivers to netdev_tx_t

Mostly just simple conversions:
* ray_cs had bogus return of NET_TX_LOCKED but driver
was not using NETIF_F_LLTX
* hostap and ipw2x00 had some code that returned value
from a called function that also had to change to return netdev_tx_t

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7e272fcff6f0a32a3d46e600ea5895f6058f4e2d 25-Sep-2008 John W. Linville <linville@tuxdriver.com> wireless: consolidate on a single escape_essid implementation

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>
15dbaac03e862ee746310832c8d8d694dc0427ee 18-May-2008 Javier Cardona <javier@cozybit.com> libertas: sysfs interface for accessing non-volatile configuration

This will create the following sysfs directories:
/sys/class/net/mshX
...
|-- boot_options
| |-- bootflag
| `-- boottime
...
|-- mesh_ie
| |-- capability
| |-- mesh_id
| |-- metric_id
| `-- protocol_id

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a63e5cb22fcc8590abc7d5050118a6d3589ed95f 30-Apr-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: make some functions void

They don't return anything meaningfull and no-one cares about their results.

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>
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>
fb14a7e0860ef8b19d0dd61be96e23eacb4da129 02-Apr-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: remove lbs_get_fwversion()

It was used only at one place anyway.

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>
04850a47aa7d03cbf651a91262fdaa9f18373dfc 26-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: don't depend on IEEE80211

Runtime-wise we only need escape_ssid from the deprecated IEEE80211
subsystem. However, it's easy to provide our own copy.

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>
e98a88dd33b7188ce84533e128101dd9630ae592 19-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: remove lots of unused stuff

This removes many unused function parameters as well as some not-implemented
functions, e.g. CMD_802_11_GET_STATS. The silly lbs_set_cmd_ctrl_node()
function is now also gone.

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>
d4ff0ef635b222d5f66dad65e9364d702e5f94e0 19-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: misc power saving adjusts

* firmware for the CF card supports power saving
* the driver currenly only accept "iwconfig ethX power on|off", so
I fixed what the range wext ioctl reports.
* initialize value/flags in lbs_get_power()
* get rid of unused parameter psmode in lbs_ps_confirm_sleep()
* some minor debug output tweaks

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>
c97329e21fc487ebf251c920d46537ff5fb4d8a7 18-Mar-2008 Holger Schurig <hs4233@mail.mn-solutions.de> libertas: fix scheduling while atomic bug in CMD_MAC_CONTROL

The old code incorrectly used lbs_cmd_with_response() and now uses
lbs_cmd_async().

While there I noticed that there is no real useful return values for
asynchronous command functions, so I made the function "void".

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>
4b7524a42e14a7f86fa12611f3419650e99e2526 26-Feb-2008 Roland Dreier <rdreier@cisco.com> libertas: Remove unused exports

The libertas driver exports a number of symbols with no in-tree users;
remove these unused exports. lbs_reset_device() is completely unused, with
no callers at all, so remove the function completely.

A couple of these unused exported symbols are static, which causes the
following build error on ia64 with gcc 4.2.3:

drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict
drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
681ffbb7d42435332fff0812145c7050d6153925 16-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: kill 'addtail' argument to lbs_queue_cmd() and make it static

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
183aeac1c49869ba9a14c7ead86ce268da397a0e 15-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: introduce and use lbs_complete_command() for command completion

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
9f4625776f96e26b15d98615337ea5916648b1e8 13-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: make lbs_update_channel() function non-static

We'll want to use this for meshfrobbing

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>
14e865ba5d9e9adc90363e572743ac238935ba38 10-Dec-2007 Dan Williams <dcbw@redhat.com> libertas: make lbs_cmd() usage nicer

Define a macro that relieves the caller from having to use sizeof on
the command structure when calling lbs_cmd(), and move the prototype
of __lbs_cmd() to a new cmd.h file.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4f679496567809ce1e95730c25274e1832537f4b 10-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: clean up lbs_interrupt()

Make it take struct lbs_private as argument; that's all it wants anyway,
and all callers were starting off from that. Don't wake the netif
queues, because those should be handled elsewhere. And sort out the
locking, with a big nasty warning for those who don't have the
driver_lock locked when they call it.

Oh, and fix if_cs.c to lock the driver_lock before calling it.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1309b55b4de18bbfe19c73225a5481d6cdc8a463 10-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: add opaque extra argument to cmd callback function

This will be useful for letting callbacks do stuff like copying the
response into a buffer provided by the caller of lbs_cmd()

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6f93a8e7e41c2d29749242f983f41e3f6a75b40b 10-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: kill lbs_upload_tx_packet()

It replaces two lines of code. And even for those it has to make
inferences about things (i.e. which device) which the caller would have
just known.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a9bdce6564b25268af7315d3dd17f4f5b6435a45 09-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: move lbs_hard_start_xmit() into tx.c

... where it can shortly be merged with lbs_process_tx()...

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>
448a51ae0684c146c9f9ba4e178ab2182512258f 08-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: switch lbs_cmd() to take a callback function pointer

All existing code which sends commands is set up to have some function
called with the results, not to get data back. It's more versatile this
way, and providing it with a callback function which involves memcpy()
is hardly difficult.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
675787e29fd97d08bf7e6253c89ab6de23bf7089 05-Dec-2007 Holger Schurig <h.schurig@mn-solutions.de> 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>
0d61d04210b617963c202a3c4dcbcd26a024d5d3 05-Dec-2007 Holger Schurig <h.schurig@mn-solutions.de> 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>
e775ed7c677b163c80643036c32e23d3e59b9429 06-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: Consolidate lbs_host_to_card_done() function.

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>
f5ece8fc8d3f5e36bda3554b74b0fbecb0a14309 01-Dec-2007 David Woodhouse <dwmw2@infradead.org> libertas: Remove cmd_oid from struct cmd_ctrl_node

This is only needed for SNMP and key operations; it doesn't need to be
preserved outside that context.

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>
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>
ac558ca2ae878bd7a77831cda684702a2fa23d95 02-Aug-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: make more functions static & remove unused functions

Some functions where declared in header files, but used only once. They are
now static functions.

After doing this, I found out that some functions weren't used at all. I
removed this dead code.

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

Firmware download is quite different for different hardware. The SDIO and CF
cards have two flat files that need to be downloaded, whereas the USB driver
needs only one file, but with an internal structure.

The code that handles this (USB only) structured file is currently in fw.c.
This patch moves this code into if_usb.c. The remaining functions in fw.c
have not much to do with firmware, they are various card- and network-stack
initialisation functions. I've moved them into main.c.

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>
eedc2a319154a64f5ca7f281c92b7af3691fe73c 02-Aug-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: move generic firmware reset command to common code

It's not USB specific, so move it out of the USB interface code.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7732ca45c68f893689a8c0d8c6e2eb2bfefbc087 25-May-2007 Dan Williams <dcbw@redhat.com> [PATCH] libertas: call SET_NETDEV_DEV from common code

Move usage of SET_NETDEV_DEV into common code since it has nothing
to do with bus-specific devices. Also fixes a bug where the mesh
device was getting SET_NETDEV_DEV called after register_netdevice,
resulting in no 'device' link in /sys/class/net/mshX/.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
084708b61014776198c56d1606343d4f504c691e 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: split module into two (libertas.ko and usb8xxx.ko)

* add CONFIG_LIBERTAS to Kconfig
* remove global variable libertas_fw_name, the USB module might want to
use a different default FW name than the CF module, so libertas_fw_name
is now local to if_usb.c
* exported some symbols as GPL

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ed457037c5e8287a3fd24408250fb396b57b9a1b 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: move contents of fw.h to decl.h

Also removes some useless "extern" declarations from function declaration.

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>
32a74b7c8f7b883b532e0e4333b7c3014d3d8fe8 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: split wlan_add_card()

Split wlan_add_card() into a part that just setups kernel parameters and
into the function libertas_activate_card(), which will implizitly use
hardware functions by the started thread.

This allows us later to do something like this:

priv = libertas_add_card();
priv->hw_command_to_host = if_usb_command_to_host;
priv->hw_xxxx = if_usb_xxxx;
priv->hw_yyyy = if_usb_yyyy;
wlan_activate_card()

and of course the CF driver can set it's own functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3874d0fefd965eedfc7f8e0a5459ddf914eb4306 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: move reset_device() code main.c to if_usb.c

The reset_device() logic is only needed for USB devices, not for CF
devices.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1ac812f161801c276dd520def0e81b9938eb7761 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: get rid of libertas_sbi_get_priv()

It's not really needed, because we can call wlan_remove_card() with
wlan_private* anyway.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
78523daa86cf0b02c4d2f73b962c04ad565e9140 25-May-2007 Holger Schurig <hs4233@mail.mn-solutions.de> [PATCH] libertas: single out mesh code

This patches adds the two functions wlan_add_mesh() and wlan_remove_mesh(),
which are responsible for the mshX interface. In a CF driver with a non-
mesh-aware firmware you can omit the calls to this functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3d4bd24b019981394fabb465b0c7932924b83d65 18-May-2007 Florin Malita <fmalita@gmail.com> [PATCH] libertas: skb dereferenced after netif_rx

In libertas_process_rxed_packet() and process_rxed_802_11_packet() the
skb is dereferenced after being passed to netif_rx (called from
libertas_upload_rx_packet). Spotted by Coverity (1658, 1659).

Also, libertas_upload_rx_packet() unconditionally returns 0 so the error
check is dead code - might as well take it out and change the signature.

Signed-off-by: Florin Malita <fmalita@gmail.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>