summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/tx.c
Commit message (Collapse)AuthorAgeFilesLines
* wireless/wl12xx/wl1251: move TI WLAN modules to a common ti subdirectoryLuciano Coelho2012-04-121-1079/+0
| | | | | | | | | 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>
* wl12xx: implement SW Tx watchdogArik Nemtsov2012-03-081-0/+4
| | | | | | | | | | | | | | | | Track freed FW blocks during Tx. If no blocks were freed during a predefined timeout, initiate a HW recovery. This helps in situations when the FW watchdog fails. Don't trigger recovery during activities that can temporarily stop Tx. This includes: - scanning - buffering packets for sleeping stations (AP role) - ROC on any role Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: flush all Tx queues on tx_flush timeoutArik Nemtsov2012-02-281-0/+7
| | | | | | | | | Ensure our queues are empty at the end of a tx_flush(), in case we timeout on passively waiting for them. This makes sure no left-overs are transmitted when we are on the wrong channel. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: avoid starving the system hlidArik Nemtsov2012-02-281-4/+13
| | | | | | | | | | | | | Re-factor the Tx scheduler so that the system_hlid is taken into account before restarting an iteration over the wlvifs. Previously this hlid had a lower priority and would starve if some wlvif had many packets. In addition avoid iterating over wlvifs past last_wlvif when performing the a second pass. If we had packets in those wlvifs they would have been found earlier. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: reset link Tx queues when freeing itArik Nemtsov2012-02-281-3/+10
| | | | | | | | | | | | | | | | | Before, the link was first freed (invalidating it in the map), and later on vif removal, all valid wlvif-related links were reset. Since these links were already invalid, we failed to reset them. The bug was made worse by op_stop, which set the tx_queue_count to 0 arbitrarily. This resulted in a negative tx_queue_count in some scenarios. Fix this by resetting the Tx-queues of a link when freeing it. Add a WARN_ON and reset all link Tx-queues in op_stop, to avoid a negative tx_queue_count. [changed WARN_ON to WARN_ON_ONCE -- Luca] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: consider encryption and QoS in auto arp templateEliad Peller2012-02-151-5/+6
| | | | | | | | | | | | | | | | | When configuring the arp response template, and encryption is enabled, we should add some space and set the protected flag bit in the fc. In order to track the encryption type, set wlvif->encryption_type when setting an encryption key, and reconfigure the arp response. Clear this field on wl1271_join, as keys have to be re-configured anyway after a join command. Similarly, track whether QoS is configured. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: add TX_HW_ATTR_HOST_ENCRYPT flagEliad Peller2012-02-151-4/+13
| | | | | | | | | | In WEP shared authentication, we encrypt the auth frame in the host, and we want the fw to pass it as-is. Use the TX_HW_ATTR_HOST_ENCRYPT flag in order to indicate it to the fw. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: Set IEEE80211_TX_RC_SHORT_GI if short GI was used onPontus Fuchs2012-02-151-2/+6
| | | | | | | | | New FW reports usage of short GI as a rate class index. Check for this rate and set the IEEE80211_TX_RC_SHORT_GI if used. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: Set IEEE80211_TX_RC_MCS on MCS rates on TX complete.Pontus Fuchs2012-02-151-1/+11
| | | | | | | | | | IEEE80211_TX_RC_MCS was not set correctly leading to incorrect link speed calculation. Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com> Signed-off-by: Ido Reis <idor@ti.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: remove wl1271_tx_update_filtersEliad Peller2012-02-151-31/+0
| | | | | | | | | | | | | | wl1271_tx_update_filters() is used as some workaround to open filters while roaming on the same channel. However, it doesn't handle roaming to a different channel, and it might also sleep in the tx path, which is a bug. With the new auth/assoc redesign, roaming is much simpler, and this function is not needed anymore. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: use ieee80211_free_txskb()Eliad Peller2011-12-151-1/+8
| | | | | | | | | | | | Use the newly introduced ieee80211_free_txskb() instead of dev_kfree_skb() for failed tx packets. Additionally, if the skb is a dummy packet, re-enqueue it (as the fw expects it) instead of freeing it. Reported-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: silence tx_attr uninitialized warning in wl1271_tx_fill_hdrJohn W. Linville2011-12-091-1/+1
| | | | | | | | CC [M] drivers/net/wireless/wl12xx/tx.o drivers/net/wireless/wl12xx/tx.c: In function ‘wl1271_tx_fill_hdr’: drivers/net/wireless/wl12xx/tx.c:288:6: warning: ‘tx_attr’ may be used uninitialized in this function Signed-off-by: John W. Linville <linville@tuxdriver.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: 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: change blocksize alignment quirk to negativeLuciano Coelho2011-11-081-3/+3
| | | | | | | | | 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: couple role_start_dev with rocEliad Peller2011-11-081-5/+1
| | | | | | | | | | | | | 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-111-14/+13
| | | | | | | | | | | | | | | 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: 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: move debugging definitions to a separate fileLuciano Coelho2011-10-111-0/+1
| | | | | | | | | | | 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: use round-robin policy for txEliad Peller2011-10-111-6/+20
| | | | | | | | | 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: use dynamic rate policiesEliad Peller2011-10-111-5/+5
| | | | | | | | 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: replace all remaining wl->vif referencesEliad Peller2011-10-111-1/+1
| | | | | | | | | | | | | 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: add band field to wlvifEliad Peller2011-10-111-2/+3
| | | | | | | | | | | | | | | add band field 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: make WL1271_FLAG_RX_STREAMING_STARTED flag per-vifEliad Peller2011-10-111-1/+1
| | | | | | | This flag should be set per-vif, rather than globally. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: make WL1271_FLAG_AP_STARTED flag per-vifEliad Peller2011-10-111-1/+1
| | | | | | | This flag should be set per-vif, rather than globally. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: make WL1271_FLAG_IBSS_JOINED flag per-vifEliad Peller2011-10-111-1/+1
| | | | | | | This flag should be set per-vif, rather than globally. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: make WL1271_FLAG_STA_ASSOCIATED flag per-vifEliad Peller2011-10-111-1/+1
| | | | | | | This flag should be set per-vif, rather than globally. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: rearm rx streaming per vifEliad Peller2011-10-111-21/+46
| | | | | | | | | | | | Currently, the rx streaming doesn't support multi-vif (the actual wlvif is taken from wl->vif, and the management is global). Make the rx streaming timers/works per-vif, and pass the the actual vif as param. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move tx_security_seq into wlvifEliad Peller2011-10-111-3/+9
| | | | | | | | | The last security seq num has to be saved across reconfigs. Add a new "persistent" struct into wlvif, which won't get deleted on wl12xx_init_vif_data() Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: support multiple vifs in the tx pathEliad Peller2011-10-111-31/+48
| | | | | | | | | | Pass the wlvif associated with each skb as param. Note that dummy packet doesn't belong to any particular vif, so we pass NULL in this case. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: unify STA and AP tx_queue mechanismEliad Peller2011-10-111-70/+39
| | | | | | | | | | Make sta use the global wl->links[hlid].tx_queue (by considering its links map) instead of wl->tx_queue, and then unify the tx and tx_reset flows for the various vifs. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move last_tx_hlid into wlvifEliad Peller2011-10-111-5/+5
| | | | | | | | move last_tx_hlid into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move ap_hlid_map into wlvif.apEliad Peller2011-10-071-18/+17
| | | | | | | | | | | | | Add wlvif->links_map bitmap to represent all the links allocated for this vif. AP vif also has a sta_hlid_map bitmap, which represents the links stations connected to it (sta_hlid_bitmap is a subset of wlvif->links_map, which itself is a subset of the global wl->links_map) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move ba fields into wlvifEliad Peller2011-10-071-1/+1
| | | | | | | | move ba_fields into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move default_key into wlvifEliad Peller2011-10-071-2/+2
| | | | | | | | move default_key into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move dev_hlid into wlvifEliad Peller2011-10-071-2/+2
| | | | | | | | move dev_hlid into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move session_counter into wlvifEliad Peller2011-10-071-3/+3
| | | | | | | | move session_counter into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move ap_global_hlid and ap_bcast_hlid into wlvifEliad Peller2011-10-071-7/+8
| | | | | | | | move ap_global_hlid and ap_bcast_hlid into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move sta_hlid into wlvifEliad Peller2011-10-071-2/+2
| | | | | | | | move sta_hlid into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move dev_role_id into wlvifEliad Peller2011-10-071-4/+5
| | | | | | | | move dev_role_id into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: move bss_type into wlvifEliad Peller2011-10-071-32/+54
| | | | | | | | move bss_type into the per-interface data, rather than being global. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: implement set_bitrate_mask callbackEliad Peller2011-09-231-16/+7
| | | | | | | | Save the configured bitrate, and use the min allowed rate as the basic rate (e.g. when scanning). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: Use dev_hlid for auth and assoc reqEliad Peller2011-09-231-6/+9
| | | | | | | | | | | | On roaming, the auth and assoc req are sent with the sta hlid. This is wrong, as the sta hlid is configured according to the old ap. Use the dev_hlid instead. Move the wl1271_tx_update_filters() call into wl1271_tx_get_hlid(), so wl->dev_hlid will be valid. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: AP mode - clean BA and queue state in tx_resetArik Nemtsov2011-09-141-1/+6
| | | | | | | | | Reset the BA state of all connected stations and explicitly clear the Tx queues. The latter is needed for clearing dummy packets from tx_queue_count. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: don't regulate links when a single STA is connectedArik Nemtsov2011-09-141-2/+5
| | | | | | | | | | | When operating as AP track the number of connected stations. When a single STA is connected don't regulate the PS status of the link. Since this is the only STA connected, there's no point holding space in FW for other links. This will speed up communications with a single connected STA in PSM. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: AP mode - don't regulate FW blocks for non-active STAsArik Nemtsov2011-09-141-0/+4
| | | | | | | | | | Check a STA is associated before regulating its PS-status in mac80211. Should never happen, so warn as a precaution. [Small cosmetic change wrt Kalle Valo's comment. -- Luca] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: don't indicate up PS-filtered dummy packetsArik Nemtsov2011-09-141-1/+1
| | | | | | | | | | | Dummy packets are currently only sent on the system_hlid link. The system_hlid link should never be filtered for PS (as it is not a STA link). Even so, for correctness, don't indicate dummy packets up. The skb does not belong to mac80211 and as such does not contain a correct skb->cb. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: remove deprecated CONFIG_WL12XX_HT flagLuciano Coelho2011-09-141-2/+0
| | | | | | | | The driver now support HT properly, so we can always have HT enabled. Remove the WL12XX_HT configuration. Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: use 2 spare TX blocks for GEM cipherGuy Eilam2011-08-251-3/+5
| | | | | | | | | | | | | Add tx_spare_blocks member to the wl1271 struct for more generic configuration of the amount of spare TX blocks that should be used. The default value is 1. In case GEM cipher is used by the STA, we need 2 spare TX blocks instead of just 1. Signed-off-by: Guy Eilam <guy@wizery.com> Acked-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
* wl12xx: enable AP advanced functionalityArik Nemtsov2011-08-221-11/+8
| | | | | | | | | | | This adjusts FW TX block allocation for connected stations in PS. Firmware congestion is measured in allocated packets instead of blocks. Allow a link in PS to queue up to 2 packets to the FW. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
OpenPOWER on IntegriCloud