@@ -390,7 +390,8 @@ struct iwl_dump_sanitize_ops {
390390/**
391391 * struct iwl_trans_config - transport configuration
392392 *
393- * @op_mode: pointer to the upper layer.
393+ * These values should be set before iwl_trans_op_mode_enter().
394+ *
394395 * @cmd_queue: the index of the command queue.
395396 * Must be set before start_fw.
396397 * @cmd_fifo: the fifo for host commands
@@ -411,14 +412,17 @@ struct iwl_dump_sanitize_ops {
411412 * @queue_alloc_cmd_ver: queue allocation command version, set to 0
412413 * for using the older SCD_QUEUE_CFG, set to the version of
413414 * SCD_QUEUE_CONFIG_CMD otherwise.
415+ * @wide_cmd_header: true when ucode supports wide command header format
416+ * @rx_mpdu_cmd: MPDU RX command ID, must be assigned by opmode before
417+ * starting the firmware, used for tracing
418+ * @rx_mpdu_cmd_hdr_size: used for tracing, amount of data before the
419+ * start of the 802.11 header in the @rx_mpdu_cmd
414420 */
415421struct iwl_trans_config {
416- struct iwl_op_mode * op_mode ;
417-
418422 u8 cmd_queue ;
419423 u8 cmd_fifo ;
420- const u8 * no_reclaim_cmds ;
421- unsigned int n_no_reclaim_cmds ;
424+ u8 n_no_reclaim_cmds ;
425+ u8 no_reclaim_cmds [ MAX_NO_RECLAIM_CMDS ] ;
422426
423427 enum iwl_amsdu_size rx_buf_size ;
424428 bool scd_set_active ;
@@ -428,6 +432,9 @@ struct iwl_trans_config {
428432 u8 cb_data_offs ;
429433 bool fw_reset_handshake ;
430434 u8 queue_alloc_cmd_ver ;
435+
436+ bool wide_cmd_header ;
437+ u8 rx_mpdu_cmd , rx_mpdu_cmd_hdr_size ;
431438};
432439
433440struct iwl_trans_dump_data {
@@ -839,6 +846,7 @@ struct iwl_trans_info {
839846 * @trans_cfg: the trans-specific configuration part
840847 * @cfg: pointer to the configuration
841848 * @drv: pointer to iwl_drv
849+ * @conf: configuration set by the opmode before enter
842850 * @state: current device state
843851 * @status: a bit-mask of transport status flags
844852 * @dev: pointer to struct device * that represents the device
@@ -850,18 +858,11 @@ struct iwl_trans_info {
850858 * @fail_to_parse_pnvm_image: set to true if pnvm parsing failed
851859 * @reduce_power_loaded: indicates reduced power section was loaded
852860 * @failed_to_load_reduce_power_image: set to true if pnvm loading failed
853- * @command_groups: pointer to command group name list array
854- * @command_groups_size: array size of @command_groups
855- * @wide_cmd_header: true when ucode supports wide command header format
856861 * @dev_cmd_pool: pool for Tx cmd allocation - for internal use only.
857862 * The user should use iwl_trans_{alloc,free}_tx_cmd.
858863 * @dev_cmd_pool_name: name for the TX command allocation pool
859864 * @dbgfs_dir: iwlwifi debugfs base dir for this device
860865 * @sync_cmd_lockdep_map: lockdep map for checking sync commands
861- * @rx_mpdu_cmd: MPDU RX command ID, must be assigned by opmode before
862- * starting the firmware, used for tracing
863- * @rx_mpdu_cmd_hdr_size: used for tracing, amount of data before the
864- * start of the 802.11 header in the @rx_mpdu_cmd
865866 * @dbg: additional debug data, see &struct iwl_trans_debug
866867 * @init_dram: FW initialization DMA data
867868 * @mbx_addr_0_step: step address data 0
@@ -887,6 +888,7 @@ struct iwl_trans {
887888 const struct iwl_cfg_trans_params * trans_cfg ;
888889 const struct iwl_cfg * cfg ;
889890 struct iwl_drv * drv ;
891+ struct iwl_trans_config conf ;
890892 enum iwl_trans_state state ;
891893 unsigned long status ;
892894
@@ -902,19 +904,13 @@ struct iwl_trans {
902904
903905 bool ext_32khz_clock_valid ;
904906
905- u8 rx_mpdu_cmd , rx_mpdu_cmd_hdr_size ;
906-
907907 bool pm_support ;
908908 bool ltr_enabled ;
909909 u8 pnvm_loaded :1 ;
910910 u8 fail_to_parse_pnvm_image :1 ;
911911 u8 reduce_power_loaded :1 ;
912912 u8 failed_to_load_reduce_power_image :1 ;
913913
914- const struct iwl_hcmd_arr * command_groups ;
915- int command_groups_size ;
916- bool wide_cmd_header ;
917-
918914 /* The following fields are internal only */
919915 struct kmem_cache * dev_cmd_pool ;
920916 char dev_cmd_pool_name [50 ];
@@ -947,8 +943,8 @@ struct iwl_trans {
947943
948944const char * iwl_get_cmd_string (struct iwl_trans * trans , u32 id );
949945
950- void iwl_trans_configure (struct iwl_trans * trans ,
951- const struct iwl_trans_config * trans_cfg );
946+ void iwl_trans_op_mode_enter (struct iwl_trans * trans ,
947+ struct iwl_op_mode * op_mode );
952948
953949int iwl_trans_start_hw (struct iwl_trans * trans );
954950
0 commit comments