aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2011-05-02wl12xx: Handle duplicate calling of remove interfaceJuuso Oikarinen
Because of the hardware recovery mechanism, its possible the __wl1271_op_remove_interface is called twice. Currently, this leads to a kernel crash even before a kernel WARNing can be issued. Fix this. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: rearrange some ELP wake_up/sleep callsEliad Peller
ELP (Extremely/Enhanced Low Power, or something like that ;)) refers to the powerstate of the 12xx chip, in which very low power is consumed, and no commands (from the host) can be issued until the chip is woken up. Wakeup/sleep commands must be protected by a wl->mutex, so it's generally a good idea to call wakeup/sleep along with the mutex lock/unlock (where needed). However, in some places the wl12xx driver calls wakeup/sleep in some "inner" functions. This result in some "nested" wakeup/sleep calls which might end up letting the chip go to sleep prematurely (e.g. during event handling). Fix it by rearranging the elp calls to come along with mutex_lock/unlock. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: configure channel/band while FW is offArik Nemtsov
Initialize the channel and band from mac80211 conf even when the FW is not yet loaded. This mitigates a bug in AP-mode where the channel was never changed from its initial setting after FW boot and was therefore never configured to FW. Reported-by: Alexander Boukaty <alexanderb@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: use a bitmask instead of list of booleans in scanned_chLuciano Coelho
We were using an array of booleans to mark the channels we had already scanned. This was causing a sparse error, because bool is not a type with defined size. To fix this, use bitmasks instead, which is much cleaner anyway. Thanks Johannes Berg for the idea. Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: fix a couple of sparse warnings about undeclared functionsLuciano Coelho
Fix the following sparse warnings: drivers/net/wireless/wl12xx/main.c:1129:5: warning: symbol '__wl1271_plt_stop' was not declared. Should it be static? drivers/net/wireless/wl12xx/main.c:2988:5: warning: symbol 'wl1271_op_ampdu_action' was not declared. Should it be static? Both functions should be static. Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: fix SG BT load value to reflect its new meaningLuciano Coelho
The Soft Gemini BT load ratio value has changed its meaning with FW version 6.1.0.0.310. It now means the passive scan compensation percentage during A2DP EDR. Instead of 50, we need to use 200. Fix the SG configuration accordingly. Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: set the skbuff priority for dummy packetsLuciano Coelho
The firmware requires dummy packets to be sent using TID 7 (WL1271_TID_MGMT). Instead of hardcoding it in the tx_fill_hdr() function, set it when creating the packet itself. This requires Eliad's fix to set the actual TID in the TX descriptor. Cc: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: set the actual tid instead of the acEliad Peller
When passing a tx frame, the driver incorrectly set desc->tid with the ac instead of the actual tid. It has some serious implications when using 802.11n + QoS, as the fw starts a BlockAck with the wrong tid (which finally cause beacon loss and disconnection / some fw crash) Fix it by using the actual tid stored in skb->priority. Reported-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Add mutex protection for interface listJuuso Oikarinen
The interface list maintained in main.c is not mutex protected. This could cause issues, as the list is accessed from notifier chains. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Clamp byte mode transfers for 128x chipsArik Nemtsov
On wl128x based devices, when TX packets are aggregated, each packet size must be aligned to the SDIO block size, and sent using block mode transfers. The block size is set to 256 bytes, which is less than the maximum possible byte transfer. Thus, if two small packets (< 256 bytes) are aggregated, the aggregation buffer size would be 512, and will be sent using byte mode transfers. This can have undesired side effects. Fix this by setting the MMC_QUIRK_BLKSZ_FOR_BYTE_MODE mmc card quirk. For 127x chips this has no effect, as the block size is set to 512 bytes. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: update bet_max_consecutiveOhad Ben-Cohen
Allow early termination of 50 consecutive beacons. This value is the recommended one by the 12xx's system/RF team, and tests show that power consumption is improved as expected. Reported-by: Ruthy Zaphir <ruthyz@ti.com> Tested-by: Danil Shalumov <danils@ti.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Add support for 11n Rx STBC one spatial streamShahar Levi
The wl12xx chip supports one Rx STBC spatial stream. Announce this in the HT capabilities info field. Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Fix potential incorrect band in rx-statusJuuso Oikarinen
The rx-status passed to mac80211 along with each received frame contains the band on which the frame was received. Under certain circumstances, this band information may be incorrect, causing in worst case a WARNING from mac80211, and causes the received frame to be dropped. This scenario mainly occurs when performing connected-mode scans, when the received scan results are from the other band than the one currently associated to. [Since desc_band doesn't exist anymore, use status->band in the later call to ieee80211_channel_to_frequency() to fix compilation -- Luca] Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: use 1 spare TX block instead of twoLuciano Coelho
All the new firmware versions (>=6.1.3.50.58 for STA and >=6.2.0.0.47 for AP) use 1 spare TX block. We still want to support older firmwares that require 2 spare blocks, so added a quirk to handle the difference. Also implemented a generic way of setting quirks that depend on the firmware revision. Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: 1281/1283 support - enable chip supportShahar Levi
Add support to wl128x chip via chip id 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-05-02wl12xx: 1281/1283 support - Use different FW file for AP mode wl127x/wl128x ↵Arik Nemtsov
chips Choose a different FW for AP-mode wl127x and wl128x chips, base on chip ID at boot time. Signed-off-by: Arik Nemtsov <arik@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: 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-05-02wl12xx: 1281/1283 support - Improve Tx & Rx pathShahar Levi
Reduced bus transactions in the Tx & Rx path. [Removed unnecessary check wl->chip.id != CHIP_ID_1283_PG20 when checking the quirk -- 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-05-02wl12xx: 1281/1283 support - use dynamic memory for the RX/TX poolsShahar Levi
Separate the memory configuration to chip-specific structures and implement dynamic memory for wl128x. This feature allows us to move TX memory blocks to the RX pool when the RX path is overloaded. Thanks for Arik Nemtsov <arik@wizery.com> for helping simplify the wl1271_fw_status() code. [Rewrote the commit subject and message for clarity; improved some comments and changed "spare" to "padding" for consistency; added a FIXME for the AP memory configuration -- 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-05-02wl12xx: 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-05-02wl12xx: 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-05-02wl12xx: 1281/1283 support - New radio structs and functionsShahar Levi
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>
2011-05-02wl12xx: 1281/1283 support - add block size handling for sdio and spiLuciano Coelho
Add the the set_block_size op in the SDIO and in the SPI modules. Since it is only used with SDIO, just explicitly set the op to NULL in spi.c Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: 1281/1283 support - Add acx commandsShahar Levi
New acx command that sets: Rx fifo enable reduced bus transactions in RX path. Tx bus transactions padding to SDIO block size that improve preference in Tx and essential for working with SDIO HS (48Mhz). The max SDIO block size is 256 when working with Tx bus transactions padding to SDIO block. Add new ops to SDIO & SPI that handles the win size change in case of transactions padding (relevant only for SDIO). [Fix endianess issues; simplify sdio-specific block_size handling; minor changes in comments; use "aligned_len" in one calculation instead of "pad" to avoid confusion -- 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-05-02wl12xx: 1281/1283 support - Add DefinitionsShahar Levi
Definitions to support wl128x: - New FW file name - Chip ID - New PLL Configuration Algorithm macros that will be used at wl128x boot stage - Rename NVS macro name: wl127x and wl128x are using the same NVS file name. However, the ini parameters between them are different. The driver will validate the correct NVS size in wl1271_boot_upload_nvs(). [Cleaned up some of the definitions. -- 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-05-02wl12xx: 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-05-02wl12xx: fix module author's email address in the spi and sdio modulesLuciano Coelho
The MODULE_AUTHOR() macro in the main module (wl12xx) has been updated to reflect one of the author's new email address, but the wl12xx_spi and wl12xx_sdio modules haven't been updated. This patches updates them. Signed-off-by: Luciano Coelho <coelho@ti.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-02wl12xx: Correctly set up protection if non-GF STAs are presentHelmut Schaa
Set the gf_protection bit when calling ACX_HT_BSS_OPERATION according to the GF bit passed by mac80211 in ht_operation_mode. [Added a proper commit message -- Luca] Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: wakeup chip from ELP during scanArik Nemtsov
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>
2011-05-02wl12xx: Modify requested number of memory blocksIdo Yariv
Tests have shown that the requested number of memory blocks is sub-optimal. Slightly modify the requested number of memory blocks for TX. Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Avoid redundant TX workIdo Yariv
TX might be handled in the threaded IRQ handler, in which case, TX work might be scheduled just to discover it has nothing to do. Save a few context switches by cancelling redundant TX work in case TX is about to be handled in the threaded IRQ handler. Also, avoid scheduling TX work from wl1271_op_tx if not needed. Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Switch to level trigger interruptsIdo Yariv
The interrupt of the wl12xx is a level interrupt in nature, since the interrupt line is not auto-reset. However, since resetting the interrupt requires bus transactions, this cannot be done from an interrupt context. Thus, requesting a level interrupt would require to disable the irq and re-enable it after the HW is acknowledged. Since we now request a threaded irq, this can also be done by specifying the IRQF_ONESHOT flag. Triggering on an edge can be problematic in some platforms, if the sampling frequency is not sufficient for detecting very frequent interrupts. In case an interrupt is missed, the driver will hang as the interrupt line will stay high until it is acknowledged by the driver, which will never happen. Fix this by requesting a level triggered interrupt, with the IRQF_ONESHOT flag. Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Switch to a threaded interrupt handlerIdo Yariv
To achieve maximal throughput, it is very important to react to interrupts as soon as possible. Currently the interrupt handler wakes up a worker for handling interrupts in process context. A cleaner and more efficient design would be to request a threaded interrupt handler. This handler's priority is very high, and can do blocking operations such as SDIO/SPI transactions. Some work can be deferred, mostly calls to mac80211 APIs (ieee80211_rx_ni and ieee80211_tx_status). By deferring such work to a different worker, we can keep the irq handler thread more I/O responsive. In addition, on multi-core systems the two threads can be scheduled on different cores, which will improve overall performance. The use of WL1271_FLAG_IRQ_PENDING & WL1271_FLAG_IRQ_RUNNING was changed. For simplicity, always query the FW for more pending interrupts. Since there are relatively long bursts of interrupts, the extra FW status read overhead is negligible. In addition, this enables registering the IRQ handler with the ONESHOT option. Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Change claiming of the SDIO busIdo Yariv
The SDIO bus is claimed and released for each SDIO transaction. In addition to the few CPU cycles it takes to claim and release the bus, it may also cause undesired side effects such as the MMC host stopping its internal clocks. Since only the wl12xx_sdio driver drives this SDIO card, it is safe to claim the SDIO host once (on power on), and release it only when turning the power off. This patch was inspired by Juuso Oikarinen's (juuso.oikarinen@nokia.com) patch "wl12xx: Change claiming of the (SDIO) bus". Signed-off-by: Ido Yariv <ido@wizery.com> Reviewed-by: Luciano Coelho <coelho@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: 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-05-02wl12xx: Reorder data handling in irq_workIdo Yariv
The FW has a limited amount of memory for holding frames. In case it runs out of memory reserved for RX frames, it'll have no other choice but to drop packets received from the AP. Thus, it is important to handle RX data interrupts as soon as possible, before handling anything else. In addition, since there are enough TX descriptors to go around, it is better to first send TX frames, and only then handle TX completions. Fix this by changing the order of function calls in wl1271_irq_work. 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-05-02wl12xx: Remove private headers in wl1271_tx_resetIdo Yariv
Frames in the tx_frames array include extra private headers, which must be removed before passing the skbs to ieee80211_tx_status. Fix this by removing any private headers in wl1271_tx_reset, similar to how this is done in wl1271_tx_complete_packet. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: Don't rely on runtime PM for toggling powerIdo Yariv
Runtime PM might not always be enabled. Even if it is enabled in the running kernel, it can still be temporarily disabled, for instance during suspend. Runtime PM is opportunistic in nature, and should not be relied on for toggling power. In case the interface is removed and re-added while runtime PM is disabled, the FW will fail to boot, as it is mandatory to toggle power between boots. For instance, this can happen during suspend in case one of the devices fails to suspend before the MMC host suspends, but after mac80211 was suspended. The interface will be removed and reactivated without toggling the power. Fix this by calling mmc_power_save_host/mmc_power_restore_host in wl1271_sdio_power_on/off functions. It will toggle the power to the chip even if runtime PM is disabled. The runtime PM functions should still be called to make sure runtime PM does not opportunistically power the chip off (e.g. after resuming from system suspend). Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: fix the path to the wl12xx firmwaresSebastien Jan
In the linux-firmware git tree, the firmwares and the NVS are inside the ti-connectivity directory. Fix the filenames that the driver looks for accordingly. [Fixed commit message and merged with the latest changes. -- Luca] Signed-off-by: Sebastien Jan <s-jan@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: AP-mode - management of links in PS-modeArik Nemtsov
Update the PS mode of each link according to a bitmap polled from fw_status. Manually notify mac80211 about PS mode changes in connected stations. mac80211 will only be notified about PS start when the station is in PS and there is a small number of TX blocks from this link ready in HW. This is required for waking up the remote station since the TIM is updated entirely by FW. When a station enters mac80211-PS-mode, we drop all the skbs in the low-level TX queues belonging to this sta with STAT_TX_FILTERED to keep our queues clean. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: AP-mode - count free FW TX blocks per linkArik Nemtsov
Count the number of FW TX blocks allocated per link. We add blocks to a link counter when allocated for a TX descriptor. We remove blocks according to counters in fw_status indicating the number of freed blocks in FW. These counters are polled after each IRQ. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: AP mode - fix bug in cleanup of wl1271_op_sta_add()Arik Nemtsov
Remove an active hlid when chip wakeup fails. In addition rename the involved functions. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: AP-mode - support HW based link PS monitoringArik Nemtsov
When operating in AP mode the wl1271 hardware filters out null-data packets as well as management packets. This makes it impossible for mac80211 to monitor the PS mode by using the PM bit of incoming frames. Disable mac80211 automatic link PS-mode handling by supporting IEEE80211_HW_AP_LINK_PS in HW flags. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: report invalid TX rate when returning non-TX-ed skbsArik Nemtsov
Report a TX rate idx of -1 and count 0 when returning untransmitted skbs to mac80211 using ieee80211_tx_status(). Otherwise mac80211 tries to use the returned (essentially garbage) status. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: AP-mode - TX queue per link in ACArik Nemtsov
When operating in AP-mode we require a per link tx-queue. This allows us to implement HW assisted PS mode for links, as well as regulate per-link FW TX blocks consumption. Split each link into ACs to support future QoS for AP-mode. AC queues are emptied in priority and per-link queues are scheduled in a simple round-robin fashion. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: AP-mode - fix race condition on sta connectionArik Nemtsov
If a sta starts transmitting immediately after authentication, sometimes the FW deauthenticates it. Fix this by marking the sta "in-connection" in FW before sending the autentication response. The "in-connection" entry is automatically removed when connection succeeds or after a timeout. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: fix potential race condition with TX queue watermarkArik Nemtsov
Check the conditions for the high/low TX queue watermarks when the spin-lock is taken. This prevents race conditions as tx_queue_count and the flag checked are only modified when the spin-lock is taken. The following race was in mind: - Queues are almost full and wl1271_op_tx() will stop the queues, but it doesn't get the spin-lock yet. - (on another CPU) tx_work_locked() dequeues 15 skbs from this queue and tx_queue_count is updated to reflect this - wl1271_op_tx() does not check tx_queue_count after taking the spin-lock and incorrectly stops the queue. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: always set mac_address when configuring ht capsEliad Peller
The mac_address should be set also when ht caps are disabled. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: use standard ALIGN() macroEliad Peller
Use the standard ALIGN() macro instead of redefining similar macros. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2011-05-02wl12xx: declare support for IEEE80211_HW_REPORTS_TX_ACK_STATUSEliad Peller
The wl12xx fw supports ack status reporting for tx frames, so add the IEEE80211_HW_REPORTS_TX_ACK_STATUS flag to our supported features. Since we do the rate control in the fw, we'll probably want to adjust the STA_LOST_PKT_THRESHOLD heuristics in the future, to account for retransmissions as well. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>