aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: move ath_tx_aggr_check() to the rate control moduleFelix Fietkau2010-09-213-15/+16
| | | | | | | It is not used anywhere else and can be made static Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: clean up / fix aggregation session flushFelix Fietkau2010-09-211-37/+26
| | | | | | | | | | | | | | | | | | | | The tid aggregation cleanup is a bit fragile, as it discards failed subframes in some places, and retransmits them in others. This could block the cleanup of an existing aggregation session, if a retransmission for a tid is issued, yet the tid is never scheduled again because of the cleanup state. Fix this by getting rid of as many subframes as possible, as early as possible, and immediately transmitting pending subframes as regular HT frames instead of waiting for the cleanup to complete. Drop all pending subframes while keeping track of the Block ACK window during aggregate tx completion to prevent sending out stale subframes, which could confuse the receiver side. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix an aggregation start related race conditionFelix Fietkau2010-09-213-6/+13
| | | | | | | | | | | | A new aggregation session start can be issued by mac80211, even when the cleanup of the previous session has not completed yet. Since the data structure for the session is not recreated, this could corrupt the block ack window and lock up the aggregation session. Fix this by delaying the new session until the old one has been cleaned up. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: clean up block ack window handlingFelix Fietkau2010-09-212-6/+4
| | | | | | | | | There's no reason to keep pointers to pending tx buffers around, if they're only used to keep track of which frames are still pending. Use a bitfield instead. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl1271: bugfix: use bitwise-AND instead of logical-ANDEliad Peller2010-09-211-2/+2
| | | | | | | | typo - while looking for specific bits we should do a bitwise-AND instead of logical-AND. Signed-off-by: Eliad Peller <eliad@wizery.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl1271: avoid redundant memcpy of rx_statusEliad Peller2010-09-211-3/+1
| | | | | | | | | copy the rx_status directly to skb->cb (control buffer) instead of copying it to a local struct and then copying it again (for each rx packet) Signed-off-by: Eliad Peller <eliad@wizery.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix hang in AP mode when HT STA does PSMChristian Lamparter2010-09-211-2/+2
| | | | | | | | This is a obvious bug, skb_queue_walk does not work if the iterator gets removed from the queue. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: reinit phy after HT settings have changedChristian Lamparter2010-09-212-12/+14
| | | | | | | | | | The driver has a set of different initvals for 20 MHz vs dynamic HT2040 operation. Because we can't change some of the registers "in-flight", the driver needs to perform a warm reset. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix state downgrade during resetChristian Lamparter2010-09-211-2/+0
| | | | | | | | | | | | | | Don't mark the device as completely dead just yet. If all goes to plan and carl9170_reboot succeeds then we can skip the expensive userspace-driven reinitialization anyway. And if it doesn't and carl9170_reboot fails, then carl9170_usb_cancel_urbs will do the necessary steps. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: abort tasklet during usb resetChristian Lamparter2010-09-211-0/+3
| | | | | | | | | This patch prevents the tasklet code from interfering while the firmware is down for an unscheduled maintenance. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: don't load bogus nf of chain 1Christian Lamparter2010-09-213-12/+9
| | | | | | | According to Atheros, chain 1 is not connected. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: fix noise dBm conversionChristian Lamparter2010-09-211-2/+2
| | | | | | | | | | | | | | Ever since carl9170 gained support to read the noisefloor, the reported noisefloor level was pretty poor. Initially I assumed that something was wrong in the PHY setup and it would be impossible to fix without any guidances. But this was not the case. In fact the nf readings were correct and the thing that was broken was the "simple" sign extension code! Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: use rx chainmask from eepromChristian Lamparter2010-09-211-1/+4
| | | | | | | | The eeprom provides a mask for all present rx chains. Why not use it instead of the generic initval default? Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Add tx queue configuration functionBruno Randolf2010-09-211-1/+39
| | | | | | | | Add the mac80211 callback function to configure the tx queue properties like cw_min, cw_max and aifs. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Simplify cw_min/max and AIFS configurationBruno Randolf2010-09-214-65/+65
| | | | | | | | | | | | | | | | | | Get rid of overly complicated cw_min/max and AIFS configuration: * Validate values in ath5k_hw_set_tx_queueprops(), so we can use them directly without further checks or computation in ath5k_hw_reset_tx_queue(). * Simplifiy by using AR5K_TUNE_AIFS|CWMIN|CWMAX variables directly since we don't support XR or B channels. That way we can also remove AR5K_TXQ_USEDEFAULT and the confusing logic around it. * Update data types: AIFS is u8, CW's are u16. * Remove now unneeded variables in ath5k_hw. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Keep last descriptor in queueBruno Randolf2010-09-211-32/+32
| | | | | | | | | | | | | | | | | | | | If we return a TX descriptor to the pool of available descriptors, while a queues TXDP still points to it we could potentially run into all sorts of troube. It has been suggested that there is hardware which can set the descriptors done bit before it reads ds_link and moves on to the next descriptor. While the documentation says this is not true for newer chipsets (the descriptor contents are copied to some internal memory), we don't know about older hardware. To be safe, we always keep the last descriptor in the queue, and avoid dangling TXDP pointers. Unfortunately this does not fully resolve the problem - queues still get stuck! This is similar to what ath9k does. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Count how many times a queue got stuckBruno Randolf2010-09-213-0/+5
| | | | | | | | Add a counter to show how many times a queue got stuck in the debugfs queue file. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Add watchdog for stuck TX queuesBruno Randolf2010-09-213-0/+56
| | | | | | | | | | | Since we do not know any better solution to the problem that TX queues can get stuck, this adds a timer-based watchdog, which will check for stuck queues and reset the hardware if necessary. Ported from ath9k commit 164ace38536849966ffa377b1b1132993a5a375d. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Move tx frame completion into separate functionBruno Randolf2010-09-211-50/+57
| | | | | | | Clearer separation between queue handling and what we do with completed frames. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Fix TX queues stoppingBruno Randolf2010-09-211-5/+4
| | | | | | | | | | It does not make sense to stop queues for NF calibration. This will not stop transmissions from the card, if there are queued packets. If we run out of TX buffers we need to stop all queues, not only one. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Fix queue debug fileBruno Randolf2010-09-211-2/+7
| | | | | | | Take txq lock in debug file and fix reporting of used buffers. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: Use four hardware queuesBruno Randolf2010-09-212-7/+45
| | | | | | | | | | | | | | | Prepare ath5k for WME by using four hardware queues. The way we set up our queues matches the mac80211 queue priority 1:1, so we don't have to do any mapping for queue numbers. Every queue uses 50 of the total 200 available transmit buffers, so the DMA memory usage does not increase with this patch, but it might be good to fine-tune the number of buffers per queue later (depending on the CPU speed and load, and the speed of the medium access, it might not be big enough). Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath5k: reorder base.c to remove fwd declsBob Copeland2010-09-211-898/+764
| | | | | | | | | | | This change reorganizes the main ath5k file in order to re-group related functions and remove most of the forward declarations (from 61 down to 3). This is, unfortunately, a lot of churn, but there should be no functional changes. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath/ath5k/ath9k: Fix crypto capabilities merge issueBruno Randolf2010-09-213-9/+5
| | | | | | | | | | | | Fixing up a merge issue / concurrent development: Remove unneeded ath_crypt_caps flags, as per "ath9k_hw: remove useless hw capability flags" (364734fafbba0c3133e482db78149b9a823ae7a5), but set the AESCCM flag for ath9k. common ath code still needs a flag for this because there is ath5k hardware which can't do AES in hardware. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* carl9170: update AR9170 phy initvalsChristian Lamparter2010-09-211-3/+5
| | | | | | | | | | | | This patch is loosely based on an ath9k patch called: "ath9k_hw: sync initvals for ar9001 and ar9002 with Atheros" It includes the following changes/fixes: - AGC setting improvements - timing changes for improved performance Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* omap: zoom: add mmc3/wl1271 device supportOhad Ben-Cohen2010-09-211-0/+19
| | | | | | | | | | | Add MMC3 support on ZOOM, which has the wl1271 device hardwired to. The wl1271 is a 4-wire, 1.8V, embedded SDIO WLAN device with an external IRQ line, and power-controlled by a GPIO-based fixed regulator. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* omap: zoom: add fixed regulator device for wlanOhad Ben-Cohen2010-09-211-0/+35
| | | | | | | | | Add a fixed regulator vmmc device to enable power control of the wl1271 wlan device. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl1271: make ref_clock configurable by boardOhad Ben-Cohen2010-09-216-5/+12
| | | | | | | | | | | The wl1271 device is using a reference clock that may change between board to board. Make the ref_clock parameter configurable by board settings instead of having a hard coded value in the sources. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl1271: take irq info from private board dataOhad Ben-Cohen2010-09-211-7/+8
| | | | | | | | Remove the hard coded irq information, and instead take the irq information from the board's platform data. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl12xx: add platform data passing supportOhad Ben-Cohen2010-09-214-1/+37
| | | | | | | | | | | | | | Add a simple mechanism to pass platform data to the SDIO instances of wl12xx. This way there is no confusion over who owns the 'embedded data', typechecking is preserved, and no possibility for the wrong driver to pick up the data. Originally proposed by Russell King. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl1271: propagate set_power's return valueOhad Ben-Cohen2010-09-215-12/+22
| | | | | | | | | | | Make it possible for the set power method to indicate a success/failure return value. This is needed to support more complex power on/off operations such as SDIO power manipulations. Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wl12xx: make wl12xx.h common to both spi and sdioOhad Ben-Cohen2010-09-217-7/+8
| | | | | | | | | | | | Move wl12xx.h outside of the spi-specific location, so it can be shared with both spi and sdio solutions. Update all users of spi/wl12xx.h accordingly Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlagn: initialize both tx/rx prio boost parametersWey-Yi Guy2010-09-171-0/+2
| | | | | | | For config bt command, initialize both tx_prio_boost and rx_prio_boost to "0". Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: minor coex API changesWey-Yi Guy2010-09-171-1/+6
| | | | | | | | | | Adding two new parameters in config bt API. these two parameters use the 3 reserved bytes, so there is no structure size changes. Make sure set both parameters to "zero" in order to preserve previous behavior. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: correct naming for failure reply tx statusWey-Yi Guy2010-09-174-14/+9
| | | | | | | For failure tx status 0x90 and 0x91, give the correct name to reflect the errors. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlwifi: corrections to debug output of ucode statisticsJay Sternberg2010-09-171-222/+135
| | | | | | | | | remove duplicate header and clean up format so it is defined once making changes consolicated ensuring consistancy of output. no function change to date displayed. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: adding aggregated frame failure status to debugfsWey-Yi Guy2010-09-172-2/+54
| | | | | | | Addition to standard tx frame failure report, adding aggregated frame failure report to debugfs Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: keep track of aggregated tx frames failure counterWey-Yi Guy2010-09-172-0/+68
| | | | | | | | | | When uCode completed the aggregated frames transmission attempt, it will send tx command response with aggregated frame status. Keep track of the failure counter which help indicate any transmission error condition. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: log aggregation tx command statusWey-Yi Guy2010-09-172-0/+35
| | | | | | | For aggregated frames with block ack, different status flag will be used as part of tx command response. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: keep track of failure tx statusWey-Yi Guy2010-09-178-0/+126
| | | | | | | | | | | Tx command response sent to host by uCode after completed the transmission attempt. The status parameter indicates whether the transmission was successful, or else why if failed. Here we keep the counters to help understand the different failure cases. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: keep track fail tx reason counterWey-Yi Guy2010-09-172-0/+108
| | | | | | | | If uCode fail to transmit frame, it will send reply tx back to driver with failure status; keep the counters of each failure cases for debugging. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* iwlagn: add bt_status_read for 5150Wey-Yi Guy2010-09-171-0/+1
| | | | | | Include bt_status_read function pointer for 5150 device Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
* ath9k: fix regression which disabled ps on ath9kLuis R. Rodriguez2010-09-161-1/+2
| | | | | | | | | | | | | | | | | | | The patch titled "ath9k: Add new file init.c" shuffled some code around but in dong so for some reason also removed the revision check for disablign power save. Add this revision check again so we can get power save re-enabled again by default on cards newer than AR5416 and AR5418. $ git describe --contains 556242049cc3992d0ee625e9f15c4b00ea4baac8 v2.6.34-rc1~233^2~49^2~343 This patch has fixes for stable kernels [2.6.34+]. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix regression which prevents chip sleep after CAB dataSenthil Balasubramanian2010-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch: commit 293dc5dfdbcc16cde06e40a688394cc8ab083e48 Author: Gabor Juhos <juhosg@openwrt.org> Date: Fri Jun 19 12:17:48 2009 +0200 ath9k: remove ath_rx_ps_back_to_sleep helper This helper only clears the SC_OP_WAIT_FOR_{BEACON,CAB} flags. Remove it and clear these flags directly in the approptiate places instead. Changes-licensed-under: ISC Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> introduced a regression which forgot to lift the beacon flag after we received all broadcast and multicast data. This meant we never went to sleep consuming about ~650mW on idle. This pretty much broke power save completely. This patch has fixes for stable kernels [2.6.32+]. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Sameer Nanda <snanda@google.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: send last 3/5 probe requests as unicastLuis R. Rodriguez2010-09-161-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some buggy APs do not respond to unicast probe requests or send unicast probe requests very delayed so in the worst case we should try to send broadcast probe requests, otherwise we can get disconnected from these APs. Even if drivers do not have filters to disregard probe responses from foreign APs mac80211 will only process probe responses from our associated AP for re-arming connection monitoring. We need to do this since the beacon monitor does not push back the connection monitor by design so even if we are getting beacons from these type of APs our connection monitor currently relies heavily on the way the probe requests are received on the AP. An example of an AP affected by this is the Nexus One, but this has also been observed with random APs. We can probably optimize this later by using null funcs instead of probe requests. For more details refer to: http://code.google.com/p/chromium-os/issues/detail?id=5715 This patch has fixes for stable kernels [2.6.35+]. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: disable beacon monitor while going offchannelLuis R. Rodriguez2010-09-161-0/+2
| | | | | | | | | | | | | | | The beacon monitor should be disabled when going off channel to prevent spurious warnings and triggering connection deterioration work such as sending probe requests. Re-enable the beacon monitor once we come back to the home channel. This patch has fixes for stable kernels [2.6.34+]. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: make the beacon monitor available externallyLuis R. Rodriguez2010-09-162-4/+5
| | | | | | | | | | | | This will be used by other components next. The beacon monitor was added as of 2.6.34 so these fixes are applicable only to kernels >= 2.6.34. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: reset connection idle when going offchannelLuis R. Rodriguez2010-09-161-0/+5
| | | | | | | | | | | | | | | | | | | When we go offchannel mac80211 currently leaves alive the connection idle monitor. This should be instead postponed until we come back to our home channel, otherwise by the time we get back to the home channel we could be triggering unecesary probe requests. For APs that do not respond to unicast probe requests (Nexus One is a simple example) this means we essentially get disconnected after the probes fails. This patch has stable fixes for kernels [2.6.35+] Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: reset probe send counter upon connection timer resetLuis R. Rodriguez2010-09-161-0/+4
| | | | | | | | | | | | | | | | | Upon beacon loss we send probe requests after 30 seconds of idle time and we wait for each probe response 1/2 second. We send a total of 3 probe requests before giving up on the AP. In the case that we reset the connection idle monitor we should reset the probe requests count to 0. Right now this won't help in any way but the next patch will. This patch has fixes for stable kernel [2.6.35+]. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add helper for reseting the connection monitorLuis R. Rodriguez2010-09-162-5/+11
| | | | | | | | | | | | This will be used in another place later. The connection monitor was added as of 2.6.35 so these fixes will be applicable to >= 2.6.35. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>