* [PATCH 1/2] nl80211: Export available antennas
@ 2010-12-14 2:20 Bruno Randolf
2010-12-14 2:20 ` [PATCH 2/2] ath5k: Set available antenna information for cfg80211 Bruno Randolf
2010-12-14 2:23 ` [PATCH 1/2] nl80211: Export available antennas Daniel Halperin
0 siblings, 2 replies; 7+ messages in thread
From: Bruno Randolf @ 2010-12-14 2:20 UTC (permalink / raw)
To: johannes, linville; +Cc: linux-wireless
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
v2: rebased
---
include/linux/nl80211.h | 5 +++++
net/wireless/nl80211.c | 2 ++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index b8fa25d..63b603c 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -841,6 +841,9 @@ enum nl80211_commands {
* the hardware should not be configured to receive on this antenna.
* For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
*
+ * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL: Bitmap of antennas which are available for
+ * configuration via the above parameters.
+ *
* @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS
*
* @NL80211_ATTR_OFFCHANNEL_TX_OK: For management frame TX, the frame may be
@@ -1035,6 +1038,8 @@ enum nl80211_attrs {
NL80211_ATTR_KEY_DEFAULT_TYPES,
+ NL80211_ATTR_WIPHY_ANTENNA_AVAIL,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 53f0443..87eae15 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -613,6 +613,8 @@ static int nl80211_send_wiphy(struct sk_buff *msg, u32 pid, u32 seq, int flags,
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_TX, tx_ant);
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_RX, rx_ant);
}
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_ANTENNA_AVAIL,
+ dev->wiphy.available_antennas);
}
nl_modes = nla_nest_start(msg, NL80211_ATTR_SUPPORTED_IFTYPES);
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/2] ath5k: Set available antenna information for cfg80211
2010-12-14 2:20 [PATCH 1/2] nl80211: Export available antennas Bruno Randolf
@ 2010-12-14 2:20 ` Bruno Randolf
2010-12-14 2:23 ` [PATCH 1/2] nl80211: Export available antennas Daniel Halperin
1 sibling, 0 replies; 7+ messages in thread
From: Bruno Randolf @ 2010-12-14 2:20 UTC (permalink / raw)
To: johannes, linville; +Cc: linux-wireless
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
v2: rebased
---
drivers/net/wireless/ath/ath5k/base.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 4e3b97c..e2a5b45 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2351,6 +2351,8 @@ ath5k_init_softc(struct ath5k_softc *sc, const struct ath_bus_ops *bus_ops)
BIT(NL80211_IFTYPE_ADHOC) |
BIT(NL80211_IFTYPE_MESH_POINT);
+ hw->wiphy->available_antennas = 0x3; /* both can be configured */
+
hw->extra_tx_headroom = 2;
hw->channel_change_time = 5000;
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] nl80211: Export available antennas
2010-12-14 2:20 [PATCH 1/2] nl80211: Export available antennas Bruno Randolf
2010-12-14 2:20 ` [PATCH 2/2] ath5k: Set available antenna information for cfg80211 Bruno Randolf
@ 2010-12-14 2:23 ` Daniel Halperin
2010-12-14 2:31 ` Bruno Randolf
1 sibling, 1 reply; 7+ messages in thread
From: Daniel Halperin @ 2010-12-14 2:23 UTC (permalink / raw)
To: Bruno Randolf; +Cc: johannes, linville, linux-wireless
On Mon, Dec 13, 2010 at 6:20 PM, Bruno Randolf <br1@einfach.org> wrote:
> Signed-off-by: Bruno Randolf <br1@einfach.org>
>
> ---
>
> v2: rebased
> ---
> include/linux/nl80211.h | 5 +++++
> net/wireless/nl80211.c | 2 ++
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
> index b8fa25d..63b603c 100644
> --- a/include/linux/nl80211.h
> +++ b/include/linux/nl80211.h
> @@ -841,6 +841,9 @@ enum nl80211_commands {
> * the hardware should not be configured to receive on this antenna.
> * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
> *
> + * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL: Bitmap of antennas which are available for
> + * configuration via the above parameters.
> + *
Not clear exactly what the point of this is -- there's no commit
message -- but should not this API distinguish between TX and RX?
E.g., several chipsets can only TX from a subset of RX antennas.
Dan
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] nl80211: Export available antennas
2010-12-14 2:23 ` [PATCH 1/2] nl80211: Export available antennas Daniel Halperin
@ 2010-12-14 2:31 ` Bruno Randolf
2010-12-14 3:11 ` Daniel Halperin
0 siblings, 1 reply; 7+ messages in thread
From: Bruno Randolf @ 2010-12-14 2:31 UTC (permalink / raw)
To: Daniel Halperin; +Cc: johannes, linville, linux-wireless
On Tue December 14 2010 11:23:09 Daniel Halperin wrote:
> > diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
> > index b8fa25d..63b603c 100644
> > --- a/include/linux/nl80211.h
> > +++ b/include/linux/nl80211.h
> > @@ -841,6 +841,9 @@ enum nl80211_commands {
> > * the hardware should not be configured to receive on this antenna.
> > * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
> > *
> > + * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL: Bitmap of antennas which are
> > available for + * configuration via the above parameters.
> > + *
>
> Not clear exactly what the point of this is -- there's no commit
> message -- but should not this API distinguish between TX and RX?
> E.g., several chipsets can only TX from a subset of RX antennas.
This is just the nl80211 part of a patch that got merged earlier, the
description of which has more info:
https://patchwork.kernel.org/patch/389682/
If it's necessary to distinguish between RX and TX it has to be done there
too. Can you give us examples of these chipsets which you mentioned?
bruno
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] nl80211: Export available antennas
2010-12-14 2:31 ` Bruno Randolf
@ 2010-12-14 3:11 ` Daniel Halperin
2010-12-15 9:53 ` Bruno Randolf
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Halperin @ 2010-12-14 3:11 UTC (permalink / raw)
To: Bruno Randolf; +Cc: johannes, linville, linux-wireless
Several of the Intel ones, I believe. For instance 4965 can RX with 3
antennas but can maybe only TX with A and B? Intel also has a 1x2
(5100 maybe?) chipset.
Dan
On Mon, Dec 13, 2010 at 6:31 PM, Bruno Randolf <br1@einfach.org> wrote:
> On Tue December 14 2010 11:23:09 Daniel Halperin wrote:
>> > diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
>> > index b8fa25d..63b603c 100644
>> > --- a/include/linux/nl80211.h
>> > +++ b/include/linux/nl80211.h
>> > @@ -841,6 +841,9 @@ enum nl80211_commands {
>> > * the hardware should not be configured to receive on this antenna.
>> > * For a more detailed descripton see @NL80211_ATTR_WIPHY_ANTENNA_TX.
>> > *
>> > + * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL: Bitmap of antennas which are
>> > available for + * configuration via the above parameters.
>> > + *
>>
>> Not clear exactly what the point of this is -- there's no commit
>> message -- but should not this API distinguish between TX and RX?
>> E.g., several chipsets can only TX from a subset of RX antennas.
>
> This is just the nl80211 part of a patch that got merged earlier, the
> description of which has more info:
>
> https://patchwork.kernel.org/patch/389682/
>
> If it's necessary to distinguish between RX and TX it has to be done there
> too. Can you give us examples of these chipsets which you mentioned?
>
> bruno
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] nl80211: Export available antennas
2010-12-14 3:11 ` Daniel Halperin
@ 2010-12-15 9:53 ` Bruno Randolf
2010-12-15 18:36 ` Daniel Halperin
0 siblings, 1 reply; 7+ messages in thread
From: Bruno Randolf @ 2010-12-15 9:53 UTC (permalink / raw)
To: Daniel Halperin; +Cc: johannes, linville, linux-wireless
On Tue December 14 2010 12:11:52 Daniel Halperin wrote:
> Several of the Intel ones, I believe. For instance 4965 can RX with 3
> antennas but can maybe only TX with A and B? Intel also has a 1x2
> (5100 maybe?) chipset.
A lot of maybees ;) Can anyone else comment? Do we need available antennas
separately for RX and TX?
bruno
> On Mon, Dec 13, 2010 at 6:31 PM, Bruno Randolf <br1@einfach.org> wrote:
> > On Tue December 14 2010 11:23:09 Daniel Halperin wrote:
> >> > diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
> >> > index b8fa25d..63b603c 100644
> >> > --- a/include/linux/nl80211.h
> >> > +++ b/include/linux/nl80211.h
> >> > @@ -841,6 +841,9 @@ enum nl80211_commands {
> >> > * the hardware should not be configured to receive on this
> >> > antenna. * For a more detailed descripton see
> >> > @NL80211_ATTR_WIPHY_ANTENNA_TX. *
> >> > + * @NL80211_ATTR_WIPHY_ANTENNA_AVAIL: Bitmap of antennas which are
> >> > available for + * configuration via the above parameters.
> >> > + *
> >>
> >> Not clear exactly what the point of this is -- there's no commit
> >> message -- but should not this API distinguish between TX and RX?
> >> E.g., several chipsets can only TX from a subset of RX antennas.
> >
> > This is just the nl80211 part of a patch that got merged earlier, the
> > description of which has more info:
> >
> > https://patchwork.kernel.org/patch/389682/
> >
> > If it's necessary to distinguish between RX and TX it has to be done
> > there too. Can you give us examples of these chipsets which you
> > mentioned?
> >
> > bruno
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 1/2] nl80211: Export available antennas
2010-12-15 9:53 ` Bruno Randolf
@ 2010-12-15 18:36 ` Daniel Halperin
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Halperin @ 2010-12-15 18:36 UTC (permalink / raw)
To: Bruno Randolf; +Cc: johannes, linville, linux-wireless
On Wed, Dec 15, 2010 at 1:53 AM, Bruno Randolf <br1@einfach.org> wrote:
> On Tue December 14 2010 12:11:52 Daniel Halperin wrote:
>> Several of the Intel ones, I believe. For instance 4965 can RX with 3
>> antennas but can maybe only TX with A and B? Intel also has a 1x2
>> (5100 maybe?) chipset.
>
> A lot of maybees ;) Can anyone else comment? Do we need available antennas
> separately for RX and TX?
>
Sorry, I thought I had given you enough info to figure it out for
yourself. Since you're incapable, here's the exact pointer:
http://git.kernel.org/?p=linux/kernel/git/iwlwifi/iwlwifi-2.6.git;a=blob;f=drivers/net/wireless/iwlwifi/iwl-5000.c;h=79ab0a6b138636781482a24bcc35e7da7e21f133;hb=HEAD#l540
That's one instance, there are many others. Atheros also makes
chipsets like this, and I suspect others do too.
Dan
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-15 18:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14 2:20 [PATCH 1/2] nl80211: Export available antennas Bruno Randolf
2010-12-14 2:20 ` [PATCH 2/2] ath5k: Set available antenna information for cfg80211 Bruno Randolf
2010-12-14 2:23 ` [PATCH 1/2] nl80211: Export available antennas Daniel Halperin
2010-12-14 2:31 ` Bruno Randolf
2010-12-14 3:11 ` Daniel Halperin
2010-12-15 9:53 ` Bruno Randolf
2010-12-15 18:36 ` Daniel Halperin
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).