OSDN Git Service

iwlwifi: mvm: simplify iwl_mvm_dbgfs_register
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 10 Feb 2021 15:15:06 +0000 (17:15 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 10 Feb 2021 23:52:07 +0000 (01:52 +0200)
commit8c082a99edb997d7999eb7cdb648e47a2bf4a638
tree796611e5e6b8dc04cc52b43b4a30e80147a19b49
parent46ad1ff977e78401537f953c84990714c4d3d768
iwlwifi: mvm: simplify iwl_mvm_dbgfs_register

No need to pass the dbgfs_dir just to assign it to mvm.
Assign to mvm and then call iwl_mvm_dbgfs_register.

This is a preparation towards the addition of a delayed
op_mode_start flow.
This will allow to split the op_mode_start flow.
Registration to debugfs must happen after we register to
mac80211 and the registration to mac80211 will soon be
delayed in certain cases. In order not to have to remember
the debugfs_dir in a separate variable, just set it into
the mvm structure so that it can be usable later.

Declare mvm->debugfs_dir in the iwl_mvm structure even when
IWLWIFI_DEBUGFS isn't enabled to simplify the source code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210171218.a92ee491863d.I047923aa3598fbf4fb6fce2cdff75a4969fedd76@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c