1. 28 2月, 2013 2 次提交
    • J
      iwlwifi: use coherent DMA memory for command header · 38c0f334
      Johannes Berg 提交于
      Recently in commit 8a964f44
      ("iwlwifi: always copy first 16 bytes of commands") we fixed
      the problem that the hardware writes back to the command and
      that could overwrite parts of the data that was still needed
      and would thus be corrupted.
      
      Investigating this problem more closely we found that this
      write-back isn't really ordered very well with respect to
      other DMA traffic. Therefore, it sometimes happened that the
      write-back occurred after unmapping the command again which
      is clearly an issue and could corrupt the next allocation
      that goes to that spot, or (better) cause IOMMU faults.
      
      To fix this, allocate coherent memory for the first 16 bytes
      of each command, containing the write-back part, and use it
      for all queues. All the dynamic DMA mappings only need to be
      TO_DEVICE then. This ensures that even when the write-back
      happens "too late" it can't hit memory that has been freed
      or a mapping that doesn't exist any more.
      
      Since now the actual command is no longer modified, we can
      also remove CMD_WANT_HCMD and get rid of the DMA sync that
      was necessary to update the scratch pointer.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      38c0f334
    • J
      iwlwifi: rename IWL_MAX_CMD_TFDS to IWL_MAX_CMD_TBS_PER_TFD · 1afbfb60
      Johannes Berg 提交于
      The IWL_MAX_CMD_TFDS name for this constant is wrong, the
      constant really indicates how many TBs we can use in the
      driver for a single command TFD, rename the constant and
      also add a comment explaining it.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1afbfb60
  2. 05 2月, 2013 1 次提交
    • J
      iwlwifi: use threaded interrupt handler · 2bfb5092
      Johannes Berg 提交于
      With new transports coming up, move to threaded
      interrupt handling now. This has the advantage
      that we can use the same locking scheme with all
      different transports we may need to implement.
      
      Note that the TX path obviously still runs in a
      tasklet, so some spin_lock() calls need to change
      to spin_lock_bh() calls to properly lock out the
      TX path.
      
      In my test on a Calpella platform this has no
      impact on throughput or latency.
      
      Also add lockdep annotations to avoid lockups due
      to catch sending synchronous commands or using
      locks that connect with them from the irq thread.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2bfb5092
  3. 01 2月, 2013 2 次提交
  4. 31 1月, 2013 1 次提交
  5. 24 1月, 2013 2 次提交
  6. 16 1月, 2013 2 次提交
  7. 03 1月, 2013 5 次提交
  8. 07 12月, 2012 1 次提交
  9. 28 11月, 2012 1 次提交
  10. 05 11月, 2012 1 次提交
  11. 01 11月, 2012 1 次提交
    • E
      iwlwifi: handle RFKILL logic in the transport layer · f946b529
      Emmanuel Grumbach 提交于
      No HCMD can be sent while RFKILL is asserted. If a SYNC
      command is running while RFKILL is asserted the fw will
      silently discard it. This means that the driver needs to
      wake the process that sleeps on the CMD_SYNC.
      
      Since the RFKILL interrupt is handled in the transport layer
      and the code that sleeps in CMD_SYNC is also in the transport
      layer, all this logic can be handled there.
      This simplifies the work of the op_mode.
      
      So the transport layer will now return -ERFKILL when a CMD
      is sent and RFKILL is asserted. This will be the case even
      when the CMD is SYNC. The transport layer will return
      -ERFKILL straight away.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f946b529
  12. 29 10月, 2012 2 次提交
  13. 16 10月, 2012 1 次提交
    • J
      iwlwifi: make data frame tracing optional · f042c2eb
      Johannes Berg 提交于
      When tracing in iwlwifi, we get all data. Most of
      the time, we don't need it, and it just takes up
      a lot of extra space in the trace.
      
      Make this optional by recording the data into two
      separate trace events if it is needed. Without it,
      record only the content of non-data and EAPOL TX
      frames.
      
      As a result, tracing without the data tracepoints
      will record meta information including the 802.11
      headers for all frames but will not record the
      contents of data frames to reduce trace overhead.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      f042c2eb
  14. 26 7月, 2012 2 次提交
    • E
      iwlwifi: get the correct HCMD in the response handler · 96791422
      Emmanuel Grumbach 提交于
      Until now, the response handler of a Host Command got the
      exact same pointer that was also given to the DMA engine.
      We almost never need to the Host Command that was sent while
      handling its response, but when we do need it, we see that
      the command has been modified.
      
      This mystery has been elucidated. The FH (our DMA engine)
      writes its meta data on the buffer in the DRAM. Of course it
      copies the buffer to the NIC first. This was known to happen
      for Tx command, but as a matter of fact, it happens to all
      TFD brought by the FH which doesn't care much about what it
      brings from DRAM to internal SRAM.
      
      So copy the Host Command to yet another buffer so that we
      can properly pass the buffer that was sent originally to the
      fw. Do that only if it was request by the user since very
      few flows need to get the HCMD sent in the response handler.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      96791422
    • M
      iwlwifi: rework the iwlwifi debugfs structure · 9da987ac
      Meenakshi Venkataraman 提交于
      The generic part of the driver now creates all debugfs
      directories. It creates a root directory directly in
      the the root of the debugfs filesystem and within that
      directories for each device, named after the device ID
      of the devices iwlwifi is attached to.
      
      In the cfg80211/mac80211 directory there's now a link
      to the toplevel iwlwifi debugfs directory to make it
      easier to find the debugfs files.
      Signed-off-by: NMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9da987ac
  15. 12 7月, 2012 1 次提交
  16. 25 6月, 2012 1 次提交
  17. 06 6月, 2012 5 次提交
  18. 03 5月, 2012 1 次提交
    • E
      iwlwifi: fix skb truesize underestimation · ed90542b
      Eric Dumazet 提交于
      By default, iwlwifi uses order-1 pages (8 KB) to store incoming frames,
      but doesnt say so in skb->truesize.
      
      This makes very possible to exhaust kernel memory since these skb evade
      normal socket memory accounting.
      
      As struct ieee80211_hdr is going to be pulled before calling IP stack,
      there is no need to use dev_alloc_skb() to reserve NET_SKB_PAD bytes.
      alloc_skb() is ok in this driver, allowing more tailroom.
      
      Pull beginning of frame in skb header, in the hope we can reuse order-1
      pages in the driver immediately for small frames and reduce their
      truesize to the minimum (linear skbs)
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com>
      Cc: "John W. Linville" <linville@tuxdriver.com>
      Cc: Neal Cardwell <ncardwell@google.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ed90542b
  19. 24 4月, 2012 3 次提交
  20. 18 4月, 2012 3 次提交
  21. 17 4月, 2012 1 次提交
  22. 13 4月, 2012 1 次提交
    • J
      iwlwifi: move eeprom into priv · 11483b5c
      Johannes Berg 提交于
      The whole code around eeprom is distributed
      across whole bunch of different files, most
      of which belong to the to-be-DVM code. As a
      result, it is currently very hard to split
      out the EEPROM code to be generic. However,
      it is also quite unlikely that the current
      EEPROM code will be needed by the MVM code
      as that has different mechanisms to query
      the EEPROM (it does so through the uCode.)
      
      So, at least temporarily, move everything
      into priv. If it becomes necessary to use
      the code from MVM, we will have to split it
      out, but then it's also easier since we'll
      know what pieces we need.
      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>
      11483b5c