Skip to content

Commit bada85a

Browse files
Miriam-Racheljmberg-intel
authored andcommitted
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: 687db6f ("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]>
1 parent dbfff5b commit bada85a

File tree

1 file changed

+2
-1
lines changed
  • drivers/net/wireless/intel/iwlwifi/mvm

1 file changed

+2
-1
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/scan.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2813,7 +2813,8 @@ static int iwl_mvm_build_scan_cmd(struct iwl_mvm *mvm,
28132813
if (ver_handler->version != scan_ver)
28142814
continue;
28152815

2816-
return ver_handler->handler(mvm, vif, params, type, uid);
2816+
err = ver_handler->handler(mvm, vif, params, type, uid);
2817+
return err ? : uid;
28172818
}
28182819

28192820
err = iwl_mvm_scan_umac(mvm, vif, params, type, uid);

0 commit comments

Comments
 (0)