aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/cmd.c
Commit message (Collapse)AuthorAgeFilesLines
* wl12xx: Validate FEM index from ini file and FWPontus Fuchs2012-01-121-0/+22
| | | | | | | | | | | | | commit 2131d3c2f99b081806fdae7662c92fe6acda52af upstream. Check for out of bound FEM index to prevent reading beyond ini memory end. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'master' of ↵John W. Linville2011-05-161-4/+14
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-tx.c net/mac80211/sta_info.h
| * Revert "wl12xx: support FW TX inactivity triggers"Luciano Coelho2011-05-021-1/+1
| | | | | | | | | | | | | | | | | | This reverts commit 47684808fd89d6809c0886e06f8ac324252499d8. Conflicts: drivers/net/wireless/wl12xx/conf.h drivers/net/wireless/wl12xx/main.c
| * wl12xx: schedule recovery on command timeoutArik Nemtsov2011-05-021-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | We use a long timeout (2 seconds) when sending commands to the FW. When a command times out, it means the FW is stuck, and we should commence recovery. This should make recovery times shorter as we'll recover on the first timeout indication. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: Set correct REF CLK and TCXO CLK values to the FWShahar Levi2011-05-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | Fix mismatch between the REF CLK and TCXO CLK information that is set in the platform data and the NVS, so we override what comes from the NVS and replace it with what comes from the platform data. [Small fix in a comment -- Luca] Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | Merge branch 'master' of ↵John W. Linville2011-05-051-7/+92
|\ \ | |/ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: drivers/net/wireless/libertas/if_cs.c drivers/net/wireless/rtlwifi/pci.c net/bluetooth/l2cap_sock.c
| * wl12xx: support FW TX inactivity triggersArik Nemtsov2011-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * wl12xx: 1281/1283 support - Loading FW & NVSShahar Levi2011-04-191-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * wl12xx: 1281/1283 support - New radio structs and functionsShahar Levi2011-04-191-1/+85
| | | | | | | | | | | | | | | | | | | | New general and radio parameters structures and functions. Implemented as separate functions due to auto-detection between wl127x and wl128x. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* | Fix common misspellingsLucas De Marchi2011-03-311-1/+1
|/ | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* wl12xx: wakeup chip from ELP during scanArik Nemtsov2011-03-031-0/+1
| | | | | | | | | | Commands are sometimes sent to FW on scan completion. Make sure the chip is awake to receive them. Sending commands while the chip is in ELP can cause SDIO read errors and/or crash the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: set supported_rates after associationEliad Peller2011-02-081-7/+4
| | | | | | | | | | | | Instead of looking for supported_rates change on every tx packet, just extract the supported_rates after association completes (station only). Remove wl1271.sta_rate_set and WL1271_FLAG_STA_RATES_CHANGED which are not used anymore. Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move to new firmware (6.1.3.50.49)Eliad Peller2011-02-081-5/+8
| | | | | | | | | | | | | | | This patch adds support for the new wl12xx firmware (Rev 6.1.3.50.49) Since this fw is not backward compatible with previous fw versions, a new fw (with different name) is being fetched. (the patch is big because it contains all the required fw api changes. splitting it into multiple patches will result in corrupted intermediate commits) Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: fix some endianess bugsEliad Peller2011-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | pointed out by sparse warnings: CHECK drivers/net/wireless/wl12xx/cmd.c drivers/net/wireless/wl12xx/cmd.c:987:20: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/cmd.c:987:20: expected restricted __le16 [usertype] aging_period drivers/net/wireless/wl12xx/cmd.c:987:20: got int CHECK drivers/net/wireless/wl12xx/tx.c drivers/net/wireless/wl12xx/tx.c:197:2: warning: cast from restricted __le16 drivers/net/wireless/wl12xx/tx.c:197:2: warning: cast from restricted __le16 drivers/net/wireless/wl12xx/tx.c:197:2: warning: cast from restricted __le16 CHECK drivers/net/wireless/wl12xx/acx.c drivers/net/wireless/wl12xx/acx.c:816:23: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/acx.c:816:23: expected restricted __le32 [usertype] rate_policy_idx drivers/net/wireless/wl12xx/acx.c:816:23: got unsigned char [unsigned] [usertype] idx Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: AP mode - workaround for FW bug on station removeArik Nemtsov2011-01-241-5/+21
| | | | | | | | | | | | Sometimes an event indicating station removal is not sent up by firmware. We work around this by always indicating success in when a wait for the event timeouts. Temporary workaround until a FW fix is introduced. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: AP-mode high level commandsArik Nemtsov2011-01-241-4/+272
| | | | | | | | | | Add commands to start/stop BSS, add/remove STA and configure encryption keys. Split the encryption commands "set key" and "set default key" into AP and STA specific versions. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: Add AP related configuration to conf_drv_settingsArik Nemtsov2011-01-241-2/+2
| | | | | | | | | Rate class configuration has been split up for AP and STA modes. Template related configuration likewise separated. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: fix some sparse warningsEliad Peller2011-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note that wl1271_write32() calls cpu_to_le32() by itself, so calling wl1271_write32(addr, cpu_to_le32(val)) is in fact a bug on BE systems. Fix the following sparse warnings: drivers/net/wireless/wl12xx/cmd.c:662:16: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/cmd.c:662:16: expected unsigned short [unsigned] [addressable] [usertype] llc_type drivers/net/wireless/wl12xx/cmd.c:662:16: got restricted __be16 [usertype] <noident> drivers/net/wireless/wl12xx/cmd.c:674:17: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/cmd.c:674:17: expected unsigned int [unsigned] [addressable] [usertype] sender_ip drivers/net/wireless/wl12xx/cmd.c:674:17: got restricted __be32 [usertype] ip_addr drivers/net/wireless/wl12xx/rx.c:202:4: warning: incorrect type in argument 3 (different base types) drivers/net/wireless/wl12xx/rx.c:202:4: expected unsigned int [unsigned] [usertype] val drivers/net/wireless/wl12xx/rx.c:202:4: got restricted __le32 [usertype] <noident> drivers/net/wireless/wl12xx/acx.c:1247:23: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/acx.c:1247:23: expected restricted __le32 [usertype] ht_capabilites drivers/net/wireless/wl12xx/acx.c:1247:23: got unsigned long drivers/net/wireless/wl12xx/acx.c:1250:24: warning: invalid assignment: |= drivers/net/wireless/wl12xx/acx.c:1250:24: left side has type restricted __le32 drivers/net/wireless/wl12xx/acx.c:1250:24: right side has type unsigned long drivers/net/wireless/wl12xx/acx.c:1253:24: warning: invalid assignment: |= drivers/net/wireless/wl12xx/acx.c:1253:24: left side has type restricted __le32 drivers/net/wireless/wl12xx/acx.c:1253:24: right side has type unsigned long drivers/net/wireless/wl12xx/acx.c:1256:24: warning: invalid assignment: |= drivers/net/wireless/wl12xx/acx.c:1256:24: left side has type restricted __le32 drivers/net/wireless/wl12xx/acx.c:1256:24: right side has type unsigned long Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: add auto-arp supportEliad Peller2010-12-151-0/+41
| | | | | | | | | | | | The auto-arp feature of wl12xx allows the firmware to automatically response to arp requests asking for its ip. in order to use it, we configure the arp response template and enable the corresponding bit in wl1271_acx_arp_filter (along with passing its ip) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
* wl1271: Fix setting of the hardware connection monitoring probe-req templateJuuso Oikarinen2010-11-261-0/+28
| | | | | | | | | | | | | | | The probe-request template used in the hardware connection monitoring feature thus far has been an empty one, without the SSID IE and without supported rate IEs. This causes problems with some AP's. Additionally, after connected scans, the template for connection maintenance would remain to be the one last used for scanning - potentially incorrect. Fix these by getting a pre-filled directed probe-request template for the associated-to AP from mac80211. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
* wl1271: Change wl12xx Files NamesShahar Levi2010-11-221-0/+783
| | | | | | | | | 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>
* wl1251: add wl1251 prefix to all 1251 filesKalle Valo2009-07-101-429/+0
| | | | | | | | | 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>
* wl12xx: Use chipset specific join commandsJuuso Oikarinen2009-07-101-1/+1
| | | | | | | | | Add implementation to use chipset specific join commands. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-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>
* wl12xx: optimise elp wakeup and sleep callsKalle Valo2009-07-101-13/+0
| | | | | | | | | | The wakeup call was done too deep in code path, it's better to wakeup chip from higher levels. This will also reduce wakeup calls significantly. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl12xx: Fix CMD_TEST regression via netlink.Ari Kauppi2009-07-101-24/+11
| | | | | | | | | | | | | | | | | | | CMD_TEST via netlink API has been broken since e29c3f59cfbc38c3b481a2694b08962da19c4664: cmd and acx interface rework. The user of the interface sends the request in a buffer without the wl12xx_command header but expects the response to have the wl12xx_command header (with id and status). This patch reverts the e29c3f5 commit for cmd.c:wl12xx_cmd_test and implements the needed wrapper functionality in netlink.c. Now the API of wl12xx_cmd_test and rest of wl12xx_cmd_* commands in cmd.c are similar. Signed-off-by: Ari Kauppi <Ext-Ari.Kauppi@nokia.com> 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>
* wl12xx: pass the wake up condition when configuring the wake up eventLuciano Coelho2009-07-101-1/+2
| | | | | | | | | | | Changed the function wl12xx_acx_wake_up_conditions() so that it receives an argument with the actual wake up condition, instead of having WAKE_UP_EVENT_DTIM_BITMAP hardcoded. This is needed because we have to use different conditions in 1271. 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>
* wl12xx: cmd and acx interface reworkKalle Valo2009-07-101-105/+206
| | | | | | | | | | | | | | | | | Rework cmd and acx interfaces, it was just too confusing earlier. Now all commands need to contain all the needed headers, either just cmd headers or both cmd and acx headers. This accomplish to remove the extra copy done for each command. The interfaces are now properly documented as well. Also try to make all commands safe for DMA transfers. I might have missed some, but most of them should be fixed now. And this is not all! As a free bonus you will also get some cosmetic cleanups and code reorganisation. Order today! Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl12xx: add driverKalle Valo2009-05-061-0/+353
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>