* @IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED: all passive scans will be fragmented
* @IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED: insert WFA vendor-specific TPC report
* and DS parameter set IEs into probe requests.
+ * @IWL_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL: use extended dwell time on channels
+ * 1, 6 and 11.
* @IWL_MVM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches
*/
enum iwl_mvm_lmac_scan_flags {
IWL_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS = BIT(4),
IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED = BIT(5),
IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED = BIT(6),
+ IWL_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL = BIT(7),
IWL_MVM_LMAC_SCAN_FLAG_MATCH = BIT(9),
};
* @active-dwell: dwell time for active channels
* @passive-dwell: dwell time for passive channels
* @fragmented-dwell: dwell time for fragmented passive scan
+ * @extended_dwell: dwell time for channels 1, 6 and 11 (in certain cases)
* @reserved2: for alignment and future use
* @rx_chain_selct: PHY_RX_CHAIN_* flags
* @scan_flags: &enum iwl_mvm_lmac_scan_flags
u8 active_dwell;
u8 passive_dwell;
u8 fragmented_dwell;
- __le16 reserved2;
+ u8 extended_dwell;
+ u8 reserved2;
__le16 rx_chain_select;
__le32 scan_flags;
__le32 max_out_time;
* @dwell_active: default dwell time for active scan
* @dwell_passive: default dwell time for passive scan
* @dwell_fragmented: default dwell time for fragmented scan
- * @reserved: for future use and alignment
+ * @dwell_extended: default dwell time for channels 1, 6 and 11
* @mac_addr: default mac address to be used in probes
* @bcast_sta_id: the index of the station in the fw
* @channel_flags: default channel flags - enum iwl_channel_flags
u8 dwell_active;
u8 dwell_passive;
u8 dwell_fragmented;
- u8 reserved;
+ u8 dwell_extended;
u8 mac_addr[ETH_ALEN];
u8 bcast_sta_id;
u8 channel_flags;
IWL_UMAC_SCAN_GEN_FLAGS_MULTIPLE_SSID = BIT(6),
IWL_UMAC_SCAN_GEN_FLAGS_FRAGMENTED = BIT(7),
IWL_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED = BIT(8),
- IWL_UMAC_SCAN_GEN_FLAGS_MATCH = BIT(9)
+ IWL_UMAC_SCAN_GEN_FLAGS_MATCH = BIT(9),
+ IWL_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL = BIT(10),
};
/**
* @uid: scan id, &enum iwl_umac_scan_uid_offsets
* @ooc_priority: out of channel priority - &enum iwl_scan_priority
* @general_flags: &enum iwl_umac_scan_general_flags
- * @reserved1: for future use and alignment
+ * @extended_dwell: dwell time for channels 1, 6 and 11
* @active_dwell: dwell time for active scan
* @passive_dwell: dwell time for passive scan
* @fragmented_dwell: dwell time for fragmented passive scan
* @scan_priority: scan internal prioritization &enum iwl_scan_priority
* @channel_flags: &enum iwl_scan_channel_flags
* @n_channels: num of channels in scan request
- * @reserved2: for future use and alignment
+ * @reserved: for future use and alignment
* @data: &struct iwl_scan_channel_cfg_umac and
* &struct iwl_scan_req_umac_tail
*/
__le32 ooc_priority;
/* SCAN_GENERAL_PARAMS_API_S_VER_1 */
__le32 general_flags;
- u8 reserved1;
+ u8 extended_dwell;
u8 active_dwell;
u8 passive_dwell;
u8 fragmented_dwell;
/* SCAN_CHANNEL_PARAMS_API_S_VER_1 */
u8 channel_flags;
u8 n_channels;
- __le16 reserved2;
+ __le16 reserved;
u8 data[];
} __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_1 */
u32 dwell_active;
u32 dwell_passive;
u32 dwell_fragmented;
+ u32 dwell_extended;
u32 suspend_time;
u32 max_out_time;
};
.dwell_active = 10,
.dwell_passive = 110,
.dwell_fragmented = 44,
+ .dwell_extended = 100,
.suspend_time = 0,
.max_out_time = 0,
},
.dwell_active = 10,
.dwell_passive = 110,
.dwell_fragmented = 44,
+ .dwell_extended = 100,
.suspend_time = 30,
.max_out_time = 120,
},
.dwell_active = 10,
.dwell_passive = 110,
.dwell_fragmented = 44,
+ .dwell_extended = 100,
.suspend_time = 120,
.max_out_time = 120,
},
.dwell_active = 10,
.dwell_passive = 110,
.dwell_fragmented = 44,
+ .dwell_extended = 44,
.suspend_time = 95,
.max_out_time = 44,
},
cmd->active_dwell = scan_timing[params->type].dwell_active;
cmd->passive_dwell = scan_timing[params->type].dwell_passive;
cmd->fragmented_dwell = scan_timing[params->type].dwell_fragmented;
+ cmd->extended_dwell = scan_timing[params->type].dwell_extended;
cmd->max_out_time = cpu_to_le32(scan_timing[params->type].max_out_time);
cmd->suspend_time = cpu_to_le32(scan_timing[params->type].suspend_time);
cmd->scan_prio = iwl_mvm_scan_priority(mvm, IWL_SCAN_PRIORITY_EXT_6);
vif->type != NL80211_IFTYPE_P2P_DEVICE);
}
+static inline bool iwl_mvm_is_regular_scan(struct iwl_mvm_scan_params *params)
+{
+ return params->n_scan_plans == 1 &&
+ params->scan_plans[0].iterations == 1;
+}
+
static int iwl_mvm_scan_lmac_flags(struct iwl_mvm *mvm,
- struct iwl_mvm_scan_params *params)
+ struct iwl_mvm_scan_params *params,
+ struct ieee80211_vif *vif)
{
int flags = 0;
flags |= IWL_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE;
#endif
+ if (iwl_mvm_is_regular_scan(params) &&
+ vif->type != NL80211_IFTYPE_P2P_DEVICE)
+ flags |= IWL_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL;
+
return flags;
}
cmd->delay = cpu_to_le32(params->delay);
- cmd->scan_flags = cpu_to_le32(iwl_mvm_scan_lmac_flags(mvm, params));
+ cmd->scan_flags = cpu_to_le32(iwl_mvm_scan_lmac_flags(mvm, params,
+ vif));
cmd->flags = iwl_mvm_scan_rxon_flags(params->channels[0]->band);
cmd->filter_flags = cpu_to_le32(MAC_FILTER_ACCEPT_GRP |
scan_config->dwell_active = scan_timing[type].dwell_active;
scan_config->dwell_passive = scan_timing[type].dwell_passive;
scan_config->dwell_fragmented = scan_timing[type].dwell_fragmented;
+ scan_config->dwell_extended = scan_timing[type].dwell_extended;
memcpy(&scan_config->mac_addr, &mvm->addresses[0].addr, ETH_ALEN);
return -ENOENT;
}
-static inline bool iwl_mvm_is_regular_scan(struct iwl_mvm_scan_params *params)
-{
- return params->n_scan_plans == 1 &&
- params->scan_plans[0].iterations == 1;
-}
-
static void iwl_mvm_scan_umac_dwell(struct iwl_mvm *mvm,
struct iwl_scan_req_umac *cmd,
struct iwl_mvm_scan_params *params)
{
+ cmd->extended_dwell = scan_timing[params->type].dwell_extended;
cmd->active_dwell = scan_timing[params->type].dwell_active;
cmd->passive_dwell = scan_timing[params->type].dwell_passive;
cmd->fragmented_dwell = scan_timing[params->type].dwell_fragmented;
}
static u32 iwl_mvm_scan_umac_flags(struct iwl_mvm *mvm,
- struct iwl_mvm_scan_params *params)
+ struct iwl_mvm_scan_params *params,
+ struct ieee80211_vif *vif)
{
int flags = 0;
if (mvm->scan_iter_notif_enabled)
flags |= IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE;
#endif
+
+ if (iwl_mvm_is_regular_scan(params) &&
+ vif->type != NL80211_IFTYPE_P2P_DEVICE)
+ flags |= IWL_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL;
+
return flags;
}
mvm->scan_uid_status[uid] = type;
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,
+ vif));
if (type == IWL_MVM_SCAN_SCHED)
cmd->flags = cpu_to_le32(IWL_UMAC_SCAN_FLAG_PREEMPTIVE);