* [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode
@ 2010-11-19 11:40 Helmut Schaa
2010-11-19 11:40 ` [PATCH 2/2] mac80211: Apply ht_opmode changes in ieee80211_change_bss Helmut Schaa
2010-11-24 7:21 ` [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Johannes Berg
0 siblings, 2 replies; 5+ messages in thread
From: Helmut Schaa @ 2010-11-19 11:40 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Helmut Schaa, Johannes Berg
Add a new BSS attribute to allow hostapd to set the current HT opmode.
Otherwise drivers won't be able to set up protection for HT rates in
AP mode.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
Not sure if we also want to pass in some other parts of the HT Operation
IE or maybe the whole IE?
At the moment the HT opmode is sufficient but in the future we might
want to support STBC beaconing and so on. Passing the whole IE would
not require any new interfaces later but also makes the interface less
nice IMO :)
I'll send a patch for hostapd as soon as the interface is agreed on.
Thanks,
Helmut
include/linux/nl80211.h | 4 ++++
include/net/cfg80211.h | 3 +++
net/wireless/nl80211.c | 5 +++++
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 037b4e4..edac2ef 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -828,6 +828,8 @@ enum nl80211_commands {
*
* @NL80211_ATTR_MCAST_RATE: Multicast tx rate (in 100 kbps) for IBSS
*
+ * @NL80211_ATTR_BSS_HTOPMODE: HT operation mode (u16)
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1002,6 +1004,8 @@ enum nl80211_attrs {
NL80211_ATTR_MCAST_RATE,
+ NL80211_ATTR_BSS_HT_OPMODE,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 91f0995..a2be9e6 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -605,6 +605,8 @@ struct mpath_info {
* (or NULL for no change)
* @basic_rates_len: number of basic rates
* @ap_isolate: do not forward packets between connected stations
+ * @ht_opmode: HT Operation mode
+ * (u16 = opmode, -1 = do not change)
*/
struct bss_parameters {
int use_cts_prot;
@@ -613,6 +615,7 @@ struct bss_parameters {
u8 *basic_rates;
u8 basic_rates_len;
int ap_isolate;
+ int ht_opmode;
};
struct mesh_config {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b15eb77..d692570 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -121,6 +121,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_BSS_SHORT_SLOT_TIME] = { .type = NLA_U8 },
[NL80211_ATTR_BSS_BASIC_RATES] = { .type = NLA_BINARY,
.len = NL80211_MAX_SUPP_RATES },
+ [NL80211_ATTR_BSS_HT_OPMODE] = { .type = NLA_U16 },
[NL80211_ATTR_MESH_PARAMS] = { .type = NLA_NESTED },
@@ -2435,6 +2436,7 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
params.use_short_preamble = -1;
params.use_short_slot_time = -1;
params.ap_isolate = -1;
+ params.ht_opmode = -1;
if (info->attrs[NL80211_ATTR_BSS_CTS_PROT])
params.use_cts_prot =
@@ -2453,6 +2455,9 @@ static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
}
if (info->attrs[NL80211_ATTR_AP_ISOLATE])
params.ap_isolate = !!nla_get_u8(info->attrs[NL80211_ATTR_AP_ISOLATE]);
+ if (info->attrs[NL80211_ATTR_BSS_HT_OPMODE])
+ params.ht_opmode =
+ nla_get_u16(info->attrs[NL80211_ATTR_BSS_HT_OPMODE]);
if (!rdev->ops->change_bss)
return -EOPNOTSUPP;
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] mac80211: Apply ht_opmode changes in ieee80211_change_bss
2010-11-19 11:40 [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Helmut Schaa
@ 2010-11-19 11:40 ` Helmut Schaa
2010-11-24 7:21 ` [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Johannes Berg
1 sibling, 0 replies; 5+ messages in thread
From: Helmut Schaa @ 2010-11-19 11:40 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Helmut Schaa, Johannes Berg
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
net/mac80211/cfg.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0c54407..e907604 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1108,6 +1108,12 @@ static int ieee80211_change_bss(struct wiphy *wiphy,
sdata->flags &= ~IEEE80211_SDATA_DONT_BRIDGE_PACKETS;
}
+ if (params->ht_opmode >= 0) {
+ sdata->vif.bss_conf.ht_operation_mode =
+ (u16) params->ht_opmode;
+ changed |= BSS_CHANGED_HT;
+ }
+
ieee80211_bss_info_change_notify(sdata, changed);
return 0;
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode
2010-11-19 11:40 [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Helmut Schaa
2010-11-19 11:40 ` [PATCH 2/2] mac80211: Apply ht_opmode changes in ieee80211_change_bss Helmut Schaa
@ 2010-11-24 7:21 ` Johannes Berg
2010-11-30 11:08 ` Helmut Schaa
2010-12-06 4:44 ` Jouni Malinen
1 sibling, 2 replies; 5+ messages in thread
From: Johannes Berg @ 2010-11-24 7:21 UTC (permalink / raw)
To: Helmut Schaa; +Cc: John W. Linville, linux-wireless, Jouni Malinen
On Fri, 2010-11-19 at 12:40 +0100, Helmut Schaa wrote:
> Add a new BSS attribute to allow hostapd to set the current HT opmode.
> Otherwise drivers won't be able to set up protection for HT rates in
> AP mode.
>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
> ---
>
> Not sure if we also want to pass in some other parts of the HT Operation
> IE or maybe the whole IE?
>
> At the moment the HT opmode is sufficient but in the future we might
> want to support STBC beaconing and so on. Passing the whole IE would
> not require any new interfaces later but also makes the interface less
> nice IMO :)
>
> I'll send a patch for hostapd as soon as the interface is agreed on.
This seems fine to me. Any opinion from Jouni?
johannes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode
2010-11-24 7:21 ` [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Johannes Berg
@ 2010-11-30 11:08 ` Helmut Schaa
2010-12-06 4:44 ` Jouni Malinen
1 sibling, 0 replies; 5+ messages in thread
From: Helmut Schaa @ 2010-11-30 11:08 UTC (permalink / raw)
To: Jouni Malinen; +Cc: Johannes Berg, John W. Linville, linux-wireless
Am Mittwoch 24 November 2010 schrieb Johannes Berg:
> On Fri, 2010-11-19 at 12:40 +0100, Helmut Schaa wrote:
> > Add a new BSS attribute to allow hostapd to set the current HT opmode.
> > Otherwise drivers won't be able to set up protection for HT rates in
> > AP mode.
> >
> > Cc: Johannes Berg <johannes@sipsolutions.net>
> > Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
> > ---
> >
> > Not sure if we also want to pass in some other parts of the HT Operation
> > IE or maybe the whole IE?
> >
> > At the moment the HT opmode is sufficient but in the future we might
> > want to support STBC beaconing and so on. Passing the whole IE would
> > not require any new interfaces later but also makes the interface less
> > nice IMO :)
> >
> > I'll send a patch for hostapd as soon as the interface is agreed on.
>
> This seems fine to me. Any opinion from Jouni?
Jouni, any comment from your side?
Thanks,
Helmut
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode
2010-11-24 7:21 ` [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Johannes Berg
2010-11-30 11:08 ` Helmut Schaa
@ 2010-12-06 4:44 ` Jouni Malinen
1 sibling, 0 replies; 5+ messages in thread
From: Jouni Malinen @ 2010-12-06 4:44 UTC (permalink / raw)
To: Johannes Berg; +Cc: Helmut Schaa, John W. Linville, linux-wireless
On Wed, Nov 24, 2010 at 08:21:29AM +0100, Johannes Berg wrote:
> On Fri, 2010-11-19 at 12:40 +0100, Helmut Schaa wrote:
> > Not sure if we also want to pass in some other parts of the HT Operation
> > IE or maybe the whole IE?
> >
> > At the moment the HT opmode is sufficient but in the future we might
> > want to support STBC beaconing and so on. Passing the whole IE would
> > not require any new interfaces later but also makes the interface less
> > nice IMO :)
> This seems fine to me. Any opinion from Jouni?
No strong preference either way, so it looks fine to go ahead with this
and add new attributes whenever something else is needed.
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-12-06 4:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-19 11:40 [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Helmut Schaa
2010-11-19 11:40 ` [PATCH 2/2] mac80211: Apply ht_opmode changes in ieee80211_change_bss Helmut Schaa
2010-11-24 7:21 ` [PATCH 1/2] cfg80211: Add new BSS attribute ht_opmode Johannes Berg
2010-11-30 11:08 ` Helmut Schaa
2010-12-06 4:44 ` Jouni Malinen
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).