From: Johannes Berg None of the drivers implementing probe_peer (mac80211, wil6210, nxpwifi) need the wiphy mutex for it, so we can just not take it. Document that as well. Signed-off-by: Johannes Berg --- include/net/cfg80211.h | 5 ++++- net/wireless/nl80211.c | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 0eee48bdc937..32b458c9a7ee 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -5149,7 +5149,10 @@ struct mgmt_frame_regs { * * @probe_peer: probe a connected peer (AP: STA MAC required; STA: no MAC), * must use the @cookie as provided which is later passed to - * cfg80211_probe_status(). + * cfg80211_probe_status(). Called without the wiphy mutex, so the + * interface type may have changed/be changing and the MAC may be + * %NULL even in AP mode (if runtime type changes are supported), + * drivers must check for that. * * @set_noack_map: Set the NoAck Map for the TIDs. * diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7cb3bb9438d7..b4ff8c811dc1 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -20835,7 +20835,8 @@ static const struct genl_small_ops nl80211_small_ops[] = { .validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP, .doit = nl80211_probe_peer, .flags = GENL_UNS_ADMIN_PERM, - .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP), + .internal_flags = IFLAGS(NL80211_FLAG_NEED_NETDEV_UP | + NL80211_FLAG_NO_WIPHY_MTX), }, { .cmd = NL80211_CMD_REGISTER_BEACONS, -- 2.56.0