* Re: [PATCH] nl80211: export HT capabilities
2008-10-09 10:20 [PATCH] nl80211: export HT capabilities Johannes Berg
@ 2008-10-09 8:57 ` Luis R. Rodriguez
2008-10-10 9:23 ` Johannes Berg
0 siblings, 1 reply; 9+ messages in thread
From: Luis R. Rodriguez @ 2008-10-09 8:57 UTC (permalink / raw)
To: Johannes Berg; +Cc: John Linville, linux-wireless
On Thu, Oct 09, 2008 at 03:20:13AM -0700, Johannes Berg wrote:
> +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
Typo
Luis
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] nl80211: export HT capabilities
@ 2008-10-09 10:20 Johannes Berg
2008-10-09 8:57 ` Luis R. Rodriguez
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2008-10-09 10:20 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
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)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nl80211: export HT capabilities
2008-10-09 8:57 ` Luis R. Rodriguez
@ 2008-10-10 9:23 ` Johannes Berg
2008-10-10 21:36 ` John W. Linville
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2008-10-10 9:23 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: John Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
On Thu, 2008-10-09 at 01:57 -0700, Luis R. Rodriguez wrote:
> On Thu, Oct 09, 2008 at 03:20:13AM -0700, Johannes Berg wrote:
> > +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
>
> Typo
Hmm? Am I too dense?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nl80211: export HT capabilities
2008-10-10 9:23 ` Johannes Berg
@ 2008-10-10 21:36 ` John W. Linville
2008-10-10 21:44 ` Johannes Berg
2008-10-11 16:34 ` Michael Buesch
0 siblings, 2 replies; 9+ messages in thread
From: John W. Linville @ 2008-10-10 21:36 UTC (permalink / raw)
To: Johannes Berg; +Cc: Luis R. Rodriguez, linux-wireless
On Fri, Oct 10, 2008 at 11:23:42AM +0200, Johannes Berg wrote:
> On Thu, 2008-10-09 at 01:57 -0700, Luis R. Rodriguez wrote:
> > On Thu, Oct 09, 2008 at 03:20:13AM -0700, Johannes Berg wrote:
> > > +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
> >
> > Typo
>
> Hmm? Am I too dense?
Well, it looks a little useless to define something as itself...
--
John W. Linville Linux should be at the core
linville@tuxdriver.com of your literate lifestyle.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nl80211: export HT capabilities
2008-10-10 21:36 ` John W. Linville
@ 2008-10-10 21:44 ` Johannes Berg
2008-10-10 23:12 ` John W. Linville
2008-10-11 22:29 ` Luis R. Rodriguez
2008-10-11 16:34 ` Michael Buesch
1 sibling, 2 replies; 9+ messages in thread
From: Johannes Berg @ 2008-10-10 21:44 UTC (permalink / raw)
To: John W. Linville; +Cc: Luis R. Rodriguez, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 574 bytes --]
On Fri, 2008-10-10 at 17:36 -0400, John W. Linville wrote:
> On Fri, Oct 10, 2008 at 11:23:42AM +0200, Johannes Berg wrote:
> > On Thu, 2008-10-09 at 01:57 -0700, Luis R. Rodriguez wrote:
> > > On Thu, Oct 09, 2008 at 03:20:13AM -0700, Johannes Berg wrote:
> > > > +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
> > >
> > > Typo
> >
> > Hmm? Am I too dense?
>
> Well, it looks a little useless to define something as itself...
Yeah but you can use that to check "has the nl80211.h I'm compiling
against defined the HT stuff yet?"
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nl80211: export HT capabilities
2008-10-10 21:44 ` Johannes Berg
@ 2008-10-10 23:12 ` John W. Linville
2008-10-11 22:29 ` Luis R. Rodriguez
1 sibling, 0 replies; 9+ messages in thread
From: John W. Linville @ 2008-10-10 23:12 UTC (permalink / raw)
To: Johannes Berg; +Cc: Luis R. Rodriguez, linux-wireless
On Fri, Oct 10, 2008 at 11:44:06PM +0200, Johannes Berg wrote:
> On Fri, 2008-10-10 at 17:36 -0400, John W. Linville wrote:
> > On Fri, Oct 10, 2008 at 11:23:42AM +0200, Johannes Berg wrote:
> > > On Thu, 2008-10-09 at 01:57 -0700, Luis R. Rodriguez wrote:
> > > > On Thu, Oct 09, 2008 at 03:20:13AM -0700, Johannes Berg wrote:
> > > > > +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
> > > >
> > > > Typo
> > >
> > > Hmm? Am I too dense?
> >
> > Well, it looks a little useless to define something as itself...
>
> Yeah but you can use that to check "has the nl80211.h I'm compiling
> against defined the HT stuff yet?"
Ah...you are just too clever... :-)
--
John W. Linville Linux should be at the core
linville@tuxdriver.com of your literate lifestyle.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nl80211: export HT capabilities
2008-10-10 21:36 ` John W. Linville
2008-10-10 21:44 ` Johannes Berg
@ 2008-10-11 16:34 ` Michael Buesch
1 sibling, 0 replies; 9+ messages in thread
From: Michael Buesch @ 2008-10-11 16:34 UTC (permalink / raw)
To: John W. Linville; +Cc: Johannes Berg, Luis R. Rodriguez, linux-wireless
On Friday 10 October 2008 23:36:10 John W. Linville wrote:
> On Fri, Oct 10, 2008 at 11:23:42AM +0200, Johannes Berg wrote:
> > On Thu, 2008-10-09 at 01:57 -0700, Luis R. Rodriguez wrote:
> > > On Thu, Oct 09, 2008 at 03:20:13AM -0700, Johannes Berg wrote:
> > > > +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
> > >
> > > Typo
> >
> > Hmm? Am I too dense?
>
> Well, it looks a little useless to define something as itself...
>
No, it's a cpp trick. You can use #ifdef to find out whether something is
implemented or not.
--
Greetings Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nl80211: export HT capabilities
2008-10-10 21:44 ` Johannes Berg
2008-10-10 23:12 ` John W. Linville
@ 2008-10-11 22:29 ` Luis R. Rodriguez
2008-10-11 22:36 ` Johannes Berg
1 sibling, 1 reply; 9+ messages in thread
From: Luis R. Rodriguez @ 2008-10-11 22:29 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless
On Fri, Oct 10, 2008 at 5:44 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Fri, 2008-10-10 at 17:36 -0400, John W. Linville wrote:
>> On Fri, Oct 10, 2008 at 11:23:42AM +0200, Johannes Berg wrote:
>> > On Thu, 2008-10-09 at 01:57 -0700, Luis R. Rodriguez wrote:
>> > > On Thu, Oct 09, 2008 at 03:20:13AM -0700, Johannes Berg wrote:
>> > > > +#define NL80211_BAND_ATTR_HT_CAPA NL80211_BAND_ATTR_HT_CAPA
>> > >
>> > > Typo
>> >
>> > Hmm? Am I too dense?
>>
>> Well, it looks a little useless to define something as itself...
>
> Yeah but you can use that to check "has the nl80211.h I'm compiling
> against defined the HT stuff yet?"
So you're going to #ifdef on the iw nl80211.h?
Can't we use something better and more obvious like defining an
nl80211 version (as kernel version won't do us any good for bleeding
edge wireless-testing users) or something like that?
Luis
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] nl80211: export HT capabilities
2008-10-11 22:29 ` Luis R. Rodriguez
@ 2008-10-11 22:36 ` Johannes Berg
0 siblings, 0 replies; 9+ messages in thread
From: Johannes Berg @ 2008-10-11 22:36 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: John W. Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 483 bytes --]
On Sat, 2008-10-11 at 18:29 -0400, Luis R. Rodriguez wrote:
> So you're going to #ifdef on the iw nl80211.h?
No. iw actually has a copy of the header file now.
> Can't we use something better and more obvious like defining an
> nl80211 version (as kernel version won't do us any good for bleeding
> edge wireless-testing users) or something like that?
Eh, no. Version numbers suck. Always test for features. Besides, this is
about compiling, not running.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-10-11 22:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09 10:20 [PATCH] nl80211: export HT capabilities Johannes Berg
2008-10-09 8:57 ` Luis R. Rodriguez
2008-10-10 9:23 ` Johannes Berg
2008-10-10 21:36 ` John W. Linville
2008-10-10 21:44 ` Johannes Berg
2008-10-10 23:12 ` John W. Linville
2008-10-11 22:29 ` Luis R. Rodriguez
2008-10-11 22:36 ` Johannes Berg
2008-10-11 16:34 ` Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).