1. 20 4月, 2017 1 次提交
  2. 11 4月, 2017 2 次提交
    • S
      iwlwifi: mvm: add multicast station · 26d6c16b
      Sara Sharon 提交于
      Currently multicast queue is associated with the broadcast
      station.
      
      This raises quite a few issues:
      
      The multicast queue has a special treatment:
      - It is sent in the MAC context command
      - It is excluded from tfd_queue_mask
      
      In DQA mode we end up enabling two queues - the probe response
      queue and the multicast queue - with the same station (broadcast)
      and TID while in DQA mode it should be unique RA-TID.
      Firmware will enforce it for a000 devices, so this allocation
      will fail.
      
      In addition, in a000 devices the FW will set the FIFO and not
      the driver. So there is a need for FW to know when we enable
      the queue that it is multicast queue so it will be bound to
      the multicast FIFO. There is no such way in current design.
      
      In order to simplify driver and firmware handling of this queue
      create a multicast station.
      This solves the unique RA-TID issue in the short term and serves
      as preparation for the long term.
      
      In the long term we will also add a flag marking this station for
      the FW as the multicast station.
      Once we will do that the FW will know this is the multicast queue
      immediately when it is added and bind it to the correct FIFO.
      It will also enable removing the special treatment of the
      queue in the MAC context command.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      26d6c16b
    • S
      iwlwifi: mvm: cleanup pending frames in DQA mode · 1c17627b
      Sara Sharon 提交于
      When a station is asleep, the fw will set it as "asleep".
      All queues that are used only by one station will be stopped by
      the fw.
      
      In pre-DQA mode this was relevant for aggregation queues. However,
      in DQA mode a queue is owned by one station only, so all queues
      will be stopped.
      As a result, we don't expect to get filtered frames back to
      mac80211 and don't have to maintain the entire pending_frames
      state logic, the same way as we do in aggregations.
      
      The correct behavior is to align DQA behavior with the aggregation
      queue behaviour pre-DQA:
      - Don't count pending frames.
      - Let mac80211 know we have frames in these queues so that it can
      properly handle trigger frames.
      
      When a trigger frame is received, mac80211 tells the driver to send
      frames from the queues using release_buffered_frames.
      The driver will tell the fw to let frames out even if the station
      is asleep. This is done by iwl_mvm_sta_modify_sleep_tx_count.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      1c17627b
  3. 24 3月, 2017 1 次提交
  4. 16 3月, 2017 1 次提交
    • S
      iwlwifi: mvm: cleanup pending frames in DQA mode · 9a3fcf91
      Sara Sharon 提交于
      When a station is asleep, the fw will set it as "asleep".
      All queues that are used only by one station will be stopped by
      the fw.
      
      In pre-DQA mode this was relevant for aggregation queues. However,
      in DQA mode a queue is owned by one station only, so all queues
      will be stopped.
      As a result, we don't expect to get filtered frames back to
      mac80211 and don't have to maintain the entire pending_frames
      state logic, the same way as we do in aggregations.
      
      The correct behavior is to align DQA behavior with the aggregation
      queue behaviour pre-DQA:
      - Don't count pending frames.
      - Let mac80211 know we have frames in these queues so that it can
      properly handle trigger frames.
      
      When a trigger frame is received, mac80211 tells the driver to send
      frames from the queues using release_buffered_frames.
      The driver will tell the fw to let frames out even if the station
      is asleep. This is done by iwl_mvm_sta_modify_sleep_tx_count.
      Reported-and-tested-by: NJens Axboe <axboe@kernel.dk>
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      9a3fcf91
  5. 08 2月, 2017 2 次提交
    • G
      iwlwifi: mvm: avoid race condition in ADD_STA. · 735a0045
      Goodstein, Mordechay 提交于
      The race happens when we send ADD_STA(auth->assoc) -> LQ_CMD
      between the commands the FW sometimes loses the medium for AUX, and
      sends a ndp to the AP and the flow becomes, ADD_STA -> send ndp -> LQ_CMD
      the problem is that there's no rates yet defined for sending the ndp and
      FW generates an assert.
      
      The fix: change the order of the commands to LQ_CMD -> ADD_STA
      Signed-off-by: NMordechay Goodstein <mordechay.goodstein@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      735a0045
    • A
      iwlwifi: mvm: Fix CSA received immediately after association · b45242c9
      Avraham Stern 提交于
      The session protection set for association is only removed when
      BSS_CHANGED_BEACON_INFO is set and BSS_CHANGED_ASSOC is not set.
      
      However, mac80211 may set both on association (in case a beacon was
      already received). In this case, mac80211 will not set
      BSS_CHANGED_BEACON_INFO on the next beacons because it has already
      notified the beacon change, so the session protection is never removed
      (until the session protection ends).
      
      When a CSA is received within this time, the station will fail to
      folllow the channel switch because it cannot schedule the time event.
      
      Fix this by removing the session protection when
      BSS_CHANGED_BEACON_INFO and BSS_CHANGED_ASSOC are both set.
      Signed-off-by: NAvraham Stern <avraham.stern@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      b45242c9
  6. 07 2月, 2017 1 次提交
    • L
      iwlwifi: mvm: release static queues on bcast release · df88c08d
      Liad Kaufman 提交于
      A few of the static queues are enabled along with the bcast
      STA. Make sure they are removed along with it, rather than
      waiting for the mac ctxt release.
      
      This is needed because we sometimes have a STA being removed
      and then added again (either with the same sta_id or a
      different one). If we wait for the mac ctxt release we will
      try to allocate the queues again (as this is currently done
      in the STA allocation and not in the MAC init) although
      they weren't freed, and even if the sta_id of the STA has
      changed.
      Signed-off-by: NLiad Kaufman <liad.kaufman@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      df88c08d
  7. 03 2月, 2017 2 次提交
    • J
      iwlwifi: mvm: set AID to firmware only for associated stations · 6ea29ce5
      Johannes Berg 提交于
      The firmware will soon actually look at the AID field, and
      when it does that it'll try to ensure that the AID is never
      changing. Due to the way the station is added, it may start
      with an invalid AID before it's associated, so to ensure a
      constant AID (once it becomes non-zero), track the station
      state and set the AID only when the station is associated
      and when it disassociates.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      6ea29ce5
    • S
      iwlwifi: mvm: support unification of INIT and RT images · 1f370650
      Sara Sharon 提交于
      For a000 devices the INIT and RT images are unified to one
      image.
      The changes in the flow are the following:
      * Driver load only RT firmware - meaning that the nvm access
        command will be done in the RT image load flow.
      * A new command (NVM_ACCESS_COMPLETE) now signals to the FW that
        the driver is done accessing the NVM and FW can proceed with phy
        calibrations.
      * Phy DB is no longer sent from INIT FW to be restored by driver
        for the RT FW - all the phy DB is now internal to the FW.
        INIT complete will now follow the NVM access command, without
        phy DB calls before.
      * Paging command is sent earlier in the flow before NVM access
        to enable a complete load of FW.
      * caution must be care when restart is called since we may have
        not completed init flow even though we are in RT firmware.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      1f370650
  8. 26 1月, 2017 1 次提交
  9. 24 1月, 2017 1 次提交
  10. 19 10月, 2016 3 次提交
  11. 27 9月, 2016 1 次提交
  12. 19 9月, 2016 2 次提交
  13. 30 8月, 2016 2 次提交
  14. 06 7月, 2016 6 次提交
  15. 01 7月, 2016 2 次提交
  16. 10 6月, 2016 1 次提交
  17. 11 5月, 2016 7 次提交
    • L
      iwlwifi: mvm: support dqa-mode agg on non-shared queue · cf961e16
      Liad Kaufman 提交于
      In non-shared queues, DQA requires re-configuring existing
      queues to become aggregated rather than allocating a new
      one. It also requires "un-aggregating" an existing queue
      when aggregations are turned off.
      
      Support this requirement for non-shared queues.
      Signed-off-by: NLiad Kaufman <liad.kaufman@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      cf961e16
    • S
      iwlwifi: mvm: don't allow negative reference count · 16c45822
      Sara Sharon 提交于
      Currently code allows mvm reference to become negative and
      only warns in case mvm reference is released while reference
      counting is 0.
      However, we better prevent this from happening at all since
      iwl_mvm_unref() may race against iwl_mvm_unref_all_except()
      which is called on restart.
      As a result we might get the same reference unreferenced twice
      ending with a negative value:
      An example for an easily reproduced log:
          [ 2689.909166] iwl_mvm_ref Take mvm reference - type 8
          [ 2690.732716] iwl_mvm_unref_all_except Cleanup: remove mvm ref type 8 (1)
          [ 2690.849708] iwl_mvm_unref Leave mvm reference - type 8
          [ 2690.849721] WARNING: ... iwl_mvm_unref+0xb0/0xc0 [iwlmvm]()
      
      If there will be yet another another restart iwl_mvm_unref_all_except
      will run from 0 up to ref count, and since it is unsigned, we will throw
      the transport ref count completely out of balance:
          iwl_mvm_unref_all_except[I] -- Cleanup: remove mvm ref type 8 (255)
          iwl_trans_slv_unref[I] -- rpm counter: 0
          iwl_trans_slv_unref[I] -- rpm counter: -1
          iwl_trans_slv_unref[I] -- rpm counter: -2
       ...
          iwl_trans_slv_unref[I] -- rpm counter: -253
          iwl_trans_slv_unref[I] -- rpm counter: -254
      
      As there is no valid scenario where we can get to a negative
      reference count - prevent it from happening.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      16c45822
    • J
      iwlwifi: mvm: advertise RSS queue usage · 80938abc
      Johannes Berg 提交于
      In order for mac80211 to use per-CPU statistics for RSS RX, the
      driver needs to advertise that it uses RSS. Do this when using
      more than a single queue.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      80938abc
    • S
      iwlwifi: mvm: add reorder buffer per queue · b915c101
      Sara Sharon 提交于
      Next hardware will direct packets to core based on the TCP/UDP
      streams.
      This logic can create holes in reorder buffer since packets that
      belong to other stream were directed to a different core.
      However, those are valid holes and the packets can be indicated
      in L3 order.
      
      The hardware will utilize a mechanism of informing the driver of
      the normalized ssn and the driver shall release all packets that
      SN is lower than the nssn.
      This enables managing the reorder across the queues without sharing
      any data between them.
      
      The reorder buffer is allocated and released directly in the RX path
      in order to avoid various races between control path and rx path.
      The code utilizes the internal messaging to notify rx queues of when
      to delete the reorder buffer.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      b915c101
    • S
      iwlwifi: mvm: add infrastructure for tracking BA session in driver · 10b2b201
      Sara Sharon 提交于
      According to the spec when a BA session is started there
      is a timeout set for the session in the ADDBA request.
      If there is not activity on the TA/TID then the session
      expires and a DELBA is sent.
      In order to check for the timeout, data must be shared
      among the rx queues.
      Add a timer that runs as long as BA session is active
      for the station and stops aggregation session if needed.
      This patch also lays the infrastructure for the reordering
      buffer which will be enabled in the next patches.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      10b2b201
    • S
      iwlwifi: mvm: change RX sync notification to be an attribute and not a type · d0ff5d22
      Sara Sharon 提交于
      Currently the sync notification is a type of notification. However, it
      is better fitted as an attribute of a notification, since there might
      be another message in the payload (delba for instance) that should be
      sent while control path is waiting for all queues to process.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      d0ff5d22
    • S
      iwlwifi: mvm: implement driver RX queues sync command · 0636b938
      Sara Sharon 提交于
      mac80211 will call the driver whenever there is a race between
      RSS queues and control path that requires a processing of all
      pending frames in RSS queues.
      Implement that by utilizing the internal notification mechanism:
      queue a message to all queues. When the message is received on
      a queue it decrements the atomic counter. This guarantees that
      all pending frames in the RX queue were processed since the message
      is in order inside the queue.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      0636b938
  18. 12 4月, 2016 1 次提交
  19. 30 3月, 2016 3 次提交