wifi: iwlwifi: remove iwl_cmd_groups_verify_sorted()
authorJohannes Berg <johannes.berg@intel.com>
Fri, 2 May 2025 12:56:31 +0000 (15:56 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 7 May 2025 03:08:00 +0000 (06:08 +0300)
We now have unit tests for the mvm and mld, and dvm isn't
going to change anyway. Remove the runtime checks.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.e3f01789575d.I4380dcbf3e0ecabc2a8a42c84f448b7dd854bf50@changeid
drivers/net/wireless/intel/iwlwifi/iwl-trans.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.h

index edb56a6772f7d1e2e7f31ba01d4f71a609906326..1c669fb0a5b63de2fb45a58884fdb08c6f04ba87 100644 (file)
@@ -409,30 +409,12 @@ const char *iwl_get_cmd_string(struct iwl_trans *trans, u32 id)
 }
 IWL_EXPORT_SYMBOL(iwl_get_cmd_string);
 
-int iwl_cmd_groups_verify_sorted(const struct iwl_trans_config *trans)
-{
-       int i, j;
-       const struct iwl_hcmd_arr *arr;
-
-       for (i = 0; i < trans->command_groups_size; i++) {
-               arr = &trans->command_groups[i];
-               if (!arr->arr)
-                       continue;
-               for (j = 0; j < arr->size - 1; j++)
-                       if (arr->arr[j].cmd_id > arr->arr[j + 1].cmd_id)
-                               return -1;
-       }
-       return 0;
-}
-IWL_EXPORT_SYMBOL(iwl_cmd_groups_verify_sorted);
-
 void iwl_trans_configure(struct iwl_trans *trans,
                         const struct iwl_trans_config *trans_cfg)
 {
        trans->op_mode = trans_cfg->op_mode;
 
        iwl_trans_pcie_configure(trans, trans_cfg);
-       WARN_ON(iwl_cmd_groups_verify_sorted(trans_cfg));
 }
 IWL_EXPORT_SYMBOL(iwl_trans_configure);
 
index b3d8b2ba5bfcc066946b3ba060acbeb5e8c3edb2..0f161deb0ec753f219e21ab906ce20f0f2f958b3 100644 (file)
@@ -985,7 +985,6 @@ struct iwl_trans {
 };
 
 const char *iwl_get_cmd_string(struct iwl_trans *trans, u32 id);
-int iwl_cmd_groups_verify_sorted(const struct iwl_trans_config *trans);
 
 void iwl_trans_configure(struct iwl_trans *trans,
                         const struct iwl_trans_config *trans_cfg);