summaryrefslogtreecommitdiff
path: root/package/mac80211/patches/421-nl80211-export-ht.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-10-11 01:33:09 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-10-11 01:33:09 +0000
commitb8f710a69a8417793819b011c8202124c1c432d6 (patch)
tree46d33e0d5efd332b85fff0a07b46b23b11e52e94 /package/mac80211/patches/421-nl80211-export-ht.patch
parent71c8fa813537012ec912415f3a1c52b27428ae86 (diff)
downloadmtk-20170518-b8f710a69a8417793819b011c8202124c1c432d6.zip
mtk-20170518-b8f710a69a8417793819b011c8202124c1c432d6.tar.gz
mtk-20170518-b8f710a69a8417793819b011c8202124c1c432d6.tar.bz2
mac80211: add rate control rewrite and enhance the performance of the minstrel algorithm for non-mrr configurations
SVN-Revision: 12948
Diffstat (limited to 'package/mac80211/patches/421-nl80211-export-ht.patch')
-rw-r--r--package/mac80211/patches/421-nl80211-export-ht.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/package/mac80211/patches/421-nl80211-export-ht.patch b/package/mac80211/patches/421-nl80211-export-ht.patch
new file mode 100644
index 0000000..d6f6b5a
--- /dev/null
+++ b/package/mac80211/patches/421-nl80211-export-ht.patch
@@ -0,0 +1,64 @@
+Subject: nl80211: export HT capabilities
+
+This exports the local HT capabilities in nl80211.
+
+Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
+---
+ include/linux/nl80211.h | 12 ++++++++++++
+ net/wireless/nl80211.c | 13 +++++++++++++
+ 2 files changed, 25 insertions(+)
+
+--- everything.orig/include/linux/nl80211.h 2008-10-09 01:31:09.000000000 +0200
++++ everything/include/linux/nl80211.h 2008-10-09 02:11:44.000000000 +0200
+@@ -452,17 +452,29 @@ enum nl80211_mpath_info {
+ * an array of nested frequency attributes
+ * @NL80211_BAND_ATTR_RATES: supported bitrates in this band,
+ * an array of nested bitrate attributes
++ * @NL80211_BAND_ATTR_HT_MCS_SET: 16-byte attribute containing the MCS set as
++ * defined in 802.11n
++ * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
++ * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
++ * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
+ */
+ enum nl80211_band_attr {
+ __NL80211_BAND_ATTR_INVALID,
+ NL80211_BAND_ATTR_FREQS,
+ NL80211_BAND_ATTR_RATES,
+
++ NL80211_BAND_ATTR_HT_MCS_SET,
++ NL80211_BAND_ATTR_HT_CAPA,
++ NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
++ NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
++
+ /* keep last */
+ __NL80211_BAND_ATTR_AFTER_LAST,
+ NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
+ };
+
++#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
++
+ /**
+ * enum nl80211_frequency_attr - frequency attributes
+ * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
+--- everything.orig/net/wireless/nl80211.c 2008-10-09 01:32:05.000000000 +0200
++++ everything/net/wireless/nl80211.c 2008-10-09 02:12:21.000000000 +0200
+@@ -157,6 +157,19 @@ static int nl80211_send_wiphy(struct sk_
+ if (!nl_band)
+ goto nla_put_failure;
+
++ /* add HT info */
++ if (dev->wiphy.bands[band]->ht_cap.ht_supported) {
++ NLA_PUT(msg, NL80211_BAND_ATTR_HT_MCS_SET,
++ sizeof(dev->wiphy.bands[band]->ht_cap.mcs),
++ &dev->wiphy.bands[band]->ht_cap.mcs);
++ NLA_PUT_U16(msg, NL80211_BAND_ATTR_HT_CAPA,
++ dev->wiphy.bands[band]->ht_cap.cap);
++ NLA_PUT_U8(msg, NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
++ dev->wiphy.bands[band]->ht_cap.ampdu_factor);
++ NLA_PUT_U8(msg, NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
++ dev->wiphy.bands[band]->ht_cap.ampdu_density);
++ }
++
+ /* add frequencies */
+ nl_freqs = nla_nest_start(msg, NL80211_BAND_ATTR_FREQS);
+ if (!nl_freqs)