]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: check add_chanctx callback before use in ieee80211_reconfig
authorArend van Spriel <arend@broadcom.com>
Mon, 19 Nov 2012 11:01:05 +0000 (12:01 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 19 Nov 2012 13:48:19 +0000 (14:48 +0100)
commitae457a1d83bd98a45ac239ceb3ae39574e029a12
treefa143c4d2ef6cbafa1475c5b22a16c67de6a9269
parent812e174b59c2f72fb9fde6e48d95a408f35e16c4
mac80211: check add_chanctx callback before use in ieee80211_reconfig

During testing our mac80211 driver a fatal error occurred which was
signalled to mac80211. Upon performing the reconfiguration of the
device a WARN_ON was triggered. This warning checked the return value
of drv_add_chanctx(). However, this returns -EOPNOTSUPP when the
driver does not provide the callback. As the callback is optional
better check it is defined before calling drv_add_chanctx().

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/util.c