summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>2012-07-08 14:08:10 +0300
committerJohannes Berg <johannes.berg@intel.com>2012-07-08 13:10:07 +0200
commit56af8f9af99223610f0582594bd4ac0a0320eb71 (patch)
tree4523f738eac30f8b4ba9ecdb23f36c10fc00cef6 /net/wireless
parent2f7916f8d6761e039a117ff560a85a20edb796de (diff)
downloadlinux-56af8f9af99223610f0582594bd4ac0a0320eb71.tar.gz
linux-56af8f9af99223610f0582594bd4ac0a0320eb71.tar.bz2
linux-56af8f9af99223610f0582594bd4ac0a0320eb71.zip
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 <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/core.c5
1 files changed, 3 insertions, 2 deletions
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;