1. 17 3月, 2010 1 次提交
    • F
      ath9k: fix BUG_ON triggered by PAE frames · 4fdec031
      Felix Fietkau 提交于
      When I initially stumbled upon sequence number problems with PAE frames
      in ath9k, I submitted a patch to remove all special cases for PAE
      frames and let them go through the normal transmit path.
      Out of concern about crypto incompatibility issues, this change was
      merged instead:
      
      commit 6c8afef5
      Author: Sujith <Sujith.Manoharan@atheros.com>
      Date:   Tue Feb 9 10:07:00 2010 +0530
      
          ath9k: Fix sequence numbers for PAE frames
      
      After a lot of testing, I'm able to reliably trigger a driver crash on
      rekeying with current versions with this change in place.
      It seems that the driver does not support sending out regular MPDUs with
      the same TID while an A-MPDU session is active.
      This leads to duplicate entries in the TID Tx buffer, which hits the
      following BUG_ON in ath_tx_addto_baw():
      
          index  = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
          cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
      
          BUG_ON(tid->tx_buf[cindex] != NULL);
      
      I believe until we actually have a reproducible case of an
      incompatibility with another AP using no PAE special cases, we should
      simply get rid of this mess.
      
      This patch completely fixes my crash issues in STA mode and makes it
      stay connected without throughput drops or connectivity issues even
      when the AP is configured to a very short group rekey interval.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Cc: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4fdec031
  2. 11 3月, 2010 4 次提交
    • B
      ath5k: read eeprom IQ calibration values correctly for G mode · 5f13bfac
      Bruno Randolf 提交于
      we read the IQ correction values (i_cal and q_cal) for G mode from a wrong
      location (the same shifts as for A mode is applied which is incorrect). use
      correct locations, matching the docs and HAL sources.
      
      also we should write IQ correction only when we have that information in the
      EEPROM, starting from version 4. also write it in the same way as we do in the
      periodic recalibration (enable last), just to be sure.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      5f13bfac
    • B
      ath5k: fix I/Q calibration (for real) · 86415d43
      Bruno Randolf 提交于
      I/Q calibration was completely broken, resulting in a high number of CRC errors
      on received packets. before i could see around 10% to 20% CRC errors, with this
      patch they are between 0% and 3%.
      
      1.) the removal of the mask in commit "ath5k: Fix I/Q calibration
      (f1cf2dbd)" resulted in no mask beeing used
      when writing the I/Q values into the register. additional errors in the
      calculation of the values (see 2.) resulted too high numbers, exceeding the
      masks, so wrong values like 0xfffffffe were written. to be safe we should
      always use the bitmask when writing parts of a register.
      
      2.) using a (s32) cast for q_coff is a wrong conversion to signed, since we
      convert to a signed value later by substracting 128. this resulted in too low
      numbers for Q many times, which were limited to -16 by the boundary check later
      on.
      
      3.) checked everything against the HAL sources and took over comments and minor
      optimizations from there.
      
      4.) we can't use ENABLE_BITS when we want to write a number (the number can
      contain zeros). also always write the correction values first and set ENABLE
      bit last, like the HAL does.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Cc: stable@kernel.org
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      86415d43
    • B
      ath5k: fix TSF reset · a3b980fd
      Bruno Randolf 提交于
      to reset the TSF, AR5K_BEACON_RESET_TSF has to be 1, not 0. also we have a
      function for that so use it.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a3b980fd
    • B
      ath5k: use fixed antenna for tx descriptors · 8bd8beab
      Bruno Randolf 提交于
      when using a fixed antenna we should use the antenna number in all tx
      descriptors, otherwise the hardware will sometimes send the frame out on the
      other antenna. it seems like the hardware does not always respect the default
      antenna and diversity settings (esp.  AR5K_STA_ID1_DEFAULT_ANTENNA).
      
      also i would like to note that antenna diversity does not always work correctly
      on 5414 (at least) when only one antenna is connected: for example all frames
      might be received on antenna A but still the HW tries to send on antenna B some
      times, causing packet loss.
      
      this is both verified with the antenna statistics output of the previous patch
      and a spectrum analyzer.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Acked-by: NNick Kossifidis <mickflemm@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8bd8beab
  3. 07 3月, 2010 1 次提交
  4. 04 3月, 2010 1 次提交
    • S
      mac80211: Fix HT rate control configuration · 4fa00437
      Sujith 提交于
      Handling HT configuration changes involved setting the channel
      with the new HT parameters and then issuing a rate_update()
      notification to the driver.
      
      This behavior changed after the off-channel changes. Now, the channel
      is not updated with the new HT params in enable_ht() - instead, it
      is now done when the scan work terminates. This results in the driver
      depending on stale information, defaulting to non-HT mode always.
      
      Fix this by passing the new channel type to the driver.
      
      Cc: stable@kernel.org
      Signed-off-by: NSujith <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      4fa00437
  5. 03 3月, 2010 2 次提交
    • J
      ar9170: load firmware asynchronously · 53576517
      Johannes Berg 提交于
      This converts ar9170 to load firmware asynchronously
      out of ->probe() and only register with mac80211 when
      all firmware has been loaded successfully. If, on the
      other hand, any firmware fails to load, it will now
      unbind from the device.
      Signed-off-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      53576517
    • M
      ath9k: fix lockdep warning when unloading module · a9f042cb
      Ming Lei 提交于
      Since txq->axq_lock may be hold in softirq context, it must be
      acquired with spin_lock_bh() instead of spin_lock() if softieq is
      enabled.
      
      The patch fixes the lockdep warning below when unloading ath9k modules.
      
      =================================
      [ INFO: inconsistent lock state ]
      2.6.33-wl #12
      ---------------------------------
      inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
      rmmod/3642 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (&(&txq->axq_lock)->rlock){+.?...}, at: [<ffffffffa03568c3>] ath_tx_node_cleanup+0x62/0x180 [ath9k]
      {IN-SOFTIRQ-W} state was registered at:
        [<ffffffff8107577d>] __lock_acquire+0x2f6/0xd35
        [<ffffffff81076289>] lock_acquire+0xcd/0xf1
        [<ffffffff813a7486>] _raw_spin_lock_bh+0x3b/0x6e
        [<ffffffffa0356b49>] spin_lock_bh+0xe/0x10 [ath9k]
        [<ffffffffa0358ec7>] ath_tx_tasklet+0xcd/0x391 [ath9k]
        [<ffffffffa0354f5f>] ath9k_tasklet+0x70/0xc8 [ath9k]
        [<ffffffff8104e601>] tasklet_action+0x8c/0xf4
        [<ffffffff8104f459>] __do_softirq+0xf8/0x1cd
        [<ffffffff8100ab1c>] call_softirq+0x1c/0x30
        [<ffffffff8100c2cf>] do_softirq+0x4b/0xa3
        [<ffffffff8104f045>] irq_exit+0x4a/0x8c
        [<ffffffff813acccc>] do_IRQ+0xac/0xc3
        [<ffffffff813a7d53>] ret_from_intr+0x0/0x16
        [<ffffffff81302d52>] cpuidle_idle_call+0x9e/0xf8
        [<ffffffff81008be7>] cpu_idle+0x62/0x9d
        [<ffffffff81391c1a>] rest_init+0x7e/0x80
        [<ffffffff818bbd38>] start_kernel+0x3e8/0x3f3
        [<ffffffff818bb2bc>] x86_64_start_reservations+0xa7/0xab
        [<ffffffff818bb3b8>] x86_64_start_kernel+0xf8/0x107
      irq event stamp: 42037
      hardirqs last  enabled at (42037): [<ffffffff813a7b21>] _raw_spin_unlock_irqrestore+0x47/0x56
      hardirqs last disabled at (42036): [<ffffffff813a72f4>] _raw_spin_lock_irqsave+0x2b/0x88
      softirqs last  enabled at (42000): [<ffffffffa0353ea6>] spin_unlock_bh+0xe/0x10 [ath9k]
      softirqs last disabled at (41998): [<ffffffff813a7463>] _raw_spin_lock_bh+0x18/0x6e
      
      other info that might help us debug this:
      4 locks held by rmmod/3642:
       #0:  (rtnl_mutex){+.+.+.}, at: [<ffffffff8132c10d>] rtnl_lock+0x17/0x19
       #1:  (&wdev->mtx){+.+.+.}, at: [<ffffffffa01e53f2>] cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
       #2:  (&ifmgd->mtx){+.+.+.}, at: [<ffffffffa0260834>] ieee80211_mgd_deauth+0x3f/0x17e [mac80211]
       #3:  (&local->sta_mtx){+.+.+.}, at: [<ffffffffa025a381>] sta_info_destroy_addr+0x2b/0x5e [mac80211]
      
      stack backtrace:
      Pid: 3642, comm: rmmod Not tainted 2.6.33-wl #12
      Call Trace:
       [<ffffffff81074469>] valid_state+0x178/0x18b
       [<ffffffff81014f94>] ? save_stack_trace+0x2f/0x4c
       [<ffffffff81074e08>] ? check_usage_backwards+0x0/0x88
       [<ffffffff8107458f>] mark_lock+0x113/0x230
       [<ffffffff810757f1>] __lock_acquire+0x36a/0xd35
       [<ffffffff8101018d>] ? native_sched_clock+0x2d/0x5f
       [<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
       [<ffffffff81076289>] lock_acquire+0xcd/0xf1
       [<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
       [<ffffffff810732eb>] ? trace_hardirqs_off+0xd/0xf
       [<ffffffff813a7193>] _raw_spin_lock+0x36/0x69
       [<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
       [<ffffffffa03568c3>] ath_tx_node_cleanup+0x62/0x180 [ath9k]
       [<ffffffff810749ed>] ? trace_hardirqs_on+0xd/0xf
       [<ffffffffa0353950>] ath9k_sta_remove+0x22/0x26 [ath9k]
       [<ffffffffa025a08f>] __sta_info_destroy+0x1ad/0x38c [mac80211]
       [<ffffffffa025a394>] sta_info_destroy_addr+0x3e/0x5e [mac80211]
       [<ffffffffa02605d6>] ieee80211_set_disassoc+0x175/0x180 [mac80211]
       [<ffffffffa026084d>] ieee80211_mgd_deauth+0x58/0x17e [mac80211]
       [<ffffffff813a60c1>] ? __mutex_lock_common+0x37f/0x3a4
       [<ffffffffa01e53f2>] ? cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
       [<ffffffffa026786e>] ieee80211_deauth+0x1e/0x20 [mac80211]
       [<ffffffffa01f47f9>] __cfg80211_mlme_deauth+0x130/0x13f [cfg80211]
       [<ffffffffa01e53f2>] ? cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
       [<ffffffff810732eb>] ? trace_hardirqs_off+0xd/0xf
       [<ffffffffa01f7eee>] __cfg80211_disconnect+0x111/0x189 [cfg80211]
       [<ffffffffa01e5433>] cfg80211_netdev_notifier_call+0x2ce/0x46d [cfg80211]
       [<ffffffff813aa9ea>] notifier_call_chain+0x37/0x63
       [<ffffffff81068c98>] raw_notifier_call_chain+0x14/0x16
       [<ffffffff81322e97>] call_netdevice_notifiers+0x1b/0x1d
       [<ffffffff8132386d>] dev_close+0x6a/0xa6
       [<ffffffff8132395f>] rollback_registered_many+0xb6/0x2f4
       [<ffffffff81323bb8>] unregister_netdevice_many+0x1b/0x66
       [<ffffffffa026494f>] ieee80211_remove_interfaces+0xc5/0xd0 [mac80211]
       [<ffffffffa02580a2>] ieee80211_unregister_hw+0x47/0xe8 [mac80211]
       [<ffffffffa035290e>] ath9k_deinit_device+0x7a/0x9b [ath9k]
       [<ffffffffa035bc26>] ath_pci_remove+0x38/0x76 [ath9k]
       [<ffffffff8120940a>] pci_device_remove+0x2d/0x51
       [<ffffffff8129d797>] __device_release_driver+0x7b/0xd1
       [<ffffffff8129d885>] driver_detach+0x98/0xbe
       [<ffffffff8129ca7a>] bus_remove_driver+0x94/0xb7
       [<ffffffff8129ddd6>] driver_unregister+0x6c/0x74
       [<ffffffff812096d2>] pci_unregister_driver+0x46/0xad
       [<ffffffffa035bae1>] ath_pci_exit+0x15/0x17 [ath9k]
       [<ffffffffa035e1a2>] ath9k_exit+0xe/0x2f [ath9k]
       [<ffffffff8108050a>] sys_delete_module+0x1c7/0x236
       [<ffffffff813a7df5>] ? retint_swapgs+0x13/0x1b
       [<ffffffff810749b5>] ? trace_hardirqs_on_caller+0x119/0x144
       [<ffffffff8109b9f6>] ? audit_syscall_entry+0x11e/0x14a
       [<ffffffff81009bb2>] system_call_fastpath+0x16/0x1b
      wlan1: deauthenticating from 00:23:cd:e1:f9:b2 by local choice (reason=3)
      PM: Removing info for No Bus:wlan1
      cfg80211: Calling CRDA to update world regulatory domain
      PM: Removing info for No Bus:rfkill2
      PM: Removing info for No Bus:phy1
      ath9k 0000:16:00.0: PCI INT A disabled
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a9f042cb
  6. 27 2月, 2010 1 次提交
  7. 20 2月, 2010 4 次提交
  8. 17 2月, 2010 1 次提交
  9. 13 2月, 2010 1 次提交
  10. 11 2月, 2010 1 次提交
  11. 10 2月, 2010 2 次提交
  12. 09 2月, 2010 7 次提交
  13. 03 2月, 2010 1 次提交
  14. 02 2月, 2010 3 次提交
  15. 29 1月, 2010 1 次提交
  16. 28 1月, 2010 1 次提交
  17. 26 1月, 2010 2 次提交
  18. 23 1月, 2010 3 次提交
  19. 20 1月, 2010 3 次提交
    • F
      ath9k: fix beacon slot/buffer leak · 74401773
      Felix Fietkau 提交于
      When cleaning up beacon buffers and slots, ath9k currently checks if
      sc->ah->opmode is set to a beacon related mode before cleaning up
      buffers.
      An unfortunate ordering of interface up/down commands can lead to
      sc->ah->opmode being set to monitor mode, while there are AP interfaces
      present on the same wiphy.
      Always cleaning up beacon buffers if present fixes this issue.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Cc: stable@kernel.org
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      74401773
    • L
      ath9k: make tx power config changes take effect immediatley · c9f6a656
      Luis R. Rodriguez 提交于
      Users wishing to tweak tx power want it to happen immediately,
      try to respect that. This was tested by Lorenzo by measuring the
      received signal strength from an AP with ath9k and the patch.
      
      Changing the tx power on the AP produced these results:
      
      1) iwconfig wlan0 txpower 20 ---> Rx power -37dbm
      2) iwconfig wlan0 txpower 15 ---> Rx power -41dbm
      3) iwconfig wlan0 txpower 10 ---> Rx power -45dbm
      4) iwconfig wlan0 txpower 5 ---> Rx power -51dbm
      5) iwconfig wlan0 txpower 0 ---> Rx power -37dbm
      
      The result with 0 is an anomoly and would need to be
      addressed through a separate patch.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Tested-by: NLorenzo Bianconi <lorenzo.bianconi83@gmail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c9f6a656
    • F
      ath9k: fix RTS/CTS handling · 27032059
      Felix Fietkau 提交于
      The Tx DMA descriptor has two kinds of flags that select RTS/CTS usage.
      The first one (global for the frame) selects whether RTS/CTS or
      CTS-to-self should be used, the second one enables RTS/CTS or
      CTS-to-self usage for an individual multi-rate-retry entry.
      Previously the code preparing the descriptor only enabled the global
      flag, if the first MRR series selected the local one.
      Fix this by enabling the global flag if any of the MRR entries need it.
      With this patch, rate control can properly select the use of RTS/CTS
      for all MRR entries except the first one, which is the default behavior.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      27032059