From: Vladimir Kondratiev Date: Sun, 8 Jul 2012 11:08:10 +0000 (+0300) Subject: cfg80211: fix oops due to unassigned set_monitor_enabled callback X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=56af8f9af99223610f0582594bd4ac0a0320eb71;p=linux-beck.git cfg80211: fix oops due to unassigned set_monitor_enabled callback Quick fix for method being invoked without checking its existence. Signed-off-by: Vladimir Kondratiev Signed-off-by: Johannes Berg --- diff --git a/net/wireless/core.c b/net/wireless/core.c index eb60410ae588..e42a97b5b971 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -774,8 +774,9 @@ void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev, has_monitors_only_new = cfg80211_has_monitors_only(rdev); if (has_monitors_only_new != has_monitors_only_old) { - rdev->ops->set_monitor_enabled(&rdev->wiphy, - has_monitors_only_new); + if (rdev->ops->set_monitor_enabled) + rdev->ops->set_monitor_enabled(&rdev->wiphy, + has_monitors_only_new); if (!has_monitors_only_new) { rdev->monitor_channel = NULL;