|
@@ -770,19 +770,23 @@ static inline bool iwl_mvm_scan_fits(struct iwl_mvm *mvm, int n_ssids,
|
|
|
iwl_mvm_max_scan_ie_fw_cmd_room(mvm)));
|
|
iwl_mvm_max_scan_ie_fw_cmd_room(mvm)));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-static inline bool iwl_mvm_scan_use_ebs(struct iwl_mvm *mvm, int n_iterations)
|
|
|
|
|
|
|
+static inline bool iwl_mvm_scan_use_ebs(struct iwl_mvm *mvm,
|
|
|
|
|
+ struct ieee80211_vif *vif,
|
|
|
|
|
+ int n_iterations)
|
|
|
{
|
|
{
|
|
|
const struct iwl_ucode_capabilities *capa = &mvm->fw->ucode_capa;
|
|
const struct iwl_ucode_capabilities *capa = &mvm->fw->ucode_capa;
|
|
|
|
|
|
|
|
/* We can only use EBS if:
|
|
/* We can only use EBS if:
|
|
|
* 1. the feature is supported;
|
|
* 1. the feature is supported;
|
|
|
* 2. the last EBS was successful;
|
|
* 2. the last EBS was successful;
|
|
|
- * 3. if only single scan, the single scan EBS API is supported.
|
|
|
|
|
|
|
+ * 3. if only single scan, the single scan EBS API is supported;
|
|
|
|
|
+ * 4. it's not a p2p find operation.
|
|
|
*/
|
|
*/
|
|
|
return ((capa->flags & IWL_UCODE_TLV_FLAGS_EBS_SUPPORT) &&
|
|
return ((capa->flags & IWL_UCODE_TLV_FLAGS_EBS_SUPPORT) &&
|
|
|
mvm->last_ebs_successful &&
|
|
mvm->last_ebs_successful &&
|
|
|
(n_iterations > 1 ||
|
|
(n_iterations > 1 ||
|
|
|
- (capa->api[0] & IWL_UCODE_TLV_API_SINGLE_SCAN_EBS)));
|
|
|
|
|
|
|
+ (capa->api[0] & IWL_UCODE_TLV_API_SINGLE_SCAN_EBS)) &&
|
|
|
|
|
+ vif->type != NL80211_IFTYPE_P2P_DEVICE);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static int iwl_mvm_scan_total_iterations(struct iwl_mvm_scan_params *params)
|
|
static int iwl_mvm_scan_total_iterations(struct iwl_mvm_scan_params *params)
|
|
@@ -860,7 +864,7 @@ static int iwl_mvm_scan_lmac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|
|
cmd->schedule[1].iterations = params->schedule[1].iterations;
|
|
cmd->schedule[1].iterations = params->schedule[1].iterations;
|
|
|
cmd->schedule[1].full_scan_mul = params->schedule[1].iterations;
|
|
cmd->schedule[1].full_scan_mul = params->schedule[1].iterations;
|
|
|
|
|
|
|
|
- if (iwl_mvm_scan_use_ebs(mvm, n_iterations)) {
|
|
|
|
|
|
|
+ if (iwl_mvm_scan_use_ebs(mvm, vif, n_iterations)) {
|
|
|
cmd->channel_opt[0].flags =
|
|
cmd->channel_opt[0].flags =
|
|
|
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
|
|
cpu_to_le16(IWL_SCAN_CHANNEL_FLAG_EBS |
|
|
|
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
|
|
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
|
|
@@ -1102,7 +1106,7 @@ static int iwl_mvm_scan_umac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
|
|
cmd->uid = cpu_to_le32(uid);
|
|
cmd->uid = cpu_to_le32(uid);
|
|
|
cmd->general_flags = cpu_to_le32(iwl_mvm_scan_umac_flags(mvm, params));
|
|
cmd->general_flags = cpu_to_le32(iwl_mvm_scan_umac_flags(mvm, params));
|
|
|
|
|
|
|
|
- if (iwl_mvm_scan_use_ebs(mvm, n_iterations))
|
|
|
|
|
|
|
+ if (iwl_mvm_scan_use_ebs(mvm, vif, n_iterations))
|
|
|
cmd->channel_flags = IWL_SCAN_CHANNEL_FLAG_EBS |
|
|
cmd->channel_flags = IWL_SCAN_CHANNEL_FLAG_EBS |
|
|
|
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
|
|
IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE |
|
|
|
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD;
|
|
IWL_SCAN_CHANNEL_FLAG_CACHE_ADD;
|