]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: pcie: set iwl_trans->cfg later in the probe function
authorLuca Coelho <luciano.coelho@intel.com>
Thu, 2 Aug 2018 13:24:53 +0000 (16:24 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 6 Sep 2019 12:51:01 +0000 (15:51 +0300)
commitadc236a8fb17d4374b8e0d6b53f8735b1cb9673c
treeece587097ecff26972c5b39afe0f0c668b797558
parenta53936f56b1daccf314db09dfc3693ed4a5f1c2d
iwlwifi: pcie: set iwl_trans->cfg later in the probe function

Instead of setting the cfg to iwl_trans already during allocation, set
it only later when we have had the time to decide which cfg to use.
This is part of the effort to be able to decide the cfg based on HW
revision and RF ID after iwl_trans_alloc() has been called.

For now, since we still have a bunch of code checking the HW revision
and the RF ID, we set iwl_trans->cfg early, even before we decided the
real cfg to use.  We only use the trans configuration at this point,
so this is fine for now.  In the future, the trans configuration will
be completely independent from the rest of the config structure, so
we'll be able to avoid this.

Additionally, we can't access the PRPH registers in iwl_trans_alloc()
anymore, so move the HW REV C-step check for family 8000 code later to
the probe function as well.  This step is probably not necessary, but
if that's the case it should be removed separately later on.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-trans.c
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/pcie/drv.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c