Message ID | 20240111181514.4c4b1c40eb3c.I2771621dee328c618536596b7e56232df42a79c8@changeid |
---|---|
State | New |
Headers | show |
Series | cfg80211/mac80211 patches from our internal tree 2024-01-11 | expand |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 99188bd84799..cc9a8eaffa6b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -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;