aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/chan.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-06 20:22:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-06 20:22:09 -0500
commit9753dfe19a85e7e45a34a56f4cb2048bb4f50e27 (patch)
treec017a1b4a70b8447c71b01d8b320e071546b5c9d /net/wireless/chan.c
parentedf7c8148ec40c0fd27c0ef3f688defcc65e3913 (diff)
parent9f42f126154786e6e76df513004800c8c633f020 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1958 commits) net: pack skb_shared_info more efficiently net_sched: red: split red_parms into parms and vars net_sched: sfq: extend limits cnic: Improve error recovery on bnx2x devices cnic: Re-init dev->stats_addr after chip reset net_sched: Bug in netem reordering bna: fix sparse warnings/errors bna: make ethtool_ops and strings const xgmac: cleanups net: make ethtool_ops const vmxnet3" make ethtool ops const xen-netback: make ops structs const virtio_net: Pass gfp flags when allocating rx buffers. ixgbe: FCoE: Add support for ndo_get_fcoe_hbainfo() call netdev: FCoE: Add new ndo_get_fcoe_hbainfo() call igb: reset PHY after recovering from PHY power down igb: add basic runtime PM support igb: Add support for byte queue limits. e1000: cleanup CE4100 MDIO registers access e1000: unmap ce4100_gbe_mdio_base_virt in e1000_remove ...
Diffstat (limited to 'net/wireless/chan.c')
-rw-r--r--net/wireless/chan.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 17cd0c04d139..2fcfe0993ca2 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -6,6 +6,7 @@
6 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net> 6 * Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
7 */ 7 */
8 8
9#include <linux/export.h>
9#include <net/cfg80211.h> 10#include <net/cfg80211.h>
10#include "core.h" 11#include "core.h"
11 12
@@ -44,9 +45,9 @@ rdev_freq_to_chan(struct cfg80211_registered_device *rdev,
44 return chan; 45 return chan;
45} 46}
46 47
47static bool can_beacon_sec_chan(struct wiphy *wiphy, 48int cfg80211_can_beacon_sec_chan(struct wiphy *wiphy,
48 struct ieee80211_channel *chan, 49 struct ieee80211_channel *chan,
49 enum nl80211_channel_type channel_type) 50 enum nl80211_channel_type channel_type)
50{ 51{
51 struct ieee80211_channel *sec_chan; 52 struct ieee80211_channel *sec_chan;
52 int diff; 53 int diff;
@@ -75,6 +76,7 @@ static bool can_beacon_sec_chan(struct wiphy *wiphy,
75 76
76 return true; 77 return true;
77} 78}
79EXPORT_SYMBOL(cfg80211_can_beacon_sec_chan);
78 80
79int cfg80211_set_freq(struct cfg80211_registered_device *rdev, 81int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
80 struct wireless_dev *wdev, int freq, 82 struct wireless_dev *wdev, int freq,
@@ -109,8 +111,8 @@ int cfg80211_set_freq(struct cfg80211_registered_device *rdev,
109 switch (channel_type) { 111 switch (channel_type) {
110 case NL80211_CHAN_HT40PLUS: 112 case NL80211_CHAN_HT40PLUS:
111 case NL80211_CHAN_HT40MINUS: 113 case NL80211_CHAN_HT40MINUS:
112 if (!can_beacon_sec_chan(&rdev->wiphy, chan, 114 if (!cfg80211_can_beacon_sec_chan(&rdev->wiphy, chan,
113 channel_type)) { 115 channel_type)) {
114 printk(KERN_DEBUG 116 printk(KERN_DEBUG
115 "cfg80211: Secondary channel not " 117 "cfg80211: Secondary channel not "
116 "allowed to initiate communication\n"); 118 "allowed to initiate communication\n");