1. 03 4月, 2019 1 次提交
  2. 22 3月, 2019 1 次提交
    • J
      iwlwifi: mvm: fix TX crypto on 22560+ devices · 475c6bde
      Johannes Berg 提交于
      In the old days, we could transmit with HW crypto with an arbitrary
      key by filling it into TX_CMD. This was broken first with the advent
      of CCMP/GCMP-256 keys which don't fit there.
      
      This was broken *again* with the newer TX_CMD format on 22560+,
      where we simply cannot pass key material anymore. However, we forgot
      to update all the cases when we get a key from mac80211 and don't
      program it into the hardware but still return 0 for HW crypto on TX.
      
      In AP mode with WEP, we tried to fix this by programming the keys
      separately for each station later, but this ultimately turns out to
      be buggy, for example now it leaks memory when we have more than one
      WEP key.
      
      Fix this by simply using only SW crypto for WEP in newer devices by
      returning -EOPNOTSUPP instead of trying to program WEP keys later.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      475c6bde
  3. 14 2月, 2019 1 次提交
  4. 04 2月, 2019 3 次提交
    • J
      iwlwifi: mvm: remove redundant condition · f992c61d
      Johannes Berg 提交于
      In iwl_mvm_sta_alloc_queue_tvqm(), we know that we have a
      station, so no need to check it.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      f992c61d
    • E
      iwlwifi: mvm: fix AP mode in WEP · 28916a16
      Emmanuel Grumbach 提交于
      Recently we started to send the WEP keys to the firmware so
      that we could use hardware Tx encryption also on newer
      devices that require the keys to be installed in the firmware
      for encryption (as opposed to older devices that can get
      the key in the Tx command for each Tx).
      
      When we implemented that, we forgot to remove the key when
      we remove a station leading to a situation where a station
      that connects and disconnects a lot of times exhausts the
      key database inside the firmware.
      
      A fix was made for that, but we always removed the same
      key: mvmvif->ap_wep_key which means that we removed the
      same key entry in the firmware. This can make sense since
      in WEP, the key is the same for all the stations, but the
      internal implementation of iwl_mvm_set_sta_key and
      iwl_mvm_remove_sta_key assumes that each station uses a
      different key in the firmware's key database.
      
      So now we got to the situation where we have a single
      ieee80211_key_conf instance that means, a single
      ieee80211_key_conf.hw_key_idx index for several stations
      and hence for several keys.
      ieee80211_key_conf.hw_key_idx is set to 0 when the first
      station associates, and then it is overwritten to 1 when
      the second station associates which is a buggy of course.
      This led to the following message upon the removal of the
      second station:
      
      iwlwifi 0000:00:03.0: offset 1 not used in fw key table.
      WARNING: CPU: 2 PID: 27883 at net/mac80211/sta_info.c:1122 __sta_info_destroy_part2+0x16b/0x180 [mac80211]
      RIP: 0010:__sta_info_destroy_part2+0x16b/0x180 [mac80211]
       Call Trace:
        __sta_info_destroy+0x2a/0x40 [mac80211]
        sta_info_destroy_addr_bss+0x38/0x60 [mac80211]
        ieee80211_del_station+0x1d/0x30 [mac80211]
        nl80211_del_station+0xe0/0x1f0 [cfg80211]
      
      Fix this by copying the ieee80211_key_conf structure for
      each and every station. This is the easiest way to properly
      remove the keys with the right index. Another solution
      would have been to allow several stations to use the same
      key offset in the firmware. That would require to change
      the way we track keys in iwlmvm and not really worth it.
      
      Also, maintain correctly fw_key_table when we add a key
      for the multicast station.
      Remove the key when we remove the multicast station.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Fixes: 337bfc98 ("iwlwifi: mvm: set wep key for all stations in soft ap mode")
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      28916a16
    • S
      iwlwifi: mvm: simplify some return conditions · b2c1bf59
      Sara Sharon 提交于
      Simplify some return conditions found by running a semantic patch
      to detect unnecessary assignments to local variables.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      b2c1bf59
  5. 29 1月, 2019 1 次提交
    • S
      iwlwifi: mvm: get rid of tx_path_lock · fba8248e
      Sara Sharon 提交于
      TX path lock was introduced in order to prevent out of order
      invocations of TX.
      
      This can happen in the following flow:
      
      TX path invoked from net dev
      Packet dequeued
      	TX path invoked from RX path
      	Packet dequeued
      	Packet TXed
      Packet TXed
      
      However, we don't really need a lock. If TX path is already
      invoked from some location, other paths can simply abort their
      execution, instead of waiting to the first path to finish, and
      then discover queue is (likely) empty or stopped.
      
      Replace the lock with an atomic variable to track TX ownership.
      This simplifies the locking dependencies between RX and TX paths,
      and should improve performance.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      fba8248e
  6. 26 1月, 2019 2 次提交
    • M
      iwlwifi: mvm: avoid possible access out of array. · b0d795a9
      Mordechay Goodstein 提交于
      The value in txq_id can be out of array scope,
      validate it before accessing the array.
      Signed-off-by: NMordechay Goodstein <mordechay.goodstein@intel.com>
      Fixes: cf961e16 ("iwlwifi: mvm: support dqa-mode agg on non-shared queue")
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      b0d795a9
    • S
      iwlwifi: mvm: support mac80211 TXQs model · cfbc6c4c
      Sara Sharon 提交于
      Move to use the new mac80211 TXQs implementation. This has
      quite a few benefits for us. We can get rid of the awkward
      mapping of DQA to mac80211 queues. We can stop buffering
      traffic while waiting for the queue to be allocated. We can
      also use mac80211 AMSDUs instead of building it ourselves.
      
      The usage is pretty simple:
      Each ieee80211_txq contains iwl_mvm_txq. There is such a
      queue for each TID, and one for management frames. We keep
      having static AP queues for probes and non-bufferable MMPDUs,
      along with broadcast and multicast queues. Those are being
      used from the "old" TX invocation path - iwl_mvm_mac_tx.
      
      When there is a new frame in a TXQ, iwl_mvm_mac_wake_tx is
      being called, and either invokes the TX path, or allocates
      the queue if it does not exist.
      
      Most of the TX path is left untouched, although we can consider
      cleaning it up some more, for example get rid of the duplication
      of txq_id in both iwl_mvm_txq and iwl_mvm_dqa_txq_info.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      cfbc6c4c
  7. 20 12月, 2018 1 次提交
  8. 11 11月, 2018 3 次提交
  9. 08 10月, 2018 10 次提交
  10. 28 9月, 2018 2 次提交
  11. 31 8月, 2018 1 次提交
  12. 26 7月, 2018 1 次提交
  13. 30 5月, 2018 1 次提交
  14. 20 4月, 2018 2 次提交
  15. 19 3月, 2018 3 次提交
  16. 16 3月, 2018 1 次提交
  17. 02 3月, 2018 2 次提交
    • I
      iwlwifi: mvm: Correctly set the tid for mcast queue · 6508de03
      Ilan Peer 提交于
      In the scheduler config command, the meaning of tid == 0xf was intended
      to indicate the configuration is for management frames. However,
      tid == 0xf was also used for the multicast queue that was meant only
      for multicast data frames, which resulted with the FW not encrypting
      multicast data frames.
      
      As multicast frames do not have a QoS header, fix this by setting
      tid == 0, to indicate that this is a data queue and not management
      one.
      Signed-off-by: NIlan Peer <ilan.peer@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      6508de03
    • S
      iwlwifi: mvm: fix "failed to remove key" message · e4f13ad0
      Sara Sharon 提交于
      When the GTK is installed, we install it to HW with the
      station ID of the AP.
      
      Mac80211 will try to remove it only after the AP sta is
      removed, which will result in a failure to remove key
      since we do not have any station for it.
      
      This is a valid situation, but a previous commit removed
      the early return and added a return with error value, which
      resulted in an error message that is confusing to users.
      
      Remove the error return value.
      
      Fixes: 85aeb58c ("iwlwifi: mvm: Enable security on new TX API")
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      e4f13ad0
  18. 16 2月, 2018 1 次提交
  19. 21 12月, 2017 1 次提交
  20. 06 12月, 2017 2 次提交