diff mbox series

[39/40] wifi: mac80211: set wiphy for virtual monitors

Message ID 20230828135928.e55a2df1ca8b.I54569d0e2936e44debeb0a79bf20c77a88d18a66@changeid
State New
Headers show
Series wifi: cfg80211/mac80211: locking cleanups | expand

Commit Message

Johannes Berg Aug. 28, 2023, noon UTC
From: Johannes Berg <johannes.berg@intel.com>

Drivers might plausibly want to have this, but also the
locking assertions will need it later.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/iface.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index f7f58c3e8349..fc407be04ce9 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1134,6 +1134,7 @@  int ieee80211_add_virtual_monitor(struct ieee80211_local *local)
 		 wiphy_name(local->hw.wiphy));
 	sdata->wdev.iftype = NL80211_IFTYPE_MONITOR;
 	mutex_init(&sdata->wdev.mtx);
+	sdata->wdev.wiphy = local->hw.wiphy;
 
 	ieee80211_sdata_init(local, sdata);