1. 19 10月, 2016 3 次提交
  2. 11 5月, 2016 1 次提交
  3. 30 3月, 2016 1 次提交
    • 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
  4. 02 3月, 2016 1 次提交
  5. 29 2月, 2016 1 次提交
  6. 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
  7. 01 2月, 2016 2 次提交
    • S
      iwlwifi: mvm: support beacon storing · 0db056d3
      Sara Sharon 提交于
      Currently firmware is configured to filter out beacons. In case
      a beacon was changed - it is waking the host.
      However, some vendors change their IEs frequently without any
      significant change, and redundant wakeups are triggered as a
      result.
      As a solution disable beacon filtering when entering d0i3.
      Instead, firmware will store the latest beacon and upon exiting
      d0i3 it will send it up to the host, so the host can act upon
      changes (if there were any).
      This beacon will arrive as a dedicated notification - support it
      as well.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      0db056d3
    • M
      iwlwifi: mvm: Do not switch to D3 image on suspend · 23ae6128
      Matti Gottlieb 提交于
      Currently when the driver is configured with wowlan parameters, and enters
      D3 mode, the driver switches the FW image to D3, and when it exists
      suspend, it reloads the D0 image.
      
      If the firmware supports the consolidation of the D0 & D3 images there is
      no need to load the D3 image on suspend, and no need to reload the D0
      image on resume.
      
      Do not switch images on suspend / resume, for firmwares that support
      consolidated images.
      Signed-off-by: NMatti Gottlieb <matti.gottlieb@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      23ae6128
  8. 08 1月, 2016 2 次提交
  9. 21 12月, 2015 3 次提交
  10. 20 12月, 2015 1 次提交
  11. 16 12月, 2015 1 次提交
    • S
      iwlwifi: mvm: change protocol offload flows · c97dab40
      Sara Sharon 提交于
      RFC4862 states that "In all cases, a node MUST NOT respond to
      a Neighbor Solicitation for a tentative address".
      Currently the driver configures the NS offload and does not wait
      for address to become permanent, thus violating the RFC.
      Just removing the address from the address list is not good enough
      for all cases, since the NS messages are needed for the duplicate
      address detection and should not be discarded.
      
      For d0i3 disable NS offload. Put tentative address in the address
      list so the NS packet will not be filtered out by ucode.
      For D3 the platform will not wake from NS packets - so enable
      NS offload while removing the tentative address from the list.
      
      Given that now NS offload might be disabled, and that the ucode
      uses the IP data for other puroposes (L3 filtering) add two
      independent flags indicating if IPv4\IPv6 data is valid.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      c97dab40
  12. 13 12月, 2015 2 次提交
    • L
      iwlwifi: replace d0i3_mode and wowlan_d0i3 with more generic variables · b7282643
      Luca Coelho 提交于
      The d0i3_mode variable is used to distinguish between transports that
      handle d0i3 entry during suspend by themselves (i.e. the slave
      transports) and those which rely on the op_mode layer to do it.  The
      reason why the former do it by themselves is that they need to
      transition from d0i3 in runtime_suspend into d0i3 in system-wide
      suspend and this transition needs to happen before the op_mode's
      suspend flow is called.
      
      The wowlan_d0i3 element is also a bit confusing, because it just
      reflects the wowlan->any value for the trans to understand.  This is a
      bit unclear in the code and not generic enough for future use.
      
      To make it clearer and to generalize the platform power mode settings,
      introduce two variables to indicate the platform power management
      modes used by the transport.
      
      Additionally, in order not to take too big a step in one patch, treat
      this new variables semantically in the same way as the old d0i3_mode
      element, introducing a iwl_mvm_enter_d0i3_on_suspend() function to
      help with that.
      
      This commit also adds the foundation for a new concept where the
      firmware configuration state (i.e. D0, D3 or D0i3) is abstracted from
      the platform PM mode we are in (i.e. runtime suspend or system-wide
      suspend).
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      b7282643
    • E
      iwlwifi: mvm: check iwl_mvm_wowlan_config_key_params() return value · 3f50a690
      Eliad Peller 提交于
      commit 9a4c830007817e ("iwlwifi: mvm: refactor d3 key
      update functions") refactored some code into
      iwl_mvm_wowlan_config_key_params() function, but the
      return value was never checked, and not all the function
      flows returned valid values. fix it.
      
      Fixes: ac8ef0ce ("iwlwifi: mvm: refactor d3 key update functions")
      Signed-off-by: NEliad Peller <eliadx.peller@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      3f50a690
  13. 02 12月, 2015 2 次提交
  14. 26 11月, 2015 2 次提交
  15. 18 11月, 2015 1 次提交
  16. 16 11月, 2015 1 次提交
    • L
      iwlwifi: mvm: don't overwrite the key indices in D3 entry · d6ee54a9
      Luca Coelho 提交于
      When entering D3, we need to use hardcoded key indices because the
      firmware requires that.  To do so, we are overwriting the HW key index
      in the keyconf structure, which makes it impossible to reuse the
      indices that were used before entering D3.  Additionally, we overwrite
      all the non-PTK keys with index 1, because the firmware only allows
      one non-PTK key to be set.  This is bad, because when we resume, we
      may try to set more than one key with index 1, which will obviously
      fail.
      
      To fix this, allow the callers to set a pre-defined index to use in
      iwl_mvm_set_sta_key() instead of relying on the hw_key_idx value from
      the keyconf struct (which requires overwriting it).  In normal cases,
      the caller can pass STA_KEY_IDX_INVALID, which will cause a new key
      offset to be chosen.  During HW_RESTART, we pass the offset that is in
      use.  And during D3 entry, we pass the hardcoded indices we need to
      use.
      
      Additionally, don't clear the fw_key_table in D3 entry, so that the
      flags are still set with the pre-D3 values when exiting D3.
      
      fixes=I3165c22362483f0152d9ec1d2a987fb5529727c1
      
      Fixes: b546dcd6 ("iwlwifi: mvm: don't reset key index on HW restart")
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      d6ee54a9
  17. 05 10月, 2015 2 次提交
  18. 28 8月, 2015 1 次提交
    • L
      iwlwifi: mvm: make sure d0i3 exit work runs before suspending · cf8c3cff
      Luciano Coelho 提交于
      If we are in d0i3 when entering suspend, we leave d0i3 so that
      mac80211 can call us to remove connections or whatever before going to
      suspend.  We do this by calling pm_runtime_resume() early in the slave
      transport flow and reactivating it later, when the wiphy suspend flow
      runs.
      
      The problem is that we queue a work in order to leave d0i3.  If this
      work hasn't run yet when the wiphy suspend flow is called, we have a
      race and entering d0i3 fails (because we're still holding the
      IWL_MVM_REF_EXIT_WORK reference).
      
      To solve this, simply flush the d0i3_exit_work at the beginning of the
      iwl_mvm_suspend() function.
      Signed-off-by: NLuciano Coelho <luciano.coelho@intel.com>
      cf8c3cff
  19. 05 8月, 2015 1 次提交
  20. 04 8月, 2015 3 次提交
  21. 03 6月, 2015 1 次提交
  22. 28 5月, 2015 3 次提交
  23. 22 5月, 2015 3 次提交
    • L
      iwlwifi: mvm: clean net-detect info if device was reset during suspend · a500e469
      Luciano Coelho 提交于
      If the device is reset during suspend with net-detect enabled, we
      leave the net-detect information dangling and this causes the next
      suspend to fail with a warning:
      
      [21795.351010] WARNING: at /root/iwlwifi/iwlwifi-stack-dev/drivers/net/wireless/iwlwifi/mvm/d3.c:989 __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]()
      [21795.353253] Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) [...]
      [21795.366168] CPU: 1 PID: 3645 Comm: bash Tainted: G           O 3.10.29-dev #1
      [21795.368785] Hardware name: Dell Inc. Latitude E6430/0CPWYR, BIOS A09 12/13/2012
      [21795.371441]  f8ec6748 f8ec6748 e51f3ce8 c168aa62 e51f3d10 c103a824 c1871238 f8ec6748
      [21795.374228]  000003dd f8eb982e f8eb982e 00000000 c3408ed4 c41edbbc e51f3d20 c103a862
      [21795.377006]  00000009 00000000 e51f3da8 f8eb982e c41ee3dc 00000004 e7970000 e51f3d74
      [21795.379792] Call Trace:
      [21795.382461]  [<c168aa62>] dump_stack+0x16/0x18
      [21795.385133]  [<c103a824>] warn_slowpath_common+0x64/0x80
      [21795.387803]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.390485]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.393124]  [<c103a862>] warn_slowpath_null+0x22/0x30
      [21795.395787]  [<f8eb982e>] __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
      [21795.398464]  [<f8eb9d7c>] iwl_mvm_suspend+0xec/0x140 [iwlmvm]
      [21795.401127]  [<c104be11>] ? del_timer_sync+0xa1/0xc0
      [21795.403800]  [<f8d4107e>] __ieee80211_suspend+0x1de/0xff0 [mac80211]
      [21795.406459]  [<c168e43d>] ? mutex_lock_nested+0x25d/0x350
      [21795.409084]  [<c1586b64>] ? rtnl_lock+0x14/0x20
      [21795.411685]  [<f8cf0076>] ieee80211_suspend+0x16/0x20 [mac80211]
      [21795.414318]  [<f8c4e014>] wiphy_suspend+0x74/0x710 [cfg80211]
      [21795.416916]  [<c141e612>] __device_suspend+0x1e2/0x220
      [21795.419521]  [<f8c4dfa0>] ? addresses_show+0xa0/0xa0 [cfg80211]
      [21795.422097]  [<c141f997>] dpm_suspend+0x67/0x210
      [21795.424661]  [<c141fd6f>] dpm_suspend_start+0x4f/0x60
      [21795.427219]  [<c108d8e0>] suspend_devices_and_enter+0x60/0x480
      [21795.429768]  [<c168646a>] ? printk+0x4d/0x4f
      [21795.432295]  [<c108de76>] pm_suspend+0x176/0x210
      [21795.434830]  [<c108ca5d>] state_store+0x5d/0xb0
      [21795.437410]  [<c108ca00>] ? wakeup_count_show+0x50/0x50
      [21795.439961]  [<c13208db>] kobj_attr_store+0x1b/0x30
      [21795.442514]  [<c11e3a4b>] sysfs_write_file+0xab/0x100
      [21795.445088]  [<c11e39a0>] ? sysfs_poll+0xa0/0xa0
      [21795.447659]  [<c1179655>] vfs_write+0xa5/0x1c0
      [21795.450212]  [<c1179af7>] SyS_write+0x57/0xa0
      [21795.452699]  [<c1699ec1>] sysenter_do_call+0x12/0x32
      [21795.455146] ---[ end trace faf5321baba2bfdb ]---
      
      To fix this, call the iwl_mvm_free_nd() function in case of any error
      during resume.  Additionally, rename the "out_unlock" label to err to
      make it clearer that it's only called in error conditions.
      
      Cc: stable@vger.kernel.org [3.19+]
      Signed-off-by: NLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      a500e469
    • L
      iwlwifi: mvm: take the UCODE_DOWN reference when resuming · dcfc7fb1
      Luciano Coelho 提交于
      The __iwl_mvm_resume() function always returns 1, which causes
      mac80211 to do a reconfig with IEEE80211_RECONFIG_TYPE_RESTART.  This
      type of reconfig calls iwl_mvm_restart_complete(), where we unref the
      IWL_MVM_REF_UCODE_DOWN, so we should always take the reference in this
      case.
      
      This prevents this kind of warning from happening:
      
      [40026.103025] WARNING: at /root/iwlwifi/iwlwifi-stack-dev/drivers/net/wireless/iwlwifi/mvm/mac80211.c:236 iwl_mvm_unref+0xc9/0xd0 [iwlmvm]()
      [40026.105145] Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) ctr ccm arc4 autofs4 snd_hda_codec_hdmi snd_hda_codec_idt joydev coretemp kvm_intel kvm aesni_intel ablk_helper cryptd lrw aes_i586 snd_hda_intel xts snd_hda_codec gf128mul snd_hwdep snd_pcm snd_seq_midi dell_wmi snd_rawmidi sparse_keymap snd_seq_midi_event snd_seq uvcvideo dell_laptop videobuf2_core dcdbas microcode videodev psmouse snd_timer videobuf2_vmalloc videobuf2_memops serio_raw snd_seq_device btusb i915 snd bluetooth lpc_ich drm_kms_helper soundcore snd_page_alloc drm i2c_algo_bit wmi parport_pc ppdev video binfmt_misc rpcsec_gss_krb5 nfsd mac_hid nfs_acl nfsv4 auth_rpcgss nfs fscache lockd sunrpc msdos lp parport sdhci_pci sdhci ahci libahci e1000e mmc_core ptp pps_core [last unloaded: compat]
      [40026.117640] CPU: 2 PID: 3827 Comm: bash Tainted: G        W  O 3.10.29-dev #1
      [40026.120216] Hardware name: Dell Inc. Latitude E6430/0CPWYR, BIOS A09 12/13/2012
      [40026.122815]  f8effd18 f8effd18 e740fd18 c168aa62 e740fd40 c103a824 c1871238 f8effd18
      [40026.125527]  000000ec f8ec79c9 f8ec79c9 d5d29ba4 d5d2a20c 00000000 e740fd50 c103a862
      [40026.128209]  00000009 00000000 e740fd7c f8ec79c9 f1c591c4 00000400 00000000 f8efb490
      [40026.130886] Call Trace:
      [40026.133506]  [<c168aa62>] dump_stack+0x16/0x18
      [40026.136115]  [<c103a824>] warn_slowpath_common+0x64/0x80
      [40026.138727]  [<f8ec79c9>] ? iwl_mvm_unref+0xc9/0xd0 [iwlmvm]
      [40026.141319]  [<f8ec79c9>] ? iwl_mvm_unref+0xc9/0xd0 [iwlmvm]
      [40026.143881]  [<c103a862>] warn_slowpath_null+0x22/0x30
      [40026.146453]  [<f8ec79c9>] iwl_mvm_unref+0xc9/0xd0 [iwlmvm]
      [40026.149030]  [<f8ec7a4d>] iwl_mvm_mac_reconfig_complete+0x7d/0x210 [iwlmvm]
      [40026.151645]  [<f8b74b20>] ? ftrace_raw_event_drv_reconfig_complete+0xc0/0xe0 [mac80211]
      [40026.154291]  [<f8b6769e>] ieee80211_reconfig+0x28e/0x2620 [mac80211]
      [40026.156920]  [<c10ef0ea>] ? ring_buffer_unlock_commit+0xba/0x100
      [40026.159585]  [<f8b4a04d>] ieee80211_resume+0x6d/0x80 [mac80211]
      [40026.162206]  [<f8a79722>] wiphy_resume+0x72/0x260 [cfg80211]
      [40026.164799]  [<c141e2e7>] ? device_resume+0x57/0x150
      [40026.167425]  [<f8a796b0>] ? wiphy_suspend+0x710/0x710 [cfg80211]
      [40026.170075]  [<c141e26e>] dpm_run_callback+0x2e/0x50
      [40026.172695]  [<c141e321>] device_resume+0x91/0x150
      [40026.175334]  [<c141f636>] dpm_resume+0xf6/0x200
      [40026.177922]  [<c141f920>] dpm_resume_end+0x10/0x20
      [40026.180489]  [<c108d9f7>] suspend_devices_and_enter+0x177/0x480
      [40026.183037]  [<c168646a>] ? printk+0x4d/0x4f
      [40026.185559]  [<c108de76>] pm_suspend+0x176/0x210
      [40026.188065]  [<c108ca5d>] state_store+0x5d/0xb0
      [40026.190581]  [<c108ca00>] ? wakeup_count_show+0x50/0x50
      [40026.193052]  [<c13208db>] kobj_attr_store+0x1b/0x30
      [40026.195608]  [<c11e3a4b>] sysfs_write_file+0xab/0x100
      [40026.198055]  [<c11e39a0>] ? sysfs_poll+0xa0/0xa0
      [40026.200469]  [<c1179655>] vfs_write+0xa5/0x1c0
      [40026.202893]  [<c1179af7>] SyS_write+0x57/0xa0
      [40026.205245]  [<c1699ec1>] sysenter_do_call+0x12/0x32
      [40026.207619] ---[ end trace db1d5a72a0381b0a ]---
      Signed-off-by: NLuciano Coelho <luciano.coelho@intel.com>
      Reviewed-by: NEliadX Peller <eliad@wizery.com>
      Reviewed-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      dcfc7fb1
    • H
      iwlwifi: mvm: Free fw_status after use to avoid memory leak · 2fc863a5
      Haim Dreyfuss 提交于
      fw_status is the only pointer pointing to a block of memory
      allocated above and should be freed after use.
      Note: this come from Klockwork static analyzer.
      
      Cc: stable@vger.kernel.org [3.19+]
      Fixes: 2021a89d ("iwlwifi: mvm: treat netdetect wake up separately")
      Signed-off-by: NHaim Dreyfuss <haim.dreyfuss@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      2fc863a5
  24. 29 4月, 2015 1 次提交