mac80211: add rate control rewrite and enhance the performance of the minstrel algori...
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 421-nl80211-export-ht.patch
1 Subject: nl80211: export HT capabilities
2
3 This exports the local HT capabilities in nl80211.
4
5 Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
6 ---
7 include/linux/nl80211.h | 12 ++++++++++++
8 net/wireless/nl80211.c | 13 +++++++++++++
9 2 files changed, 25 insertions(+)
10
11 --- everything.orig/include/linux/nl80211.h 2008-10-09 01:31:09.000000000 +0200
12 +++ everything/include/linux/nl80211.h 2008-10-09 02:11:44.000000000 +0200
13 @@ -452,17 +452,29 @@ enum nl80211_mpath_info {
14 * an array of nested frequency attributes
15 * @NL80211_BAND_ATTR_RATES: supported bitrates in this band,
16 * an array of nested bitrate attributes
17 + * @NL80211_BAND_ATTR_HT_MCS_SET: 16-byte attribute containing the MCS set as
18 + * defined in 802.11n
19 + * @NL80211_BAND_ATTR_HT_CAPA: HT capabilities, as in the HT information IE
20 + * @NL80211_BAND_ATTR_HT_AMPDU_FACTOR: A-MPDU factor, as in 11n
21 + * @NL80211_BAND_ATTR_HT_AMPDU_DENSITY: A-MPDU density, as in 11n
22 */
23 enum nl80211_band_attr {
24 __NL80211_BAND_ATTR_INVALID,
25 NL80211_BAND_ATTR_FREQS,
26 NL80211_BAND_ATTR_RATES,
27
28 + NL80211_BAND_ATTR_HT_MCS_SET,
29 + NL80211_BAND_ATTR_HT_CAPA,
30 + NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
31 + NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
32 +
33 /* keep last */
34 __NL80211_BAND_ATTR_AFTER_LAST,
35 NL80211_BAND_ATTR_MAX = __NL80211_BAND_ATTR_AFTER_LAST - 1
36 };
37
38 +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
39 +
40 /**
41 * enum nl80211_frequency_attr - frequency attributes
42 * @NL80211_FREQUENCY_ATTR_FREQ: Frequency in MHz
43 --- everything.orig/net/wireless/nl80211.c 2008-10-09 01:32:05.000000000 +0200
44 +++ everything/net/wireless/nl80211.c 2008-10-09 02:12:21.000000000 +0200
45 @@ -157,6 +157,19 @@ static int nl80211_send_wiphy(struct sk_
46 if (!nl_band)
47 goto nla_put_failure;
48
49 + /* add HT info */
50 + if (dev->wiphy.bands[band]->ht_cap.ht_supported) {
51 + NLA_PUT(msg, NL80211_BAND_ATTR_HT_MCS_SET,
52 + sizeof(dev->wiphy.bands[band]->ht_cap.mcs),
53 + &dev->wiphy.bands[band]->ht_cap.mcs);
54 + NLA_PUT_U16(msg, NL80211_BAND_ATTR_HT_CAPA,
55 + dev->wiphy.bands[band]->ht_cap.cap);
56 + NLA_PUT_U8(msg, NL80211_BAND_ATTR_HT_AMPDU_FACTOR,
57 + dev->wiphy.bands[band]->ht_cap.ampdu_factor);
58 + NLA_PUT_U8(msg, NL80211_BAND_ATTR_HT_AMPDU_DENSITY,
59 + dev->wiphy.bands[band]->ht_cap.ampdu_density);
60 + }
61 +
62 /* add frequencies */
63 nl_freqs = nla_nest_start(msg, NL80211_BAND_ATTR_FREQS);
64 if (!nl_freqs)