1. 09 3月, 2012 1 次提交
    • J
      iwlwifi: redesign PASSIVE_NO_RX workaround · e755f882
      Johannes Berg 提交于
      The PASSIVE_NO_RX workaround currently crosses
      through the op_mode and transport layers, which
      is a bit odd. This also isn't necessary, if the
      transport simply reports when queues are full
      (or no longer full) the op_mode can keep track
      of this state, and report to mac80211 only what
      *it* thinks is appropriate. What is appropriate
      can then be based on whether queues should be
      stopped to wait for RX or not.
      
      This significantly simplifies the transport API,
      it no longer needs to expose anything to stop a
      queue, nor to wake "any" queue, this can all be
      handled in the upper layer completely.
      
      Also simplify the handling to not be dependent
      on the context, that makes little sense as the
      queues are shared and both contexts have to be
      on the same channel anyway.
      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>
      e755f882
  2. 08 3月, 2012 2 次提交
  3. 07 3月, 2012 3 次提交
  4. 28 2月, 2012 1 次提交
  5. 18 2月, 2012 1 次提交
  6. 03 2月, 2012 4 次提交
  7. 25 1月, 2012 1 次提交
  8. 07 1月, 2012 1 次提交
  9. 22 12月, 2011 1 次提交
    • J
      iwlagn: fix (remove) use of PAGE_SIZE · 10667136
      Johannes Berg 提交于
      The ICT code erroneously uses PAGE_SIZE. The bug
      is that PAGE_SIZE isn't necessarily 4096, so on
      such platforms this code will not work correctly
      as we'll try to attempt to read an index in the
      table that the device never wrote, it always has
      4096-byte pages.
      
      Additionally, the manual alignment code here is
      unnecessary -- Documentation/DMA-API-HOWTO.txt
      states:
        The cpu return address and the DMA bus master address are both
        guaranteed to be aligned to the smallest PAGE_SIZE order which
        is greater than or equal to the requested size.  This invariant
        exists (for example) to guarantee that if you allocate a chunk
        which is smaller than or equal to 64 kilobytes, the extent of the
        buffer you receive will not cross a 64K boundary.
      
      Just use appropriate new constants and get rid of
      the alignment code.
      
      Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
      Cc: stable@vger.kernel.org
      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>
      10667136
  10. 16 12月, 2011 4 次提交
  11. 22 11月, 2011 1 次提交
  12. 18 11月, 2011 1 次提交
  13. 12 11月, 2011 1 次提交
  14. 22 9月, 2011 2 次提交
  15. 20 9月, 2011 3 次提交
    • J
      iwlagn: move PCI-E transport files · c17d0681
      Johannes Berg 提交于
      Move all the PCI-E specific transport files to
      be iwl-trans-pcie*; specifically iwl-trans.c
      which is really iwl-trans-pcie.c.
      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>
      c17d0681
    • E
      iwlagn: move iwl_stop / wake_queue to the upper layer · 859cfb0a
      Emmanuel Grumbach 提交于
      Add a wrapper in the upper layer to call the mac80211's function.
      This allows not to have the transport layer call mac80211 directly.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      859cfb0a
    • E
      iwlagn: unmap cmd queue's tfds as BIDI · 39644e9a
      Emmanuel Grumbach 提交于
      If the driver is unloaded while there is still a host command in
      flight, its tfd will be freed by iwl_tx_queue_free.
      This function is called for both types of queues: Tx queues and cmd
      queue. This didn't take in count the fact that in Tx queues, tfds are
      mapped as TO_DEVICE (besides the first TB), whereas in cmd queue, all
      TBs are mapped as BIDI.
      
      Hence, tx_queue_free unmapped the second (and higher) TB of each tfd
      in the cmd queue as TO_DEVICE, whereas they must be freed as BIDI.
      This means that if a multi TFD is in flight while we unload the
      driver (which is quite unlikely but can happen), we will get the
      warning below.
      
      This patch fixes this.
      
      [  445.234060] ------------[ cut here ]------------
      [  445.236273] WARNING: at lib/dma-debug.c:861 check_unmap+0x337/0x780()
      [  445.236654] iwlagn 0000:02:00.0: DMA-API: device driver frees DMA memory with different direction [device address=0x0000000126950540] [size=8 bytes] [mapped with DMA_BIDIRECTIONAL] [unmapped with DMA_TO_DEVICE]
      [  445.236654] Modules linked in: ...
      [  445.236654] Pid: 1415, comm: modprobe Not tainted 3.1.0-rc4-wl-65912-g5215ff1-dirty #79
      [  445.236654] Call Trace:
      [  445.236654]  [<ffffffff81043a51>] warn_slowpath_common+0x71/0xa0
      [  445.236654]  [<ffffffff81043b37>] warn_slowpath_fmt+0x47/0x50
      [  445.236654]  [<ffffffff8121e687>] check_unmap+0x337/0x780
      [  445.236654]  [<ffffffff810e9136>] ? free_one_page+0x156/0x320
      [  445.236654]  [<ffffffff8121ec5a>] debug_dma_unmap_page+0x5a/0x60
      [  445.236654]  [<ffffffffa021d701>] iwlagn_unmap_tfd.isra.11+0x121/0x1c0 [iwlagn]
      [  445.236654]  [<ffffffffa021ddf2>] iwlagn_txq_free_tfd+0x42/0x70 [iwlagn]
      [  445.236654]  [<ffffffffa02121de>] iwl_tx_queue_unmap+0x4e/0x70 [iwlagn]
      [  445.236654]  [<ffffffffa0212fad>] iwl_trans_pcie_tx_free+0x10d/0x440 [iwlagn]
      [  445.236654]  [<ffffffff81064959>] ? destroy_workqueue+0xb9/0x1e0
      [  445.236654]  [<ffffffffa021330a>] iwl_trans_pcie_free+0x2a/0x2c0 [iwlagn]
      [  445.236654]  [<ffffffffa022f4f2>] iwl_remove+0x149/0x17e [iwlagn]
      [  445.236654]  [<ffffffffa022f546>] iwl_pci_remove+0x1f/0x65 [iwlagn]
      [  445.236654]  [<ffffffff81228337>] pci_device_remove+0x47/0x120
      [  445.236654]  [<ffffffff8134566c>] __device_release_driver+0x7c/0xe0
      [  445.236654]  [<ffffffff81345dc8>] driver_detach+0xc8/0xd0
      [  445.236654]  [<ffffffff813454c8>] bus_remove_driver+0x88/0xe0
      [  445.236654]  [<ffffffff81346572>] driver_unregister+0x62/0xa0
      [  445.236654]  [<ffffffff812271d4>] pci_unregister_driver+0x44/0xc0
      [  445.236654]  [<ffffffffa0211ce5>] iwl_pci_unregister_driver+0x15/0x20 [iwlagn]
      [  445.236654]  [<ffffffffa022f595>] iwl_exit+0x9/0xa74 [iwlagn]
      [  445.236654]  [<ffffffff810918f4>] sys_delete_module+0x184/0x240
      [  445.236654]  [<ffffffff81452ece>] ? retint_swapgs+0xe/0x13
      [  445.236654]  [<ffffffff8121098e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
      [  445.236654]  [<ffffffff81459e2b>] system_call_fastpath+0x16/0x1b
      [  445.236654] ---[ end trace 1fbc362b7dbe5d74 ]---
      [  445.236654] Mapped at:
      [  445.236654]  [<ffffffff8121d7cb>] debug_dma_map_page+0x8b/0x150
      [  445.236654]  [<ffffffffa021e7b7>] iwl_enqueue_hcmd+0x837/0xa40 [iwlagn]
      [  445.236654]  [<ffffffffa021f92d>] iwl_trans_pcie_send_cmd+0x8d/0x580 [iwlagn]
      [  445.236654]  [<ffffffffa01f7c75>] iwl_send_calib_results+0x75/0xd0 [iwlagn]
      [  445.236654]  [<ffffffffa01f21f6>] iwlagn_alive_notify+0x196/0x1f0 [iwlagn]
      [  445.386500] iwlagn 0000:02:00.0: PCI INT A disabled
      Reported-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      39644e9a
  16. 15 9月, 2011 3 次提交
  17. 30 8月, 2011 10 次提交