1. 25 3月, 2011 2 次提交
  2. 01 3月, 2011 1 次提交
    • S
      iwlwifi: fix dma mappings and skbs leak · 387f3381
      Stanislaw Gruszka 提交于
      Since commit commit 470058e0
      "iwlwifi: avoid Tx queue memory allocation in interface down" we do
      not unmap dma and free skbs when down device and there is pending
      transfer. What in consequence may cause that system hung (waiting
      for free skb's) when performing shutdown at iptables module unload.
      
      DMA leak manifest itself following warning:
      
      WARNING: at lib/dma-debug.c:689 dma_debug_device_change+0x15a/0x1b0()
      Hardware name: HP xw8600 Workstation
      pci 0000:80:00.0: DMA-API: device driver has pending DMA allocations while released from device [count=240]
      Modules linked in: iwlagn(-) aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi microcode serio_raw tg3 arc4 ecb shpchp mac80211 cfg80211 rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas pata_acpi ata_generic ata_piix ahci libahci floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: iwlagn]
      Pid: 9131, comm: rmmod Tainted: G        W   2.6.38-rc6-wl+ #33
      Call Trace:
       [<ffffffff810649ef>] ? warn_slowpath_common+0x7f/0xc0
       [<ffffffff81064ae6>] ? warn_slowpath_fmt+0x46/0x50
       [<ffffffff812320ab>] ? dma_debug_device_change+0xdb/0x1b0
       [<ffffffff8123212a>] ? dma_debug_device_change+0x15a/0x1b0
       [<ffffffff8149dc18>] ? notifier_call_chain+0x58/0xb0
       [<ffffffff8108e370>] ? __blocking_notifier_call_chain+0x60/0x90
       [<ffffffff8108e3b6>] ? blocking_notifier_call_chain+0x16/0x20
       [<ffffffff812f570c>] ? __device_release_driver+0xbc/0xe0
       [<ffffffff812f5808>] ? driver_detach+0xd8/0xe0
       [<ffffffff812f45d1>] ? bus_remove_driver+0x91/0x100
       [<ffffffff812f6022>] ? driver_unregister+0x62/0xa0
       [<ffffffff8123d5d4>] ? pci_unregister_driver+0x44/0xa0
       [<ffffffffa05632d1>] ? iwl_exit+0x15/0x1c [iwlagn]
       [<ffffffff810ab492>] ? sys_delete_module+0x1a2/0x270
       [<ffffffff81498da9>] ? trace_hardirqs_on_thunk+0x3a/0x3f
       [<ffffffff8100bf42>] ? system_call_fastpath+0x16/0x1b
      
      I still can observe above warning after apply patch, but it is very
      hard to reproduce it, and have count=1. Whereas that one is easy to
      reproduce using debugfs force_reset while transmitting data, and have
      very big counts eg. 240, like quoted here. So count=1 WARNING seems
      to be different issue that need to be resolved separately.
      
      v1 -> v2: fix infinity loop bug I made during "for" to "while" loop transition.
      v2 -> v3: remove unneeded EXPORT_SYMBOL
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Acked-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      387f3381
  3. 22 1月, 2011 1 次提交
  4. 14 12月, 2010 1 次提交
  5. 25 11月, 2010 3 次提交
  6. 17 11月, 2010 1 次提交
  7. 16 11月, 2010 4 次提交
  8. 26 10月, 2010 1 次提交
  9. 08 10月, 2010 1 次提交
  10. 06 10月, 2010 1 次提交
    • W
      iwlagn: reduce redundant parameter definitions · 7cb1b088
      Wey-Yi Guy 提交于
      move paramater definitions to a device paramater structure only
      leaving the device name, which antennas are used and what firmware
      file to use in the iwl_cfg structure.  this will not completely
      remove the redundancies but greatly reduce them for devices that
      only vary by name or antennas.  the parameters that are more
      likely to change within a given device family are left in iwl_cfg.
      also separate bt param structure added to help reduce more.
      Signed-off-by: NJay Sternberg <jay.e.sternberg@intel.com>
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      7cb1b088
  11. 28 8月, 2010 3 次提交
  12. 27 8月, 2010 2 次提交
  13. 26 8月, 2010 3 次提交
  14. 17 8月, 2010 1 次提交
  15. 10 8月, 2010 1 次提交
    • J
      iwlagn: fix rts cts protection · 94597ab2
      Johannes Berg 提交于
      Currently the driver will try to protect all frames,
      which leads to a lot of odd things like sending an
      RTS with a zeroed RA before multicast frames, which
      is clearly bogus.
      
      In order to fix all of this, we need to take a step
      back and see what we need to achieve:
       * we need RTS/CTS protection if requested by
         the AP for the BSS, mac80211 tells us this
       * in that case, CTS-to-self should only be
         enabled when mac80211 tells us
       * additionally, as a hardware workaround, on
         some devices we have to protect aggregated
         frames with RTS
      
      To achieve the first two items, set up the RXON
      accordingly and set the protection required flag
      in the transmit command when mac80211 requests
      protection for the frame.
      
      To achieve the last item, set the rate-control
      RTS-requested flag for all stations that we have
      aggregation sessions with, and set the protection
      required flag when sending aggregated frames (on
      those devices where this is required).
      
      Since otherwise bugs can occur, do not allow the
      user to override the RTS-for-aggregation setting
      from sysfs any more.
      
      Finally, also clean up the way all these flags get
      set in the driver and move everything into the
      device-specific functions.
      
      Cc: stable@kernel.org [2.6.35]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      94597ab2
  16. 07 8月, 2010 1 次提交
  17. 05 8月, 2010 1 次提交
  18. 10 7月, 2010 1 次提交
  19. 22 6月, 2010 1 次提交
  20. 15 6月, 2010 1 次提交
    • S
      iwlagn: verify flow id in compressed BA packet · b561e827
      Shanyu Zhao 提交于
      The flow id (scd_flow) in a compressed BA packet should match the txq_id
      of the queue from which the aggregated packets were sent. However, in
      some hardware like the 1000 series, sometimes the flow id is 0 for the
      txq_id (10 to 19). This can cause the annoying message:
      [ 2213.306191] iwlagn 0000:01:00.0: Received BA when not expected
      [ 2213.310178] iwlagn 0000:01:00.0: Read index for DMA queue txq id (0),
      index 5, is out of range [0-256] 7 7.
      
      And even worse, if agg->wait_for_ba is true when the bad BA is arriving,
      this can cause system hang due to NULL pointer dereference because the
      code is operating in a wrong tx queue!
      Signed-off-by: NShanyu Zhao <shanyu.zhao@intel.com>
      Signed-off-by: NPradeep Kulkarni <pradeepx.kulkarni@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      b561e827
  21. 09 6月, 2010 1 次提交
  22. 06 6月, 2010 3 次提交
    • D
      iwlwifi: parse block ack responses correctly · 02cd8dee
      Daniel Halperin 提交于
      Compressed BlockAck frames store the ACKs/NACKs in a 64-bit bitmap that starts
      at the sequence number of the first frame sent in the aggregated batch. Note
      that this is a selective ACKnowledgement following selective retransmission;
      e.g., if frames 1,4-5 in a batch are ACKed then the next transmission will
      include frames 2-3,6-10 (7 frames). In this latter case, the Compressed
      BlockAck will not have all meaningful information in the low order bits -- the
      semantically meaningful bits of the BA will be 0x1f3 (where the low-order frame
      is seq 2).
      
      The driver code originally just looked at the lower (in this case, 7) bits of
      the BlockAck. In this case, the lower 7 bits of 0x1f3 => only 5 packets,
      maximum, could ever be ACKed. In reality it should be looking at all of the
      bits, filtered by those corresponding to packets that were actually sent. This
      flaw meant that the number of correctly ACked packets could be significantly
      underreported and might result in asynchronous state between TX and RX sides as
      well as driver and uCode.
      
      Fix this and also add a shortcut that doesn't require the code to loop through
      all 64 bits of the bitmap but rather stops when no higher packets are ACKed.
      
      In my experiments this fix greatly reduces throughput swing, making throughput
      stable and high. It is also likely related to some of the stalls observed in
      aggregation mode and maybe some of the buffer underruns observed, e.g.,
      
      http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1968
      http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2098
      http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2018Signed-off-by: NDaniel Halperin <dhalperi@cs.washington.edu>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      02cd8dee
    • J
      iwlwifi: generic scan TX antenna forcing · 0e1654fa
      Johannes Berg 提交于
      In "iwlwifi: make scan antenna forcing more generic"
      I introduced generic scan RX antenna forcing, which
      here I rename to make it more evident. Also add scan
      TX antenna forcing, since I will need that as well.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      0e1654fa
    • J
      iwlwifi: reduce memory allocation · ff0d91c3
      Johannes Berg 提交于
      Currently, the driver allocates up to 19 skb pointers
      for each TFD, of which we have 256 per queue. This
      means that for each TX queue, we allocate 19k/38k
      (an order 4 or 5 allocation on 32/64 bit respectively)
      just for each queue's "txb" array, which contains only
      the SKB pointers.
      
      However, due to the way we use these pointers only the
      first one can ever be assigned. When the driver was
      initially written, the idea was that it could be
      passed multiple SKBs for each TFD and attach all
      those to implement gather DMA. However, due to
      constraints in the userspace API and lack of TCP/IP
      level checksumming in the device, this is in fact not
      possible. And even if it were, the SKBs would be
      chained, and we wouldn't need to keep pointers to
      each anyway.
      
      Change this to only keep track of one SKB per TFD,
      and thereby reduce memory consumption to just one
      pointer per TFD, which is an order 0 allocation per
      transmit queue.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
      ff0d91c3
  23. 05 6月, 2010 1 次提交
  24. 04 6月, 2010 1 次提交
  25. 14 5月, 2010 2 次提交
  26. 11 5月, 2010 1 次提交