summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k
Commit message (Collapse)AuthorAgeFilesLines
* ath9k: Restart xmit logic in xmit watchdog.Ben Greear2011-01-214-29/+68
| | | | | | | | | | | | | | | | The system can get into a state where the xmit queue is stopped, but there are no packets pending, so the queue will not be restarted. Add logic to the xmit watchdog to attempt to restart the xmit logic if this situation is detected. Example 'dmesg' output: ath: txq: f4e723e0 axq_qnum: 2, mac80211_qnum: 2 axq_link: f4e996c8 pending frames: 1 axq_acq empty: 1 stopped: 0 axq_depth: 0 Attempting to restart tx logic. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: More xmit queue debugfs information.Ben Greear2011-01-211-0/+26
| | | | | | | To try to figure out why xmit logic hangs. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Keep track of stations for debugfs.Ben Greear2011-01-214-3/+115
| | | | | | | | | | The stations hold the ath_node, which holds the tid and other xmit logic structures. In order to debug stuck xmit logic, we need a way to print out the tid state for the stations. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add counters to distinquish AMPDU enqueues.Ben Greear2011-01-213-4/+8
| | | | | | | | Show counters for pkts sent directly to hardware and those queued in software. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Ensure xmit makes progress.Ben Greear2011-01-211-0/+2
| | | | | | | | | | | | | If the txq->axq_q is empty, the code was breaking out of the tx_processq logic without checking to see if it should transmit other queued AMPDU frames (txq->axq_acq). This patches ensures ath_txq_schedule is called. This needs review. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Remove un-used member from ath_node.Ben Greear2011-01-211-1/+0
| | | | | Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Add more information to debugfs xmit file.Ben Greear2011-01-214-2/+42
| | | | | | | Should help debug strange tx lockup type issues. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Initialize ah->hwBen Greear2011-01-211-0/+1
| | | | | | | Previous code left it NULL. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Show some live tx-queue values in debugfs.Ben Greear2011-01-211-0/+16
| | | | | | | I thought this might help track down stuck queues, etc. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: track receiver's aggregation reorder buffer sizeJohannes Berg2011-01-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | The aggregation code currently doesn't implement the buffer size negotiation. It will always request a max buffer size (which is fine, if a little pointless, as the mac80211 code doesn't know and might just use 0 instead), but if the peer requests a smaller size it isn't possible to honour this request. In order to fix this, look at the buffer size in the addBA response frame, keep track of it and pass it to the driver in the ampdu_action callback when called with the IEEE80211_AMPDU_TX_OPERATIONAL action. That way the driver can limit the number of subframes in aggregates appropriately. Note that this doesn't fix any drivers apart from the addition of the new argument -- they all need to be updated separately to use this variable! Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: Fix up hardware mode and beacons with multiple vifs.Ben Greear2011-01-195-146/+263
| | | | | | | | | | | | | | | | | | When using a mixture of AP and Station interfaces, the hardware mode was using the type of the last VIF registered. Instead, we should keep track of the number of different types of vifs and set the mode accordingly. In addtion, use the vif type instead of hardware opmode when dealing with beacons. Attempt to move some of the common setup code into smaller methods so we can re-use it when changing vif mode as well as adding/deleting vifs. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix excessive BAR sending when a frame exceeds its retry limitFelix Fietkau2011-01-191-1/+1
| | | | | | | | | Because the sendbar variable was not reset to zero, the stack would send Block ACK requests for all subframes following the one that failed, which could mess up the receiver side block ack window. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: try more than one tid when scheduling a new aggregateFelix Fietkau2011-01-191-3/+6
| | | | | | | | | | | | Sometimes the first TID in the first AC's list is not available for forming a new aggregate (the BAW might not allow it), however other TIDs may have data available for sending. Prevent a slowdown of other TIDs by going through multiple entries until we've either hit the last one or enough AMPDUs are pending in the hardware queue. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: fix carrier leakage calibration for AR9271Rajkumar Manoharan2011-01-191-1/+4
| | | | | | | | AR9285 carrier leakage calibration related workaround on high temperature is not applicable for AR9271. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: keep calibrated noise floor value for oper channelRajkumar Manoharan2011-01-192-4/+5
| | | | | | | | | | | | The ath9k_hw assumes that caldata is valid only for oper channel. But with ath9k_htc case, the caldata is passed for all channels on hw_reset though we are not doing calibration on that channel. So the oper channel's nf history got cleared to default due to mismatch in channel flags. This patch also saves some space. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: preserve caldata history buffer across scanningRajkumar Manoharan2011-01-191-3/+2
| | | | | | | | | | caldata's channel info is never filled with operating channel info which is causing the operating channel's noise floor history buffer is reset to default nf during channel change. Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: partially revert "fix dma descriptor rx error bit parsing"Felix Fietkau2011-01-192-8/+14
| | | | | | | | | | | | | | | The rx error bit parsing was changed to consider PHY errors and various decryption errors separately. While correct according to the documentation, this is causing spurious decryption error reports in some situations. Fix this by restoring the original order of the checks in those places, where the errors are meant to be mutually exclusive. If a CRC error is reported, then MIC failure and decryption errors are irrelevant, and a PHY error is unlikely. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: reduce the likelihood of baseband hang check false positivesFelix Fietkau2011-01-191-1/+12
| | | | | | | | | | | | | | | | | | | Since baseband hangs are rare, but the hang check function has a high false positive rate in some situations, we need to add more reliable indicators. In AP mode we can use blocked beacon transmissions as an indicator, they should be rare enough. In station mode, we can skip the hang check entirely, since a true hang will trigger beacon loss detection, and mac80211 will rescan, which leads to a hw reset that will bring the hardware back to life. To make this more reliable, we need to skip fast channel changes if the hardware appears to be stuck. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: reinitialize block ack window data when starting aggregationFelix Fietkau2011-01-191-0/+3
| | | | | | | | There might be some old stale data left, which could confuse tracking of pending tx frames. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix initial sequence number after starting an ampdu sessionFelix Fietkau2011-01-191-1/+1
| | | | | | | | | | txtid->seq_start may not always be up to date, when there is HT non-AMPDU traffic just before starting an AMPDU session. Relying on txtid->seq_next is better, since it is also used to generate the sequence numbers for all QoS data frames. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: fix bogus sequence number increases on aggregation tid flushFelix Fietkau2011-01-191-1/+1
| | | | | | | | | | When a tid pointer is passed to ath_tx_send_normal(), it increases the starting sequence number for the next AMPDU action frame, which should only be done if the sequence number assignment is fresh. In this case it is clearly not. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Offload USB eeprom reading to targetSujith Manoharan2011-01-195-29/+123
| | | | | | | | | For USB devices, reading the EEPROM data can be offloaded to the target. Use multiple register reads to take advantage of this feature to reduce initialization time. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Add multiple register read APISujith Manoharan2011-01-192-0/+32
| | | | | | | This would decrease latency in reading bulk registers. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_htc: Really fix packet injectionSujith Manoharan2011-01-102-11/+27
| | | | | | | | | | The chainmask value along with other configuration has to be set on the target for packet injection. Fix this and also move the monitor interface addition before the channel set segment to ensure that the opmode is updated properly. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix RX handling for USB devicesSujith Manoharan2011-01-101-1/+1
| | | | | | | | | | | | Commit "ath9k_hw: Abort rx if hw is not coming out of full sleep in reset" uncondionally added aborting RX DMA in a HW reset, though it is a bit unclear as to why this is needed. Anyway, RX DMA is handled in the target for USB devices, and this would interfere with normal operations (scanning etc.), so fix this. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix thermal issue with UB94Sujith Manoharan2011-01-101-0/+4
| | | | | | | | Hardcode the output voltage of x-PA bias LDO to the lowest value for UB94. The card doesn't get too hot now. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix calibration for AR9287 devicesSujith Manoharan2011-01-101-0/+3
| | | | | | | | | AR9287 based devices have issues with ADC gain calibration which would cause uplink throughput drops in HT40 mode. Remove ADC gain from the supported calibration algorithms. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k_hw: Fix chip testSujith Manoharan2011-01-101-1/+2
| | | | | | | USB devices do not require the chip test routine. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2011-01-0524-420/+623
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: net/bluetooth/Makefile
| * ath9k: correct MODULE_PARM_DESC parameters for force_new_aniJohn W. Linville2011-01-051-1/+1
| | | | | | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: qualify global modparam_nohwcrypt variableJohn W. Linville2011-01-053-5/+5
| | | | | | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_htc: Fix packet injectionSujith Manoharan2011-01-041-8/+64
| | | | | | | | | | | | | | | | | | To inject a packet in monitor mode, a dummy station has to be associated with the monitor interface in the target. Failing to do this would result in a firmware crash on the device. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k : few rate control clean upsMohammed Shafi Shajakhan2011-01-042-11/+8
| | | | | | | | | | | | | | Remove some obvious looking dead code and rename few functions Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: fix beacon restart on channel changeRajkumar Manoharan2011-01-041-1/+2
| | | | | | | | | | | | | | | | | | | | Restart the beacon timers only if the beacon was already configured. Otherwise beacons timers are restarted unnecessarily in unassociated state too. Cc: stable@kernel.org Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * Revert "ath9k: Parse DTIM period from mac80211"Mohammed Shafi Shajakhan2011-01-042-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0ce3bcfc84900a64347b0fe1140229bd81314008. Event though with the above commit we obtain the configured DTIM period from the AP rather than always hardcoding it to '1', this seems to cause problems under the following scenarios: * Preventing association with broken AP's * Adds latency in roaming So its better to always use the safe value of '1' for dtim period Cc: Jouni Malinen <Jouni.Malinen@Atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_hw: fix dma descriptor rx error bit parsingFelix Fietkau2011-01-042-9/+11
| | | | | | | | | | | | | | | | | | | | An Rx DMA descriptor can have multiple error bits set, and some error bits (e.g. MIC failure) are filtered by the driver based on other criteria. Remove the 'else' in various error bit checks so that all error information is properly passed to the driver. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_htc: Move LED/RFKILL code to htc_drv_gpio.cSujith Manoharan2011-01-043-312/+333
| | | | | | | | | | | | | | And add the copyright/license header. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_htc: Fix fast channel changeSujith Manoharan2011-01-042-16/+11
| | | | | | | | | | | | | | | | | | | | | | When returning to the operating channel, a full HW reset has to be done instead of a fast channel change. Since sw_scan_complete() is called after the config() call for the home channel, we end up doing a FCC. Fix this issue by checking the OFFCHANNEL flag to determine FCC. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_htc: Handle FATAL eventsSujith Manoharan2011-01-045-8/+84
| | | | | | | | | | | | | | | | The device has to be reset when a FATAL event is received. Not doing so would leave the card in a non-working state. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_htc: Move work cancellation outside of mutexSujith Manoharan2011-01-041-5/+5
| | | | | | | | | | | | | | | | There is no need to lock the various work cancellation calls. This will be helpful when handling FATAL events. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_htc: Handle pending URBs properlySujith Manoharan2011-01-042-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | When doing a channel change, the pending URBs have to be killed properly on calling htc_stop(). This fixes the probe response timeout seen when sending UDP traffic at a high rate and running background scan at the same time. Cc: stable <stable@kernel.org> Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Few clean ups in beacon config parametersMohammed Shafi Shajakhan2011-01-041-12/+13
| | | | | | | | | | | | | | Some minor clean ups in assigning values to beacon config parameters Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: fix spur mitigation no-spur case for AR9002Brian Prodoehl2011-01-041-2/+3
| | | | | | | | | | | | | | | | | | | | For the AR9002, the spur frequency read from the EEPROM is mangled before being compared against AR_NO_SPUR. This results in the driver trying to set up the spur mitigation for bogus spurs, rather than cleanly breaking out. Signed-off-by: Brian Prodoehl <bprodoehl@nomadio.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: spin_lock_bh is not required within tasklet context.Senthil Balasubramanian2011-01-041-2/+2
| | | | | | | | | | | | | | | | Disabling BH is not required while running from a tasklet context and so replace spin_lock_bh with just spin_lock. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Reset keycache on resumeMohammed Shafi Shajakhan2010-12-223-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like some hardware registers are left into undefined state after suspend/resume. At minimum, this can cause odd issues related to key cache and hardware trying to encrypt/decrypt frames unexpectedly. This seems to happen even when there is no keys configured, i.e., hardware can end up touching TX frames just based of invalid key cache context even if the driver is not asking a specific entry to be used. In addition, RX can likely be affected. This patch fixes this issue. Signed-off-by: Jouni Malinen <Jouni.Malinen@Atheros.com> Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k_hw: Fix bug in eeprom data length validation for AR9485Vasanthakumar Thiagarajan2010-12-221-1/+3
| | | | | | | | | | | | | | | | | | | | The size of the eeprom data is 1088 bytes for AR9485. But a sanity check is done against 4K which would result in a 'potential read past the end of the buffer' smatch complaint. Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: unlock on error path in ath9k_change_interface()Dan Carpenter2010-12-221-4/+7
| | | | | | | | | | | | | | | | There is a missing unlock when we hit the "No beacon slot available" error condition. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: Use pci_is_pcie()Hauke Mehrtens2010-12-221-1/+1
| | | | | | | | | | | | | | | | Use function pci_is_pcie() instead of accessing struct member directly. CC: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * ath9k: fix aphy / wiphy idle mismatchLuis R. Rodriguez2010-12-222-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ath9k supports its own set of virtual wiphys, and it uses the mac80211 idle notifications to know when a device needs to be idle or not. We recently changed ath9k to force idle on driver stop() and on resume but forgot to take into account ath9k's own virtual wiphy idle states. These are used internally by ath9k to check if the device's radio should be powered down on each idle call. Without this change its possible that the device could have been forced off but the virtual wiphy idle was left on. 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 warnings on card removalRajkumar Manoharan2010-12-224-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recently added warning message on power change failure is not needed on device removal. ath: Failed to wakeup in 500us ------------[ cut here ]------------ WARNING: at drivers/net/wireless/ath/ath9k/hw.c:1618 ath9k_hw_setpower+0x61f/0x630 [ath9k_hw]() Hardware name: 64756D6 Pid: 540, comm: kworker/u:3 Not tainted 2.6.37-rc6-wl #37 Call Trace: [<ffffffff810501aa>] warn_slowpath_common+0x7a/0xb0 [<ffffffffa056e280>] ? ath9k_iowrite32+0x0/0x90 [ath9k] [<ffffffff810501f5>] warn_slowpath_null+0x15/0x20 [<ffffffffa05226ef>] ath9k_hw_setpower+0x61f/0x630 [ath9k_hw] [<ffffffffa05700e5>] ath9k_ps_wakeup+0x85/0xd0 [ath9k] [<ffffffffa0570685>] ath9k_configure_filter+0x25/0x80 [ath9k] [<ffffffffa04dde43>] ieee80211_configure_filter+0x133/0x190 [mac80211] [<ffffffffa04ee502>] ieee80211_do_stop+0x132/0x540 [mac80211] [<ffffffff813466ff>] ? _raw_spin_unlock_bh+0x1f/0x30 [<ffffffff812b6923>] ? dev_deactivate+0x1c3/0x1e0 [<ffffffffa04ee925>] ieee80211_stop+0x15/0x20 [mac80211] [<ffffffff8129d1b6>] __dev_close+0x56/0x90 Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>