1. 15 3月, 2011 1 次提交
    • F
      ath9k: improve reliability of beacon transmission and stuck beacon handling · efff395e
      Felix Fietkau 提交于
      ath9k calls ath9k_hw_stoptxdma every time it sends a beacon, however there
      is not much point in doing that if the previous beacon and mcast traffic
      went out properly. On AR9380, calling that function too often can result
      in an increase of stuck beacons due to differences in the handling of the
      queue enable/disable functionality.
      
      With this patch, the queue will only be explicitly stopped if the previous
      data frames were not sent successfully. With the beacon code being the
      only remaining user of ath9k_hw_stoptxdma, this function can be simplified
      in order to remove the now pointless attempts at waiting for transmission
      completion, which would never happen at this point due to the different
      method of tx scheduling of the beacon queue.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      efff395e
  2. 15 2月, 2011 1 次提交
  3. 10 2月, 2011 1 次提交
  4. 08 2月, 2011 1 次提交
  5. 29 1月, 2011 2 次提交
  6. 22 1月, 2011 1 次提交
  7. 20 1月, 2011 1 次提交
  8. 05 1月, 2011 1 次提交
  9. 08 12月, 2010 2 次提交
  10. 01 12月, 2010 1 次提交
  11. 18 11月, 2010 1 次提交
  12. 16 11月, 2010 1 次提交
    • F
      ath9k: rework tx queue selection and fix queue stopping/waking · 066dae93
      Felix Fietkau 提交于
      The current ath9k tx queue handling code showed a few issues that could
      lead to locking issues, tx stalls due to stopped queues, and maybe even
      DMA issues.
      
      The main source of these issues is that in some places the queue is
      selected via skb queue mapping in places where this mapping may no
      longer be valid. One such place is when data frames are transmitted via
      the CAB queue (for powersave buffered frames). This is made even worse
      by a lookup WMM AC values from the assigned tx queue (which is
      undefined for the CAB queue).
      
      This messed up the pending frame counting, which in turn caused issues
      with queues getting stopped, but not woken again.
      
      To fix these issues, this patch removes an unnecessary abstraction
      separating a driver internal queue number from the skb queue number
      (not to be confused with the hardware queue number).
      
      It seems that this abstraction may have been necessary because of tx
      queue preinitialization from the initvals. This patch avoids breakage
      here by pushing the software <-> hardware queue mapping to the function
      that assigns the tx queues and redefining the WMM AC definitions to
      match the numbers used by mac80211 (also affects ath9k_htc).
      
      To ensure consistency wrt. pending frame count tracking, these counters
      are moved to the ath_txq struct, updated with the txq lock held, but
      only where the tx queue selected by the skb queue map actually matches
      the tx queue used by the driver for the frame.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Reported-by: NBjörn Smedman <bjorn.smedman@venatech.se>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      066dae93
  13. 10 11月, 2010 1 次提交
    • F
      ath9k_hw: optimize interrupt mask changes · 4df3071e
      Felix Fietkau 提交于
      OProfile showed that ath9k was spending way too much time in
      ath9k_hw_set_interrupts. Since most of the interrupt mask changes only
      need to globally enable/disable interrupts, it makes sense to split
      this part into separate functions, replacing all calls to
      ath9k_hw_set_interrupts(ah, 0) with ath9k_hw_disable_interrupts(ah).
      
      ath9k_hw_set_interrupts(ah, ah->imask) only gets changed to
      ath9k_hw_enable_interrupts(ah), whenever ah->imask was not changed
      since the point where interrupts were disabled.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4df3071e
  14. 26 10月, 2010 1 次提交
  15. 16 10月, 2010 2 次提交
  16. 17 8月, 2010 2 次提交
    • F
      ath9k: use AP beacon miss as a trigger for fast recalibration · 70cf1533
      Felix Fietkau 提交于
      When beacons get stuck in AP mode, the most likely cause is interference.
      Such interference can often go on for a while, and too many consecutive
      beacon misses can lead to connected clients getting dropped.
      
      Since connected clients might not be subjected to the same interference
      if that happens to be very local, the AP should try to deal with it as
      good as it can. One way to do this is to trigger an NF calibration with
      automatic baseband update right after the beacon miss. In my tests with
      very strong interference, this allowed the AP to continue transmitting
      beacons after only 2-3 misses, which allows a normal client to stay
      connected.
      
      With some of the newer - really sensitive - chips, the maximum noise
      floor limit is very low, which can be problematic during very strong
      interference. To avoid an endless loop of stuck beacons -> nfcal ->
      periodic calibration -> stuck beacons, the beacon miss event also sets
      a flag, which allows the calibration code to bypass the chip specific
      maximum NF value. This flag is automatically cleared, as soon as the
      first NF median goes back below the limits for all chains.
      
      In my tests, this allowed an ath9k AP to survive very strong interference
      (measured NF: -68, or sometimes even higher) without losing connectivity
      to its clients. Even under these conditions, I was able to transmit
      several mbits/s through the interface.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      70cf1533
    • F
      ath9k: add a separate debug level for stuck beacons · 6252fcb9
      Felix Fietkau 提交于
      Stuck beacons are a useful indicator for debugging various PHY
      issues such as calibration. Putting them on the same debug level
      as the other beacon stuff makes it hard to spot them in huge amounts
      of spam.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6252fcb9
  17. 15 6月, 2010 1 次提交
  18. 25 5月, 2010 2 次提交
  19. 17 4月, 2010 2 次提交
  20. 07 4月, 2010 1 次提交
  21. 20 2月, 2010 1 次提交
    • F
      ath9k: fix beacon timer restart after a card reset · d8728ee9
      Felix Fietkau 提交于
      In AP mode, ath_beacon_config_ap only restarts the timer if a TSF
      restart is requested. Apparently this was added, because this function
      unconditionally sets the flag for TSF reset.
      
      The problem with this is, that ath9k_hw_reset() clobbers the timer
      registers (specified in the initvals), thus effectively disabling the
      SWBA interrupt whenever a card reset without TSF reset is issued
      (happens in a few places in the code).
      
      This patch fixes ath_beacon_config_ap to only issue the TSF reset flag
      when necessary, but reinitialize the timer unconditionally. Tests show,
      that this is enough to keep the SWBA interrupt going after a call to
      ath_reset()
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Cc: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      d8728ee9
  22. 17 2月, 2010 1 次提交
  23. 09 2月, 2010 1 次提交
  24. 16 1月, 2010 1 次提交
  25. 29 11月, 2009 2 次提交
  26. 08 10月, 2009 5 次提交
  27. 11 7月, 2009 1 次提交
  28. 04 6月, 2009 2 次提交
    • J
      ath9k: Add sanity check for beacon_int in adhoc/mesh case · 546256fb
      Jouni Malinen 提交于
      It looks like mac80211 can request the driver to start beaconing with
      a beacon interval of zero in some cases (at least for mesh point). This
      does not sound correct and something may need to be fixed in
      mac80211. However, taken into account the unpleasantness of getting
      stuck in an infinite busy loop with rtnl_lock held, let's add a quick
      workaround in the driver to avoid the worst symptom while someone more
      familiar with the mesh implementation can figure out what should be done
      with mac80211 as far as beacon interval configuration is concerned.
      Signed-off-by: NJouni Malinen <jouni.malinen@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      546256fb
    • J
      ath9k: Reset SC_OP_TSF_RESET flag after stuck beacon · b74444f8
      Jeff Hansen 提交于
      I have a TrendNet 652-BRP running OpenWRT + ath9k very well.  The only
      problem is that the beacon gets stuck maybe once a day.  After
      Vasanthakumar Thiagarajan's "ath9k: cleanup beacon parameters
      configuration" patch, ath9k would nearly re-configure the beacons after it
      detected the stuck beacon, and did a reset.  But it would fail the
      SC_OP_TSF_RESET check in ath_beacon_config_ap.  This patch gets the beacon
      fully reconfigured after the reset.
      Signed-off-by: NJeff Hansen <x@jeffhansen.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      b74444f8