summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: Enable MCI for AR9565Bala Shanmugam2012-09-283-5/+5
| | | | | Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmfmac: use kcalloc() to prevent integer overflowDan Carpenter2012-09-281-2/+2
| | | | | | | | | The multiplication here looks like it could overflow. I've changed it to use kcalloc() to prevent that. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix chainmask selection for AR9462Sujith Manoharan2012-09-282-0/+6
| | | | | | | | | Force chain 1 to be used for CCK rates since the target power table stored in EEPROM is too high to transmit with both chains. This is needed to avoid regulatory violation. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add inactivity deauth support for apKevin Gan2012-09-284-1/+39
| | | | | | | | | | | | | The firmware has support for this feature, so we offload it to firmware. In start_ap, driver passes the inactivity timeout value to firmware via TLVs and firmware will report STA_DEAUTH event to driver when inactivity timer is fired. Signed-off-by: Kevin Gan <ganhy@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: set txpd when send a mgmt frame for AP and GO modeStone Piao2012-09-281-0/+9
| | | | | | | | | | | Set packet type and packet offset in txpd when send a mgmt frame in AP and GO mode. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Kevin Gan <ganhy@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: parse P2P IEs from beacon_dataStone Piao2012-09-281-32/+54
| | | | | | | | | Parse P2P IEs and set them to FW with related masks. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add support for P2P GO in interface type changeStone Piao2012-09-286-3/+90
| | | | | | | | | | | When cfg80211 calls to change interface type for P2P GO, send P2P mode config commands to firmware and set bss role and bss mode accordingly. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add support for P2P client in interface type changeStone Piao2012-09-284-0/+95
| | | | | | | | | When cfg80211 calls to change interface type for P2P client, send P2P mode config commands to firmware. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: add P2P interfaceStone Piao2012-09-283-2/+47
| | | | | | | | | Due to firmware design, driver needs to add a default P2P interface to implement find phase and action frame handshake. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: send firmware initialization commands synchronouslyStone Piao2012-09-281-32/+33
| | | | | | | | | | | | | | | | | The driver will send some commands to firmware during the initialization. Currently these commands are sent asynchronously, which means that we firstly insert all of them to a pre-allocated command queue, and then start to process them one by one. The command queue will soon be exhausted if we keep adding new initialization commands. This issue can be resolved by sending initialization commands synchronously because each command is consumed and the buffer is recycled before queuing next command. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: append each IE into a seperate IE bufferStone Piao2012-09-281-4/+9
| | | | | | | | | | | When scan is triggered from cfg80211, the request contains some IEs and we should parse all the IEs and append each IE into a seperate IE buffer. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: process remain on channel expired eventStone Piao2012-09-282-0/+13
| | | | | | | | | Process remain on channel expired event, and notify cfg80211. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: implement remain_on_channel and cancel_remain_on_channelStone Piao2012-09-288-6/+163
| | | | | | | | | | Add a new command to implement remain_on_channel and cancel_remain_on_channel. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: report received management frames to cfg80211Stone Piao2012-09-286-0/+58
| | | | | | | | | | | Process the management frames received from firmware and report them to cfg80211. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Kevin Gan <ganhy@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: implement cfg80211 mgmt_frame_register handlerStone Piao2012-09-285-0/+40
| | | | | | | | | Add a new command to implement mgmt_frame_register. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: advertise mgmt_stype to cfg80211Stone Piao2012-09-281-0/+30
| | | | | | | | Advertise supported management frame types to cfg80211. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: implement cfg80211 mgmt_tx handlerStone Piao2012-09-286-17/+143
| | | | | | | | | | | | Implement mgmt_tx in cfg80211 ops through data path. Advertise probe resp offload and skip to send probe resp in AP or GO mode. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Kiran Divekar <dkiran@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mwifiex: fix coding style issueStone Piao2012-09-282-4/+1
| | | | | | | | Remove unnecessary blank lines and extra tab. Signed-off-by: Stone Piao <piaoyun@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add a debugfs file to adjust antenna diversitySujith Manoharan2012-09-282-3/+54
| | | | | | | Location: /<debugfs>/ieee80211/phy#/ath9k/diversity Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Handle errors properly in MCI initializationSujith Manoharan2012-09-283-17/+23
| | | | | | | | | The MCI initialization path has various points of failures, handle these to ensure that we bail out correctly in such cases. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix rx filtering issue for older chipsThomas Wagner2012-09-281-2/+2
| | | | | | | | | | | | | | | | | | We need to have the promiscuous mode enabled for older chipsets so that the olderchips hardware does not filters out some valid/necessary frames that need to be sent to mac80211. Fix this by enabling promiscus mode for all the chipsets whose macversion <= AR9160 chipsets. This should fix https://bugzilla.kernel.org/show_bug.cgi?id=45591 shafi: made the fix generic by having the frame filtering disabled for chipsets older than AR9280. Cc: Javier Cardona <javier@cozybit.com> Signed-off-by: Thomas Wagner <Thomas.Wagner@hs-rm.de> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: change delays to follow timers-howto guideRafał Miłecki2012-09-284-9/+12
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-linville' of ↵John W. Linville2012-09-2821-339/+476
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx
| * wlcore: protect wlcore_op_set_key with mutexEliad Peller2012-09-272-33/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wlcore_op_set_key() calls wl18xx_set_key(), which in turn executes some of his function calls without acquiring wl->mutex and making sure the fw is awake. Adding mutex_lock()/ps_elp_wakeup() calls is not enough, as wl18xx_set_key() calls wl1271_tx_flush() which can't be called while the mutex is taken. Add the required calls to wlcore_op_set_key, but limit the queues_stop and flushing to the only encryption types in which a spare block might be needed (GEM and TKIP). [Arik - move state != ON check] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: decrease elp timeoutEliad Peller2012-09-271-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current elp timeout (the same as the dynamic ps timeout - 1500ms) is too high. Usually, wl1271_ps_elp_sleep() get called right after tx/rx, which is fine, but some command might get sent even when there is no traffic (e.g. ht changes triggered by beacon frames), and leaving the device awake for 1500ms in this case is redundant. Use a timeout of 30ms. The fw won't enter elp anyway before the dynamic-ps timeout was expired as well (and it entered ps successfully). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: Load the NVS file asynchronouslyIdo Yariv2012-09-272-38/+53
| | | | | | | | | | | | | | | | | | | | | | | | The NVS file is loaded by the device's probe callback with the help of request_firmware(). Since request_firmware() relies on udevd, the modules cannot be loaded before hotplug events are handled. Fix this by loading the NVS file asynchronously and continue initialization only after the firmware request is over. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: Refactor probeIdo Yariv2012-09-274-48/+83
| | | | | | | | | | | | | | | | | | Move most of the device-specific probe functionality into setup(), a new op. By doing this, wlcore_probe will be the first to request a firmware from userspace, making it easier to load the NVS file asynchronously. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: Allow memory access when the FW crashesIdo Yariv2012-09-271-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | When the no_recovery flag is used, the recovery work will not restart the FW and the state will not be set to 'on'. To enable post-mortem analysis, allow memory access in the 'restarting' state. Also, since the FW might not be operational, don't fail the read/write operations if elp_wakeup fails. Reported-by: Arkady Miasnikov <a-miasnikov@ti.com> Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: use dynamic keep-alive template idsEliad Peller2012-09-276-23/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, all the (station) roles use the same keep-alive template id (0). However, the klv template ids shouldn't be shared by different roles. Implement a simple klv_templates bitmap, and let each role allocate its own klv template id on role initialization. [Arik - remove invalidation of KLV template when getting into "idle". This is already handled in unjoin] Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: invalidate keep-alive template on disconnectionEliad Peller2012-09-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, invalidation of the keep-alive template was done when going idle. However, while removing the idle-handling we didn't move the keep-alive template invalidation to another place. This finally resulted in fw error when trying to use the keep-alive template by another role. (Note that we still have an error here - each role should have its unique keep-alive template id, while currently they all use CMD_TEMPL_KLV_IDX_NULL_DATA (0). This only works now because we don't support concurrent connected stations yet) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wl18xx: default to siso40 in 2.4ghz with a single antennaArik Nemtsov2012-09-271-2/+2
| | | | | | | | | | | | | | | | The driver used siso20 in this case for legacy reasons. Reported-by: Ido Reis <idor@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: Fix unbalanced interrupts enablementIdo Yariv2012-09-272-1/+15
| | | | | | | | | | | | | | | | | | | | The interrupt line is enabled by wl12xx_enable_interrupts and wl18xx_enable_interrupts, but it will not be disabled in all failure paths. Fix this. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: Don't recover during bootIdo Yariv2012-09-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While recursive recovery is avoided during shutdown, a new recovery may be queued when the FW boots. The recovery work will then try to stop an already stopped hardware, which will most likely result in a kernel panic. Fix this by verifying that wl->state is on before queueing a new recovery. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore/wl18xx: add phy_fw_version_str to debugfs driver_stateYair Shapira2012-09-273-0/+8
| | | | | | | | | | | | | | | | add phy_fw_version_str to debugfs driver_state file. information is taken during boot and stored in wl->chip.phy_fw_ver_str. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: spi: use private max-buf-size limitArik Nemtsov2012-09-272-4/+8
| | | | | | | | | | | | | | | | | | | | Limit SPI transmissions to the wl12xx max buffer size, as only 12xx was tested with SPI. This allows us to remove the global aggregation buffer constant. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wl18xx: number_of_assembled_ant5 indicates if A band is enabledYair Shapira2012-09-271-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use number_of_assembled_ant5 phy param to indicate if A band is enabled: if number_of_assembled_ant5 != 0 then it is enabled otherwise it is disabled. This aligns with phy implementation that uses this param both to indicate if band is active and the number of antennas. This parameter replaces enable_11a module param that was removed. User-Space applications can use wlconf and/or INI files to disable A band using this parameter. Signed-off-by: Yair Shapira <yair.shapira@ti.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: allow up to 3 running STA interfaces in combinationsArik Nemtsov2012-09-271-2/+2
| | | | | | | | | | | | | | | | This allows us to have a p2p-management interface (in STA mode), as we as a group dedicated interface. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: lazy-enable device rolesEliad Peller2012-09-272-20/+15
| | | | | | | | | | | | | | | | | | | | Enable device roles just before starting it. This way, a single device role should be enough for all vifs, as we can't use concurrent device roles (which require ROC) anyway. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: always use wlvif->role_id for scansEliad Peller2012-09-271-11/+7
| | | | | | | | | | | | | | | | | | enabled (but not-started) sta role should be good enough for scanning (both normal and scheduled), so use it instead of the device_role. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: make debug prints work without dynamic debugArik Nemtsov2012-09-271-3/+13
| | | | | | | | | | | | | | | | | | | | Make debug prints operational when dynamic debug is not defined. This allows better debugging in production environments. Change the driver prefix to "wlcore" while were at it. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore/wl18xx/wl12xx: allow up to 3 mac addressesArik Nemtsov2012-09-276-9/+38
| | | | | | | | | | | | | | | | | | Allow 3 native mac addresses on 18xx. On 12xx allow 2 native mac addresses and set the LAA bit to create a third mac address. This enabled operation with a separate group interface. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: resume() only if sta is associatedEliad Peller2012-09-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | mac80211's resume() callback might get called even if the sta is not associated (but only up). The resume sequence in this case results in configuring the wake-up conditions of a non-started role, which causes fw assertion. Fix it by bailing out if the STA is not connected (like we do on suspend()). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: configure wowlan regardless of wakeup conditionsEyal Shapira2012-09-271-13/+13
| | | | | | | | | | | | | | | | | | | | | | wowlan filters should be configured in any case in suspend/resume. This shouldn't be dependent on whether wakeup conditions are the same for suspend and resume states. Only the FW command to reconfigure wakeup conditions should be avoided in such a case. Reported-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore/wl18xx/wl12xx: aggregation buffer size setIgal Chernobelsky2012-09-278-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | Aggregation buffer size is set separately per 18xx/12xx chip family. For 18xx aggragation buffer is set to 13 pages to utilize all the available tx/rx descriptors for aggregation. [Arik - remove redundant parts from the patch] Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wl18xx/wl12xx: defines for Tx/Rx descriptors numIgal Chernobelsky2012-09-274-4/+10
| | | | | | | | | | | | | | Use defines for number of Tx/Rx descriptors. Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: tx_flush - optimize flow and force Tx during the flushArik Nemtsov2012-09-271-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Force Tx during the flush if there are packets pending in the driver. This actually solves a bug where we would get called from the mac80211 wq context, which would prevent tx_work from getting queued, even when the mutex is unlocked. Don't stop the queues needlessly if there's nothing to flush. Use a larger delay when sleeping to give the driver a chance to flush and avoid cpu busy looping. Re-arrange the loop so the last iteration is not wasted. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: make Tx flush timings more verboseArik Nemtsov2012-09-271-4/+9
| | | | | | | | | | | | | | | | Print how much time a flush took. This will help debug the time it takes to switch between channels. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: allow only the lowest OFDM rate for p2p setup framesArik Nemtsov2012-09-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | The IEEE80211_TX_CTL_NO_CCK_RATE flag is only set for mgmt packets transmitted during p2p connection setup. Make sure to use the lowest OFDM rate guarantee the peer always hears us. Change the p2p rate policy to contain only the 6mpbs rate to acheive this effect. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: AP mode - send non-data packets with basic ratesArik Nemtsov2012-09-271-2/+6
| | | | | | | | | | | | | | | | | | | | This solves interoperability issues with peer that don't seem to "hear" management packets transmitted in higher rates. Based on a previous patch by Igal Chernobelsky. Cc: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>
| * wlcore: cancel recovery_work on stop() instead of remove_interface()Eliad Peller2012-09-271-4/+2
| | | | | | | | | | | | | | | | | | recovery_work should be cancelled when stopping the device, not when removing an interface (this is probably a leftover from the single-role days) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luca@coelho.fi>