wifi: mac80211_hwsim: fix potential channel crash

If wmediumd is used together with a hwsim radio that has
channel contexts enabled, the channel pointer can be NULL.

Track the frequency so we don't need it at that point,
avoiding the crash but still reporting the right freq.

Link: https://patch.msgid.link/20260911154632.44cf5d8492c2.I9448bd3cea76eb90554ae73fc77e0a3092ff1271@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2026-09-11 15:46:29 +02:00
commit abc142dab5