diff options
| author | Miri Korenblit <[email protected]> | 2024-04-15 08:54:44 +0000 |
|---|---|---|
| committer | Johannes Berg <[email protected]> | 2024-04-17 07:28:28 +0000 |
| commit | bada85a3f584763deadd201147778c3e791d279c (patch) | |
| tree | fe4b419106b177da009802b3b34d01acdd9fe078 /drivers/net/wireless/intel/iwlwifi/mvm/scan.c | |
| parent | wifi: iwlwifi: mvm: remove old PASN station when adding a new one (diff) | |
| download | kernel-bada85a3f584763deadd201147778c3e791d279c.tar.gz kernel-bada85a3f584763deadd201147778c3e791d279c.zip | |
wifi: iwlwifi: mvm: return uid from iwl_mvm_build_scan_cmd
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 <[email protected]>
Reviewed-by: Ilan Peer <[email protected]>
Link: https://msgid.link/20240415114847.5e2d602b3190.I4c4931021be74a67a869384c8f8ee7463e0c7857@changeid
Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/scan.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index f3e3986b4c72..11559563ae38 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -2813,7 +2813,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); |
