mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
wifi: cfg80211: fix NAN regulatory enforcement
reg_wdev_chan_valid() returns early for any wdev that has no netdev,
which is fine for P2P originally (and later PD still), but NAN has
no netdev and yet enforcement code was added and is needed, but is
dead code right now.
Use wdev_running() instead so that netdev-less wdevs aren't skipped.
P2P/PD don't do anything in the later switch, but NAN code can now
be reached.
Assisted-by: LLM
Fixes: 0e8ec738a7 ("wifi: cfg80211: add support for NAN data interface")
Link: https://patch.msgid.link/20260904165614.6abc075b5401.Ib90696e3fa49b1698c27d64db5360d51f6f187a9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
708f9d43d6
commit
17a5f8571d
|
|
@ -2345,7 +2345,7 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev)
|
|||
iftype = wdev->iftype;
|
||||
|
||||
/* make sure the interface is active */
|
||||
if (!wdev->netdev || !netif_running(wdev->netdev))
|
||||
if (!wdev_running(wdev))
|
||||
return true;
|
||||
|
||||
/* NAN doesn't have links, handle it separately */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user