aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 2f876b9ee344..48febd2160ba 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -9,6 +9,7 @@
9#include <linux/export.h> 9#include <linux/export.h>
10#include <net/cfg80211.h> 10#include <net/cfg80211.h>
11#include "core.h" 11#include "core.h"
12#include "rdev-ops.h"
12 13
13struct ieee80211_channel * 14struct ieee80211_channel *
14rdev_freq_to_chan(struct cfg80211_registered_device *rdev, 15rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
@@ -52,6 +53,8 @@ bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
52 struct ieee80211_channel *sec_chan; 53 struct ieee80211_channel *sec_chan;
53 int diff; 54 int diff;
54 55
56 trace_cfg80211_can_beacon_sec_chan(wiphy, chan, channel_type);
57
55 switch (channel_type) { 58 switch (channel_type) {
56 case NL80211_CHAN_HT40PLUS: 59 case NL80211_CHAN_HT40PLUS:
57 diff = 20; 60 diff = 20;
@@ -60,20 +63,25 @@ bool cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
60 diff = -20; 63 diff = -20;
61 break; 64 break;
62 default: 65 default:
66 trace_cfg80211_return_bool(true);
63 return true; 67 return true;
64 } 68 }
65 69
66 sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff); 70 sec_chan = ieee80211_get_channel(wiphy, chan->center_freq + diff);
67 if (!sec_chan) 71 if (!sec_chan) {
72 trace_cfg80211_return_bool(false);
68 return false; 73 return false;
74 }
69 75
70 /* we'll need a DFS capability later */ 76 /* we'll need a DFS capability later */
71 if (sec_chan->flags & (IEEE80211_CHAN_DISABLED | 77 if (sec_chan->flags & (IEEE80211_CHAN_DISABLED |
72 IEEE80211_CHAN_PASSIVE_SCAN | 78 IEEE80211_CHAN_PASSIVE_SCAN |
73 IEEE80211_CHAN_NO_IBSS | 79 IEEE80211_CHAN_NO_IBSS |
74 IEEE80211_CHAN_RADAR)) 80 IEEE80211_CHAN_RADAR)) {
81 trace_cfg80211_return_bool(false);
75 return false; 82 return false;
76 83 }
84 trace_cfg80211_return_bool(true);
77 return true; 85 return true;
78} 86}
79EXPORT_SYMBOL(cfg80211_can_beacon_sec_chan); 87EXPORT_SYMBOL(cfg80211_can_beacon_sec_chan);
@@ -92,7 +100,7 @@ int cfg80211_set_monitor_channel(struct cfg80211_registered_device *rdev,
92 if (!chan) 100 if (!chan)
93 return -EINVAL; 101 return -EINVAL;
94 102
95 return rdev->ops->set_monitor_channel(&rdev->wiphy, chan, chantype); 103 return rdev_set_monitor_channel(rdev, chan, chantype);
96} 104}
97 105
98void 106void