Linux-Wireless Archive mirror
 help / color / mirror / Atom feed
From: Miri Korenblit <miriam.rachel.korenblit@intel.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Ilan Peer <ilan.peer@intel.com>
Subject: [PATCH 11/11] wifi: iwlwifi: mvm: return uid from iwl_mvm_build_scan_cmd
Date: Mon, 15 Apr 2024 11:54:44 +0300	[thread overview]
Message-ID: <20240415114847.5e2d602b3190.I4c4931021be74a67a869384c8f8ee7463e0c7857@changeid> (raw)
In-Reply-To: <20240415085444.3840884-1-miriam.rachel.korenblit@intel.com>

This function is supposed to return a uid on success, and an errno in
failure.
But it currently returns the return value of the specific cmd version
handler, which in turn returns 0 on success and errno otherwise.
This means that on success, iwl_mvm_build_scan_cmd will return 0
regardless if the actual uid.
Fix this by returning the uid if the handler succeeded.

Fixes: 687db6ff5b70 ("iwlwifi: scan: make new scan req versioning flow")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
index f2fe9ee83d68..2f55de11cd52 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c
@@ -2831,7 +2831,8 @@ static int iwl_mvm_build_scan_cmd(struct iwl_mvm *mvm,
 		if (ver_handler->version != scan_ver)
 			continue;
 
-		return ver_handler->handler(mvm, vif, params, type, uid);
+		err = ver_handler->handler(mvm, vif, params, type, uid);
+		return err ? : uid;
 	}
 
 	err = iwl_mvm_scan_umac(mvm, vif, params, type, uid);
-- 
2.34.1


      parent reply	other threads:[~2024-04-15  8:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15  8:54 [PATCH 00/11] wifi: iwlwifi: updates - 2024-04-15 Miri Korenblit
2024-04-15  8:54 ` [PATCH 01/11] wifi: iwlwifi: bump FW API to 91 for BZ/SC devices Miri Korenblit
2024-04-15  8:54 ` [PATCH 02/11] wifi: iwlwifi: mvm: Refactor tracking of scan UIDs Miri Korenblit
2024-04-15  8:54 ` [PATCH 03/11] wifi: iwlwifi: mvm: move phy band to nl80211 band helper Miri Korenblit
2024-04-15  8:54 ` [PATCH 04/11] wifi: iwlwifi: mvm: extend STEP URM workaround for new devices Miri Korenblit
2024-04-15  8:54 ` [PATCH 05/11] wifi: iwlwifi: move WTAS macro to api file Miri Korenblit
2024-04-15  8:54 ` [PATCH 06/11] wifi: iwlwifi: add a device ID for BZ-W Miri Korenblit
2024-04-15  8:54 ` [PATCH 07/11] wifi: iwlwifi: move lari_config handlig to regulatory Miri Korenblit
2024-04-15  8:54 ` [PATCH 08/11] wifi: iwlwifi: mvm: Add support for PPAG cmd v6 Miri Korenblit
2024-04-15  8:54 ` [PATCH 09/11] wifi: iwlwifi: Add support for LARI_CONFIG_CHANGE_CMD v10 Miri Korenblit
2024-04-15  8:54 ` [PATCH 10/11] wifi: iwlwifi: mvm: remove old PASN station when adding a new one Miri Korenblit
2024-04-15  8:54 ` Miri Korenblit [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240415114847.5e2d602b3190.I4c4931021be74a67a869384c8f8ee7463e0c7857@changeid \
    --to=miriam.rachel.korenblit@intel.com \
    --cc=ilan.peer@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).