wifi: iwlwifi: mvm: allocate STA links only for active links
authorJohannes Berg <johannes.berg@intel.com>
Tue, 19 Mar 2024 08:10:27 +0000 (10:10 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 25 Mar 2024 14:39:11 +0000 (15:39 +0100)
commit62bdd97598f8be82a24f556f78336b05d1c3e84b
treeb41f0bb09990ba94eec900d64da1b96695441efb
parent84ace57c22d3c3b08245ff96ff4d68c2a28b44eb
wifi: iwlwifi: mvm: allocate STA links only for active links

For the mvm driver, data structures match what's in the firmware,
we allocate FW IDs for them already etc. During link switch we
already allocate/free the STA links appropriately, but initially
we'd allocate them always. Fix this to allocate memory, a STA ID,
etc. only for active links.

Fixes: 57974a55d995 ("wifi: iwlwifi: mvm: refactor iwl_mvm_mac_sta_state_common()")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240319100755.f2093ff73465.Ie891e1cc9c9df09ae22be6aad5c143e376f40f0e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c