summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
Commit message (Collapse)AuthorAgeFilesLines
* libertas: Consolidate lbs_host_to_card_done() function.David Woodhouse2008-01-291-0/+18
| | | | | | | | | 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>
* libertas: tweak tx path debuggingHolger Schurig2008-01-291-4/+4
| | | | | | | | | Make two functions in the TX packet path emit their debug messages with LBS_DEB_TX, not LBS_DEB_MAIN. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove arbitrary typedefsHolger Schurig2008-01-291-59/+63
| | | | | | | | | | | | 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>
* libertas: separate mesh connectivity from that of the main interfaceBrajesh Dave2008-01-291-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libertas: mark module_init/exit functions as __init/__exitAndres Salomon2008-01-291-2/+2
| | | | | | 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>
* libertas: move to uniform lbs_/LBS_ namespaceHolger Schurig2008-01-291-264/+264
| | | | | | | | | | | | | | | | | | 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>
* libertas: Don't set NETIF_F_IPV6_CSUM in dev->featuresDavid Woodhouse2007-11-301-4/+0Star
| | | | | | | | | | | I'm not sure why it was doing this, and I'm not sure I _want_ to know why. But calling it NETIF_F_DYNALLOC doesn't change the fact that the kernel believes it to be NETIF_F_IPV6_CSUM, and that IPv6 communication is hence buggered. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches2007-10-111-8/+4Star
| | | | | | | This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/: all drivers/net/ cleanup with ARRAY_SIZEDenis Cheng2007-10-111-7/+7
| | | | | Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle2007-10-111-4/+0Star
| | | | | | | | | | | | It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] libertas: don't stomp on interface-specific private dataDan Williams2007-10-111-3/+3
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: reorganize and simplify init sequenceDan Williams2007-10-111-243/+162Star
| | | | | | | | | | | | | | | | | | 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>
* [PATCH] libertas: fix inadvertant removal of bits from commit ↵Dan Williams2007-10-111-0/+1
| | | | | | | 831441862956fffa17b9801db37e6ea1650b0f69 Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: bump driver versionDan Williams2007-10-111-1/+1
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: pass boot2 version to firmwareLuis Carlos Cobo2007-10-111-0/+4
| | | | | | | | | 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>
* [PATCH] libertas: push WEXT scan requests to a work queueDan Williams2007-10-111-4/+6
| | | | | | | | | 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>
* [PATCH] libertas: monitor mode support for OLPC firmwareLuis Carlos Cobo2007-10-111-1/+152
| | | | | | | | | | | | | | | | | | 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>
* [PATCH] libertas: keep mesh autostart enabled while asleepLuis Carlos Cobo2007-10-111-1/+22
| | | | | | | | | | 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>
* [PATCH] libertas: remove adapter->scantypeHolger Schurig2007-10-111-3/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->scanmodeHolger Schurig2007-10-111-3/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->beaconperiodHolger Schurig2007-10-111-2/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->adhoc_grate_enabledHolger Schurig2007-10-111-1/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->listenintervalHolger Schurig2007-10-111-2/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->atimwindowHolger Schurig2007-10-111-3/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->multipledtimHolger Schurig2007-10-111-1/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->locallistenintervalHolger Schurig2007-10-111-1/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->{data,bcn}_avg_factorHolger Schurig2007-10-111-3/+0Star
| | | | | | | | | 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>
* [PATCH] libertas: remove adapter->pkttxctrlHolger Schurig2007-10-111-1/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->scanprobesHolger Schurig2007-10-111-2/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->prescanHolger Schurig2007-10-111-2/+0Star
| | | | | | | | 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>
* [PATCH] libertas: remove adapter->{rx,tx}antennaHolger Schurig2007-10-111-2/+0Star
| | | | | | | | | | 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>
* [PATCH] libertas: use LBS_DEB_HOST for host-to-card communicationsHolger Schurig2007-10-111-1/+1
| | | | | | | | ... and LBS_DEB_CMD for command execution. Also tidies misc comments to give a consistent output. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: make the hex dumper nicerHolger Schurig2007-10-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | Currently, when you define LBS_DEB_HEX, you get every hex dump in the whole driver, e.g. for LBS_DEB_CMD, LBS_DEB_RX, LBS_DEB_TX etc. This patch makes sure that you only get the hexdump that you're interested in. Renamed lbs_dbg_hex() into lbs_deb_hex(), like the other lbs_deb_XXX() macros. Made lbs_deb_hex() issue a line feed (and a new prompt) after 16 bytes. As lbs_deb_hex() now prints the ":" after the prompt by itself, removed the misc colons in the various *.c files. lbs_deb_XXX() now print the debug category as well. As lbs_deb_XXX() --- and especially lbs_deb_11d() --- now print the category, I removed various "11D:" prefixes in 11d.c as well. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] Support for mesh autostart deactivation through sysfsLuis Carlos Cobo2007-10-111-2/+46
| | | | | | | | | echo 0 > /sys/class/net/mshX/autostart_enabled This is supported from Marvell firmware version 5.110.16.p0 (to be released). Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: access mesh_dev more carefullyHolger Schurig2007-10-111-6/+10
| | | | | | | | The CF/SDIO firmware doesn't support Mesh, so priv->mesh_dev is NULL there. Protect all accesses. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: uppercase some #definesHolger Schurig2007-10-111-4/+4
| | | | | | | | | | | Usually constants defined by #define are in ALL_UPPERCASE. This patch fixes this. I also shuffled the bits around so that they match the bit positions in the host-interrupt-state register of the CF/SDIO card :-) Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: make more functions static & remove unused functionsHolger Schurig2007-10-111-25/+25
| | | | | | | | | | | 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>
* [PATCH] libertas: remove fw.cHolger Schurig2007-10-111-2/+276
| | | | | | | | | | | | | | 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>
* [PATCH] libertas: simplify and clean up data rate handlingDan Williams2007-10-111-13/+44
| | | | | | | | | | | | | | | | | | | 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>
* [PATCH] libertas: wlan_ -> libertas_ function prefix renames for main.cDan Williams2007-10-111-35/+36
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: move generic firmware reset command to common codeDan Williams2007-10-111-0/+14
| | | | | | | 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>
* [PATCH] libertas: bump version to 322.p1Dan Williams2007-10-111-1/+1
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: remove thread.h and make kthread usage clearerDan Williams2007-10-111-18/+18
| | | | | | | | 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>
* [PATCH] libertas: re-uppercase command defines and other constantsDan Williams2007-10-111-26/+26
| | | | | | | For readability. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Freezer: make kernel threads nonfreezable by defaultRafael J. Wysocki2007-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the freezer treats all tasks as freezable, except for the kernel threads that explicitly set the PF_NOFREEZE flag for themselves. This approach is problematic, since it requires every kernel thread to either set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't care for the freezing of tasks at all. It seems better to only require the kernel threads that want to or need to be frozen to use some freezer-related code and to remove any freezer-related code from the other (nonfreezable) kernel threads, which is done in this patch. The patch causes all kernel threads to be nonfreezable by default (ie. to have PF_NOFREEZE set by default) and introduces the set_freezable() function that should be called by the freezable kernel threads in order to unset PF_NOFREEZE. It also makes all of the currently freezable kernel threads call set_freezable(), so it shouldn't cause any (intentional) change of behaviour to appear. Additionally, it updates documentation to describe the freezing of tasks more accurately. [akpm@linux-foundation.org: build fixes] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] libertas: remove private ioctlsDan Williams2007-06-281-2/+0Star
| | | | | | Signed-off-by: Christoph Hellwig <hch@infradead.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: style fixesDan Williams2007-06-281-2/+4
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: convert libertas_mpp into anycast_maskLuis Carlos2007-06-121-13/+13
| | | | | | | | | | | | | | | | | | | | With firmware 5.220.11.p5, this allows to specify the anycast addresses the device will listen to. The anycast address range is C0:27:C0:27:C0:XX where XX goes from 00 to 1F (or 0 to 31 in dec). The value to write on anycast_mask will specify which addresses the device listens to. Bits in a 32 bit int are numbered from 0 (least significative bit) to 31. A specific address ending in YY will be listened to if bit YY in the value is set to one. Examples: 0x00000000 : do not listen to any anycast address 0xFFFFFFFF : listen to every anycast address from :00 to :1F 0x00000013 : listen to anycast addresses :00, :01 and :04 Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: pull current channel from firmware on mesh autostartLuis Carlos Cobo Rus2007-06-121-0/+1
| | | | | Signed-off-by: Luis Carlos Cobo Rus <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [PATCH] libertas: first pass at fixing up endianness issuesDavid Woodhouse2007-06-111-4/+6
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>