iwlwifi: trans/pcie: defer transport initialisation
authorJohannes Berg <johannes.berg@intel.com>
Sun, 11 Apr 2021 10:25:41 +0000 (13:25 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 14 Apr 2021 09:07:21 +0000 (12:07 +0300)
commitd12455fdbfe9430affd88bfbfee51777356667a0
treea4cabde353695f45e18c23eaa4c69bbb654cc927
parent7db67f68392c1c5a6373c1caa7dd951bf94e550b
iwlwifi: trans/pcie: defer transport initialisation

In a few PCIe devices we may have to swap out the configuration
after we allocate/initialise some parts of the device because
we only know the correct one after reading some registers. This
causes some things such as the byte-count table allocations to
be incorrect, since the configuration is swapped for one with a
bigger queue size.

Fix this by initialising most of the transport much later, only
after the configuration has finally been determined.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210411132130.8f5db97db1e4.Ic622da559b586a04ca536a0ec49ed5ecf03a9354@changeid
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