1. 21 Sep, 2010 1 commit
  2. 16 Sep, 2010 1 commit
    • Luis R. Rodriguez's avatar
      ath9k: fix enabling ANI / tx monitor after bg scan · 48a6a468
      Luis R. Rodriguez authored
      ath9k's entire logic with SC_OP_SCANNING is incorrect due to the
      way mac80211 currently implements the scan complete callback and
      we handle it in ath9k. This patch removes the flag completely in
      preference for the SC_OP_OFFCHANNEL which is really what we wanted.
      The scanning flag was used to ensure we reset ANI to the old values
      when we go back to the home channel, but if we are offchannel we
      use some defaults. The flag was also used to re-enable the TX monitor.
      Without this patch we simply never re-enabled ANI and the TX monitor
      after going offchannel. This means that after one background
      scan we are prone to noise issues and if we had a TX hang we would
      not recover. To get this to work properly we must enable ANI after
      we have configured the beacon timers, otherwise hardware acts really
      This patch has stable fixes which apply down to [2.6.36+], there
      *may* be a to fix this on older kernels but requires a bit of
      work since this patch relies on the new mac80211 flag
      IEEE80211_CONF_OFFCHANNEL which was introduced as of 2.6.36.
      Cc: stable@kernel.org
      Cc: Paul Stewart <pstew@google.com>
      Cc: Amod Bodas <amod.bodas@atheros.com>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  3. 14 Sep, 2010 1 commit
    • Felix Fietkau's avatar
      ath9k: fix BSSID mask calculation · 31a01645
      Felix Fietkau authored
      At the time the .add_interface driver op is called, the interface has not
      been marked as running yet, so ieee80211_iterate_active_interfaces will
      not pass it to the iterator function.
      Because of this, the calculated BSSID mask is wrong, which breaks multi-BSS
      Additionally, the current way of comparing all addresses against each other
      is pointless, as the hardware only uses the hardware MAC address and the BSSID
      mask for matching the destination address, so all the address array
      reallocation is completely unnecessary.
      This patch simplifies the logic by setting the initial mask bytes to 0xff
      and removing all bits in the iterator call that don't match the hardware MAC
      address. It also calls the iterator for the vif that was passed to
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Tested-by: default avatarBen Greear <greearb@candelatech.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  4. 07 Sep, 2010 1 commit
  5. 24 Aug, 2010 1 commit
  6. 16 Aug, 2010 1 commit
  7. 04 Aug, 2010 2 commits
    • Felix Fietkau's avatar
      ath9k_hw: clean up per-channel calibration data · 20bd2a09
      Felix Fietkau authored
      The noise floor history buffer is currently not kept per channel, which
      can lead to problems when changing channels from a clean channel to a
      noisy one. Also when switching from HT20 to HT40, the noise floor
      history buffer is full of measurements, but none of them contain data
      for the extension channel, which it needs quite a bit of time to recover
      This patch puts all the per-channel calibration data into a single data
      structure, and gives the the driver control over whether that is used
      per-channel or even not used for some channels.
      For ath9k_htc, I decided to keep this per-channel in order to avoid
      creating regressions.
      For ath9k, the data is kept only for the operating channel, which saves
      some space. ath9k_hw takes care of wiping old data when the operating
      channel or its channel flags change.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Felix Fietkau's avatar
      ath9k: prevent calibration during off-channel activity · 5ee08656
      Felix Fietkau authored
      Previously the software scan callback was used to indicate to the hardware,
      when it was safe to calibrate. This didn't really work properly, because it
      depends on a specific order of software scan callbacks vs. channel changes.
      Also, software scans are not the only thing that triggers off-channel
      activity, so it's better to use the newly added indication from mac80211 for
      this and not use the software scan callback for anything calibration related.
      This fixes at least some of the invalid noise floor readings that I've seen
      in AP mode on AR9160
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  8. 26 Jul, 2010 1 commit
  9. 02 Jul, 2010 1 commit
  10. 24 Jun, 2010 2 commits
  11. 23 Jun, 2010 2 commits
    • Vasanthakumar Thiagarajan's avatar
      ath9k: Fix bug in starting ani · 6c3118e2
      Vasanthakumar Thiagarajan authored
      There are few places where ANI is started without checking
      if it is right to start. This might lead to a case where ani
      timer would be left undeleted and cause improper memory acccess
      during module unload. This bug is clearly exposed with
      paprd support where the driver detects tx hang and does a
      chip reset. During this reset ani is (re)started without checking
      if it needs to be started. This would leave a timer scheduled
      even after all the resources are freed and cause a panic.
      This patch introduces a bit in sc_flags to indicate if ani
      needs to be started in sw_scan_start() and ath_reset().
      This would fix the following panic. This issue is easily seen
      with ar9003 + paprd.
       BUG: unable to handle kernel paging request at 0000000000003f38
      [<ffffffff81075391>] ? __queue_work+0x41/0x50
      [<ffffffff8106afaa>] run_timer_softirq+0x17a/0x370
      [<ffffffff81088be8>] ? tick_dev_program_event+0x48/0x110
      [<ffffffff81061f69>] __do_softirq+0xb9/0x1f0
      [<ffffffff810ba060>] ? handle_IRQ_event+0x50/0x160
      [<ffffffff8100af5c>] call_softirq+0x1c/0x30
      [<ffffffff8100c9f5>] do_softirq+0x65/0xa0
      [<ffffffff81061e25>] irq_exit+0x85/0x90
      [<ffffffff8155e095>] do_IRQ+0x75/0xf0
      [<ffffffff815570d3>] ret_from_intr+0x0/0x11
      [<ffffffff812fd67b>] ? acpi_idle_enter_simple+0xe4/0x119
      [<ffffffff812fd674>] ? acpi_idle_enter_simple+0xdd/0x119
      [<ffffffff81441c87>] cpuidle_idle_call+0xa7/0x140
      [<ffffffff81008da3>] cpu_idle+0xb3/0x110
      [<ffffffff81550722>] start_secondary+0x1ee/0x1f5
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Vivek Natarajan's avatar
      ath9k: Add a module parameter to disable led blinking. · 9a75c2ff
      Vivek Natarajan authored
      Some vendors require the LED to be ON always irrespective of any
      radio activity. Introducing a module parameter to disable blinking,
      so that one can choose between always on or led blink during
      Signed-off-by: default avatarVivek Natarajan <vnatarajan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  12. 14 Jun, 2010 7 commits
    • Felix Fietkau's avatar
    • Felix Fietkau's avatar
      ath9k: fix queue stopping threshold · 97923b14
      Felix Fietkau authored
      ath9k tries to prevent WMM queue tx buffer starvation caused by
      traffic on different queues by limiting the number of pending frames
      in a tx queue (tracked in the ath_buf structure). This had a leak
      issue, because the a skb can be reassigned to a different ath_buf
      in the tx path, causing the pending frame counter to become inaccurate.
      To fix this, track the number of frames in an array in the softc,
      using the mac80211 queue mapping as index.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Felix Fietkau's avatar
    • Felix Fietkau's avatar
    • Felix Fietkau's avatar
    • Felix Fietkau's avatar
      ath9k: fix mac80211 queue lookup for waking up queues · 293f2ba8
      Felix Fietkau authored
      ath_get_mac80211_qnum() expects the queue 'subtype'
      (internal ID for the WMM AC) as argument when looking up
      the mac80211 queue, however ath_wake_mac80211_queue provides
      txq->axq_qnum instead, which contains the hardware queue
      number. Fix this by keeping track of the WMM class ID in
      the txq data structure.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Cc: stable@kernel.org
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Luis R. Rodriguez's avatar
      ath9k: add new ANI implementation for AR9003 · e36b27af
      Luis R. Rodriguez authored
      This adds support for ANI for AR9003. The implementation for
      ANI for AR9003 is slightly different than the one used for
      the older chipset families. It can technically be used for
      the older families as well but this is not yet fully tested
      so we only enable the new ANI for the AR5008, AR9001 and AR9002
      families with a module parameter, force_new_ani.
      The old ANI implementation is left intact.
      Details of the new ANI implemention:
        * ANI adjustment logic is now table driven so that each ANI level
          setting is parameterized. This makes adjustments much more
          deterministic than the old procedure based logic and allows
          adjustments to be made incrementally to several parameters per
        * ANI register settings are now relative to INI values; so ANI
          param zero level == INI value. Appropriate floor and ceiling
          values are obeyed when adjustments are combined with INI values.
        * ANI processing is done once per second rather that every 100ms.
          The poll interval is now a set upon hardware initialization and
          can be picked up by the core driver.
        * OFDM error and CCK error processing are made in a round robin
          fashion rather than allowing all OFDM adjustments to be made
          before CCK adjustments.
        * ANI adjusts MRC CCK off in the presence of high CCK errors
        * When adjusting spur immunity (SI) and OFDM weak signal detection,
          ANI now sets register values for the extension channel too
        * When adjusting FIR step (ST), ANI now sets register for FIR step
          low too
        * FIR step adjustments now allow for an extra level of immunity for
          extremely noisy environments
        * The old Noise immunity setting (NI), which changes coarse low, size
          desired, etc have been removed. Changing these settings could affect
          up RIFS RX as well.
        * CCK weak signal adjustment is no longer used
        * ANI no longer enables phy error interrupts; in all cases phy hw
          counting registers are used instead
        * The phy error count (overflow) interrupts are also no longer used
          for ANI adjustments. All ANI adjustments are made via the polling
          routine and no adjustments are possible in the ISR context anymore
        * A history settings buffer is now correctly used for each channel;
          channel settings are initialized with the defaults but later
          changes are restored when returning back to that channel
        * When scanning, ANI is disabled settings are returned to (INI) defaults.
        * OFDM phy error thresholds are now 400 & 1000 (errors/second units) for
          low/high water marks, providing increased stability/hysteresis when
          changing levels.
        * Similarly CCK phy error thresholds are now 300 & 600 (errors/second)
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  13. 03 Jun, 2010 1 commit
    • Felix Fietkau's avatar
      ath9k: fix queue stop/start based on the number of pending frames · 84642d6b
      Felix Fietkau authored
      Because there is a limited number of tx buffers available, once the
      queue has been filled to a certain point, ath9k needs to stop accepting
      new frames from mac80211. In order to prevent a full WMM queue from
      stopping another queue with fewer frames, this patch limits the number
      of queued frames to a quarter of the total available tx buffers, minus
      some reserved frames to be used for other purposes (e.g. beacons).
      Because tx buffers are reserved for frames when they're staged in
      software queues as well, the actual queue depth cannot be used for
      this, so this patch stores a reference to the tx queue in the ath_buf
      struct and keeps track of the total number of pending frames.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  14. 02 Jun, 2010 1 commit
  15. 16 Apr, 2010 4 commits
  16. 06 Apr, 2010 1 commit
  17. 31 Mar, 2010 1 commit
  18. 08 Feb, 2010 1 commit
  19. 01 Feb, 2010 1 commit
  20. 29 Jan, 2010 1 commit
  21. 22 Jan, 2010 1 commit
  22. 12 Jan, 2010 4 commits
  23. 04 Jan, 2010 1 commit
  24. 22 Dec, 2009 1 commit
  25. 28 Nov, 2009 1 commit