1. 11 4月, 2017 1 次提交
    • 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
  2. 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
  3. 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
  4. 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
  5. 26 1月, 2017 1 次提交
  6. 24 1月, 2017 1 次提交
  7. 19 10月, 2016 3 次提交
  8. 27 9月, 2016 1 次提交
  9. 19 9月, 2016 2 次提交
  10. 30 8月, 2016 2 次提交
  11. 06 7月, 2016 6 次提交
  12. 01 7月, 2016 2 次提交
  13. 10 6月, 2016 1 次提交
  14. 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
  15. 12 4月, 2016 1 次提交
  16. 30 3月, 2016 4 次提交
    • S
      iwlwifi: mvm: enable TCP/UDP checksum support for 9000 family · 5e6a98dc
      Sara Sharon 提交于
      Declare and enable support of RX and TX checksum for 9000 family.
      Configure offload_assist in the TX cmd accordingly to support
      TX csum.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      5e6a98dc
    • L
      iwlwifi: mvm: support bss dynamic alloc/dealloc of queues · 24afba76
      Liad Kaufman 提交于
      "DQA" is shorthand for "dynamic queue allocation". This
      enables on-demand allocation of queues per RA/TID rather than
      statically allocating per vif, thus allowing a potential
      benefit of various factors.
      
      Please refer to the DOC section this patch adds to sta.h to
      see a more in-depth explanation of this feature.
      
      There are many things to take into consideration when working
      in DQA mode, and this patch is only one in a series. Note that
      default operation mode is non-DQA mode, unless the FW
      indicates that it supports DQA mode.
      
      This patch enables support of DQA for a station connected to
      an AP, and works in a non-aggregated mode.
      
      When a frame for an unused RA/TID arrives at the driver, it
      isn't TXed immediately, but deferred first until a suitable
      queue is first allocated for it, and then TXed by a worker
      that both allocates the queues and TXes deferred traffic.
      
      When a STA is removed, its queues goes back into the queue
      pools for reuse as needed.
      Signed-off-by: NLiad Kaufman <liad.kaufman@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      24afba76
    • E
      iwlwifi: make uapsd_disable module param a bitmap · 11dee0b4
      Emmanuel Grumbach 提交于
      This allows to disable uapsd for BSS only, or P2P client
      separately. Remove the now unneeded
      IWL_MVM_P2P_UAPSD_STANDALONE constant.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      11dee0b4
    • A
      iwlwifi: mvm: add LQM vendor command and notification · 03098268
      Aviya Erenfeld 提交于
      LQM stands for Link Quality Measurement. The firmware
      will collect a defined set of statitics (see the
      notification for details) that allow to know how busy
      the medium is. The driver issues a request to the firmware
      that includes the duration of the measurement (the firmware
      needs to be on channel for that amount of time) and the
      timeout (in case the firmware has a lot of offchannel
      activities). If the timeout elapses, the firmware will
      send partial results which are still valuable.
      In case of disassociation / channel switch and alike, the
      driver is in charge of stopping the measurements and the
      firmware will reply with partial results.
      
      The user space API for now is debugfs only and will be
      implmemented in an upcoming patch.
      Signed-off-by: NAviya Erenfeld <aviya.erenfeld@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      03098268
  17. 21 3月, 2016 1 次提交
  18. 10 3月, 2016 2 次提交