iwlwifi: pcie: free RBs during configure
authorJohannes Berg <johannes.berg@intel.com>
Mon, 2 Aug 2021 14:09:38 +0000 (17:09 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 26 Aug 2021 20:32:20 +0000 (23:32 +0300)
commit6ac5720086c8b176794eb74c5cc09f8b79017f38
treec39e4cd00061468d273aa2e4ba8883e1493d946d
parent95fe8d89bb8c9c114ca3e46f8b2457f894f55746
iwlwifi: pcie: free RBs during configure

When switching op-modes, or more generally when reconfiguring,
we might switch the RB size. In _iwl_pcie_rx_init() we have a
comment saying we must free all RBs since we might switch the
size, but this is actually too late: the switch has been done
and we'll free the buffers with the wrong size.

Fix this by always freeing the buffers, if any, at the start
of configure, instead of only after the size may have changed.

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.20210802170640.42d7c93279c4.I07f74e65aab0e3d965a81206fcb289dc92d74878@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/pcie/rx.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c