]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: trans: export the maximum supported hcmd size
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Sun, 31 May 2026 10:53:04 +0000 (13:53 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 3 Jun 2026 14:02:55 +0000 (17:02 +0300)
Export the maximum allowed host command payload size to the op-modes.
Note that this information was available to the op-modes also before
this change, this just adds a clear macro.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260531135036.2e6b15bcaf50.I027e150e5f25ef2431ab4e212175dc00ca5e8abd@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-trans.h

index 914864005704a76a9ae996375660aa077f85bc7d..c581cc8f5bcb89908f7d351359b2b09110b6a426 100644 (file)
@@ -161,6 +161,10 @@ struct iwl_device_tx_cmd {
 
 #define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl_device_cmd))
 
+/* Maximum payload size for a non-NOCOPY host command (excluding the header) */
+#define IWL_MAX_CMD_PAYLOAD_SIZE \
+       (TFD_MAX_PAYLOAD_SIZE - sizeof(struct iwl_cmd_header_wide))
+
 /*
  * number of transfer buffers (fragments) per transmit frame descriptor;
  * this is just the driver's idea, the hardware supports 20