1. 27 5月, 2010 1 次提交
    • C
      ar9170usb: fix read from freed driver context · 50019600
      Christian Lamparter 提交于
      Commit "ar9170: wait for asynchronous firmware loading"
      introduced a bug, which is triggered by fatal errors
      while the driver is initializing the device.
      
      BUG: unable to handle kernel paging request at 6b6b6bf7
      IP: [<c117b567>] kobject_put+0x7/0x70
      *pde = 00000000
      Oops: 0000 [#1] PREEMPT
      last sysfs file: /sys/devices/platform/hdaps/position
      Modules linked in: ar9170usb [...]
      
      Pid: 6246, comm: firmware/ar9170 Not tainted 2.6.34-wl #54
      EIP: 0060:[<c117b567>] EFLAGS: 00010206 CPU: 0
      EIP is at kobject_put+0x7/0x70
      EAX: 6b6b6bd7 EBX: f4d3d0e0 ECX: f5ba9124 EDX: f6af2a7c
      ESI: 00000000 EDI: f4d3d0e0 EBP: 00000000 ESP: f5e98f9c
       DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      Process firmware/ar9170 (pid: 6246)
      Stack:
       c12532ed 00000246 f5bfaa70 f8487353 f4d3d0e0
      Call Trace:
       [<c12532ed>] ? device_release_driver+0x1d/0x30
       [<f8487353>] ? ar9170_usb_firmware_failed+0x43/0x70 [ar9170usb]
       [<c125983c>] ? request_firmware_work_func+0x2c/0x70
       [<c1259810>] ? request_firmware_work_func+0x0/0x70
       [<c10413f4>] ? kthread+0x74/0x80
       [<c1041380>] ? kthread+0x0/0x80
       [<c1003136>] ? kernel_thread_helper+0x6/0x10
      Code: 40 d3 f2 ff 85 c0 89 c3 74 0a ba 44 86 4c c1 e8 [...]
      EIP: [<c117b567>] kobject_put+0x7/0x70 SS:ESP 0068:f5e98f9c
      CR2: 000000006b6b6bf7
      ---[ end trace e81abb992434b410 ]---
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      50019600
  2. 25 5月, 2010 8 次提交
  3. 22 5月, 2010 1 次提交
  4. 21 5月, 2010 1 次提交
  5. 18 5月, 2010 1 次提交
  6. 14 5月, 2010 1 次提交
    • J
      drivers/net: Remove unnecessary returns from void function()s · a4b77097
      Joe Perches 提交于
      This patch removes from drivers/net/ all the unnecessary
      return; statements that precede the last closing brace of
      void functions.
      
      It does not remove the returns that are immediately
      preceded by a label as gcc doesn't like that.
      
      It also does not remove null void functions with return.
      
      Done via:
      $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
        xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
      
      with some cleanups by hand.
      
      Compile tested x86 allmodconfig only.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a4b77097
  7. 13 5月, 2010 10 次提交
  8. 12 5月, 2010 5 次提交
    • V
    • V
      ath9k: Fix bug in handling rx frames with invalid descriptor content · 083e3e8d
      Vasanthakumar Thiagarajan 提交于
      Don't send them for further processing.
      Signed-off-by: NVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      083e3e8d
    • L
      ath9k_hw: new initialization values for AR9003 · 7fca8e26
      Luis R. Rodriguez 提交于
      These changes include:
      
        * For PAPRD, the TXRF3.capdiv5G, TXRF3.rdiv5G and TXRF3.rdiv2G
          are set to 0x0, the TXRF6.capdiv2G is set to 0x2 for all
          three chains.
        * The d2cas5G/d3cas5G/d4cas5G was updated to 4/4/4 in lowest_ob_db
          Tx gain table.
        * To improve DPPM, three parameters were updated (Released from Madhan):
      	1. RANGE_OSDAC is set to 0x1 for 2G, 0x0 for 5G
      	2. offsetC1 is set to 0xc
      	3. inv_clk320_adc is set to 0x1
        * To reduce PHY error(from spur), cycpwr_thr1 and cycpwr_thr1_ext
          are increased to 0x8 at 2G.
        * The 2G Rx gain tables are updated with mixer gain setting 3,1,0.
      
      The new checksums yield:
      
      initvals -f ar9003
      0x00000000c2bfa7d5        ar9300_2p0_radio_postamble
      0x00000000ada2b114        ar9300Modes_lowest_ob_db_tx_gain_table_2p0
      0x00000000e0bc2c84        ar9300Modes_fast_clock_2p0
      0x00000000056eaf74        ar9300_2p0_radio_core
      0x0000000000000000        ar9300Common_rx_gain_table_merlin_2p0
      0x0000000078658fb5        ar9300_2p0_mac_postamble
      0x0000000023235333        ar9300_2p0_soc_postamble
      0x0000000054d41904        ar9200_merlin_2p0_radio_core
      0x00000000748572cf        ar9300_2p0_baseband_postamble
      0x000000009aa5a0a4        ar9300_2p0_baseband_core
      0x000000003df9a326        ar9300Modes_high_power_tx_gain_table_2p0
      0x000000001cfba124        ar9300Modes_high_ob_db_tx_gain_table_2p0
      0x0000000011302700        ar9300Common_rx_gain_table_2p0
      0x00000000e3eab114        ar9300Modes_low_ob_db_tx_gain_table_2p0
      0x00000000c9d66d40        ar9300_2p0_mac_core
      0x000000001e1d0800        ar9300Common_wo_xlna_rx_gain_table_2p0
      0x00000000a0c54980        ar9300_2p0_soc_preamble
      0x00000000292e2544        ar9300PciePhy_pll_on_clkreq_disable_L1_2p0
      0x000000002d3e2544        ar9300PciePhy_clkreq_enable_L1_2p0
      0x00000000293e2544        ar9300PciePhy_clkreq_disable_L1_2p0
      
      Cc: Don Breslin <don.breslin@atheros.com>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      7fca8e26
    • L
      ath5k: drop warning on jumbo frames · 9637e516
      Luis R. Rodriguez 提交于
      Jumbo frames are not supported, and if they are seen it is likely
      a bogus frame so just silently discard them instead of warning on
      them all time. Also, instead of dropping them immediately though
      move the check *after* we check for all sort of frame errors. This
      should enable us to discard these frames if the hardware picks
      other bogus items first. Lets see if we still get those jumbo
      counters increasing still with this.
      
      Jumbo frames would happen if we tell hardware we can support
      a small 802.11 chunks of DMA'd frame, hardware would split RX'd
      frames into parts and we'd have to reconstruct them in software.
      This is done with USB due to the bulk size but with ath5k we
      already provide a good limit to hardware and this should not be
      happening.
      
      This is reported quite often and if it fills the logs then this
      needs to be addressed and to avoid spurious reports.
      
      Cc: stable@kernel.org
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9637e516
    • S
      5a147e8b
  9. 11 5月, 2010 4 次提交
  10. 08 5月, 2010 8 次提交
    • S
      ath9k_htc: Handle IDLE LED properly · 2ff6575b
      Sujith 提交于
      Switch LED off/on when handling CONF_CHANGE_IDLE.
      Not doing this would leave the radio LED on even
      though the chip would be in full sleep mode.
      Signed-off-by: NSujith <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      2ff6575b
    • L
      ath9k_hw: Update initvals for AR9003 for xb113 · bc6fb356
      Luis R. Rodriguez 提交于
      Generated using the new shiny intivals-tool [1]:
      
      initvals -w -f ar9003 > ar9003_initvals.h
      
      The respective checksums are:
      
      0x000000005a76829d        ar9300_2p0_radio_postamble
      0x000000009d90cb74        ar9300Modes_lowest_ob_db_tx_gain_table_2p0
      0x00000000e0bc2c84        ar9300Modes_fast_clock_2p0
      0x00000000852fca34        ar9300_2p0_radio_core
      0x0000000000000000        ar9300Common_rx_gain_table_merlin_2p0
      0x0000000078658fb5        ar9300_2p0_mac_postamble
      0x0000000023235333        ar9300_2p0_soc_postamble
      0x0000000054d41904        ar9200_merlin_2p0_radio_core
      0x00000000618455d4        ar9300_2p0_baseband_postamble
      0x000000009aa590a4        ar9300_2p0_baseband_core
      0x000000004783d946        ar9300Modes_high_power_tx_gain_table_2p0
      0x000000006681db44        ar9300Modes_high_ob_db_tx_gain_table_2p0
      0x000000001f318700        ar9300Common_rx_gain_table_2p0
      0x000000009990cb74        ar9300Modes_low_ob_db_tx_gain_table_2p0
      0x00000000c9d66d40        ar9300_2p0_mac_core
      0x0000000039139500        ar9300Common_wo_xlna_rx_gain_table_2p0
      0x00000000a0c54980        ar9300_2p0_soc_preamble
      0x00000000292e2544        ar9300PciePhy_pll_on_clkreq_disable_L1_2p0
      0x000000002d3e2544        ar9300PciePhy_clkreq_enable_L1_2p0
      0x00000000293e2544        ar9300PciePhy_clkreq_disable_L1_2p0
      
      [1] http://wireless.kernel.org/en/users/Drivers/ath9k_hw/initvals-tool
      
      Cc: Tom Hammel <thammel@atheros.com>
      Cc: Enis Akay <Enis.Akay@Atheros.com>
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      bc6fb356
    • L
      ath9k_common: drop incomming frames with an invalid hardware rate · 6f256de7
      Luis R. Rodriguez 提交于
      ath9k_common (used by ath9k and ath9k_htc) trusts the frames
      blessed by hardware as OK are infact correct even if the rate
      seen by the driver is unrecognized. ath9k_common just treats
      these frames in mac80211 as frames as frames under 1 mbps rate.
      It seems this might not be the best thing to do as other parts of
      the frame might not be valid so just drop these frames for now.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6f256de7
    • L
      ath9k_common: move the rate status setting into ath9k_process_rate() · 8e155994
      Luis R. Rodriguez 提交于
      This has no real functional change, this just moves the setting the
      the mac80211 rate index into ath9k_process_rate(). This allows us
      to eventually make ath9k_process_rate() return a negative value
      in case we have detected a specific case rate situation which should
      have been ignored.
      Signed-off-by: NLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8e155994
    • S
      ath9k_htc: Fix beaconing in IBSS mode · 9c6dda4e
      Sujith 提交于
      The current way of managing beaconing in ad-hoc
      mode has a subtle race - the beacon obtained from mac80211
      is freed in the SWBA handler rather than the TX
      completion routine. But transmission of beacons goes
      through the normal SKB queue maintained in hif_usb,
      leading to a situation where __skb_dequeue() in the TX
      completion handler goes kaput.
      
      Fix this by simply getting a beacon from mac80211 for
      every SWBA and free it in its completion routine.
      Signed-off-by: NSujith <Sujith.Manoharan@atheros.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9c6dda4e
    • F
      ath9k: fix another source of corrupt frames · 3ef83d74
      Felix Fietkau 提交于
      Atheros hardware supports receiving frames that span multiple
      descriptors and buffers. In this case, the rx status of every
      descriptor except for the last one is invalid and may contain random
      data. Because the driver does not support this, it needs to drop such
      frames.
      Signed-off-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      3ef83d74
    • C
      ar9170usb: remove deprecated aggregation code · f3926b49
      Christian Lamparter 提交于
      This patch removes the incomplete AMPDU implementation in ar9170usb.
      
      The code in question is:
       * too big and complex (more than 550 SLOC.)
         This is enough to qualify for a new separate code file!
      
       * unbalanced quantity & quality
      	over-engineered areas like:
      		* xmit scheduling and queuing frames for multiple HT peers
      		* redundant frame sorting
      	are confronted by gaping holes:
      		* accurate transmission feedback
      		* firmware error-handling and device reset
      		* HT rate control algorithm
      
       * error-prone
      	Since its inclusion, hardly anything was done to fix
      	any of the outlined flaws from the initial commit message.
      
         => This also indicates poor maintainability.
      
       * relies heavily on several spinlocks.
      
      As a result of this shortcomings, the code is slow and does not
      even support the most basic 11n requirement: HT station mode.
      
      Therefore, I request to purge my heap of **** from the kernel:
      "ar9170: implement transmit aggregation".
      
      The next item on the agenda is: (re-)start from scratch with
      an adequate design to accommodate the special requirements
      and features of the available frameworks and tools.
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f3926b49
    • C
      ar9170: wait for asynchronous firmware loading · 160b8242
      Christian Lamparter 提交于
      This patch fixes a regression introduced by the following patch:
      "ar9170: load firmware asynchronously"
      
      When we kick off a firmware loading request and then unbind,
      or disconnect the usb device right away, we get into trouble:
      
      > ------------[ cut here ]------------
      > WARNING: at lib/kref.c:44 kref_get+0x1c/0x20()
      > Hardware name: 18666GU
      > Modules linked in: ar9170usb [...]
      > Pid: 6588, comm: firmware/ar9170 Not tainted 2.6.34-rc5-wl #43
      > Call Trace:
      > [<c102b05e>] ? warn_slowpath_common+0x6e/0xb0
      > [<c117c93c>] ? kref_get+0x1c/0x20
      > [<c102b0b3>] ? warn_slowpath_null+0x13/0x20
      > [<c117c93c>] ? kref_get+0x1c/0x20
      > [<c117bb2f>] ? kobject_get+0xf/0x20
      > [<c124d630>] ? get_device+0x10/0x20
      > [<c124e5a0>] ? device_add+0x60/0x530
      > [<c117b8b5>] ? kobject_init+0x25/0xa0
      > [<c12569f9>] ? _request_firmware+0x139/0x3e0
      > [<c1256cc0>] ? request_firmware_work_func+0x20/0x70
      > [<c1256ca0>] ? request_firmware_work_func+0x0/0x70
      > [<c103ff24>] ? kthread+0x74/0x80
      > [<c103feb0>] ? kthread+0x0/0x80
      > [<c1003136>] ? kernel_thread_helper+0x6/0x10
      >---[ end trace 2d50bd818f64a1b7 ]---
      - followed by a random Oops -
      
      Avoid that by waiting for the firmware loading to finish
      (whether successfully or not) before the unbind in
      ar9170_usb_disconnect.
      Reported-by: NJohannes Berg <johannes@sipsolutions.net>
      Bug-fixed-by: NJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: NChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      160b8242