summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm
Commit message (Collapse)AuthorAgeFilesLines
...
| * iwlwifi: mvm: combine part of the scan stop flowsLuciano Coelho2015-05-281-28/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For UMAC scans, we were simply jumping into another function when scan stop functions were called, while for LMAC scans, the flow continued. To make the flows cleaner and more balanced, combine the UMAC part into the main stop functions. This also makes us take one step closer into combining the state flags for both APIs. Note that some STOPPING flags will be dangling in UMAC scans, but it doesn't matter because they are not used in UMAC yet (and this will be fixed in subsequent patches). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: don't stop regular scans when going out of idle stateLuciano Coelho2015-05-281-3/+1
| | | | | | | | | | | | | | | | | | | | It is not necessary to stop regular scans when going out of idle state. Previously, we were doing so for LMAC scans because the iwl_mvm_scan_offload_stop() function was stopping both kinds of scans. Now that we have more granularity, we can skip it. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: reorganize scan stopping functionsLuciano Coelho2015-05-284-58/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The iwl_mvm_scan_offload_stop() function is used to stop LMAC regular scan, stop LMAC scheduled scan and stop UMAC scheduled scans (but not UMAC regular scans), making it very difficult to read. Reorganize the scan stopping functions by creating separate functions to stop regular and scheduled scans, separating the LMAC stopping part of the code from the rest and renaming the offload_stop function to iwl_mvm_lmac_scan_stop(). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: BT Coex - fix shared antenna check with new APIEmmanuel Grumbach2015-05-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit below fixed this for the old firmware API only. Since the new firmware API hasn't been released yet, this doesn't fix anything on currently existing firmwares. This completes: commit afcee962b09842d0f4191beb4a2d08251b4c7705 Author: Eyal Shapira <eyal@wizery.com> Date: Mon Feb 9 15:18:17 2015 +0200 iwlwifi: mvm: fix BT coex shared antenna activity check type=bugfix bug=not-tracked fixes=unknown Reviewed-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: make iwl_mvm_config_sched_scan_profiles() staticLuciano Coelho2015-05-282-4/+3
| | | | | | | | | | | | | | | | The iwl_mvm_config_sched_scan_profiles() function is only used in scan.c, so remove the declaration from mvm.h and make it static. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: fix the net-detect SSIDs report orderLuciano Coelho2015-05-281-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | After the scan refactor, the order of the SSIDs passed to the firmware in all scans (including net-detect) are inverted. This was causing the reporting code to use the wrong SSIDs. To fix this, invert the array index when accessing the saved match SSIDs to report the wake-up. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: add UMAC scan iteration complete notificationAvraham Stern2015-05-285-2/+53
| | | | | | | | | | | | | | | | | | | | | | Add UMAC scan iteration complete notification. This notification can be enabled by setting scan_iter_notif_enabled through debugfs. Upon receiving this notification, print the list of channels that have been scanned in this iteration. This is useful for debugging. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: print scanned channel list on scan iteration complete notificationAvraham Stern2015-05-281-2/+21
| | | | | | | | | | | | | | | | | | When receiving scan iteration complete notification, print a list of the channels that have been scanned in this iteration. This is useful for debugging. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: BT Coex - allocate a short command on the stackEmmanuel Grumbach2015-05-281-25/+11
| | | | | | | | | | | | | | | | | | The BT_CONFIG command used to be very long, hence it was allocated on the heap in the previous API. In the new API, this command is much smaller, and can now safely be allocated on the stack. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: BT Coex - remove useless codeEmmanuel Grumbach2015-05-281-43/+0
| | | | | | | | | | | | | | | | | | Since we don't need to configure the Ack / CTS kill mask anymore in the new API, we don't need to iterate all the interfaces upon rssi event on one of the interfaces. Remove that code. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: remove the UMAC specific scan typesLuciano Coelho2015-05-281-30/+17
| | | | | | | | | | | | | | | | | | | | There is no need to have separate definitions for the UMAC scan types, since they are the same as the LMAC types. Remove UMAC scan types and use the generic ones instead. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: Configure agg. queue before assigning it to STAAndrei Otcheretianski2015-05-281-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | In order to imeplement the extended VI session feature for Miracast, the FW requires to detect the VI queue. The detection of the VI queue is done when it is assigned to a STA with ADD_STA command, so by this time the FW expects the queue to be already configured (mapped to VI AC and aggregation enabled). Previously, the queue configuration was done after STA modificaton which broke the extended VI session feature and resulted in higher latencies. Fix this by calling iwl_mvm_enable_agg_txq before station modification. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: handle device start failure correctlyJohannes Berg2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | If the device fails to start correctly prior to loading the regular runtime firmware (after having run the INIT firmware), treat that error correctly by actually checking the return value of _iwl_trans_start_hw() and stopping the device again before returning an error. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: advertise randomised netdetect MAC addressJohannes Berg2015-05-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the nl80211 documentation, we can neither advertise scheduled scan nor netdetect address randomisation. However, all the products that currently require this don't have a need for the full randomisation. Therefore, advertise the feature anyway which results in host- based randomisation, done whenever the system suspends. This is sufficient for the platforms currently requiring this feature. If we ever extend this in the future to do full randomisation in the firmware, then certainly this will still be sufficient for the current requirements, so it doesn't make a lot of sense to split the feature bits. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: 8000: fallback to default NVM fileEran Harary2015-05-282-14/+11
| | | | | | | | | | | | | | | | | | | | Set a default NVM in case the userspace specifies a file that doesn't match the hardware version. This allows not to change the boot scripts when someone replaces the device with a newer hardware step. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: Add debugfs entry for Tx power limitMatti Gottlieb2015-05-281-2/+19
| | | | | | | | | | | | | | | | Add debugfs entry for showing the different Tx power restrictions that are caused due to various reasons. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: small fix in a comment about UMAC scan schedulesLuciano Coelho2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | The UMAC API supports multiple scan schedules, but now we use only a single one. Change the comment to make this clear and avoid confusion. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: Remove use of the deprecacted PTR_RETNicholas Krause2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | This removes the use of the two deprecated calls to the macro PTR_RET in iwl_mvm_get_regdomain and replaces them both to PTR_ERR_OR_ZERO. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> [Commit message editing] Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * iwlwifi: mvm: fix ROC reference accountingEliad Peller2015-05-264-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit b112889c5af8124 ("iwlwifi: mvm: add Aux ROC request/response flow") added aux ROC flow in addition to the existing ROC flow. While doing it, it moved the ROC reference release to a common work item, which is being called for both the ROC and aux ROC flows. This resulted in invalid reference accounting, as no reference was taken in case of aux ROC, while a reference was released on completion. Fix it by adding a reference for the aux ROC as well, and release only the relevant references on completion (according to the set bits). While at it, convert cancel_work_sync() to flush_work(), in order to make sure the references are being cleaned properly. Fixes: b112889c5af8 ("iwlwifi: mvm: add Aux ROC request/response flow") Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * Merge remote-tracking branch 'iwlwifi-fixes/master' into iwlwifi-nextEmmanuel Grumbach2015-05-264-10/+20
| |\ | | | | | | | | | | | | | | | | | | Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Conflicts: drivers/net/wireless/iwlwifi/Kconfig
| | * iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx()Eliad Peller2015-05-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qos_seq points (to a struct) inside the command response data. Make sure to free the response only after qos_seq is not needed anymore. Reported-by: Heng Luo <heng.luo@intel.com> Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| | * iwlwifi: mvm: clean net-detect info if device was reset during suspendLuciano Coelho2015-05-211-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| | * iwlwifi: mvm: take the UCODE_DOWN reference when resumingLuciano Coelho2015-05-211-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: EliadX Peller <eliad@wizery.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| | * iwlwifi: mvm: BT Coex - duplicate the command if sent ASYNCEmmanuel Grumbach2015-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | There are buses that can't handle ASYNC command without copying them. Duplicate the host command instead. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| | * iwlwifi: mvm: Free fw_status after use to avoid memory leakHaim Dreyfuss2015-05-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 2021a89d7b8a ("iwlwifi: mvm: treat netdetect wake up separately") Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| | * iwlwifi: mvm: fix MLME triggerEmmanuel Grumbach2015-05-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | A few triggers have status = MLME_SUCCESS and they are still interesting. E.g. if we want to collect data upon deauth, the status will be MLME_SUCCESS. Fix that. Fixes: d42f53503406 ("iwlwifi: mvm: add trigger for firmware dump upon MLME failures") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| | * iwlwifi: mvm: forbid MIMO on devices that don't support itEmmanuel Grumbach2015-05-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | There are devices that forbid MIMO by the mean of the NVM. Detect thoses devices and forbid MIMO otherwise the firmware would crash. STBC is still allowed on these devices. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: include wildcard SSID in scansDavid Spinadel2015-05-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a copy paste bug that didn't copy wildcard SSIDs to scan requests. This bug causes scan with only wildcard SSID to be passive, and scans with more than one SSID to send only the direct probes. Fixes: 2a28ac14c518 ("iwlwifi: mvm: add common scan params to thw iwl_mvm_scan_params struct") Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: remove some unused stuff from scan.cLuciano Coelho2015-04-291-5/+0
| | | | | | | | | | | | | | | | | | | | | Some more tidbits left over from the legacy scan removal. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: make thermal throttling values configurable per NIC familyChaya Rachel Ivgi2015-04-292-75/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The thermal throttling parameters were constant and hardcoded, not allowing changes for different NIC families. Change this so that the values are part of the NIC family configuration and are not constant (so they can be changed dynamically in the future). Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: don't reset key index on HW restartJohannes Berg2015-04-291-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a firmware restart is done, don't try to reprogram the keys to new slots but rather just keep the old key index, while skipping keys that weren't programmed before. Not only does this restore the state more faithfully, but it will also allow using the HW key index for internal purposes as an array index. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: rename generic_scan_cmd functions to dwellLuciano Coelho2015-04-291-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic scan command functions are now irrelevant, since both sched and regular scans are in the same code. So rename this functions to dwell and isolate all the dwell-related setting to them. Keeping the dwell code separate makes it easier to compare the LMAC and UMAC versions. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: move all LMAC scan flags into a single funtionLuciano Coelho2015-04-291-25/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having an LMAC counterpart for the existing UMAC flags function makes things more consistent and easy to compare and spot the differences. The flags are the same, but are in different bits, so unfortunately we can't use a single function for both APIs. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: move all UMAC scan flags setting into the relevant functionLuciano Coelho2015-04-291-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clean the code a little by moving all the flags into the right function. Additionally, rename the function, since "common" is now irrelevant. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: remove deprecated command IDsDavid Spinadel2015-04-294-29/+0
| | | | | | | | | | | | | | | Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: avoid use-after-free on iwl_mvm_d0i3_enable_tx() [BUGFIX]Eliad Peller2015-04-291-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qos_seq points (to a struct) inside the command response data. Make sure to free the response only after qos_seq is not needed anymore. type=bugfix bug=not-tracked fixes=I78c07110b59dcd389207bd2b168b0a2760839fe0 Change-Id: I619ce2c17e064dc98c7be9abc1e23175fdc8fb9a Reported-by: Heng Luo <heng.luo@intel.com> Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-on: https://gerrit.rds.intel.com/r/55381 Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Tested-by: IWL Jenkins Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine UMAC scans into oneLuciano Coelho2015-04-291-69/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | With just a few differences left in the UMAC scan functions now, we can merge them into one, taking care of the small difference according to the total number of iterations required. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: trim sched scan delay down to 16-bit for LMAC as wellLuciano Coelho2015-04-291-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In theory, LMAC scans can handle a 32-bit delay, but since waiting for over 18 hours to start the scan is a bit silly and to keep it aligned with UMAC scans (which only support 16-bit delays), trim it down to 16-bits. This makes the LMAC vs. UMAC and the UMAC reg scan vs. UMAC sched scan code more similar. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine LMAC scans into oneLuciano Coelho2015-04-291-83/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last remaining difference between the regular scan and scheduled scan flows for LMAC is the FW capabilities check for EBS scans. Merge these checks into a new function and then combine the LMAC scan functions into a single one. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: add number of scan iterations and multiplier to paramsLuciano Coelho2015-04-291-14/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As another step towards combining the scan and sched scan functions, add parameters that tell the scan function how many iterations we want (i.e. 1 for normal scan, more for scheduled scan) and that set the full scan multiplier (only meaningful for LMAC). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine LMAC and UMAC preq generationLuciano Coelho2015-04-291-46/+35
| | | | | | | | | | | | | | | | | | | | | | | | The probe request to be added to both LMAC and UMAC scan commands are identical, so move the generation out of the LMAC/UMAC-specific code. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: rename scan_calc_params to scan_calc_dwellLuciano Coelho2015-04-291-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | To make things clearer, rename the iwl_mvm_scan_calc_params() function to iwl_mvm_calc_dwell() and make it calculate and fill in only dwell-related parameters. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine SSID functions for sched and regular scansLuciano Coelho2015-04-291-47/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that both scheduled scan and regular scan SSID populating functions do the same thing, they can be combined into a single function. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: revert order of SSIDs for sched scansLuciano Coelho2015-04-291-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The firmware inverts the order of the SSIDs sent out in probe requests (for some reason). For regular scans, we've been passing the SSIDs in the opposite order so they go out in the order we want. With scheduled scans, we were not doing that, so they were sent out in reverse order of priority. Fix that by using the reverse order when populating the SSIDs array for scheduled scans as well. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine ssid_bitmap setting for regular scansLuciano Coelho2015-04-291-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only difference in the ssid_bitmap between LMAC and UMAC scans is that in LMAC bits 1 to 20 are used, while in UMAC bits 0 to 19 are used (*sigh*). So we can combine the bitmap creation into a single function and simply shift left if LMAC is used. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: add common scan params to thw iwl_mvm_scan_params structLuciano Coelho2015-04-291-94/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many parameters are common for all scans. Instead of parsing the cfg80211 scan and sched scan requests differently in each flow, move the parsing outside of the API/scan-type specific functions. In this way, we only need to differentiate between scan types once. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine parts of UMAC and LMAC sched scansLuciano Coelho2015-04-291-74/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to the regular scan patch, a lot of the UMAC and LMAC sched scan code is also almost identical. Grab the low hanging fruits by combining the obvious parts. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine parts of UMAC and LMAC scansLuciano Coelho2015-04-291-75/+50
| | | | | | | | | | | | | | | | | | | | | | | | A lot of the UMAC and LMAC scan code is almost identical. Grab the low hanging fruits by combining the obvious parts. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: iterate all interfaces during HW recovery cleanupArik Nemtsov2015-04-291-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usually during HW recovery the state of all active interfaces is cleaned up during drv_start(). There's a special case where a HW restart is requested when an interface is going down. In this case the iface-iterator won't see this interface and we won't clean it. This has bad consequences once the interface is legitimately brought up again. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
| * | iwlwifi: mvm: combine scan size checks into a common functionLuciano Coelho2015-04-293-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of repeating the same code in 4 different places, combine the comparisons into a new function. Additionally, this change fixes UMAC scans where the RRM IEs were not taken into consideration when calculating the IE length. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
OpenPOWER on IntegriCloud