]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: make ieee80211_vif_to_wdev work when the vif isn't in the driver
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Fri, 9 Apr 2021 09:40:19 +0000 (12:40 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Apr 2021 10:03:13 +0000 (12:03 +0200)
commit46a8841e25bd0056b50520851a341754b146122f
tree72ee7385117fb310e9ed2f7754bec0583d353057
parent06a84da301e1395e96b1a4827d369c67a242089d
mac80211: make ieee80211_vif_to_wdev work when the vif isn't in the driver

This will allow the low level driver to get the wdev during
the add_interface flow.
In order to do that, remove a few checks from there and do
not return NULL for vifs that were not yet added to the
driver. Note that all the current callers of this helper
function assume that the vif already exists:
 - The callers from the drivers already have a vif pointer.
 Before this change, ieee80211_vif_to_wdev would return NULL
 in some cases, but those callers don't even check they
 get a non-NULL pointer from ieee80211_vif_to_wdev.
 - The callers from net/mac80211/cfg.c assume the vif is
 already added to the driver as well.

So, this change has no impact on existing callers of this
helper function.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210409123755.6078d3517095.I1907a45f267a62dab052bcc44428aa7a2005ffc9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/util.c