]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cfg80211: fix oops due to unassigned set_monitor_enabled callback
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Sun, 8 Jul 2012 11:08:10 +0000 (14:08 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Sun, 8 Jul 2012 11:10:07 +0000 (13:10 +0200)
Quick fix for method being invoked without checking its existence.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/core.c

index eb60410ae58879b48c96d663f5926aaaaf1c47e9..e42a97b5b971efc5e65c4c17b5105a946e9b7438 100644 (file)
@@ -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;