summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/560-cfg80211_get_freq.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-17 20:49:28 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-01-17 20:49:28 +0000
commitb97cfa4bf5267917339a323505dfd104f8ceba46 (patch)
tree31713fca2ba2c86dacf603c7e6749c17406a6902 /package/mac80211/patches/560-cfg80211_get_freq.patch
parent001ebd8d90028c583b1e3b2ef40e3a168c6e7b6a (diff)
downloadmtk-20170518-b97cfa4bf5267917339a323505dfd104f8ceba46.zip
mtk-20170518-b97cfa4bf5267917339a323505dfd104f8ceba46.tar.gz
mtk-20170518-b97cfa4bf5267917339a323505dfd104f8ceba46.tar.bz2
iw, mac80211: get the frequency info per-netdev instead of per-phy
SVN-Revision: 19194
Diffstat (limited to 'package/mac80211/patches/560-cfg80211_get_freq.patch')
-rw-r--r--package/mac80211/patches/560-cfg80211_get_freq.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/mac80211/patches/560-cfg80211_get_freq.patch b/package/mac80211/patches/560-cfg80211_get_freq.patch
new file mode 100644
index 0000000..93c9d6e
--- /dev/null
+++ b/package/mac80211/patches/560-cfg80211_get_freq.patch
@@ -0,0 +1,34 @@
+--- a/net/wireless/core.h
++++ b/net/wireless/core.h
+@@ -75,6 +75,7 @@ struct cfg80211_registered_device {
+
+ /* current channel */
+ struct ieee80211_channel *channel;
++ enum nl80211_channel_type channel_type;
+
+ /* must be last because of the way we do wiphy_priv(),
+ * and it should at least be aligned to NETDEV_ALIGN */
+--- a/net/wireless/chan.c
++++ b/net/wireless/chan.c
+@@ -97,6 +97,7 @@ int rdev_set_freq(struct cfg80211_regist
+ return result;
+
+ rdev->channel = chan;
++ rdev->channel_type = channel_type;
+
+ return 0;
+ }
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -881,6 +881,11 @@ static int nl80211_send_iface(struct sk_
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
+ NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, dev->name);
+ NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, dev->ieee80211_ptr->iftype);
++ if (rdev->channel) {
++ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, rdev->channel->center_freq);
++ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, rdev->channel_type);
++ }
++
+
+ NLA_PUT_U32(msg, NL80211_ATTR_GENERATION,
+ rdev->devlist_generation ^