Commit Graph

21 Commits (fe4a57c581f88e81e9274e0750f1a22c8c73cf58)

Author SHA1 Message Date
Randy Dunlap 8973a6e770 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>
2011-04-28 14:53:18 -04:00
Dan Williams 5cddea816e libertas: [usb] use new firmware locations
Look for firmware where the linux-firmware tree actually puts it, but
fall back to original firmware name & location when the new location
doesn't exist.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-08-16 15:26:43 -04:00
Brian Cavagnolo 1556c0f22d libertas: support boot commands to write persistent firmware and bootloader
Add locking and non-locking versions of if_usb_prog_firmware to support
programming firmware after and before driver bring-up respectively.  Add more
suitable error codes for firmware programming process.  Add capability checks
for persistent features before attempting to use them.

Based on patches from Brajesh Dave and Priyank Singh.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-22 16:29:49 -04:00
Holger Schurig 7919b89c82 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>
2008-04-16 15:59:56 -04:00
Holger Schurig 4365929d17 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>
2008-01-28 15:10:05 -08:00
David Woodhouse eae86bf378 libertas: clean up if_usb driver
It was just getting on my tits, really.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:07:27 -08:00
David Woodhouse 202f3f3ac9 libertas: kill rx_urb_recall and eth_dev members of struct usb_card_rec
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:54 -08:00
David Woodhouse 6bc822b516 libertas: switch USB cardp->priv to 'struct lbs_private *' and resulting fix
Amazing what interesting things the compiler will tell you if you let it
know what types you expect to be passing around.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:43 -08:00
David Woodhouse 4f82f5c853 libertas: switch to a waitqueue and timer for handling USB firmware load
No need to busy-wait, even if we did have a 100ms delay in the loop.
This makes it easier to support the new 'firmware ready' event which is
in the new firmware, too.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:39 -08:00
David Woodhouse 6d35fdfced libertas: cope with device which already has firmware loaded
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:06:21 -08:00
Andres Salomon be13f1897f libertas: reset devices upon disconnect rather than module unloading
1) Do not reset libertas devices upon module unload.  We're unloading
the module, we're not killing off devices.
2) Instead, reset libertas devices inside if_usb_disconnect, as we're
killing off interfaces and so on.
3) Resetting via disconnect callback means we no longer need to keep
track of probed libertas devices; kill off that list (and its wonderful
lack of locking..), as well.

Drop a useless comment as well.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28 15:04:51 -08:00
Holger Schurig 1007832103 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>
2008-01-28 15:04:46 -08:00
Dan Williams 954ee164f4 [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>
2007-10-10 16:50:34 -07:00
Holger Schurig ac558ca2ae [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>
2007-10-10 16:49:49 -07:00
Dan Williams 9e22cb67d9 [PATCH] libertas: remove if_bootcmd.c
Move the only function in it to if_usb.c, which was its
only user anyway.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10 16:49:41 -07:00
David Woodhouse bb793e2bfc [PATCH] libertas: More endianness fixes.
Now it at least manages to load the firmware.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-06-11 14:28:45 -04:00
David Woodhouse 981f187b7c [PATCH] libertas: first pass at fixing up endianness issues
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-06-11 14:28:45 -04:00
Holger Schurig 435a1acba2 [PATCH] libertas: fix RESET logic at unload time
Previously, we had a fixed array of 5 elements where we remembered all
initialized devices. This has been changed to use a "struct list_head"
organization, which is IMHO cleaner.

Also renamed usb_cardp to cardp, as in the reset of the code.

Renamed reset_device() to if_usb_reset_device() like many other functions.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-06-11 14:28:39 -04:00
Holger Schurig 66fcc55904 [PATCH] libertas: move vendor & product id's into if_usb.c
For me it looks cleaner, because it removes one level of indirection.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-06-11 14:28:36 -04:00
Dan Williams 4f3465f805 [PATCH] libertas: remove SUPPORT_BOOT_COMMAND
Remove the static definition of SUPPORT_BOOT_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>
2007-05-11 14:54:55 -04:00
Marcelo Tosatti 876c9d3aeb [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>
2007-04-28 11:00:54 -04:00