Re: [PATCH] wifi: mac80211: fix WARN_ON_ONCE in ieee80211_tdls_oper
From: Johannes Berg
Date: Fri Mar 13 2026 - 03:16:02 EST
On Tue, 2026-03-10 at 21:30 +0530, Deepanshu Kartikey wrote:
>
> - WARN_ON_ONCE(is_zero_ether_addr(sdata->u.mgd.tdls_peer) ||
> - !ether_addr_equal(sdata->u.mgd.tdls_peer, peer));
> + if (is_zero_ether_addr(sdata->u.mgd.tdls_peer) ||
> + !ether_addr_equal(sdata->u.mgd.tdls_peer, peer))
> + return -ENOLINK;
>
I think that check needs to be earlier, otherwise side effects happen
(TDLS_PEER_AUTH flag).
Also, I'm a bit confused, how is it possible the sta_info_get() worked,
but there's no TDLS? Maybe really what it needs is
sta = sta_info_get(sdata, peer);
- if (!sta)
+ if (!sta || !sta->sta.tdls)
return -ENOLINK;
instead?
johannes