1. 05 1月, 2011 15 次提交
    • M
      Revert "ath9k: Parse DTIM period from mac80211" · bd8027a7
      Mohammed Shafi Shajakhan 提交于
      This reverts commit 0ce3bcfc.
      
      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: NMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bd8027a7
    • F
      ath9k_hw: fix dma descriptor rx error bit parsing · 1c30cc19
      Felix Fietkau 提交于
      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: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1c30cc19
    • S
      ath9k_htc: Move LED/RFKILL code to htc_drv_gpio.c · 1e1f4ad2
      Sujith Manoharan 提交于
      And add the copyright/license header.
      Signed-off-by: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1e1f4ad2
    • S
      ath9k_htc: Fix fast channel change · 039a0721
      Sujith Manoharan 提交于
      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: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      039a0721
    • S
      ath9k_htc: Handle FATAL events · 73908674
      Sujith Manoharan 提交于
      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: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      73908674
    • S
      ath9k_htc: Move work cancellation outside of mutex · 66e35474
      Sujith Manoharan 提交于
      There is no need to lock the various work cancellation
      calls. This will be helpful when handling FATAL events.
      Signed-off-by: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      66e35474
    • S
      ath9k_htc: Handle pending URBs properly · ff8f59b5
      Sujith Manoharan 提交于
      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: NSujith Manoharan <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ff8f59b5
    • M
      ath9k: Few clean ups in beacon config parameters · ee832d3e
      Mohammed Shafi Shajakhan 提交于
      Some minor clean ups in assigning values to beacon config parameters
      Signed-off-by: NMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ee832d3e
    • C
      carl9170: fix usb pm suspend->resume woes · 97e2c402
      Christian Lamparter 提交于
      This patch revamps some common code-paths which are
      shared between (re-)initialization and suspend/resume
      subroutines. It also adds some helpful comments
      about quirks and associated difficulties.
      
      It's quite big, but it should fix #25382:
      <https://bugzilla.kernel.org/show_bug.cgi?id=25382>
      
      And hopefully the code is robust enough to deal with
      all possible suspend/resume scenarios without requiring
      the user to do any sort of manual and possibly
      dangerous work.
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      97e2c402
    • C
      carl9170: reduce channel change delay · 3b386510
      Christian Lamparter 提交于
      By removing two "safety" msleeps (and an echo nop), the
      channel change delay is effectively halved. Previously,
      the delay could be as long as 260 ms and the device
      could not go off-channel without risking to miss the
      next DTIM beacon [interval ~307 ms].
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3b386510
    • C
      carl9170: add missing return-value check · c9e57f0f
      Christian Lamparter 提交于
      This patch adds a forgotten bail-out path.
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c9e57f0f
    • B
      ath5k: fix cycle counter inconsistent locking · bb007554
      Bob Copeland 提交于
      ath5k_reset is called from process context and takes the cc_lock
      with plain spin_lock(), but cc_lock can also be taken from tasklets
      in softirq context.  Thus we need to at least use spin_lock_bh.
      
      This fixes the following lockdep warning:
      
      [   19.967874] sky2 0000:01:00.0: eth0: enabling interface
      [   19.982761] ieee80211 phy0: device now idle
      [   20.904809] NET: Registered protocol family 17
      [   21.243857] ieee80211 phy0: device no longer idle - scanning
      [   21.404343]
      [   21.404346] =================================
      [   21.404450] [ INFO: inconsistent lock state ]
      [   21.404518] 2.6.37-rc7-wl+ #242
      [   21.404582] ---------------------------------
      [   21.404650] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
      [   21.404721] kworker/u:4/982 [HC0[0]:SC1[3]:HE1:SE0] takes:
      [   21.404792]  (&(&common->cc_lock)->rlock){+.?...}, at: [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
      [   21.405011] {SOFTIRQ-ON-W} state was registered at:
      [   21.405011]   [<c105cadd>] __lock_acquire+0x62f/0x13c1
      [   21.405011]   [<c105d944>] lock_acquire+0xd5/0xf1
      [   21.405011]   [<c12c978d>] _raw_spin_lock+0x45/0x72
      [   21.405011]   [<f8111533>] ath5k_reset+0x2c0/0x349 [ath5k]
      [   21.405011]   [<f8111a7a>] ath5k_start+0xb8/0x139 [ath5k]
      [   21.405011]   [<f849c714>] ieee80211_do_open+0x13f/0x819 [mac80211]
      [   21.405011]   [<f849ce51>] ieee80211_open+0x63/0x66 [mac80211]
      [   21.405011]   [<c1258b2e>] __dev_open+0x8d/0xb6
      [   21.405011]   [<c1255c64>] __dev_change_flags+0x9d/0x114
      [   21.405011]   [<c1258a75>] dev_change_flags+0x18/0x44
      [   21.405011]   [<c1262990>] do_setlink+0x23f/0x521
      [   21.405011]   [<c1262d58>] rtnl_setlink+0xe6/0xea
      [   21.405011]   [<c126347c>] rtnetlink_rcv_msg+0x18a/0x1a0
      [   21.405011]   [<c126d5f0>] netlink_rcv_skb+0x35/0x7b
      [   21.405011]   [<c12632eb>] rtnetlink_rcv+0x20/0x27
      [   21.405011]   [<c126d370>] netlink_unicast+0x1bb/0x21e
      [   21.405011]   [<c126db21>] netlink_sendmsg+0x23b/0x288
      [   21.405011]   [<c124823c>] sock_sendmsg+0xac/0xc4
      [   21.405011]   [<c1248680>] sys_sendmsg+0x152/0x1a2
      [   21.405011]   [<c1249b0d>] sys_socketcall+0x214/0x275
      [   21.405011]   [<c10029d0>] sysenter_do_call+0x12/0x36
      [   21.405011] irq event stamp: 138032
      [   21.405011] hardirqs last  enabled at (138032): [<c12ca252>] _raw_spin_unlock_irqrestore+0x3b/0x5e
      [   21.405011] hardirqs last disabled at (138031): [<c12c98cc>] _raw_spin_lock_irqsave+0x18/0x7e
      [   21.405011] softirqs last  enabled at (138024): [<f84a570e>] ieee80211_tx_skb+0x47/0x49 [mac80211]
      [   21.405011] softirqs last disabled at (138027): [<c100452b>] do_softirq+0x63/0xb4
      [   21.405011]
      [   21.405011] other info that might help us debug this:
      [   21.405011] 3 locks held by kworker/u:4/982:
      [   21.405011]  #0:  (name){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
      [   21.405011]  #1:  ((&(&local->scan_work)->work)){+.+.+.}, at: [<c1046158>] process_one_work+0x1b8/0x41b
      [   21.405011]  #2:  (&local->mtx){+.+.+.}, at: [<f84920fb>] ieee80211_scan_work+0x32/0x4a4 [mac80211]
      [   21.405011]
      [   21.405011] stack backtrace:
      [   21.405011] Pid: 982, comm: kworker/u:4 Not tainted 2.6.37-rc7-wl+ #242
      [   21.405011] Call Trace:
      [   21.405011]  [<c12c6e68>] ? printk+0x1d/0x25
      [   21.405011]  [<c105a742>] print_usage_bug+0x181/0x18b
      [   21.405011]  [<c105b196>] ? check_usage_forwards+0x0/0xb6
      [   21.405011]  [<c105a9ec>] mark_lock+0x2a0/0x4aa
      [   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
      [   21.405011]  [<c105ca68>] __lock_acquire+0x5ba/0x13c1
      [   21.405011]  [<c1059eed>] ? trace_hardirqs_off_caller+0x18/0x8d
      [   21.405011]  [<c1059f6d>] ? trace_hardirqs_off+0xb/0xd
      [   21.405011]  [<c1050411>] ? local_clock+0x2c/0x4f
      [   21.405011]  [<c1059e00>] ? save_trace+0x2/0xa0
      [   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
      [   21.405011]  [<c12ca252>] ? _raw_spin_unlock_irqrestore+0x3b/0x5e
      [   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
      [   21.405011]  [<c105d944>] lock_acquire+0xd5/0xf1
      [   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
      [   21.405011]  [<c12c9b1a>] _raw_spin_lock_bh+0x4a/0x77
      [   21.405011]  [<f8115780>] ? ath5k_ani_calibration+0x29/0x5d9 [ath5k]
      [   21.405011]  [<f8115780>] ath5k_ani_calibration+0x29/0x5d9 [ath5k]
      [   21.405011]  [<c105ac39>] ? mark_held_locks+0x43/0x5b
      [   21.405011]  [<f8113496>] ath5k_tasklet_ani+0x1d/0x27 [ath5k]
      [   21.405011]  [<c1037304>] tasklet_action+0x96/0x137
      [   21.405011]  [<c10379b5>] __do_softirq+0xde/0x1c3
      [   21.405011]  [<c10b0cef>] ? arch_get_unmapped_area_topdown+0x3b/0x127
      [   21.405011]  [<c10378d7>] ? __do_softirq+0x0/0x1c3
      [   21.405011]  <IRQ>  [<c1036dee>] ? irq_exit+0x3d/0x49
      [   21.405011]  [<c1003b4f>] ? do_IRQ+0x98/0xac
      [   21.405011]  [<c1002eee>] ? common_interrupt+0x2e/0x34
      [   21.405011]  [<c103007b>] ? sys_unshare+0x57/0x226
      [   21.405011]  [<c1047fee>] ? queue_delayed_work+0x1/0x27
      [   21.405011]  [<f84a83a0>] ? ieee80211_queue_delayed_work+0x2e/0x33 [mac80211]
      [   21.405011]  [<f8492528>] ? ieee80211_scan_work+0x45f/0x4a4 [mac80211]
      [   21.405011]  [<c104620e>] ? process_one_work+0x26e/0x41b
      [   21.405011]  [<c1046158>] ? process_one_work+0x1b8/0x41b
      [   21.405011]  [<f84920c9>] ? ieee80211_scan_work+0x0/0x4a4 [mac80211]
      [   21.405011]  [<c10466b6>] ? worker_thread+0x18a/0x2a5
      [   21.405011]  [<c12ca25e>] ? _raw_spin_unlock_irqrestore+0x47/0x5e
      [   21.405011]  [<c104652c>] ? worker_thread+0x0/0x2a5
      [   21.405011]  [<c104abe7>] ? kthread+0x67/0x6c
      [   21.405011]  [<c104ab80>] ? kthread+0x0/0x6c
      [   21.405011]  [<c1002efa>] ? kernel_thread_helper+0x6/0x10
      Signed-off-by: NBob Copeland <me@bobcopeland.com>
      Acked-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bb007554
    • B
      ath9k: fix spur mitigation no-spur case for AR9002 · 44cefead
      Brian Prodoehl 提交于
      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: NBrian Prodoehl <bprodoehl@nomadio.net>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      44cefead
    • S
      ath9k: spin_lock_bh is not required within tasklet context. · 52671e43
      Senthil Balasubramanian 提交于
      Disabling BH is not required while running from a tasklet context
      and so replace spin_lock_bh with just spin_lock.
      Signed-off-by: NSenthil Balasubramanian <senthilkumar@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      52671e43
    • B
      ath5k: Move mac80211 functions into new file · cd2c5486
      Bruno Randolf 提交于
      Move mac80211 functions into new file mac80211-ops.c to have a better
      separation and to make base.c smaller.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      cd2c5486
  2. 23 12月, 2010 13 次提交
  3. 21 12月, 2010 6 次提交
  4. 17 12月, 2010 6 次提交
    • B
      ath5k: Fix survey · f15a4bb2
      Bruno Randolf 提交于
      The old survey implementation was broken and returned nonsense data.
      
      Clear cycle counters and survey data on reset. Since the cycle counters easily
      overflow it's better to keep a local version of collected survey data (in ms
      resolution, instead of clockrate) and update this every time survey is
      retrieved. If survey is retrieved often enough to avoid cycle counter overflows
      this works fine, otherwise we could update survey more often, like ath9k does.
      Still only the survey for the current channel is kept.
      Signed-off-by: NBruno Randolf <br1@einfach.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f15a4bb2
    • L
      ath: fix NULL pointer dereference on reg_notifier() · 931299cf
      Luis R. Rodriguez 提交于
      The reg_notifier() was recently updated as being capable of
      having the request passed as NULL, fix ath to follow this API
      change. Without this we end up oopsing:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
      IP: [<ffffffffa02fb8cb>] ath_reg_notifier_apply+0x5b/0xa0 [ath]
      PGD b4c4c067 PUD b4c4d067 PMD 0
      Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
      last sysfs file: /sys/devices/pci0000:00/0000:00:1b.0/uevent
      CPU 1
      Modules linked in: <etc>
      Pid: 436, comm: modprobe Not tainted 2.6.37-rc5-wl+ #36 6460DWU/6460DWU
      RIP: 0010:[<ffffffffa02fb8cb>]  [<ffffffffa02fb8cb>] ath_reg_notifier_apply+0x5b/0xa0 [ath]
      RSP: 0018:ffff8800b6f6baa8  EFLAGS: 00010246
      RAX: ffff8800b527b254 RBX: ffff8800b532c180 RCX: 0000000000000018
      RDX: ffff8800b530c108 RSI: 0000000000000000 RDI: ffff8800b532c180
      RBP: ffff8800b6f6baa8 R08: ffff8800b532f268 R09: 0000000000000235
      R10: 00000000000016ad R11: 0000000000000018 R12: 0000000000000000
      R13: 0000000000000016 R14: ffff8800b532f268 R15: 0000000000000011
      FS:  00007f0c53104700(0000) GS:ffff8800bed00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000000004 CR3: 00000000b6531000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process modprobe (pid: 436, threadinfo ffff8800b6f6a000, task ffff8800b404dc40)
      Stack:
       ffff8800b6f6bac8 ffffffffa03ea651 ffff8800b532c180 ffff8800b527b254
       ffff8800b6f6bb38 ffffffffa01835ca ffffffffa019ed00 00000000a019ed80
       0000000000000002 ffff880000000002 ffffffffa0366140 0000000010aee572
      Call Trace:
       [<ffffffffa03ea651>] ath9k_reg_notifier+0x41/0x50 [ath9k]
       [<ffffffffa01835ca>] wiphy_update_regulatory+0x4ba/0x5a0 [cfg80211]
       [<ffffffffa0366140>] ? ieee80211_register_hw+0xa0/0x5b0 [mac80211]
       [<ffffffffa0366140>] ? ieee80211_register_hw+0xa0/0x5b0 [mac80211]
       [<ffffffffa017f994>] wiphy_register+0x1d4/0x360 [cfg80211]
       [<ffffffff8114b918>] ? __kmalloc+0x108/0x1c0
       [<ffffffffa0366223>] ieee80211_register_hw+0x183/0x5b0 [mac80211]
       [<ffffffffa03eb49b>] ath9k_init_device+0x66b/0x850 [ath9k]
       [<ffffffffa03f9dd6>] ath_pci_probe+0x2f6/0x3c0 [ath9k]
       [<ffffffff81037529>] ? default_spin_lock_flags+0x9/0x10
       [<ffffffff812e19cf>] local_pci_probe+0x5f/0xd0
       [<ffffffff812e2bf1>] pci_device_probe+0x101/0x120
       [<ffffffff81390aca>] ? driver_sysfs_add+0x7a/0xb0
       [<ffffffff81390c26>] driver_probe_device+0x96/0x1c0
       [<ffffffff81390deb>] __driver_attach+0x9b/0xa0
       [<ffffffff81390d50>] ? __driver_attach+0x0/0xa0
       [<ffffffff81390008>] bus_for_each_dev+0x68/0x90
       [<ffffffff81390a4e>] driver_attach+0x1e/0x20
       [<ffffffff81390309>] bus_add_driver+0xe9/0x290
       [<ffffffffa0407000>] ? ath9k_init+0x0/0x4d [ath9k]
       [<ffffffff81391130>] driver_register+0x80/0x150
       [<ffffffffa0407000>] ? ath9k_init+0x0/0x4d [ath9k]
       [<ffffffffa0407000>] ? ath9k_init+0x0/0x4d [ath9k]
       [<ffffffff812e2e76>] __pci_register_driver+0x56/0xd0
       [<ffffffffa03f9ec3>] ath_pci_init+0x23/0x30 [ath9k]
       [<ffffffffa040702b>] ath9k_init+0x2b/0x4d [ath9k]
       [<ffffffff81002053>] do_one_initcall+0x43/0x190
       [<ffffffff8109fb5b>] sys_init_module+0xbb/0x200
       [<ffffffff8100c042>] system_call_fastpath+0x16/0x1b
      Code: <who even reads this anyway? haha, ok you do>
      RIP  [<ffffffffa02fb8cb>] ath_reg_notifier_apply+0x5b/0xa0 [ath]
       RSP <ffff8800b6f6baa8>
      CR2: 0000000000000004
      ---[ end trace 6d03d3c7eda9f06b ]---
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      931299cf
    • V
      ath9k_hw: Configure appropriate Tx power when PAPRD fails · 45ef6a0b
      Vasanthakumar Thiagarajan 提交于
      Target Tx power available in eeprom is for PAPRD. If PAPRD
      fails, paprd scale factor needs to be detected from this
      target tx power.
      Signed-off-by: NVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      45ef6a0b
    • V
      ath9k_hw: Disable PAPRD for rates with low Tx power · 7072bf62
      Vasanthakumar Thiagarajan 提交于
      When the drop in Tx power for a particular mcs rate exceeds
      the paprd scale factor, paprd may not work properly. Disable
      paprd for any such rates.
      Signed-off-by: NVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7072bf62
    • V
    • V
      ath9k_hw: Tx IQ cal changes for AR9003 · 0b2084bc
      Vasanthakumar Thiagarajan 提交于
      Add multiple Tx IQ cal support to improve EVM accross
      different power levels.
      Signed-off-by: NVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0b2084bc