[BUGFIX] wifi: mac80211: fix MLD ID for cross-link CSA

The elems currently passed to ieee80211_sta_process_chanswitch()
are the CSA elements, so the STA profile in cross-link scenarios.
In this case, 'elems' may even be NULL if the profile disappeared
from the multi-link element (due to CSA elements no longer being
there), and static checkers reported that it may be dereferenced.
This is true, but the underlying cause is that we attempt to use
the wrong set of elements to find the MLD ID and look at the RNR,
for this purpose we must use the full outer elements.

Pass the right pointer to get the correct MLD ID and iterate the
correct RNR elements in ieee80211_sta_other_link_csa_disappeared.

type=bugfix
fixes=Ie8453979f5805873a8411c99346bcc3810cd6476
ticket=none

Change-Id: Iad5f645a9589b6324cf32d081cc8c4d812b62cf4
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/104386
automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Tested-by: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/104593
x-iwlwifi-stack-dev: c868f082d47c5845652cac1902ef124ad864856c
2 files changed