1. 10 3月, 2016 1 次提交
    • E
      iwlwifi: mvm: don't let NDPs mess the packet tracking · 532beba3
      Emmanuel Grumbach 提交于
      We need to track the next packet that we will reclaim in
      order to know when the Tx queues are empty. This is useful
      when we open or tear down an A-MPDU session which requires
      to switch queue.
      The next packet being reclaimed is identified by its WiFi
      sequence number and this is relevant only when we use QoS.
      QoS NDPs do have a TID but have a meaningless sequence
      number. The spec mandates the receiver to ignore the
      sequence number in this case, allowing the transmitter to
      put any sequence number. Our implementation leaves it 0.
      When we reclaim a QoS NDP, we can't update the next_relcaim
      counter since the sequence number of the QoS NDP itself is
      invalid.
      We used to update the next_reclaim based on the sequence
      number of the QoS NDP which reset it to 1 (0 + 1) and
      because of this, we never knew when the queue got empty.
      This had to sad consequence to stuck the A-MPDU state
      machine in a transient state.
      To fix this, don't update next_reclaim when we reclaim
      a QoS NDP.
      
      Alesya saw this bug when testing u-APSD. Because the
      A-MPDU state machine was stuck in EMPTYING_DELBA, we
      updated mac80211 that we still have frames for that
      station when it got back to sleep. mac80211 then wrongly
      set the TIM bit in the beacon and requested to release
      non-existent frames from the A-MPDU queue. This led to
      a situation where the client was trying to poll frames
      but we had no frames to send.
      Reported-by: NAlesya Shapira <alesya.shapira@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      532beba3
  2. 28 2月, 2016 5 次提交
  3. 24 2月, 2016 1 次提交
    • E
      iwlwifi: mvm: move TX PN assignment for TKIP to the driver · 1ad4f639
      Eliad Peller 提交于
      If protocol offloading is configured, the fw might generate some
      frames (e.g. arp response) on its own during d3/d0i3.
      
      On d3/d0i3 exit the driver queries the updated PN (if relevant),
      and updates its keys (for the d0i3 case, this is done by
      iwl_mvm_d0i3_exit_work(), which is scheduled on d0i3 exit)
      
      While in d0i3, iwlmvm defers tx frames until d0i3 exit, and
      then continues their processing.
      
      This is problematic with TKIP, since the frame's PN has already
      been set at this stage (in contrast to CCMP, where the PN is
      being set only later on), so both the frame's PN and the upcoming
      PN update (from d0i3 exit work) might be wrong.
      
      Fix it by moving the TX PN assignment (for TKIP) to the driver,
      similarly to CCMP.
      Signed-off-by: NEliad Peller <eliadx.peller@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      1ad4f639
  4. 16 2月, 2016 1 次提交
    • L
      iwlwifi: mvm: inc pending frames counter also when txing non-sta · fb896c44
      Liad Kaufman 提交于
      Until this patch, when TXing non-sta the pending_frames counter
      wasn't increased, but it WAS decreased in
      iwl_mvm_rx_tx_cmd_single(), what makes it negative in certain
      conditions. This in turn caused much trouble when we need to
      remove the station since we won't be waiting forever until
      pending_frames gets 0. In certain cases, we were exhausting
      the station table even in BSS mode, because we had a lot of
      stale stations.
      
      Increase the counter also in iwl_mvm_tx_skb_non_sta() after a
      successful TX to avoid this outcome.
      
      CC: <stable@vger.kernel.org> [3.18+]
      Signed-off-by: NLiad Kaufman <liad.kaufman@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      fb896c44
  5. 01 2月, 2016 1 次提交
  6. 26 1月, 2016 1 次提交
    • G
      iwlwifi: mvm: rs: fix TPC statistics handling · 69c7fda4
      Gregory Greenman 提交于
      FW behaviour changed and now updates driver about the used TPC
      reduction in the following cases:
      1. In tx response, which is used mostly for a single frame case
      2. In BA notification
      
      When tx aggregation fails with the initial rate, FW will send
      to the driver BA notification and will try to transmit with the
      next rate, but this time without tx power reduction. Thus, in case
      of a failure with the initial rate, driver will get two BA notifications,
      the first one with reduced tx power as in the LQ command and the second
      one with 0 power reduction.
      
      This patch adapts the TPC statistics according to the description above:
      1. Use BA notifications instead of Tx response
      2. For TPC only, drop the optimization which considers empty BA as one
      MPDU. The reason is that with TPC we want to recover very quickly from
      a bad power reduction and, therefore we'd like the success ratio to get
      an immediate hit when failing to get a BA, so we'd switch back to a
      lower or zero power reduction
      Signed-off-by: NGregory Greenman <gregory.greenman@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      69c7fda4
  7. 20 12月, 2015 3 次提交
  8. 13 12月, 2015 1 次提交
  9. 02 12月, 2015 1 次提交
  10. 18 11月, 2015 1 次提交
  11. 25 10月, 2015 1 次提交
  12. 05 10月, 2015 1 次提交
    • L
      iwlwifi: mvm: support using multiple ACs on single HW queue · 4ecafae9
      Liad Kaufman 提交于
      "DQA" is shorthand for "dynamic queue allocation", with the
      idea of allocating queues per-RA/TID on-demand rather than
      using shared queues statically allocated per vif. The goal
      of this is to enable future features (like GO PM) and to
      improve performance measurements of TX traffic.
      
      When RA/TID streams can't be neatly sorted into different AC
      queues, DQA allows sharing queues for the same RA. This means
      that DQA allows different ACs may reach the same HW queue.
      
      Update the code to allow such queue sharing by having a mapping
      between the HW queue and the mac80211 queues using it (as this
      could be more than one queue).
      Signed-off-by: NLiad Kaufman <liad.kaufman@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      4ecafae9
  13. 05 8月, 2015 2 次提交
  14. 04 8月, 2015 2 次提交
  15. 26 6月, 2015 1 次提交
  16. 03 6月, 2015 1 次提交
    • J
      iwlwifi: prepare for higher API/CAPA bits · 859d914c
      Johannes Berg 提交于
      Currently, loading the firmware fails when it has higher API or CAPA
      bits than the driver supports. That's an issue with integration.
      
      At the same time, actually using api[0] and capa[0] will become
      confusing when we also have api[1] and capa[1], and it's almost
      certain that we'll mix up the bits and use the bits for api[1] with
      api[0] by accident.
      
      Avoid all this by translating the API/CAPA bits to the regular kernel
      test_bit() format, and also providing wrapper functions. Also use the
      __bitwise__ facility of sparse to check that we're testing the right
      one.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      859d914c
  17. 28 5月, 2015 1 次提交
  18. 19 3月, 2015 1 次提交
  19. 18 3月, 2015 1 次提交
    • E
      iwlwifi: mvm: properly flush the queues for buffering transport · fe92e32a
      Emmanuel Grumbach 提交于
      There are transport that must buffer frames in the driver.
      This means that we have frames that are not in the op_mode
      and not visible to the firwmare. This causes issues when we
      flush the queues: the op_mode flushes a queue, and the
      firmware flushes all the frames that are *currently* on the
      rings, but if the transport buffers frames, it can submit
      these while we are flushing. This leads to a situation
      where we still have frames on the queues after we flushed
      them.
      Preventing those buffered frame from getting into the
      firmware is possible, but then, we have to run the Tx
      response path on frames that didn't reach the firmware
      which is not desirable.
      The way I solve this here is to let these frames go to the
      firmware, but make sure the firmware will not transmit them
      (by setting the station as draining). The op_mode then needs
      to wait until the transport itself is empty to be sure that
      the queue is really empty.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      fe92e32a
  20. 24 2月, 2015 1 次提交
  21. 22 1月, 2015 2 次提交
  22. 20 1月, 2015 1 次提交
  23. 13 1月, 2015 1 次提交
    • E
      iwlwifi: mvm: set the tx cmd tid for BAR frame correctly · 9b3b43d8
      Eyal Shapira 提交于
      BAR tx cmd tid was set to non qos (8). This is wrong as BAR
      should be sent with the tid of the BA session.
      This led to a corruption in the firmware. The visible
      effect of this from the driver side is the BA notification
      that comes back after the BAR. It was botched and led to the
      WARNING below.
      
      ------------[ cut here ]------------
      WARNING: CPU: 2 PID: 17707 at /home/tester/workspace_hostap/iwlwifi/drivers/net/wireless/iwlwifi/mvm/tx.c:976 iwl_mvm_rx_ba_notif+0x4ba/0x4d0 [iwlmvm]()
      Q 4500, tid 8, flow 65535
      Modules linked in: iwlmvm(O) mac80211(O) iwlwifi(O) cfg80211(O) compat(O) netconsole configfs ctr ccm arc4 autofs4 microcode bnep rfcomm snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_codec_generic snd_hda_intel joydev snd_hda_codec uvcvideo videobuf2_core snd_hwdep videodev snd_pcm videobuf2_vmalloc videobuf2_memops i915 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device drm_kms_helper dell_wmi dell_laptop drm btusb bluetooth snd psmouse i2c_algo_bit sparse_keymap wmi soundcore 6lowpan_iphc dcdbas serio_raw video lpc_ich ppdev mac_hid parport_pc nfsd nfs_acl auth_rpcgss nfs fscache binfmt_misc lockd sunrpc lp parport msdos sdhci_pci sdhci mmc_core ahci libahci e1000e ptp pps_core [last unloaded: compat]
      CPU: 2 PID: 17707 Comm: irq/46-iwlwifi Tainted: G        W  O 3.14.17-patched #4
      Hardware name: Dell Inc. Latitude E6430/0CPWYR, BIOS A09 12/13/2012
       00000000 00000000 ebd49d6c c1616221 f985dbdc ebd49d9c c1044e44 f9861df4
       ebd49dc8 0000452b f985dbdc 000003d0 f98395da f98395da ebd49f10 eaf3d8a4
       0000ffff ebd49db4 c1044f03 00000009 ebd49dac f9861df4 ebd49dc8 ebd49e64
      Call Trace:
       [<c1616221>] dump_stack+0x41/0x52
       [<c1044e44>] warn_slowpath_common+0x84/0xa0
       [<f98395da>] ? iwl_mvm_rx_ba_notif+0x4ba/0x4d0 [iwlmvm]
       [<f98395da>] ? iwl_mvm_rx_ba_notif+0x4ba/0x4d0 [iwlmvm]
       [<c1044f03>] warn_slowpath_fmt+0x33/0x40
       [<f98395da>] iwl_mvm_rx_ba_notif+0x4ba/0x4d0 [iwlmvm]
       [<c10e3952>] ? ring_buffer_unlock_commit+0xa2/0xd0
       [<c10e9767>] ? trace_buffer_unlock_commit+0x37/0x50
       [<f98568a3>] ? iwl_tm_mvm_send_rx+0x53/0x90 [iwlmvm]
       [<f98327a8>] iwl_mvm_rx_dispatch+0x108/0x130 [iwlmvm]
       [<f9eac7e7>] iwl_pcie_irq_handler+0xf17/0x15b0 [iwlwifi]
       [<c10994c1>] irq_thread_fn+0x21/0x50
       [<c109926c>] irq_thread+0xec/0x110
       [<c10994a0>] ? irq_thread_dtor+0xb0/0xb0
       [<c10993f0>] ? irq_finalize_oneshot.part.34+0xc0/0xc0
       [<c1099180>] ? wake_threads_waitq+0x40/0x40
       [<c1062fdb>] kthread+0x9b/0xb0
       [<c1627137>] ret_from_kernel_thread+0x1b/0x28
       [<c1062f40>] ? flush_kthread_worker+0x90/0x90
      ---[ end trace 5e0f67374816db17 ]---
      Signed-off-by: NEyal Shapira <eyalx.shapira@intel.com>
      Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      9b3b43d8
  24. 05 1月, 2015 1 次提交
  25. 29 12月, 2014 1 次提交
  26. 24 11月, 2014 2 次提交
  27. 11 11月, 2014 1 次提交
  28. 29 10月, 2014 1 次提交
  29. 24 10月, 2014 1 次提交
    • E
      Revert "iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate" · 1ffde699
      Emmanuel Grumbach 提交于
      This reverts commit aa11bbf3.
      This commit was causing connection issues and is not needed
      if IWL_MVM_RS_RSSI_BASED_INIT_RATE is set to false by default.
      
      Regardless of the issues mentioned above, this patch added the
      following WARNING:
      
      WARNING: CPU: 0 PID: 3946 at drivers/net/wireless/iwlwifi/mvm/tx.c:190 iwl_mvm_set_tx_params+0x60a/0x6f0 [iwlmvm]()
      Got an HT rate for a non data frame 0x8
      CPU: 0 PID: 3946 Comm: wpa_supplicant Tainted: G           O   3.17.0+ #6
      Hardware name: LENOVO 20ANCTO1WW/20ANCTO1WW, BIOS GLET71WW (2.25 ) 07/02/2014
       0000000000000009 ffffffff814fa911 ffff8804288db8f8 ffffffff81064f52
       0000000000001808 ffff8804288db948 ffff88040add8660 ffff8804291b5600
       0000000000000000 ffffffff81064fb7 ffffffffa07b73d0 0000000000000020
      Call Trace:
       [<ffffffff814fa911>] ? dump_stack+0x41/0x51
       [<ffffffff81064f52>] ? warn_slowpath_common+0x72/0x90
       [<ffffffff81064fb7>] ? warn_slowpath_fmt+0x47/0x50
       [<ffffffffa07a39ea>] ? iwl_mvm_set_tx_params+0x60a/0x6f0 [iwlmvm]
       [<ffffffffa07a3cf8>] ? iwl_mvm_tx_skb+0x48/0x3c0 [iwlmvm]
       [<ffffffffa079cb9b>] ? iwl_mvm_mac_tx+0x7b/0x180 [iwlmvm]
       [<ffffffffa0746ce9>] ? __ieee80211_tx+0x2b9/0x3c0 [mac80211]
       [<ffffffffa07492f3>] ? ieee80211_tx+0xb3/0x100 [mac80211]
       [<ffffffffa0749c49>] ? ieee80211_subif_start_xmit+0x459/0xca0 [mac80211]
       [<ffffffff814116e7>] ? dev_hard_start_xmit+0x337/0x5f0
       [<ffffffff81430d46>] ? sch_direct_xmit+0x96/0x1f0
       [<ffffffff81411ba3>] ? __dev_queue_xmit+0x203/0x4f0
       [<ffffffff8142f670>] ? ether_setup+0x70/0x70
       [<ffffffff814e96a1>] ? packet_sendmsg+0xf81/0x1110
       [<ffffffff8140625c>] ? skb_free_datagram+0xc/0x40
       [<ffffffff813f7538>] ? sock_sendmsg+0x88/0xc0
       [<ffffffff813f7274>] ? move_addr_to_kernel.part.20+0x14/0x60
       [<ffffffff811c47c2>] ? __inode_wait_for_writeback+0x62/0xb0
       [<ffffffff813f7a91>] ? SYSC_sendto+0xf1/0x180
       [<ffffffff813f88f9>] ? __sys_recvmsg+0x39/0x70
       [<ffffffff8150066d>] ? system_call_fastpath+0x1a/0x1f
      ---[ end trace cc19a150d311fc63 ]---
      
      which was reported here: https://bugzilla.kernel.org/show_bug.cgi?id=85691
      
      CC: <stable@vger.kernel.org> [3.13+]
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      1ffde699
  30. 21 9月, 2014 1 次提交