} schedule[2];
};
-enum iwl_umac_scan_uid_type {
- IWL_UMAC_SCAN_UID_REG_SCAN = BIT(0),
- IWL_UMAC_SCAN_UID_SCHED_SCAN = BIT(1),
-};
-
-static int iwl_umac_scan_stop(struct iwl_mvm *mvm,
- enum iwl_umac_scan_uid_type type, bool notify);
+static int iwl_umac_scan_stop(struct iwl_mvm *mvm, int type, bool notify);
static u8 iwl_mvm_scan_rx_ant(struct iwl_mvm *mvm)
{
lockdep_assert_held(&mvm->mutex);
if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)
- return iwl_umac_scan_stop(mvm, IWL_UMAC_SCAN_UID_SCHED_SCAN,
- notify);
+ return iwl_umac_scan_stop(mvm, IWL_MVM_SCAN_SCHED, notify);
/* FIXME: For now we only check if no scan is set here, since
* we only support LMAC in this flow and it doesn't support
int iwl_mvm_cancel_scan(struct iwl_mvm *mvm)
{
if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)
- return iwl_umac_scan_stop(mvm, IWL_UMAC_SCAN_UID_REG_SCAN,
- true);
+ return iwl_umac_scan_stop(mvm, IWL_MVM_SCAN_REGULAR, true);
if (!(mvm->scan_status & IWL_MVM_SCAN_REGULAR))
return 0;
struct iwl_umac_scan_done {
struct iwl_mvm *mvm;
- enum iwl_umac_scan_uid_type type;
+ int type;
};
static int rate_to_scan_rate_flag(unsigned int rate)
return iwl_mvm_find_scan_uid(mvm, 0);
}
-static bool iwl_mvm_find_scan_type(struct iwl_mvm *mvm,
- enum iwl_umac_scan_uid_type type)
+static bool iwl_mvm_find_scan_type(struct iwl_mvm *mvm, int type)
{
int i;
return false;
}
-static int iwl_mvm_find_first_scan(struct iwl_mvm *mvm,
- enum iwl_umac_scan_uid_type type)
+static int iwl_mvm_find_first_scan(struct iwl_mvm *mvm, int type)
{
int i;
return i;
}
-static u32 iwl_generate_scan_uid(struct iwl_mvm *mvm,
- enum iwl_umac_scan_uid_type type)
+static u32 iwl_generate_scan_uid(struct iwl_mvm *mvm, int type)
{
u32 uid;
iwl_mvm_scan_umac_dwell(mvm, cmd, params);
if (n_iterations == 1)
- uid = iwl_generate_scan_uid(mvm, IWL_UMAC_SCAN_UID_REG_SCAN);
+ uid = iwl_generate_scan_uid(mvm, IWL_MVM_SCAN_REGULAR);
else
- uid = iwl_generate_scan_uid(mvm, IWL_UMAC_SCAN_UID_SCHED_SCAN);
+ uid = iwl_generate_scan_uid(mvm, IWL_MVM_SCAN_SCHED);
mvm->scan_uid[uid_idx] = uid;
cmd->uid = cpu_to_le32(uid);
struct iwl_rx_packet *pkt = rxb_addr(rxb);
struct iwl_umac_scan_complete *notif = (void *)pkt->data;
u32 uid = __le32_to_cpu(notif->uid);
- bool sched = !!(uid & IWL_UMAC_SCAN_UID_SCHED_SCAN);
+ bool sched = !!(uid & IWL_MVM_SCAN_SCHED);
int uid_idx = iwl_mvm_find_scan_uid(mvm, uid);
/*
notif->status ==
IWL_SCAN_OFFLOAD_ABORTED);
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
- } else if (!iwl_mvm_find_scan_type(mvm, IWL_UMAC_SCAN_UID_SCHED_SCAN)) {
+ } else if (!iwl_mvm_find_scan_type(mvm, IWL_MVM_SCAN_SCHED)) {
ieee80211_sched_scan_stopped(mvm->hw);
} else {
IWL_DEBUG_SCAN(mvm, "Another sched scan is running\n");
return iwl_mvm_send_cmd_pdu(mvm, SCAN_ABORT_UMAC, 0, sizeof(cmd), &cmd);
}
-static int iwl_umac_scan_stop(struct iwl_mvm *mvm,
- enum iwl_umac_scan_uid_type type, bool notify)
+static int iwl_umac_scan_stop(struct iwl_mvm *mvm, int type, bool notify)
{
struct iwl_notification_wait wait_scan_done;
static const u8 scan_done_notif[] = { SCAN_COMPLETE_UMAC, };
int err;
if (iwl_mvm_is_radio_killed(mvm) &&
- (type & IWL_UMAC_SCAN_UID_REG_SCAN)) {
+ (type & IWL_MVM_SCAN_REGULAR)) {
ieee80211_scan_completed(mvm->hw, true);
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
break;
return ret;
if (notify) {
- if (type & IWL_UMAC_SCAN_UID_SCHED_SCAN)
+ if (type & IWL_MVM_SCAN_SCHED)
ieee80211_sched_scan_stopped(mvm->hw);
- if (type & IWL_UMAC_SCAN_UID_REG_SCAN) {
+ if (type & IWL_MVM_SCAN_REGULAR) {
ieee80211_scan_completed(mvm->hw, true);
iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
}
if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN) {
u32 uid, i;
- uid = iwl_mvm_find_first_scan(mvm, IWL_UMAC_SCAN_UID_REG_SCAN);
+ uid = iwl_mvm_find_first_scan(mvm, IWL_MVM_SCAN_REGULAR);
if (uid < mvm->max_scans) {
ieee80211_scan_completed(mvm->hw, true);
mvm->scan_uid[uid] = 0;
}
- uid = iwl_mvm_find_first_scan(mvm,
- IWL_UMAC_SCAN_UID_SCHED_SCAN);
+ uid = iwl_mvm_find_first_scan(mvm, IWL_MVM_SCAN_SCHED);
if (uid < mvm->max_scans && !mvm->restart_fw) {
ieee80211_sched_scan_stopped(mvm->hw);
mvm->scan_uid[uid] = 0;