summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/carl9170/tx.c
AgeCommit message (Collapse)Author
2012-07-11carl9170: fix HT peer BA session corruptionChristian Lamparter
This patch adds an alternative tx status path for BlockAck Requests as the hardware doesn't recognize that a BlockAck Requests is usually acked with a BlockAck and not a legacy ACK. Without this patch, the stack would constantly resent old and stale BARs. So, depending on the receiver stack, this could lead to: - "stuck" ba sessions and package loss, as the stale BAR would reset the sequence each time. - lots of reorder releases. - ... Reported-by: Sean Patrick Santos <quantheory@gmail.com> Reported-by: Mikołaj Kuligowski <mikolaj.q@wp.pl> Reported-by: Per-Erik Westerberg <per-erik.westerberg@bredband.net> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-07-03mac80211: reduce IEEE80211_TX_MAX_RATESThomas Huehn
IEEE80211_TX_MAX_RATES can be reduced from 5 to 4 as there is no current hardware supporting a rate chain with 5 multi rate stages (mrr), so 4 mrr stages are sufficient. The memory that is freed within the ieee80211_tx_info struct will be used in the upcoming Transmission Power Control (TPC) implementation. Suggested-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> [reword commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-02-29carl9170: fix breakage from "mac80211: handle non-bufferable MMPDUs correctly"John W. Linville
That commit intended for 3.4 renamed IEEE80211_TX_CTL_POLL_RESPONSE as IEEE80211_TX_CTL_NO_PS_BUFFER. Meanwhile, "carl9170: fix frame delivery if sta is in powersave mode" added a reference to IEEE80211_TX_CTL_POLL_RESPONSE in the fixes stream for 3.3. This simple patch fixes that merge boo-boo. Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2012-02-29carl9170: fix frame delivery if sta is in powersave modeChristian Lamparter
Nicolas Cavallari discovered that carl9170 has some serious problems delivering data to sleeping stations. It turns out that the driver was not honoring two important flags (IEEE80211_TX_CTL_POLL_RESPONSE and IEEE80211_TX_CTL_CLEAR_PS_FILT) which are set on frames that should be sent although the receiving station is still in powersave mode. Cc: stable <stable@vger.kernel.org> Reported-by: Nicolas Cavallari <Nicolas.Cavallari@lri.fr> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-29carl9170: Fix memory accounting when sta is in power-save mode.Nicolas Cavallari
On Access Point mode, when transmitting a packet, if the destination station is in powersave mode, we abort transmitting the packet to the device queue, but we do not reclaim the allocated memory. Given enough packets, we can go in a state where there is no packet on the device queue, but we think the device has no memory left, so no packet gets transmitted, connections breaks and the AP stops working. This undo the allocation done in the TX path when the station is in power-save mode. Signed-off-by: Nicolas Cavallari <cavallar@lri.fr> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-27carl9170: allow users to lower output power levelChristian Lamparter
This patch implements a simple way of reducing the output power of the device by a configurable upper limit. Requested-by: Harshal Chhaya <harshal@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-21carl9170: use ieee80211_free_txskbChristian Lamparter
In the past, it was fine to simply call dev_kfree_skb when it was impossible to transmit a skb. However, with the new tx status API: "mac80211: implement wifi TX status" Every loose skb needs to be handed back to mac80211. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-02carl9170: fix AMPDU TX_CTL_REQ_TX_STATUS handlingChristian Lamparter
Previously the driver did not care if TX_CTL_REQ_TX_STATUS was set on aggregated frames or not and it would silently drop successfully sent frames if possible [much like: "no news is good news!"]. But, TX_CTL_REQ_TX_STATUS was invented for a reason and no tx status report should ever be dropped if it is set. Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-18carl9170: set beacon xmit power to the maxChristian Lamparter
Harshal Chhaya discovered during network tests, that several of his clients dropped-off the network. The captured packets shows that the beacons sent by the AP are at a much lower power than the other data packets. The reason for this mishap: The driver never updated the beacon phy register, so all beacons were always sent at the lowest power. Reference: http://marc.info/?l=linux-wireless&m=131067225105801 Reported-by: Harshal Chhaya <harshal@gmail.com> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-18carl9170: move beacon_update into tx.cChristian Lamparter
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-10carl9170: fix -Wunused-but-set-variable warningsChristian Lamparter
tx.c: In function ‘carl9170_tx_accounting_free’: tx.c:159:28: warning: variable ‘txinfo’ set but not used tx.c: In function ‘carl9170_tx_status_process_ampdu’: tx.c:383:27: warning: variable ‘ar_info’ set but not used tx.c: In function ‘__carl9170_tx_process_status’: tx.c:626:27: warning: variable ‘arinfo’ set but not used tx.c: In function ‘carl9170_tx_ampdu_queue’: tx.c:1324:15: warning: variable ‘max’ set but not used Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-26carl9170: improve unicast PS bufferingChristian Lamparter
Using the ieee80211_sta_block allows the PS code to handle awake->doze->awake transitions of our clients in a race-free manner. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-03-29carl9170: Fix tx aggregation problems with some clientsChristian Lamparter
Some clients seem to rely upon the reception of BlockAckReqs to flush their rx reorder buffer. In order to fix aggregation for these clients carl9170 should set IEEE80211_TX_STAT_AMPDU_NO_BACK to generate a BlockAckReq if the transmission of an AMPDU subframe fails. This fixes aggregation problems with Intel 5100 Windows STAs (and maybe others as well). Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-02-25mac80211: make tx() operation return voidJohannes Berg
The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-01-27carl9170: utilize fw seq counter for mgmt/non-QoS data framesChristian Lamparter
"mac80211 will properly assign sequence numbers to QoS-data frames but cannot do so correctly for non-QoS-data and management frames because beacons need them from that counter as well and mac80211 cannot guarantee proper sequencing." Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-08Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/ath/ath9k/ar9003_eeprom.c net/llc/af_llc.c
2010-11-29carl9170: fix carl9170_tx_prepare typoChristian Lamparter
commit: "carl9170: revamp carl9170_tx_prepare" introduced a peculiar bug that would only show up if the the module parameter noht is set to 1. Then all outbound voice, video and background frames would each invoke a (bogus) RTS/CTS handshake. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-22carl9170: fix init-self regressionChristian Lamparter
The commit: "carl9170: tx path review" introduced a regression. gcc (with -Winit-self): tx.c:1264: warning: ‘super’ is used uninitialized in this function Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15carl9170: tx path reviewChristian Lamparter
This patch fixes a few shortcomings in the tx path. * move temp. ampdu_[ack]_len out of txinfo->pad. * fix WARN_ON from tx.c:line 300 when tx_ampdu_queue fails to queue the frame. * In tx_prepare, we already have a local pointer to the station's ieee80211_sta struct. * remove a second !sta check, tx_prepare already takes care of that. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-11-15carl9170: stop stale uplink BA sessionsChristian Lamparter
This patch fixes a possible lengthy stall if the device is operating as an experimental 11n AP and an STA [during heavy txrx action] suddenly signalized to go off-channel (old NetworkManager), or (sleep - which is unlikely, because then it wouldn't be *active* at all!?). Because the driver has to manage the BA Window, the sudden PSM transition can leave active uplink BA sessions to the STA in a bad state and a proper cleanup is needed. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-28carl9170: revamp carl9170_tx_prepareChristian Lamparter
David Miller complained about the driver's excessive use of variables in __packed structs. While I did not fully agree with his sole "performance" argument on all accounts. I do see some room for improvement in hot-paths on architectures without an efficient access to unaligned elements. This first patch (dare I say?) optimizes an important tx hot-path in the driver: carl9170_tx_prepare. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-28carl9170: remove lost-frame workaroundChristian Lamparter
This patch removes some cruft, which survived the RFC review phase. Originally, carl9170_tx_ampdu_queue erroneously dropped a lot of frames. As a result the ampdu scheduler bogged down quite frequently and the affected BA session timed out. However this bug has been fixed and the WA and its debugfs counter is no longer useful. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-09-14carl9170: 802.11 rx/tx processing and usb backendChristian Lamparter
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>