summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx
Commit message (Collapse)AuthorAgeFilesLines
...
* wl12xx: fix testmode test/interrogate commandsEliad Peller2011-12-081-19/+53
| | | | | | | | | | fix several issues in testmode test/interrogate commands: 1. check the driver state is not OFF. 2. wakeup the chip from elp (if needed) 3. fix memory leak in wl1271_tm_cmd_interrogate() Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: don't explicitly check for unjoined ibssEliad Peller2011-12-011-9/+1
| | | | | | | | | | | | | | | | | | After the ibss carrier issue was fixed, we can revert the following patch: commit 48309fd477ef867babb6819f67fe082c133a5fa9 Author: Shahar Lev <shahar@wizery.com> Date: Fri Oct 7 18:17:25 2011 +0200 wl12xx: remove warning message during IBSS Tx mac80211 sets the carrier on an IBSS interface even when no network is joined. Ignore garbage frames transmitted on a disconnected IBSS interface without printing warnings. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: leave IV calculation to HW for CCMPArik Nemtsov2011-12-011-1/+1
| | | | | | | | | | | Use an appropriate mac80211 flags in CCMP keys to indicate we are calculating the CCMP IV in HW, but require room for the IV to be reserved in the skb. The space is reserved by mac80211. depends on "mac80211: support adding IV-room in the skb for CCMP keys". Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: Print nvs/fw file name if loading fails.Pontus Fuchs2011-12-011-2/+3
| | | | | | | | Print the name of nvs/fw if request_firmware fails. This will make troubleshooting a bit easier. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: avoid bail out when probe-resp is not set by mac80211Arik Nemtsov2011-12-011-9/+8
| | | | | | | | | | | | | | During reconfig we can get the BSS_CHANGED_AP_PROBE_RESP indication even if a probe-resp has not been set in the first place. Therefore ignore the error when not getting a probe-resp from mac80211. Resort to the legacy probe-resp in this case. Also take this opportunity to add a vif argument to the set_probe_resp function. Reported-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: init CMD_TEMPL_KLV to sizeof(ieee80211_qos_hdr)Eliad Peller2011-12-012-8/+3
| | | | | | | | | | | The keep alive template should have a max size of sizeof(struct ieee80211_qos_hdr). Additionally, Remove the redundant wl12xx_qos_null_data_template struct. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: indicate probe-resp offloading supportArik Nemtsov2011-12-011-0/+7
| | | | | | | | | The wl12xx driver supports probe-response offloading, and the WPS, WPS2 and P2P special cases as well. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: configure probe-resp template according to notificationArik Nemtsov2011-12-012-7/+51
| | | | | | | | | | | When operating in AP-mode, replace our probe-response template when a notification is recieved from mac80211. We preserve the "legacy" way of configuring a probe-response according to beacon for IBSS mode and for versions of hostapd that do not support this feature. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: Check buffer bound when processing nvs dataPontus Fuchs2011-12-011-0/+14
| | | | | | | | | | | An nvs with malformed contents could cause the processing of the calibration data to read beyond the end of the buffer. Prevent this from happening by adding bound checking. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Cc: stable@kernel.org Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: Validate FEM index from ini file and FWPontus Fuchs2011-12-011-0/+22
| | | | | | | | | | Check for out of bound FEM index to prevent reading beyond ini memory end. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Cc: stable@kernel.org Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* Merge branch 'master' of ↵Luciano Coelho2011-12-013-2/+2
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into wl12xx-next
| * wireless: Remove redundant spi driver bus initializationLars-Peter Clausen2011-11-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In ancient times it was necessary to manually initialize the bus field of an spi_driver to spi_bus_type. These days this is done in spi_driver_register(), so we can drop the manual assignment. The patch was generated using the following coccinelle semantic patch: // <smpl> @@ identifier _driver; @@ struct spi_driver _driver = { .driver = { - .bus = &spi_bus_type, }, }; // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Dan Williams <dcbw@redhat.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: Luciano Coelho <coelho@ti.com> Cc: libertas-dev@lists.infradead.org Cc: linux-wireless@vger.kernel.org Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * Merge branch 'master' of ↵John W. Linville2011-11-221-0/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux Conflicts: drivers/net/wireless/iwlegacy/iwl-debugfs.c drivers/net/wireless/iwlegacy/iwl-rx.c drivers/net/wireless/iwlegacy/iwl-scan.c drivers/net/wireless/iwlegacy/iwl-tx.c include/net/bluetooth/bluetooth.h
| | * drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker2011-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were getting the macros from an implicit module.h include via device.h, but we are planning to clean that up. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: Add export.h to wireless/brcm80211/brcmfmac/bcmsdh.c This relatively recently added file uses EXPORT_SYMBOL and hence needs export.h included so that it is compatible with the module.h split up work. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
| * | wl12xx: fix wl12xx_scan_sched_scan_ssid_list() check that all given ssids ↵Eyal Shapira2011-11-081-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | are in filters A minor fix for the check that verifies that all given SSIDs (in req) exist in the filters (the match sets) Signed-off-by: Eyal Shapira <eyal@wizery.com> Acked-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wl12xx: fix SDIO suspend/resumeEyal Shapira2011-11-081-2/+4
| | | | | | | | | | | | | | | | wl1271_suspend/resume() accessed the wrong struct and not wl1271 which caused it to think that wow was enabled when it wasn't. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: handle idle changes per-interfaceEliad Peller2011-11-081-7/+6
| | | | | | | | | | | | | | | | | | Idle changes are currently handled per hardware. However, some operations should be done only per-interface. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: use p2p rate index when the skb has the NO_CCK flagEliad Peller2011-11-081-1/+3
| | | | | | | | | | | | | | | | If the skb contains the NO_CCK flag, use the p2p rate index (which contains only the OFDM rates) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: set scan probe requests rate according to the no_cck flagGuy Eilam2011-11-082-4/+19
| | | | | | | | | | | | | | | | | | Set the TX rate of probe requests during scanning according to the no_cck flag in the scan request struct. Signed-off-by: Guy Eilam <guy@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: increase firmware upload chunk sizeLuciano Coelho2011-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The chunk size used during firmware upload was set to 512, which is the size of a single SDIO block (or two). This is very inneficient because we send one or two blocks only per SDIO transaction and don't get the full benefits of sdio block transfers. This patch increases the chunk size to 16K. This more than doubles the transfer speed both in wl127x and wl128x chips, with greater impact on the latter: wl127x: 512 bytes chunk -> ~132ms 16384 bytes chunk -> ~57ms wl128x: 512 bytes chunk -> ~216ms 16384 bytes chunk -> ~37ms Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: use the same SDIO block size for all different chipsLuciano Coelho2011-11-081-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sdio driver uses a block size of 512 bytes by default. With our card, this doesn't work correctly because it sets the block size FBR in the chip too early (ie. before the chip is powered on). Thus, if we don't set it explicitly, block mode remains disabled in the chip. If we try to send more data than fits in one block, the sdio driver will split it into separate blocks before sending to the chip. This causes problems because the chip is not expecting multiple blocks. At the moment this is not a problem, because we use chunks of 512 bytes for firmware upload and the data is always sent in byte mode. In the next patch, we will change the chunk size to a bigger value, so this patch is a preparation for that. Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: change blocksize alignment quirk to negativeLuciano Coelho2011-11-084-8/+12
| | | | | | | | | | | | | | | | | | SDIO blocksize alignment support is now the rule, not the exception. To simplify the code in patches to come, invert the meaning of the quirk to be negative (ie. the quirk is set if the device does _not_ support blocksize alignment). Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: clear wl->vif on remove_interfaceEliad Peller2011-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | wl->vif should be cleared on remove_interface() (rather than on stop()) even when only a single vif is supported, because during vif mode change stop() might not get called (e.g. because of monitor interface existence) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add vifs_state debugfs keyEliad Peller2011-11-081-0/+110
| | | | | | | | | | | | | | | | Add debugfs key to dump information regarding the active vifs (similar to the driver_state debugfs key) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: keep beacon-filtering enabled during STA operationArik Nemtsov2011-11-083-16/+6
| | | | | | | | | | | | | | | | | | Enable beacon filtering on STA init, and don't disable it when entering active mode. Otherwise dynamic-PS supports means we receive beacons from the current AP during any Tx/Rx performed by the driver. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: reconfigure rate policies on set_bitrate_maskEliad Peller2011-11-081-2/+21
| | | | | | | | | | | | | | | | | | | | The rate policies are configured only after association, resulting in auth req being sent in wrong rates. Reconfigure rate policies on bitrate mask change. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: couple role_start_dev with rocEliad Peller2011-11-085-41/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | Device role is always started along with ROC. Couple them together by introducing new wl12xx_start_dev and wl12xx_stop_dev functions. By using these functions, we solve a bug that occured during channel switch - we started the dev role on one channel, and ROCed on a different one. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: handle injected packetsEliad Peller2011-10-112-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Injected packets are sent with no vif, causing the wl12xx to NULL-dereference in multiple places. Furthermore, injected packets are currently not sent at all, as system_hlid doesn't belong to any specific role, so wl1271_skb_dequeue() never return its packets. Handle both these problems. Reported-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: use the same plat dev name for both SPI and SDIOLuciano Coelho2011-10-113-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's no need to have the bus name included in the platform device name that we create. The core driver doesn't need to know about the type of bus it uses. Any differences between the buses that need to be handled differently in the core, can be passed in the platform data (as the pwr_in_suspend boolean does). Use "wl12xx" for the device name in both bus drivers. Rename the platform driver name to "wl12xx_driver", just to differentiate from the platform device names. Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: remove warning message during IBSS TxShahar Lev2011-10-111-1/+9
| | | | | | | | | | | | | | | | | | | | mac80211 sets the carrier on an IBSS interface even when no network is joined. Ignore garbage frames transmitted on a disconnected IBSS interface without printing warnings. Signed-off-by: Shahar Lev <shahar@wizery.com> [merged with wlvif changes] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: spi: use dev_err instead of wl1271_errorLuciano Coelho2011-10-111-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | To prevent a useless dependency between the spi module and the wl12xx module, we need to replace the wl1271_error macros with dev_err. At the same time, remove the SPI data hexdump, since this produces way too much data and is not particularly useful. There's no print_hex_dump() equivalent for dynamic debug, so it's hard to control when the dumps are printed out. Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: sdio: use dev_dbg instead of wl1271_debugLuciano Coelho2011-10-111-26/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | To prevent a useless dependency between the sdio module and the wl12xx module, we need to replace the wl1271_debug macros (and friends) for dev_dbg and other equivalents. At the same time, remove the SDIO data hexdump, since this produces way too much data and is not particularly useful. There's not print_hex_dump() equivalent for dynamic debug, so it's hard to control when the dumps are printed out. Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: move debugging definitions to a separate fileLuciano Coelho2011-10-1117-70/+116
| | | | | | | | | | | | | | | | | | | | | | Separate the debugging macros and other definitions to a new debug.h file. This is be needed because the sdio and spi modules don't need to depend on the wl12xx module anymore, but still need to include wl12xx.h. Currently they do depend on it, because of the debugging global that wl12xx exports. A future patch will remove this dependency. Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: drop unneeded plat_devFelipe Balbi2011-10-112-75/+30
| | | | | | | | | | | | | | | | | | now that useless plat_dev is unnecessary, we can remove it. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward ported and fixed sysfs file creation] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: mark some symbols staticFelipe Balbi2011-10-112-19/+8
| | | | | | | | | | | | | | | | | | | | after re-factoring a bunch of symbols are only used inside main.c which allows us to mark them as static. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: move common init code from bus modules to mainFelipe Balbi2011-10-117-311/+180
| | | | | | | | | | | | | | | | | | | | | | Move all common parts from sdio.c and spi.c to main.c, since they now can be handled as part of the platform driver. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [added a bunch of fixes and a new pdata element] [moved some new code into main.c as well] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add platform driver to the core moduleFelipe Balbi2011-10-111-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Nnow that we have a platform_device on both glue layers, add a platform_driver to the core driver. It's currently an empty platform_driver but more functionality will be added on later patches. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [added platform_driver.driver initialization] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add a platform device to the spi moduleFelipe Balbi2011-10-111-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | The platform device will be used to match the platform driver that will be implemented by the core module. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [call platform_device_add() instead of platform_device_register()] [store alloc'ed device platform directly in glue->core] [fixed the length of memset(res...)] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add a platform device to the sdio moduleFelipe Balbi2011-10-111-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | The platform device will be used to match the platform driver that will be implemented by the core module. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [call platform_device_add() instead of platform_device_register()] [store alloc'ed device platform directly in glue->core] [fixed the length of memset(res...)] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add an spi glue struct to keep wl and device side-by-sideFelipe Balbi2011-10-111-20/+47
| | | | | | | | | | | | | | | | | | | | | | | | In order to fully abstract the bus, we need to save the device structure *beside* wl1271, instead of inside it. This will help re-structuring the driver so that we avoid the duplicated code in the bus modules. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported and cleaned up and rephrased commit message] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add an sdio glue struct to keep wl and device side-by-sideFelipe Balbi2011-10-111-16/+43
| | | | | | | | | | | | | | | | | | | | | | | | In order to fully abstract the bus, we need to save the device structure *beside* wl1271, instead of inside it. This will help re-structuring the driver so that we avoid the duplicated code in the bus modules. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported and cleaned up and rephrased commit message] Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: remove sdio_test moduleLuciano Coelho2011-10-113-556/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This module has been causing more trouble than being useful. It only tests the SDIO speed by connecting to the wl12xx chip and does some throughput calculations. It is an ugly quick hack and, if we really want to have it as part of wl12xx we need to clean it up and implement it properly. A tarball of the code has been created and posted here, with some instructions: http://wireless.kernel.org/en/users/Drivers/wl12xx#SDIO_performance_test_module Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: use round-robin policy for txEliad Peller2011-10-113-6/+28
| | | | | | | | | | | | | | | | | | Currently, a single vif might starve all the other vifs. Save the last vif we dequeued a packet from, and continue with the following one using a round-robin policy. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add elp wakeup/sleep calls to add_interfaceEliad Peller2011-10-111-0/+6
| | | | | | | | | | | | | | | | add_interface might be called while the chip is in elp. add elp_wakeup/sleep calls to handle it. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: use dynamic rate policiesEliad Peller2011-10-116-21/+72
| | | | | | | | | | | | | | | | allocate the rate policies dynamically, instead of using hardcoded indexes. this is needed for proper multi-role configuration. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: call stop() on recoveryEliad Peller2011-10-111-3/+6
| | | | | | | | | | | | | | | | The recovery work should call stop() after it removed all the existing interfaces. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: replace all remaining wl->vif referencesEliad Peller2011-10-116-65/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | wl->vif is appropriate only when a single vif is being used. Instead, pass wlvif as parameter or iterate through all the vifs (e.g. when a global configuration was changed) Leave wl->vif only to determine whether a vif was already added (this check will be removed as well after both the driver and fw will support multiple vifs) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: make op_config configure all vifsEliad Peller2011-10-111-51/+61
| | | | | | | | | | | | | | | | When mac80211 changes a global (hw) config, iterate through all the relevant vifs and update them. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add power_level field to wlvifEliad Peller2011-10-113-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | move power_level into the per-interface data. mac80211 configures some values (e.g. band, channel) globally, while we configure them per-interface. In order to make it easier to keep track of the configured value for each value while keeping sync with mac80211, save these values both globally and per-vif. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | wl12xx: add channel field to wlvifEliad Peller2011-10-113-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add channel into the per-interface data. mac80211 configures some values (e.g. band, channel) globally, while we configure them per-interface. In order to make it easier to keep track of the configured value for each value while keeping sync with mac80211, save these values both globally and per-vif. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
OpenPOWER on IntegriCloud