summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers/net: request_irq - Remove unnecessary leading & from second argJoe Perches2009-11-181-2/+2
| | | | | | | | | | | | Not as fancy as coccinelle. Checkpatch errors ignored. Compile tested allyesconfig x86, not all files compiled. grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \ perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\ done Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* mwl8k: declare MODULE_FIRMWAREBen Hutchings2009-11-111-0/+3
| | | | | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: use integral index instead of pointer for driver_dataJohn W. Linville2009-11-061-24/+23
| | | | | | | Use of an integral index makes adding new device IDs through sysfs more practical. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: add support for the 88w8366Lennert Buytenhek2009-11-061-1/+94
| | | | | | | | Add support for the 88w8366 firmware receive descriptor format, and add the 88w8366 PCI ID. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: implement AP firmware EDCA parameter configurationLennert Buytenhek2009-11-061-12/+37
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: add AP firmware (mbss) handling to mwl8k_set_mac_addr()Lennert Buytenhek2009-11-061-2/+14
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: add AP firmware handling to ->start()Lennert Buytenhek2009-11-061-8/+10
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: add AP firmware handling to ->configure_filter()Lennert Buytenhek2009-11-061-0/+10
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: implement AP firmware antenna configurationLennert Buytenhek2009-11-061-2/+42
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: add the commands used for AP firmware initialisationLennert Buytenhek2009-11-061-1/+132
| | | | | | | | Add the AP version of the GET_HW_SPEC command, as well as the SET_HW_SPEC command, for initialising AP firmware. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: rename mwl8k_cmd_get_hw_spec() to mwl8k_cmd_get_hw_spec_sta()Lennert Buytenhek2009-11-061-5/+5
| | | | | | | As the AP version of the command uses a different format. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: set ->interface_modes from the driver dataLennert Buytenhek2009-11-061-1/+3
| | | | | | | | As different chip/firmware combinations support different interface types. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: allow for different receive descriptor formatsLennert Buytenhek2009-11-061-61/+119
| | | | | | | | | | | | As the receive descriptor format is determined by the firmware running on the hardware and not by the hardware itself, and as these descriptor formats vary a bit between different firmware releases, abstract out the receive descriptor init/refill/process methods, and allow choosing between different formats at run time depending on the chip and firmware we're running on. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: use pci_unmap_addr{,set}() to keep track of unmap addresses on rxLennert Buytenhek2009-11-061-25/+30
| | | | | | | | | Instead of reading back the unmap address from the receive descriptor when doing receive processing, use DECLARE_PCI_UNMAP_ADDR and pci_unmap_addr{,set}() to keep track of these addresses. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: handle loading AP firmware imagesLennert Buytenhek2009-11-061-4/+19
| | | | | | | | | AP and STA firmware images provide a different signature in the HIU_INT_CODE register after loading. Record which of the signatures we saw, as it determines which command sequences to use later on. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: spell out the names of firmware images in the pci driver dataLennert Buytenhek2009-11-061-21/+22
| | | | | | | To allow use of a more flexible firmware file naming scheme. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: change pci id table driver data to a structure pointerLennert Buytenhek2009-11-061-17/+30
| | | | | | | | | | | To prepare for adding support for more device types, introduce a new structure, mwl8k_device_info, where per-device information can be stored, and change the pci id table driver data from an integer indicating only the part number to a pointer to a mwl8k_device_info structure. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: pci BAR mapping changesLennert Buytenhek2009-11-041-3/+22
| | | | | | | | | | Map BAR0 as well, as we need to write to it during init on some chips. Also, if BAR0 is a 64bit BAR, the register BAR becomes BAR2, so try mapping BAR2 if mapping BAR1 fails. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: shorten receive/transmit state variable namesLennert Buytenhek2009-11-041-101/+93
| | | | | | | To conserve horizontal space. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: add support for enabling hardware sniffer modeLennert Buytenhek2009-11-041-3/+63
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: report rate and other information for received framesLennert Buytenhek2009-11-041-6/+25
| | | | | | | | | When receiving a frame, report the antenna info, long/short preamble status, 20/40 MHz flag, long/short guard interval status, MCS/legacy rate status, and MCS/legacy rate index to the stack. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: clarify WME transmit queue 0/1 swizzlingLennert Buytenhek2009-11-041-20/+6
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: use cond_resched() when loading firmware blocksLennert Buytenhek2009-11-041-0/+2
| | | | | | | | | | | | Since each firmware block takes on the order of several hundred usec to upload to the hardware, using msleep in the inner loop would make the firmware loading process take a lot more time than just doing busy-waiting like we do now. But if we keep the busy-waiting, we can at least add a cond_resched() to the inner loop so that we give other tasks a chance to run while the firmware is being loaded. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: clear hardware MAC address if no STA interface configuredLennert Buytenhek2009-11-041-1/+42
| | | | | | | | If there is no STA interface configured, clear the hardware MAC address to prevent ACKing frames sent to our MAC address. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: enforce FIF_BCN_PRBRESP_PROMISC when no STA interfaces are activeLennert Buytenhek2009-11-041-3/+14
| | | | | | | | | | | | | | | When FIF_BCN_PRBRESP_PROMISC is not set, we enable the hardware's BSS filter so that we'll only see packets destined for our BSS. But if no STA interfaces have been configured, we would end up passing the BSSID 00:00:00:00:00:00 into the POST_SCAN command, which actually disables the hardware's BSS filter, as it's not a valid BSSID. Fix this by passing in 01:00:00:00:00:00 instead (the criterion is that the OUI part of the BSSID must be nonzero), and add comments to explain what PRE_SCAN and POST_SCAN do. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: implement FIF_ALLMULTILennert Buytenhek2009-11-041-11/+28
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: use the mac80211-provided workqueue instead of creating our ownLennert Buytenhek2009-11-041-22/+6
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: fix multicast address filter programmingLennert Buytenhek2009-11-041-13/+27
| | | | | | | | | | | | | | mwl8k's ->prepare_multicast() currently just enables reception of all multicast packets, which is somewhat ineffective. Fix this by either disabling all multicast RX, enabling multicast RX according to the multicast address filter table, or enabling all multicast RX, depending on whether ->prepare_multicast() was given any multicast addresses and whether the hardware multicast address filter table is large enough to fit all requested addresses. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: minor transmit quiescing reworkLennert Buytenhek2009-11-041-22/+15
| | | | | | | | | | | | | | | | Minor changes to the transmit quiescing logic: - Clarify the locking rules for ->tx_wait: only the holder of fw_mutex can wait for the TX path to become idle, but tx_wait itself is read and cleared by the TX reclaim tasklet under tx_lock. - Inline mwl8k_txq_busy() in its callers. - There's no need to kick the transmitter again in mwl8k_tx_wait_empty(), since it will have been kicked when the packets currently in the TX ring were added to it. - If the TX ring didn't drain in time, run mwl8k_scan_tx_ring() after reading priv->pending_pkts without dropping tx_lock in between. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: coding style cleanupsLennert Buytenhek2009-11-041-57/+65
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: fix GET_STAT firmware command packet layoutLennert Buytenhek2009-11-041-2/+0
| | | | | | | | The GET_STAT command doesn't have an 'action' field like other commands do, so remove it. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: separate driver and device info reporting during probeLennert Buytenhek2009-08-281-9/+12
| | | | | | | | Only print the driver version once, and condense all per-PHY information to a single line. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: missing endian conversion when printing firmware command resultLennert Buytenhek2009-08-281-1/+1
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: fix pci dma mapping leak in mwl8k_post_cmd() error pathLennert Buytenhek2009-08-281-1/+4
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: fix inverted error test in mwl8k_bss_info_changed()Lennert Buytenhek2009-08-281-1/+1
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: update copyright and version numberLennert Buytenhek2009-08-201-2/+2
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: remove mwl8k_queue_work()Lennert Buytenhek2009-08-201-64/+0
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_configure_filter() workqueue useLennert Buytenhek2009-08-201-45/+20
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_get_stats() workqueue useLennert Buytenhek2009-08-201-30/+2
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_conf_tx() workqueue useLennert Buytenhek2009-08-201-43/+14
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_set_rts_threshold() workqueue useLennert Buytenhek2009-08-201-39/+3
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_bss_info_changed() workqueue useLennert Buytenhek2009-08-201-63/+38
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_config() workqueue useLennert Buytenhek2009-08-201-52/+20
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_stop() workqueue useLennert Buytenhek2009-08-201-25/+1
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: get rid of mwl8k_start() workqueue useLennert Buytenhek2009-08-201-78/+27
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: fix firmware command serialisationLennert Buytenhek2009-08-201-65/+89
| | | | | | | | | | | | | | | | | | | | | | | | The current mwl8k_priv->fw_lock spinlock doesn't actually protect against multiple commands being submitted at once, as it is not kept held over the entire firmware command submission. And since waiting for command completion sleeps, we can't use a spinlock anyway. To fix mwl8k firmware command serialisation properly, we have the following requirements: - Some commands require that the packet transmit path is idle when the command is issued. (For simplicity, we'll just quiesce the transmit path for every command.) - There are certain sequences of commands that need to be issued to the hardware sequentially, with no other intervening commands. This leads to an implementation of a "firmware lock" as a mutex that can be taken recursively, and which is taken by both the low-level command submission function (mwl8k_post_cmd) as well as any users of that function that require issuing of an atomic sequence of commands, and quiesces the transmit path whenever it's taken. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: mwl8k_queue_work() cleanupLennert Buytenhek2009-08-201-171/+33
| | | | | | | | | | | | | | | | | Delete most of the mwl8k_work_struct fields and options, since most of them are unused or never changed from their defaults: - We always use priv->config_wq, so delete the wqueue argument from mwl8k_queue_work(). - MWL8K_WQ_SPIN and MWL8K_WQ_POST_REQUEST are never used, as all callers sleep for request completion, so sleep unconditionally. - MWL8K_WQ_FREE_WORKSTRUCT is never used. - MWL8K_WQ_TX_WAIT_EMPTY is always set, so assume it unconditionally. - timeout_ms/txwait_attempts/tx_timeout_ms are never changed from their defaults, so just hardcode these in the workqueue worker. - step is never used. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: mwl8k_txq_xmit() reworkLennert Buytenhek2009-08-201-93/+52
| | | | | | | | | | | | | | | Various mwl8k_txq_xmit changes: - Extract the QoS field before adding the DMA header. - Only write to tx->status once, and only after all the other descriptor fields have been set. - Do all tx state manipulation under the tx spinlock. - Remove the priv->inconfig check, as all transmit queues will be frozen during config cycles, so we won't ever be asked to transmit if a config cycle is running. - Remove some more dead code. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: implement idle modeLennert Buytenhek2009-08-201-0/+6
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwl8k: no need to hold ->tx_lock while setting the hardware interrupt maskLennert Buytenhek2009-08-201-6/+0
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud