summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/boot.c
AgeCommit message (Collapse)Author
2012-04-12wireless/wl12xx/wl1251: move TI WLAN modules to a common ti subdirectoryLuciano Coelho
Move wl12xx and wl1251 modules into a new drivers/net/wireless/ti directory. Add a TI WLAN Kconfig option and Makefile to support this change. Signed-off-by: Luciano Coelho <coelho@ti.com> Cc: John W. Linville <linville@tuxdriver.com>
2012-04-10wl12xx: fix DMA-API-related warningsMircea Gherzan
On the PandaBoard (omap_hsmmc + wl12xx_sdio) with DMA_API_DEBUG: WARNING: at lib/dma-debug.c:930 check_for_stack.part.8+0x7c/0xe0() omap_hsmmc omap_hsmmc.4: DMA-API: device driver maps memory fromstack Signed-off-by: Mircea Gherzan <mgherzan@gmail.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: remove PS management codeEyal Shapira
Removal of PS management code from the driver as PS is handled by the FW (dynamic PS) Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: fw api change - update cmd/acx/event enumsEliad Peller
Update enums/structs to the new fw api. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: use two MAC addresses based on the NVS or from fuse ROMLuciano Coelho
Add support for two MAC addresses. If the NVS has a valid MAC address, that takes precedence and we use two sequential address starting from the one specified. If the NVS doesn't contain a valid MAC address (ie. if it is set to 00:00:00:00:00:00), we check if the HW PG version in use has the BD_ADDR written in the fuse ROM. If it does, we read it and derive the two subsequent addresses for WLAN. During production, 3 addresses are reserved per device. The first for Bluetooth (burnt in the fuse ROM) and the following two for WLAN. This patch has some code by Igal and Arik (squashed from internal patches). Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: read chip ID and HW PG version during probeLuciano Coelho
In order to read the MAC addresses from the fuse ROM, we need to know the chip ID and the HW PG version. We need to know the MAC address during probe, because that's when we register our HW with mac80211. To prepare for that, this patch reads the chip ID and HW PG version during probe instead of doing it at boot time. We power the chip on briefly in order to do that. Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-02-15wl12xx: move partition table definition to io.cLuciano Coelho
Up till now we only needed to access the partition table in boot.c. But to add support for reading the MAC address from the FUSE in testmode, we will have to change the partition in testmode.c. Thus, we move the partition table to io.c and export it via io.h. It makes more sense to have it in the io part anyway. Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-12-01wl12xx: Check buffer bound when processing nvs dataPontus Fuchs
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>
2011-12-01Merge branch 'master' of ↵Luciano Coelho
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into wl12xx-next
2011-10-31drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULEPaul Gortmaker
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>
2011-10-11wl12xx: move debugging definitions to a separate fileLuciano Coelho
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>
2011-10-07wl12xx: disable AP-mode-specific quirksEliad Peller
The current wl12xx fw (7.3.0.0.77) supports both STA and AP mode, and we no longer use AP-mode-specific quirks. WL12XX_QUIRK_END_OF_TRANSACTION is still used for certain HWs, while WL12XX_QUIRK_LPD_MODE is not used anymore. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-10-07wl12xx: Add support for HW channel switchShahar Levi
The wl12xx FW supports HW channel switch. If we don't use it, sometimes the firmware gets confused when recalibrating to the new channel, causing RX problems. This commit adds HW channel switch support by implementing the channell_switch op. Signed-off-by: Shahar Levi <shahar_levi@ti.com> [added one comment, remove the tx_flush and rephrased the commit message] Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-08-25wl12xx: allow 11a AP-mode for wl127x devicesArik Nemtsov
There was a check preventing 127x devices from using the 11a band when operating as AP. Since we now support this functionality, remove the check. With this patch, a 11a AP starts ok on 127x cards. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-08-22wl12xx: update commands & eventsEliad Peller
Change the commands and events according to the new fw api (fw >= 6/7.3.0.0.75). The main change is the replacement of JOIN/DISCONNECT commands, with ROLE_START/ROLE_STOP commands. The use of these commands should be preceded by the ROLE_ENABLE command (allocating role resources), and followed by the ROLE_DISABLE command (freeing role resources). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-08-22wl12xx: remove rx filtering stuffEliad Peller
The new fw doesn't support rx_filtering configuration (as a stand-alone command. the rx filtering is done automatically according to the active role). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-08-22wl12xx: use 1 spare block in all casesArik Nemtsov
Remove support for firmwares that require 2 spare blocks for packet TX (and delete the WL12XX_QUIRK_USE_2_SPARE_BLOCKS quirk definition) Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-08-12wl12xx: fixes for hw_pg_ver and chip id reportingGery Kahn
Fix the value of PG version for 128x at sysfs, remove write permissions from PG version (hw_pg_ver) in sysfs and add remove files (hw_pg_ver,bt_coex_state) from sysfs while freeing hardware. New macro names for register Fuse_data_2_1 depend on architecture. Propagate chip id through wiphy in PLT mode which still not work of a bug in ethtool. Signed-off-by: Gery Kahn <geryk@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-07-05wl12xx: AP mode - support FW TX inactivity triggersArik Nemtsov
In AP mode we register for the MAX_TX_RETRY and INACTIVE_STA events. Both are reported to the upper layers as a TX failure in the offending stations. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27wl12xx: Support routing FW logs to the hostIdo Yariv
A recently added feature to the firmware enables the driver to retrieve firmware logs via the host bus (SDIO or SPI). There are two modes of operation: 1. On-demand: The FW collects its log in an internal ring buffer. This buffer can later be read, for example, upon recovery. 2. Continuous: The FW pushes the FW logs as special packets in the RX path. Reading the internal ring buffer does not involve the FW. Thus, as long as the HW is not in ELP, it should be possible to read the logs, even if the FW crashes. A sysfs binary file named "fwlog" was added to support this feature, letting a monitor process read the FW messages. The log is transferred from the FW only when available, so the reading process might block. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27wl12xx: Check for FW quirks as soon as the FW bootsIdo Yariv
The FW initialization might depend on the FW revision, so check for any FW quirks right after booting it. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-27wl12xx: Add Support for Low Power DRPw (LPD) ModeShahar Levi
The Low Power DRPw (LPD) mode contains several optimizations that designed to reduce power consumption. The purpose is to save current consumption in RX and Listen mode. LPD setting apply only for wl127x AP mode (not wl128x) Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-06-07wl12xx: Stop BA session event from deviceShahar Levi
Adding new event that close RX BA session in case of periodic BT activity limiting WLAN activity. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-13wl12xx: listen to scheduled scan eventsLuciano Coelho
Subscribe and listen to PERIODIC_SCAN_REPORT_EVENT_ID and PERIODIC_SCAN_COMPLETE_EVENT_ID in preparation for the scheduled scan implementation. Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02Revert "wl12xx: support FW TX inactivity triggers"Luciano Coelho
This reverts commit 47684808fd89d6809c0886e06f8ac324252499d8. Conflicts: drivers/net/wireless/wl12xx/conf.h drivers/net/wireless/wl12xx/main.c
2011-04-28wl12xx: support FW TX inactivity triggersArik Nemtsov
In AP mode we register for the MAX_TX_RETRY and INACTIVE_STA events. Both are reported to the upper layers as a TX failure in the offending stations. In STA mode we register only for the MAX_TX_RETRY event. A TX failure is interpreted as a loss of connection. Support for IEEE80211_HW_REPORTS_TX_ACK_STATUS has been removed to avoid the inherent race condition of a mac80211 TX failure counter in addition to the FW counter. This patch depends on "mac80211: allow low level driver to report packet loss" Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-19wl12xx: move hardcoded hci_io_ds value into the conf structLuciano Coelho
Instead of hardcoding the hci_io_ds configuration that we write to the SDIO_IO_DS top registed, read it from the default configuration so that it's easier to change for different platforms. Reported-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-04-19wl12xx: Clean up and fix the 128x boot sequenceIdo Yariv
Clean up the boot sequence code & fix the following issues: 1. Always read the registers' values and set the relevant bits instead of zeroing all other bits 2. Handle cases where wl1271_top_reg_read returns an error 3. Verify that the HW can detect the selected clock source 4. Remove 128x PG10 initialization code 5. Configure the MCS PLL to work in HP mode Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-04-19wl12xx: 1281/1283 support - Add dummy packet supportShahar Levi
Support sending dummy packet to wl128x FW as results of dummy packet event. That is part of dynamic TX mem blocks mechanism. Only send dummy packet when not in AP mode. [Even though the DUMMY_PACKET_EVENT_ID and the STA_REMOVE_COMPLETE_EVENT_ID events are defined to the same value, we need to treat them separately in the code. Keep the check and enable STA_REMOVE_COMPLETE_EVENT_ID for AP mode and DUMMY_PACKET_EVENT_ID for STA. Moved one warning to a cleaner place. Use WL1271_TID_MGMT for dummy packets -- Luca] Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-04-19wl12xx: 1281/1283 support - New boot sequenceShahar Levi
Boot sequence support FREF clock and TCXO clock. WL128x has two clocks input - TCXO and FREF. TCXO is the main clock of the device, while FREF is used to sync between the GPS and the cellular modem. Auto-detection checks where TCXO is 32.736MHz or 16.368MHz, in that case the FREF will be used as the WLAN/BT main clock. [Use clock enumeration as defined in linux/wl12xx.h; remove unnecessary else block in wl128x_switch_fref; remove unnecessary change in main.c; remove some unnecessary debug prints and comments; fix potential use of uninitialized value (pll_config) -- Luca] Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-04-19wl12xx: 1281/1283 support - Loading FW & NVSShahar Levi
Take care of FW & NVS with the auto-detection between wl127x and wl128x. [Moved some common code outside if statements and added notes about NVS structure assumptions; Fixed a bug when checking the nvs size: if the size was incorrect, the local nvs variable was set to NULL, it should be wl->nvs instead. -- Luca] [Merged with potential buffer overflow fix -- Luca] Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-04-19wl12xx: 1281/1283 support - move IRQ polarityShahar Levi
In order to prevent overran of IRQ polarity via FW the polarity setting move after FW download and before IRQ enable. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-03-03wl12xx: Do end-of-transactions transfers only if neededIdo Yariv
On newer hardware revisions, there is no need to write the host's counter at the end of a RX transaction. The same applies to writing the number of packets at the end of a TX transaction. It is generally a good idea to avoid unnecessary SDIO/SPI transfers. Throughput and CPU usage are improved when avoiding these. Send the host's RX counter and the TX packet count only if needed, based on the hardware revision. [Changed WL12XX_QUIRK_END_OF_TRANSACTION to use BIT(0) -- Luca] Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-01-24wl12xx: BA initiator supportLevi, Shahar
Add 80211n BA initiator session support wl1271 driver. Include BA supported FW version auto detection mechanism. BA initiator session management included in FW independently. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-01-24wl12xx: Enable AP-modeArik Nemtsov
Indicate support for the NL80211_IFTYPE_AP interface mode to enable AP mode operation. Disable 11a when operating in AP-mode (unsupported for now). Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-01-24wl12xx: AP specific RX filter configurationArik Nemtsov
Set filters according to the mode of operation. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-01-24wl12xx: AP mode - add AP specific eventArik Nemtsov
Add STA-remove completion event. Unmask it during boot if operating in AP-mode. Ignore unrelated events in AP-mode. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2010-12-22wl12xx: remove unnecessary importHauke Mehrtens
No function declared in gpio.h is used here. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-02wl1271: Add wl1271_load_firmware() and export some functionsRoger Quadros
For the SDIO testing module we need to load the firmware but not boot it. wl1271_load_firmware() is meant to do just the firmware loading part. We also export some functions so they are usable in the testing module. Signed-off-by: Roger Quadros <roger.quadros@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2010-11-22wl1271: Change wl12xx Files NamesShahar Levi
All files name prefix removed due to the fact that wl12xx driver supports wl1271 and wl1273. Also the definition in Kconfig and header files changed respectively. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
2009-07-10wl1251: add wl1251 prefix to all 1251 filesKalle Valo
Now that all 1271 files are split, we can add wl1251_ prefix to the files. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Vidhya Govindan <vidhya.govindan@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-10wl12xx: moved firmware version reading routine to chip-specific functionsLuciano Coelho
With WL1271, the firmware version can only be read right after booting the chip. To keep WL1251 aligned with this procedure, the code that reads the firmware version initially has been moved to a common place where it can be read from both chipsets. Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-05-06wl12xx: add driverKalle Valo
wl12xx is a driver for TI wl1251 802.11 chipset designed for embedded devices, supporting both SDIO and SPI busses. Currently the driver supports only SPI. Adding support 1253 (the 5 GHz version) should be relatively easy. More information here: http://focus.ti.com/general/docs/wtbu/wtbuproductcontent.tsp?contentId=4711&navigationId=12494&templateId=6123 (Collapsed original sequence of pre-merge patches into single commit for initial merge. -- JWL) Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>