Skip to content

Commit

Permalink
cfg80211: fix oops due to unassigned set_monitor_enabled callback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Kondratiev authored and Johannes Berg committed Jul 8, 2012
1 parent 2f7916f commit 56af8f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions net/wireless/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 56af8f9

Please sign in to comment.