diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/scan.c')
| -rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/scan.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c index 3bd5f34d3285..7e9aa3cb3254 100644 --- a/drivers/net/wireless/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/iwlwifi/mvm/scan.c | |||
| @@ -704,7 +704,8 @@ int iwl_mvm_rx_scan_offload_complete_notif(struct iwl_mvm *mvm, | |||
| 704 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); | 704 | iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN); |
| 705 | } | 705 | } |
| 706 | 706 | ||
| 707 | mvm->last_ebs_successful = !ebs_status; | 707 | if (ebs_status) |
| 708 | mvm->last_ebs_successful = false; | ||
| 708 | 709 | ||
| 709 | return 0; | 710 | return 0; |
| 710 | } | 711 | } |
| @@ -1682,10 +1683,10 @@ int iwl_mvm_config_scan(struct iwl_mvm *mvm) | |||
| 1682 | 1683 | ||
| 1683 | band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; | 1684 | band = &mvm->nvm_data->bands[IEEE80211_BAND_2GHZ]; |
| 1684 | for (i = 0; i < band->n_channels; i++, j++) | 1685 | for (i = 0; i < band->n_channels; i++, j++) |
| 1685 | scan_config->channel_array[j] = band->channels[i].center_freq; | 1686 | scan_config->channel_array[j] = band->channels[i].hw_value; |
| 1686 | band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; | 1687 | band = &mvm->nvm_data->bands[IEEE80211_BAND_5GHZ]; |
| 1687 | for (i = 0; i < band->n_channels; i++, j++) | 1688 | for (i = 0; i < band->n_channels; i++, j++) |
| 1688 | scan_config->channel_array[j] = band->channels[i].center_freq; | 1689 | scan_config->channel_array[j] = band->channels[i].hw_value; |
| 1689 | 1690 | ||
| 1690 | cmd.data[0] = scan_config; | 1691 | cmd.data[0] = scan_config; |
| 1691 | cmd.len[0] = cmd_size; | 1692 | cmd.len[0] = cmd_size; |
| @@ -1862,6 +1863,13 @@ int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | |||
| 1862 | flags |= IWL_UMAC_SCAN_GEN_FLAGS_PASS_ALL; | 1863 | flags |= IWL_UMAC_SCAN_GEN_FLAGS_PASS_ALL; |
| 1863 | 1864 | ||
| 1864 | cmd->general_flags = cpu_to_le32(flags); | 1865 | cmd->general_flags = cpu_to_le32(flags); |
| 1866 | |||
| 1867 | if (mvm->fw->ucode_capa.api[0] & IWL_UCODE_TLV_API_SINGLE_SCAN_EBS && | ||
| 1868 | mvm->last_ebs_successful) | ||
| 1869 | cmd->channel_flags = IWL_SCAN_CHANNEL_FLAG_EBS | | ||
| 1870 | IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE | | ||
| 1871 | IWL_SCAN_CHANNEL_FLAG_CACHE_ADD; | ||
| 1872 | |||
| 1865 | cmd->n_channels = req->req.n_channels; | 1873 | cmd->n_channels = req->req.n_channels; |
| 1866 | 1874 | ||
| 1867 | for (i = 0; i < req->req.n_ssids; i++) | 1875 | for (i = 0; i < req->req.n_ssids; i++) |
| @@ -2025,7 +2033,9 @@ int iwl_mvm_rx_umac_scan_complete_notif(struct iwl_mvm *mvm, | |||
| 2025 | notif->ebs_status == IWL_SCAN_EBS_SUCCESS ? | 2033 | notif->ebs_status == IWL_SCAN_EBS_SUCCESS ? |
| 2026 | "success" : "failed"); | 2034 | "success" : "failed"); |
| 2027 | 2035 | ||
| 2028 | mvm->last_ebs_successful = !notif->ebs_status; | 2036 | if (notif->ebs_status) |
| 2037 | mvm->last_ebs_successful = false; | ||
| 2038 | |||
| 2029 | mvm->scan_uid[uid_idx] = 0; | 2039 | mvm->scan_uid[uid_idx] = 0; |
| 2030 | 2040 | ||
| 2031 | if (!sched) { | 2041 | if (!sched) { |
| @@ -2058,10 +2068,14 @@ static bool iwl_scan_umac_done_check(struct iwl_notif_wait_data *notif_wait, | |||
| 2058 | 2068 | ||
| 2059 | /* | 2069 | /* |
| 2060 | * Clear scan uid of scans that was aborted from above and completed | 2070 | * Clear scan uid of scans that was aborted from above and completed |
| 2061 | * in FW so the RX handler does nothing. | 2071 | * in FW so the RX handler does nothing. Set last_ebs_successful here if |
| 2072 | * needed. | ||
| 2062 | */ | 2073 | */ |
| 2063 | scan_done->mvm->scan_uid[uid_idx] = 0; | 2074 | scan_done->mvm->scan_uid[uid_idx] = 0; |
| 2064 | 2075 | ||
| 2076 | if (notif->ebs_status) | ||
| 2077 | scan_done->mvm->last_ebs_successful = false; | ||
| 2078 | |||
| 2065 | return !iwl_mvm_find_scan_type(scan_done->mvm, scan_done->type); | 2079 | return !iwl_mvm_find_scan_type(scan_done->mvm, scan_done->type); |
| 2066 | } | 2080 | } |
| 2067 | 2081 | ||
