diff mbox

[26/39] iwlwifi: mvm: rename umac scan stop function

Message ID 1432667872-18092-26-git-send-email-emmanuel.grumbach@intel.com (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show

Commit Message

Emmanuel Grumbach May 26, 2015, 7:17 p.m. UTC
From: Luciano Coelho <luciano.coelho@intel.com>

For consistency with the LMAC functions, rename the UMAC scan stop
function to iwl_mvm_umac_scan_stop().  Additionally, move things
around a bit to avoid an unnecessary forward declaration.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
 drivers/net/wireless/iwlwifi/mvm/scan.c | 126 ++++++++++++++++----------------
 1 file changed, 62 insertions(+), 64 deletions(-)
diff mbox

Patch

diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index ec8ef56..bee92d7 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -101,8 +101,6 @@  struct iwl_mvm_scan_params {
 	} schedule[2];
 };
 
-static int iwl_umac_scan_stop(struct iwl_mvm *mvm, int type);
-
 static u8 iwl_mvm_scan_rx_ant(struct iwl_mvm *mvm)
 {
 	if (mvm->scan_rx_ant != ANT_NONE)
@@ -885,67 +883,6 @@  static int iwl_mvm_scan_lmac(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
 	return 0;
 }
 
-int iwl_mvm_reg_scan_stop(struct iwl_mvm *mvm)
-{
-	int ret;
-
-	if (!(mvm->scan_status & IWL_MVM_SCAN_REGULAR))
-		return 0;
-
-	if (iwl_mvm_is_radio_killed(mvm)) {
-		ret = 0;
-		goto out;
-	}
-
-	if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)
-		ret = iwl_umac_scan_stop(mvm, IWL_MVM_SCAN_REGULAR);
-	else
-		ret = iwl_mvm_lmac_scan_stop(mvm, IWL_MVM_SCAN_REGULAR);
-
-	if (!ret)
-		mvm->scan_status |= IWL_MVM_SCAN_STOPPING_REGULAR;
-out:
-	/* Clear the scan status so the next scan requests will
-	 * succeed and mark the scan as stopping, so that the Rx
-	 * handler doesn't do anything, as the scan was stopped from
-	 * above. Since the rx handler won't do anything now, we have
-	 * to release the scan reference here.
-	 */
-	iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
-
-	mvm->scan_status &= ~IWL_MVM_SCAN_REGULAR;
-	ieee80211_scan_completed(mvm->hw, true);
-
-	return ret;
-}
-
-int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm, bool notify)
-{
-	int ret;
-
-	if (!(mvm->scan_status & IWL_MVM_SCAN_SCHED))
-		return 0;
-
-	if (iwl_mvm_is_radio_killed(mvm)) {
-		ret = 0;
-		goto out;
-	}
-
-	if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)
-		ret = iwl_umac_scan_stop(mvm, IWL_MVM_SCAN_SCHED);
-	else
-		ret = iwl_mvm_lmac_scan_stop(mvm, IWL_MVM_SCAN_SCHED);
-
-	if (!ret)
-		mvm->scan_status |= IWL_MVM_SCAN_STOPPING_SCHED;
-out:
-	mvm->scan_status &= ~IWL_MVM_SCAN_SCHED;
-	if (notify)
-		ieee80211_sched_scan_stopped(mvm->hw);
-
-	return ret;
-}
-
 /* UMAC scan API */
 
 struct iwl_umac_scan_done {
@@ -1587,7 +1524,7 @@  static int iwl_umac_scan_abort_one(struct iwl_mvm *mvm, u32 uid)
 	return iwl_mvm_send_cmd_pdu(mvm, SCAN_ABORT_UMAC, 0, sizeof(cmd), &cmd);
 }
 
-static int iwl_umac_scan_stop(struct iwl_mvm *mvm, int type)
+static int iwl_mvm_umac_scan_stop(struct iwl_mvm *mvm, int type)
 {
 	struct iwl_notification_wait wait_scan_done;
 	static const u8 scan_done_notif[] = { SCAN_COMPLETE_UMAC, };
@@ -1681,3 +1618,64 @@  void iwl_mvm_report_scan_aborted(struct iwl_mvm *mvm)
 			ieee80211_sched_scan_stopped(mvm->hw);
 	}
 }
+
+int iwl_mvm_reg_scan_stop(struct iwl_mvm *mvm)
+{
+	int ret;
+
+	if (!(mvm->scan_status & IWL_MVM_SCAN_REGULAR))
+		return 0;
+
+	if (iwl_mvm_is_radio_killed(mvm)) {
+		ret = 0;
+		goto out;
+	}
+
+	if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)
+		ret = iwl_mvm_umac_scan_stop(mvm, IWL_MVM_SCAN_REGULAR);
+	else
+		ret = iwl_mvm_lmac_scan_stop(mvm, IWL_MVM_SCAN_REGULAR);
+
+	if (!ret)
+		mvm->scan_status |= IWL_MVM_SCAN_STOPPING_REGULAR;
+out:
+	/* Clear the scan status so the next scan requests will
+	 * succeed and mark the scan as stopping, so that the Rx
+	 * handler doesn't do anything, as the scan was stopped from
+	 * above. Since the rx handler won't do anything now, we have
+	 * to release the scan reference here.
+	 */
+	iwl_mvm_unref(mvm, IWL_MVM_REF_SCAN);
+
+	mvm->scan_status &= ~IWL_MVM_SCAN_REGULAR;
+	ieee80211_scan_completed(mvm->hw, true);
+
+	return ret;
+}
+
+int iwl_mvm_sched_scan_stop(struct iwl_mvm *mvm, bool notify)
+{
+	int ret;
+
+	if (!(mvm->scan_status & IWL_MVM_SCAN_SCHED))
+		return 0;
+
+	if (iwl_mvm_is_radio_killed(mvm)) {
+		ret = 0;
+		goto out;
+	}
+
+	if (mvm->fw->ucode_capa.capa[0] & IWL_UCODE_TLV_CAPA_UMAC_SCAN)
+		ret = iwl_mvm_umac_scan_stop(mvm, IWL_MVM_SCAN_SCHED);
+	else
+		ret = iwl_mvm_lmac_scan_stop(mvm, IWL_MVM_SCAN_SCHED);
+
+	if (!ret)
+		mvm->scan_status |= IWL_MVM_SCAN_STOPPING_SCHED;
+out:
+	mvm->scan_status &= ~IWL_MVM_SCAN_SCHED;
+	if (notify)
+		ieee80211_sched_scan_stopped(mvm->hw);
+
+	return ret;
+}