summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/570-mac80211_get_freq.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-17 03:07:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-01-17 03:07:51 +0000
commit9f0c2d0a5b114e1988f540c8fe2d8d88206c2ee0 (patch)
treee729dda11e67db4d8349ba46992527606c4910c2 /package/mac80211/patches/570-mac80211_get_freq.patch
parent8bdee4acf7fac4a8dc0661cf6addbadfa020b959 (diff)
downloadmtk-20170518-9f0c2d0a5b114e1988f540c8fe2d8d88206c2ee0.zip
mtk-20170518-9f0c2d0a5b114e1988f540c8fe2d8d88206c2ee0.tar.gz
mtk-20170518-9f0c2d0a5b114e1988f540c8fe2d8d88206c2ee0.tar.bz2
mac80211: allow user space to query the current operating frequency
SVN-Revision: 19178
Diffstat (limited to 'package/mac80211/patches/570-mac80211_get_freq.patch')
-rw-r--r--package/mac80211/patches/570-mac80211_get_freq.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/mac80211/patches/570-mac80211_get_freq.patch b/package/mac80211/patches/570-mac80211_get_freq.patch
new file mode 100644
index 0000000..073fe63
--- /dev/null
+++ b/package/mac80211/patches/570-mac80211_get_freq.patch
@@ -0,0 +1,29 @@
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -1154,6 +1154,18 @@ static int ieee80211_set_txq_params(stru
+ return 0;
+ }
+
++static int ieee80211_get_oper_channel(struct wiphy *wiphy,
++ struct ieee80211_channel **chan,
++ enum nl80211_channel_type *channel_type)
++{
++ struct ieee80211_local *local = wiphy_priv(wiphy);
++
++ *chan = local->oper_channel;
++ *channel_type = local->oper_channel_type;
++
++ return 0;
++}
++
+ static int ieee80211_set_channel(struct wiphy *wiphy,
+ struct ieee80211_channel *chan,
+ enum nl80211_channel_type channel_type)
+@@ -1494,6 +1506,7 @@ struct cfg80211_ops mac80211_config_ops
+ #endif
+ .change_bss = ieee80211_change_bss,
+ .set_txq_params = ieee80211_set_txq_params,
++ .get_channel = ieee80211_get_oper_channel,
+ .set_channel = ieee80211_set_channel,
+ .suspend = ieee80211_suspend,
+ .resume = ieee80211_resume,