1. 18 4月, 2013 1 次提交
  2. 28 2月, 2013 1 次提交
    • 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
  3. 15 2月, 2013 2 次提交
    • J
      mac80211: stop modifying HT SMPS capability · af0ed69b
      Johannes Berg 提交于
      Instead of modifying the HT SMPS capability field
      for stations, track the SMPS mode explicitly in a
      new field in the station struct and use it in the
      drivers that care about it. This simplifies the
      code using it.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      af0ed69b
    • J
      mac80211: stop toggling IEEE80211_HT_CAP_SUP_WIDTH_20_40 · e1a0c6b3
      Johannes Berg 提交于
      For VHT, many more bandwidth changes are possible. As a first
      step, stop toggling the IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag
      in the HT capabilities and instead introduce a bandwidth field
      indicating the currently usable bandwidth to transmit to the
      station. Of course, make all drivers use it.
      
      To achieve this, make ieee80211_ht_cap_ie_to_sta_ht_cap() get
      the station as an argument, rather than the new capabilities,
      so it can set up the new bandwidth field.
      
      If the station is a VHT station and VHT bandwidth is in use,
      also set the bandwidth accordingly.
      
      Doing this allows us to get rid of the supports_40mhz flag as
      the HT capabilities now reflect the true capability instead of
      the current setting.
      
      While at it, also fix ieee80211_ht_cap_ie_to_sta_ht_cap() to not
      ignore HT cap overrides when MCS TX isn't supported (not that it
      really happens...)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      e1a0c6b3
  4. 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
  5. 24 1月, 2013 1 次提交
  6. 07 12月, 2012 1 次提交
  7. 20 9月, 2012 1 次提交
    • J
      iwlwifi: fix async station command crash · 513aa3b0
      Johannes Berg 提交于
      Before Emmanuel's change to use a copy of the command
      ("iwlwifi: get the correct HCMD in the response handler")
      the iwl_add_sta_callback() function would have used a
      random pointer to somewhere when processing responses
      to an async command, while that wasn't valid data it
      was at least a valid pointer. Now, the pointer will be
      NULL in this case, thus crashing.
      
      Fix this by exiting the function early if no command
      is passed back which means it was sent asynchronously.
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      513aa3b0
  8. 26 7月, 2012 1 次提交
    • 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
  9. 06 6月, 2012 4 次提交
  10. 25 5月, 2012 1 次提交
    • M
      iwlwifi: do not send lq cmd when station add fails · f4c37176
      Meenakshi Venkataraman 提交于
      When adding a station fails in
      iwl_restore_stations, the driver treats it
      like a successful station add and sends a
      link quality command, when it it shouldn't.
      
      This patch fixes one of the potential
      sources for kernel warnings like this one:
      
      WARNING: at drivers/net/wireless/iwlwifi/iwl-agn-sta.c:905 iwl_send_lq_cmd+0x130/0x217 [iwlwifi]()
      Hardware name: 3323A2G
      Modules linked in: ...
      Pid: 17359, comm: kworker/u:2 Tainted: G           O 3.3.0-wl+ #1
      Call Trace:
       [<ffffffff81039620>] warn_slowpath_common+0x7e/0x96
       [<ffffffff8103964d>] warn_slowpath_null+0x15/0x17
       [<ffffffffa02a9f0b>] iwl_send_lq_cmd+0x130/0x217 [iwlwifi]
       [<ffffffffa02aa1fb>] iwl_restore_stations+0x209/0x289 [iwlwifi]
       [<ffffffffa02b07c2>] iwlagn_commit_rxon+0x602/0x7bd [iwlwifi]
       [<ffffffffa02b111f>] iwlagn_bss_info_changed+0x247/0x31a [iwlwifi]
       [<ffffffffa0861437>] ieee80211_bss_info_change_notify+0x1a5/0x1ba [mac80211]
       [<ffffffffa088afad>] ieee80211_destroy_auth_data+0x4b/0x70 [mac80211]
       [<ffffffffa088df26>] ieee80211_sta_work+0xb5/0x954 [mac80211]
      Signed-off-by: NMeenakshi Venkataraman <meenakshi.venkataraman@intel.com>
      Reviewed-by: NWey-Yi W Guy <wey-yi.w.guy@intel.com>
      Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      f4c37176
  11. 11 5月, 2012 1 次提交
    • J
      drivers/net: Convert compare_ether_addr to ether_addr_equal · 2e42e474
      Joe Perches 提交于
      Use the new bool function ether_addr_equal to add
      some clarity and reduce the likelihood for misuse
      of compare_ether_addr for sorting.
      
      Done via cocci script:
      
      $ cat compare_ether_addr.cocci
      @@
      expression a,b;
      @@
      -	!compare_ether_addr(a, b)
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	compare_ether_addr(a, b)
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) == 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!ether_addr_equal(a, b) != 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) == 0
      +	!ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	ether_addr_equal(a, b) != 0
      +	ether_addr_equal(a, b)
      
      @@
      expression a,b;
      @@
      -	!!ether_addr_equal(a, b)
      +	ether_addr_equal(a, b)
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2e42e474
  12. 24 4月, 2012 1 次提交
  13. 13 4月, 2012 4 次提交
  14. 09 3月, 2012 2 次提交
  15. 08 3月, 2012 4 次提交
  16. 07 3月, 2012 8 次提交
  17. 22 2月, 2012 1 次提交
  18. 25 1月, 2012 2 次提交
  19. 07 1月, 2012 2 次提交
  20. 16 12月, 2011 1 次提交