* [PATCHv3 1/3] mac80211: remove debugfs noack test
2011-11-18 11:01 [PATCHv3 0/3] add NoAck per tid support Simon Wunderlich
@ 2011-11-18 11:01 ` Simon Wunderlich
2011-11-18 11:01 ` [PATCHv3 2/3] wireless: Add NoAck per tid Support Simon Wunderlich
` (3 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Simon Wunderlich @ 2011-11-18 11:01 UTC (permalink / raw)
To: linux-wireless
Cc: linville, Johannes Berg, Simon Wunderlich, Mathias Kretschmer
This feature has been superseded by the NoAck per Queue feature.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
net/mac80211/debugfs.c | 35 -----------------------------------
net/mac80211/ieee80211_i.h | 1 -
net/mac80211/tx.c | 10 +---------
net/mac80211/wme.c | 3 +--
4 files changed, 2 insertions(+), 47 deletions(-)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 00cefcb..90baea5 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -97,40 +97,6 @@ static const struct file_operations reset_ops = {
.llseek = noop_llseek,
};
-static ssize_t noack_read(struct file *file, char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- struct ieee80211_local *local = file->private_data;
-
- return mac80211_format_buffer(user_buf, count, ppos, "%d\n",
- local->wifi_wme_noack_test);
-}
-
-static ssize_t noack_write(struct file *file,
- const char __user *user_buf,
- size_t count, loff_t *ppos)
-{
- struct ieee80211_local *local = file->private_data;
- char buf[10];
- size_t len;
-
- len = min(count, sizeof(buf) - 1);
- if (copy_from_user(buf, user_buf, len))
- return -EFAULT;
- buf[len] = '\0';
-
- local->wifi_wme_noack_test = !!simple_strtoul(buf, NULL, 0);
-
- return count;
-}
-
-static const struct file_operations noack_ops = {
- .read = noack_read,
- .write = noack_write,
- .open = mac80211_open_file_generic,
- .llseek = default_llseek,
-};
-
static ssize_t uapsd_queues_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
@@ -398,7 +364,6 @@ void debugfs_hw_add(struct ieee80211_local *local)
DEBUGFS_ADD(wep_iv);
DEBUGFS_ADD(queues);
DEBUGFS_ADD_MODE(reset, 0200);
- DEBUGFS_ADD(noack);
DEBUGFS_ADD(uapsd_queues);
DEBUGFS_ADD(uapsd_max_sp_len);
DEBUGFS_ADD(channel_type);
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 068cc92..5c62579 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -957,7 +957,6 @@ struct ieee80211_local {
int total_ps_buffered; /* total number of all buffered unicast and
* multicast packets for power saving stations
*/
- int wifi_wme_noack_test;
unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
/*
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 30d212a..f632690 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1150,16 +1150,8 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
if (is_multicast_ether_addr(hdr->addr1)) {
tx->flags &= ~IEEE80211_TX_UNICAST;
info->flags |= IEEE80211_TX_CTL_NO_ACK;
- } else {
+ } else
tx->flags |= IEEE80211_TX_UNICAST;
- if (unlikely(local->wifi_wme_noack_test))
- info->flags |= IEEE80211_TX_CTL_NO_ACK;
- /*
- * Flags are initialized to 0. Hence, no need to
- * explicitly unset IEEE80211_TX_CTL_NO_ACK since
- * it might already be set for injected frames.
- */
- }
if (!(info->flags & IEEE80211_TX_CTL_DONTFRAG)) {
if (!(tx->flags & IEEE80211_TX_UNICAST) ||
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 4332711..74b3d10 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -150,8 +150,7 @@ void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
/* preserve EOSP bit */
ack_policy = *p & IEEE80211_QOS_CTL_EOSP;
- if (unlikely(sdata->local->wifi_wme_noack_test) ||
- is_multicast_ether_addr(hdr->addr1))
+ if (is_multicast_ether_addr(hdr->addr1))
ack_policy |= IEEE80211_QOS_CTL_ACK_POLICY_NOACK;
/* qos header is 2 bytes */
*p++ = ack_policy | tid;
--
1.7.7.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCHv3 2/3] wireless: Add NoAck per tid Support
2011-11-18 11:01 [PATCHv3 0/3] add NoAck per tid support Simon Wunderlich
2011-11-18 11:01 ` [PATCHv3 1/3] mac80211: remove debugfs noack test Simon Wunderlich
@ 2011-11-18 11:01 ` Simon Wunderlich
2011-11-18 11:17 ` Johannes Berg
2011-11-18 11:01 ` [PATCHv3 3/3] mac80211: " Simon Wunderlich
` (2 subsequent siblings)
4 siblings, 1 reply; 14+ messages in thread
From: Simon Wunderlich @ 2011-11-18 11:01 UTC (permalink / raw)
To: linux-wireless
Cc: linville, Johannes Berg, Simon Wunderlich, Mathias Kretschmer
This patch contains the configuration changes in nl80211/cfg80211.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
include/linux/nl80211.h | 10 ++++++++++
include/net/cfg80211.h | 6 ++++++
net/wireless/nl80211.c | 28 ++++++++++++++++++++++++++++
3 files changed, 44 insertions(+), 0 deletions(-)
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index f9261c2..b99e50d 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -538,6 +538,9 @@
* OLBC handling in hostapd. Beacons are reported in %NL80211_CMD_FRAME
* messages. Note that per PHY only one application may register.
*
+ * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether
+ * No Acknowledgement Policy should be applied.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -675,6 +678,8 @@ enum nl80211_commands {
NL80211_CMD_UNEXPECTED_4ADDR_FRAME,
+ NL80211_CMD_SET_NOACK_MAP,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -1170,6 +1175,9 @@ enum nl80211_commands {
* probe-response frame. The DA field in the 802.11 header is zero-ed out,
* to be filled by the FW.
*
+ * @NL80211_ATTR_NOACK_MAP: This u16 bitmap contains the No Ack Policy of
+ * up to 16 TIDs.
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1408,6 +1416,8 @@ enum nl80211_attrs {
NL80211_ATTR_PROBE_RESP,
+ NL80211_ATTR_NOACK_MAP,
+
/* 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 8d7ba09..2720f2e 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1442,6 +1442,8 @@ struct cfg80211_gtk_rekey_data {
*
* @probe_client: probe an associated client, must return a cookie that it
* later passes to cfg80211_probe_status().
+ *
+ * @set_noack_map: Set the NoAck Map for the TIDs.
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -1635,6 +1637,10 @@ struct cfg80211_ops {
int (*probe_client)(struct wiphy *wiphy, struct net_device *dev,
const u8 *peer, u64 *cookie);
+ int (*set_noack_map)(struct wiphy *wiphy,
+ struct net_device *dev,
+ u16 noack_map);
+
struct ieee80211_channel *(*get_channel)(struct wiphy *wiphy);
};
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 6bc7c4b..a0c2c13 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -199,6 +199,8 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_DONT_WAIT_FOR_ACK] = { .type = NLA_FLAG },
[NL80211_ATTR_PROBE_RESP] = { .type = NLA_BINARY,
.len = IEEE80211_MAX_DATA_LEN },
+ [NL80211_ATTR_NOACK_MAP] = { .type = NLA_U16 },
+
};
/* policy for the key attributes */
@@ -1743,6 +1745,23 @@ static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info)
return rdev->ops->del_virtual_intf(&rdev->wiphy, dev);
}
+static int nl80211_set_noack_map(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct net_device *dev = info->user_ptr[1];
+ u16 noack_map;
+
+ if (!info->attrs[NL80211_ATTR_NOACK_MAP])
+ return -EINVAL;
+
+ if (!rdev->ops->set_noack_map)
+ return -EOPNOTSUPP;
+
+ noack_map = nla_get_u16(info->attrs[NL80211_ATTR_NOACK_MAP]);
+
+ return rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map);
+}
+
struct get_key_cookie {
struct sk_buff *msg;
int error;
@@ -6529,6 +6548,15 @@ static struct genl_ops nl80211_ops[] = {
.internal_flags = NL80211_FLAG_NEED_WIPHY |
NL80211_FLAG_NEED_RTNL,
},
+ {
+ .cmd = NL80211_CMD_SET_NOACK_MAP,
+ .doit = nl80211_set_noack_map,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL80211_FLAG_NEED_NETDEV |
+ NL80211_FLAG_NEED_RTNL,
+ },
+
};
static struct genl_multicast_group nl80211_mlme_mcgrp = {
--
1.7.7.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCHv3 3/3] mac80211: Add NoAck per tid Support
2011-11-18 11:01 [PATCHv3 0/3] add NoAck per tid support Simon Wunderlich
2011-11-18 11:01 ` [PATCHv3 1/3] mac80211: remove debugfs noack test Simon Wunderlich
2011-11-18 11:01 ` [PATCHv3 2/3] wireless: Add NoAck per tid Support Simon Wunderlich
@ 2011-11-18 11:01 ` Simon Wunderlich
2011-11-18 11:12 ` Johannes Berg
2011-11-18 11:01 ` [PATCHv3 1/2] iw: import latest nl80211.h with new commands Simon Wunderlich
2011-11-18 11:01 ` [PATCHv3 2/2] iw: add support for NoAck per tid Simon Wunderlich
4 siblings, 1 reply; 14+ messages in thread
From: Simon Wunderlich @ 2011-11-18 11:01 UTC (permalink / raw)
To: linux-wireless
Cc: linville, Johannes Berg, Simon Wunderlich, Mathias Kretschmer
This patch contains the processing changes in mac80211.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
net/mac80211/cfg.c | 11 +++++++++++
net/mac80211/ieee80211_i.h | 3 +++
net/mac80211/iface.c | 2 ++
net/mac80211/wme.c | 7 ++++++-
4 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 1063a7e..e1a8d89 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -102,6 +102,16 @@ static int ieee80211_change_iface(struct wiphy *wiphy,
return 0;
}
+static int ieee80211_set_noack_map(struct wiphy *wiphy,
+ struct net_device *dev,
+ u16 noack_map)
+{
+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+
+ sdata->noack_map = noack_map;
+ return 0;
+}
+
static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
u8 key_idx, bool pairwise, const u8 *mac_addr,
struct key_params *params)
@@ -2698,4 +2708,5 @@ struct cfg80211_ops mac80211_config_ops = {
.tdls_mgmt = ieee80211_tdls_mgmt,
.probe_client = ieee80211_probe_client,
.get_channel = ieee80211_wiphy_get_channel,
+ .set_noack_map = ieee80211_set_noack_map,
};
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 5c62579..e93c496 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -607,6 +607,9 @@ struct ieee80211_sub_if_data {
struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX];
unsigned int fragment_next;
+ /* TID bitmap for NoAck policy */
+ u16 noack_map;
+
struct ieee80211_key __rcu *keys[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS];
struct ieee80211_key __rcu *default_unicast_key;
struct ieee80211_key __rcu *default_multicast_key;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index b34ca0c..be1d61e 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -866,6 +866,8 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
sdata->control_port_protocol = cpu_to_be16(ETH_P_PAE);
sdata->control_port_no_encrypt = false;
+ sdata->noack_map = 0;
+
/* only monitor differs */
sdata->dev->type = ARPHRD_ETHER;
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index 74b3d10..9933590 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -139,6 +139,7 @@ void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb)
{
struct ieee80211_hdr *hdr = (void *)skb->data;
+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
/* Fill in the QoS header if there is one. */
if (ieee80211_is_data_qos(hdr->frame_control)) {
@@ -150,8 +151,12 @@ void ieee80211_set_qos_hdr(struct ieee80211_sub_if_data *sdata,
/* preserve EOSP bit */
ack_policy = *p & IEEE80211_QOS_CTL_EOSP;
- if (is_multicast_ether_addr(hdr->addr1))
+ if (is_multicast_ether_addr(hdr->addr1) ||
+ (sdata->noack_map & 1 << tid)) {
ack_policy |= IEEE80211_QOS_CTL_ACK_POLICY_NOACK;
+ info->flags |= IEEE80211_TX_CTL_NO_ACK;
+ }
+
/* qos header is 2 bytes */
*p++ = ack_policy | tid;
*p = ieee80211_vif_is_mesh(&sdata->vif) ?
--
1.7.7.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCHv3 3/3] mac80211: Add NoAck per tid Support
2011-11-18 11:01 ` [PATCHv3 3/3] mac80211: " Simon Wunderlich
@ 2011-11-18 11:12 ` Johannes Berg
2011-11-18 12:30 ` Simon Wunderlich
0 siblings, 1 reply; 14+ messages in thread
From: Johannes Berg @ 2011-11-18 11:12 UTC (permalink / raw)
To: Simon Wunderlich
Cc: linux-wireless, linville, Simon Wunderlich, Mathias Kretschmer
On Fri, 2011-11-18 at 12:01 +0100, Simon Wunderlich wrote:
> - if (is_multicast_ether_addr(hdr->addr1))
> + if (is_multicast_ether_addr(hdr->addr1) ||
> + (sdata->noack_map & 1 << tid)) {
I'd prefer this:
if (is_multicast_ether_addr(...) ||
sdata->noack_map & BIT(tid))
(Note indentation & use of BIT())
Isn't this missing an update to ieee80211_duration() now?
johannes
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCHv3 3/3] mac80211: Add NoAck per tid Support
2011-11-18 11:12 ` Johannes Berg
@ 2011-11-18 12:30 ` Simon Wunderlich
2011-11-21 17:20 ` Kalle Valo
0 siblings, 1 reply; 14+ messages in thread
From: Simon Wunderlich @ 2011-11-18 12:30 UTC (permalink / raw)
To: Johannes Berg
Cc: Simon Wunderlich, linux-wireless, linville, Simon Wunderlich,
Mathias Kretschmer
[-- Attachment #1: Type: text/plain, Size: 740 bytes --]
On Fri, Nov 18, 2011 at 12:12:24PM +0100, Johannes Berg wrote:
> On Fri, 2011-11-18 at 12:01 +0100, Simon Wunderlich wrote:
>
> > - if (is_multicast_ether_addr(hdr->addr1))
> > + if (is_multicast_ether_addr(hdr->addr1) ||
> > + (sdata->noack_map & 1 << tid)) {
>
> I'd prefer this:
>
> if (is_multicast_ether_addr(...) ||
> sdata->noack_map & BIT(tid))
>
> (Note indentation & use of BIT())
OK
>
> Isn't this missing an update to ieee80211_duration() now?
Yep, I silently dropped that modification - I rather don't mess with stuff I
don't completly understand. Keeping the duration too long shouldn't hurt
(only performance), having it too short will have much worse effects ...
Thanks,
Simon
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCHv3 3/3] mac80211: Add NoAck per tid Support
2011-11-18 12:30 ` Simon Wunderlich
@ 2011-11-21 17:20 ` Kalle Valo
2011-11-21 17:26 ` Johannes Berg
0 siblings, 1 reply; 14+ messages in thread
From: Kalle Valo @ 2011-11-21 17:20 UTC (permalink / raw)
To: Simon Wunderlich
Cc: Johannes Berg, linux-wireless, linville, Simon Wunderlich,
Mathias Kretschmer
Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> writes:
>> Isn't this missing an update to ieee80211_duration() now?
>
> Yep, I silently dropped that modification - I rather don't mess with stuff I
> don't completly understand. Keeping the duration too long shouldn't hurt
> (only performance), having it too short will have much worse effects ...
Still a comment in the function about this issue would be nice. Just to
make sure that it's not forgotten.
--
Kalle Valo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCHv3 3/3] mac80211: Add NoAck per tid Support
2011-11-21 17:20 ` Kalle Valo
@ 2011-11-21 17:26 ` Johannes Berg
2011-11-21 20:37 ` Simon Wunderlich
0 siblings, 1 reply; 14+ messages in thread
From: Johannes Berg @ 2011-11-21 17:26 UTC (permalink / raw)
To: Kalle Valo
Cc: Simon Wunderlich, linux-wireless, linville, Simon Wunderlich,
Mathias Kretschmer
On Mon, 2011-11-21 at 19:20 +0200, Kalle Valo wrote:
> Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> writes:
>
> >> Isn't this missing an update to ieee80211_duration() now?
> >
> > Yep, I silently dropped that modification - I rather don't mess with stuff I
> > don't completly understand. Keeping the duration too long shouldn't hurt
> > (only performance), having it too short will have much worse effects ...
>
> Still a comment in the function about this issue would be nice. Just to
> make sure that it's not forgotten.
I think it should be added back -- it doesn't seem that hard? Just check
if (qos_data && no-ack)? It's on my list but I haven't gotten around ...
johannes
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCHv3 3/3] mac80211: Add NoAck per tid Support
2011-11-21 17:26 ` Johannes Berg
@ 2011-11-21 20:37 ` Simon Wunderlich
0 siblings, 0 replies; 14+ messages in thread
From: Simon Wunderlich @ 2011-11-21 20:37 UTC (permalink / raw)
To: Johannes Berg
Cc: Kalle Valo, Simon Wunderlich, linux-wireless, linville,
Simon Wunderlich, Mathias Kretschmer
[-- Attachment #1: Type: text/plain, Size: 918 bytes --]
On Mon, Nov 21, 2011 at 06:26:33PM +0100, Johannes Berg wrote:
> On Mon, 2011-11-21 at 19:20 +0200, Kalle Valo wrote:
> > Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> writes:
> >
> > >> Isn't this missing an update to ieee80211_duration() now?
> > >
> > > Yep, I silently dropped that modification - I rather don't mess with stuff I
> > > don't completly understand. Keeping the duration too long shouldn't hurt
> > > (only performance), having it too short will have much worse effects ...
> >
> > Still a comment in the function about this issue would be nice. Just to
> > make sure that it's not forgotten.
>
> I think it should be added back -- it doesn't seem that hard? Just check
> if (qos_data && no-ack)? It's on my list but I haven't gotten around ...
Very well, I've sent another patch in reply to the PATCHv4 set - please have
a look at this one.
Thanks
Simon
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCHv3 1/2] iw: import latest nl80211.h with new commands
2011-11-18 11:01 [PATCHv3 0/3] add NoAck per tid support Simon Wunderlich
` (2 preceding siblings ...)
2011-11-18 11:01 ` [PATCHv3 3/3] mac80211: " Simon Wunderlich
@ 2011-11-18 11:01 ` Simon Wunderlich
2011-11-18 11:01 ` [PATCHv3 2/2] iw: add support for NoAck per tid Simon Wunderlich
4 siblings, 0 replies; 14+ messages in thread
From: Simon Wunderlich @ 2011-11-18 11:01 UTC (permalink / raw)
To: linux-wireless
Cc: linville, Johannes Berg, Simon Wunderlich, Mathias Kretschmer
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
nl80211.h | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 121 insertions(+), 0 deletions(-)
diff --git a/nl80211.h b/nl80211.h
index 8049bf7..b99e50d 100644
--- a/nl80211.h
+++ b/nl80211.h
@@ -509,6 +509,38 @@
* @NL80211_CMD_TDLS_OPER: Perform a high-level TDLS command (e.g. link setup).
* @NL80211_CMD_TDLS_MGMT: Send a TDLS management frame.
*
+ * @NL80211_CMD_UNEXPECTED_FRAME: Used by an application controlling an AP
+ * (or GO) interface (i.e. hostapd) to ask for unexpected frames to
+ * implement sending deauth to stations that send unexpected class 3
+ * frames. Also used as the event sent by the kernel when such a frame
+ * is received.
+ * For the event, the %NL80211_ATTR_MAC attribute carries the TA and
+ * other attributes like the interface index are present.
+ * If used as the command it must have an interface index and you can
+ * only unsubscribe from the event by closing the socket. Subscription
+ * is also for %NL80211_CMD_UNEXPECTED_4ADDR_FRAME events.
+ *
+ * @NL80211_CMD_UNEXPECTED_4ADDR_FRAME: Sent as an event indicating that the
+ * associated station identified by %NL80211_ATTR_MAC sent a 4addr frame
+ * and wasn't already in a 4-addr VLAN. The event will be sent similarly
+ * to the %NL80211_CMD_UNEXPECTED_FRAME event, to the same listener.
+ *
+ * @NL80211_CMD_PROBE_CLIENT: Probe an associated station on an AP interface
+ * by sending a null data frame to it and reporting when the frame is
+ * acknowleged. This is used to allow timing out inactive clients. Uses
+ * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_MAC. The command returns a
+ * direct reply with an %NL80211_ATTR_COOKIE that is later used to match
+ * up the event with the request. The event includes the same data and
+ * has %NL80211_ATTR_ACK set if the frame was ACKed.
+ *
+ * @NL80211_CMD_REGISTER_BEACONS: Register this socket to receive beacons from
+ * other BSSes when any interfaces are in AP mode. This helps implement
+ * OLBC handling in hostapd. Beacons are reported in %NL80211_CMD_FRAME
+ * messages. Note that per PHY only one application may register.
+ *
+ * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether
+ * No Acknowledgement Policy should be applied.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -638,6 +670,16 @@ enum nl80211_commands {
NL80211_CMD_TDLS_OPER,
NL80211_CMD_TDLS_MGMT,
+ NL80211_CMD_UNEXPECTED_FRAME,
+
+ NL80211_CMD_PROBE_CLIENT,
+
+ NL80211_CMD_REGISTER_BEACONS,
+
+ NL80211_CMD_UNEXPECTED_4ADDR_FRAME,
+
+ NL80211_CMD_SET_NOACK_MAP,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -658,6 +700,8 @@ enum nl80211_commands {
#define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE
#define NL80211_CMD_REG_BEACON_HINT NL80211_CMD_REG_BEACON_HINT
+#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
+
/* source-level API compatibility */
#define NL80211_CMD_GET_MESH_PARAMS NL80211_CMD_GET_MESH_CONFIG
#define NL80211_CMD_SET_MESH_PARAMS NL80211_CMD_SET_MESH_CONFIG
@@ -1109,6 +1153,31 @@ enum nl80211_commands {
* %NL80211_CMD_TDLS_MGMT. Otherwise %NL80211_CMD_TDLS_OPER should be
* used for asking the driver to perform a TDLS operation.
*
+ * @NL80211_ATTR_DEVICE_AP_SME: This u32 attribute may be listed for devices
+ * that have AP support to indicate that they have the AP SME integrated
+ * with support for the features listed in this attribute, see
+ * &enum nl80211_ap_sme_features.
+ *
+ * @NL80211_ATTR_DONT_WAIT_FOR_ACK: Used with %NL80211_CMD_FRAME, this tells
+ * the driver to not wait for an acknowledgement. Note that due to this,
+ * it will also not give a status callback nor return a cookie. This is
+ * mostly useful for probe responses to save airtime.
+ *
+ * @NL80211_ATTR_FEATURE_FLAGS: This u32 attribute contains flags from
+ * &enum nl80211_feature_flags and is advertised in wiphy information.
+ * @NL80211_ATTR_PROBE_RESP_OFFLOAD: Indicates that the HW responds to probe
+ *
+ * requests while operating in AP-mode.
+ * This attribute holds a bitmap of the supported protocols for
+ * offloading (see &enum nl80211_probe_resp_offload_support_attr).
+ *
+ * @NL80211_ATTR_PROBE_RESP: Probe Response template data. Contains the entire
+ * probe-response frame. The DA field in the 802.11 header is zero-ed out,
+ * to be filled by the FW.
+ *
+ * @NL80211_ATTR_NOACK_MAP: This u16 bitmap contains the No Ack Policy of
+ * up to 16 TIDs.
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1337,6 +1406,18 @@ enum nl80211_attrs {
NL80211_ATTR_TDLS_SUPPORT,
NL80211_ATTR_TDLS_EXTERNAL_SETUP,
+ NL80211_ATTR_DEVICE_AP_SME,
+
+ NL80211_ATTR_DONT_WAIT_FOR_ACK,
+
+ NL80211_ATTR_FEATURE_FLAGS,
+
+ NL80211_ATTR_PROBE_RESP_OFFLOAD,
+
+ NL80211_ATTR_PROBE_RESP,
+
+ NL80211_ATTR_NOACK_MAP,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -1371,6 +1452,7 @@ enum nl80211_attrs {
#define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES
#define NL80211_ATTR_KEY NL80211_ATTR_KEY
#define NL80211_ATTR_KEYS NL80211_ATTR_KEYS
+#define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
#define NL80211_MAX_SUPP_RATES 32
#define NL80211_MAX_SUPP_REG_RULES 32
@@ -2650,4 +2732,43 @@ enum nl80211_tdls_operation {
NL80211_TDLS_DISABLE_LINK,
};
+/*
+ * enum nl80211_ap_sme_features - device-integrated AP features
+ * Reserved for future use, no bits are defined in
+ * NL80211_ATTR_DEVICE_AP_SME yet.
+enum nl80211_ap_sme_features {
+};
+ */
+
+/**
+ * enum nl80211_feature_flags - device/driver features
+ * @NL80211_FEATURE_SK_TX_STATUS: This driver supports reflecting back
+ * TX status to the socket error queue when requested with the
+ * socket option.
+ */
+enum nl80211_feature_flags {
+ NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
+};
+
+/**
+ * enum nl80211_probe_resp_offload_support_attr - optional supported
+ * protocols for probe-response offloading by the driver/FW.
+ * To be used with the %NL80211_ATTR_PROBE_RESP_OFFLOAD attribute.
+ * Each enum value represents a bit in the bitmap of supported
+ * protocols. Typically a subset of probe-requests belonging to a
+ * supported protocol will be excluded from offload and uploaded
+ * to the host.
+ *
+ * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS: Support for WPS ver. 1
+ * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2: Support for WPS ver. 2
+ * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P: Support for P2P
+ * @NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U: Support for 802.11u
+ */
+enum nl80211_probe_resp_offload_support_attr {
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS = 1<<0,
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 = 1<<1,
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P = 1<<2,
+ NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U = 1<<3,
+};
+
#endif /* __LINUX_NL80211_H */
--
1.7.7.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* [PATCHv3 2/2] iw: add support for NoAck per tid
2011-11-18 11:01 [PATCHv3 0/3] add NoAck per tid support Simon Wunderlich
` (3 preceding siblings ...)
2011-11-18 11:01 ` [PATCHv3 1/2] iw: import latest nl80211.h with new commands Simon Wunderlich
@ 2011-11-18 11:01 ` Simon Wunderlich
2011-11-18 11:15 ` Johannes Berg
4 siblings, 1 reply; 14+ messages in thread
From: Simon Wunderlich @ 2011-11-18 11:01 UTC (permalink / raw)
To: linux-wireless
Cc: linville, Johannes Berg, Simon Wunderlich, Mathias Kretschmer
This adds support for the new NoAck feature in nl80211/mac80211
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
interface.c | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/interface.c b/interface.c
index 3a345ba..db38b6a 100644
--- a/interface.c
+++ b/interface.c
@@ -386,6 +386,33 @@ COMMAND(set, 4addr, "<on|off>",
NL80211_CMD_SET_INTERFACE, 0, CIB_NETDEV, handle_interface_4addr,
"Set interface 4addr (WDS) mode.");
+static int handle_interface_noack_map(struct nl80211_state *state,
+ struct nl_cb *cb,
+ struct nl_msg *msg,
+ int argc, char **argv)
+{
+ uint16_t noack_map;
+ char *end;
+
+ if (argc != 1)
+ return 1;
+
+ noack_map = strtoul(argv[0], &end, 16);
+ if (end != (argv[0] + strlen(argv[0])))
+ return 1;
+
+ NLA_PUT_U16(msg, NL80211_ATTR_NOACK_MAP, noack_map);
+
+ return 0;
+ nla_put_failure:
+ return -ENOBUFS;
+
+}
+COMMAND(set, noack_map, "<map>",
+ NL80211_CMD_SET_NOACK_MAP, 0, CIB_NETDEV, handle_interface_noack_map,
+ "Set the NoAck map for the TIDs. (0x0001 = BE, 0x000e = BK, 0x0030 = VI, 0x00C0 = VO)");
+
+
static int handle_interface_wds_peer(struct nl80211_state *state,
struct nl_cb *cb,
struct nl_msg *msg,
--
1.7.7.3
^ permalink raw reply related [flat|nested] 14+ messages in thread* Re: [PATCHv3 2/2] iw: add support for NoAck per tid
2011-11-18 11:01 ` [PATCHv3 2/2] iw: add support for NoAck per tid Simon Wunderlich
@ 2011-11-18 11:15 ` Johannes Berg
2011-11-18 11:55 ` Dave Taht
0 siblings, 1 reply; 14+ messages in thread
From: Johannes Berg @ 2011-11-18 11:15 UTC (permalink / raw)
To: Simon Wunderlich
Cc: linux-wireless, linville, Simon Wunderlich, Mathias Kretschmer
On Fri, 2011-11-18 at 12:01 +0100, Simon Wunderlich wrote:
> +static int handle_interface_noack_map(struct nl80211_state *state,
> + struct nl_cb *cb,
> + struct nl_msg *msg,
> + int argc, char **argv)
> +{
> + uint16_t noack_map;
> + char *end;
> +
> + if (argc != 1)
> + return 1;
> +
> + noack_map = strtoul(argv[0], &end, 16);
> + if (end != (argv[0] + strlen(argv[0])))
> + return 1;
if (*end)
return 1;
:-)
> + NLA_PUT_U16(msg, NL80211_ATTR_NOACK_MAP, noack_map);
> +
> + return 0;
> + nla_put_failure:
> + return -ENOBUFS;
> +
> +}
> +COMMAND(set, noack_map, "<map>",
> + NL80211_CMD_SET_NOACK_MAP, 0, CIB_NETDEV, handle_interface_noack_map,
> + "Set the NoAck map for the TIDs. (0x0001 = BE, 0x000e = BK, 0x0030 = VI, 0x00C0 = VO)");
That doesn't seem right -- BE should be 0x9, BK should be 0x6, no?
johannes
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: [PATCHv3 2/2] iw: add support for NoAck per tid
2011-11-18 11:15 ` Johannes Berg
@ 2011-11-18 11:55 ` Dave Taht
0 siblings, 0 replies; 14+ messages in thread
From: Dave Taht @ 2011-11-18 11:55 UTC (permalink / raw)
To: Johannes Berg
Cc: Simon Wunderlich, linux-wireless, linville, Simon Wunderlich,
Mathias Kretschmer
Anything that makes it more possible to drop packets when appropriate
makes me happy.
Would there be some way to do this on a per packet basis,
rather than on a per queue basis?
For example, via some sort of dscp map (EF = OK to DROP),
or setsockopt option...
or cgroup...
--
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net
^ permalink raw reply [flat|nested] 14+ messages in thread