Commit e1032281 authored by Benjamin Berg's avatar Benjamin Berg Committed by Johannes Berg

wifi: mac80211: use deflink and fix typo in link ID check

This does not change anything effectively, but it is closer to what the
code is trying to achieve here. i.e. select the link data if it is an
MLD and fall back to using the deflink otherwise.

Fixes: 0f99f087 ("wifi: mac80211: Print local link address during authentication")
Signed-off-by: default avatarBenjamin Berg <benjamin.berg@intel.com>
Reviewed-by: default avatarIlan Peer <ilan.peer@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240111181514.4c4b1c40eb3c.I2771621dee328c618536596b7e56232df42a79c8@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent bc8a0fac
......@@ -7869,10 +7869,10 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
if (err)
goto err_clear;
if (req->link_id > 0)
if (req->link_id >= 0)
link = sdata_dereference(sdata->link[req->link_id], sdata);
else
link = sdata_dereference(sdata->link[0], sdata);
link = &sdata->deflink;
if (WARN_ON(!link)) {
err = -ENOLINK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment