From: Antonio Quartulli <antonio@meshcoding.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: devel@lists.open80211s.org, b.a.t.m.a.n@lists.open-mesh.org,
linux-wireless@vger.kernel.org,
Antonio Quartulli <antonio@open-mesh.com>
Subject: [B.A.T.M.A.N.] [PATCHv3 2/4] cfg80211: export expected throughput via nl80211 (GET_STATION)
Date: Sat, 17 May 2014 18:41:44 +0200 [thread overview]
Message-ID: <1400344906-27984-3-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1400344906-27984-1-git-send-email-antonio@meshcoding.com>
From: Antonio Quartulli <antonio@open-mesh.com>
Send the expected throughput when replying to a GET_STATION
command via nl80211.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
include/uapi/linux/nl80211.h | 3 +++
net/wireless/nl80211.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 0cfa827..2964948 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2199,6 +2199,8 @@ enum nl80211_sta_bss_param {
* Contains a nested array of signal strength attributes (u8, dBm)
* @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
* Same format as NL80211_STA_INFO_CHAIN_SIGNAL.
+ * @NL80211_STA_EXPECTED_THROUGHPUT: expected throughput (considering also the
+ * 802.11 header) expressed in kbps
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -2230,6 +2232,7 @@ enum nl80211_sta_info {
NL80211_STA_INFO_TX_BYTES64,
NL80211_STA_INFO_CHAIN_SIGNAL,
NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
+ NL80211_STA_INFO_EXPECTED_THROUGHPUT,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ca19b15..9631648 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3650,6 +3650,10 @@ static int nl80211_send_station(struct sk_buff *msg, u32 portid, u32 seq,
nla_put_u32(msg, NL80211_STA_INFO_TX_FAILED,
sinfo->tx_failed))
goto nla_put_failure;
+ if ((sinfo->filled & STATION_INFO_EXPECTED_THROUGHPUT) &&
+ nla_put_u32(msg, NL80211_STA_INFO_EXPECTED_THROUGHPUT,
+ sinfo->expected_throughput))
+ goto nla_put_failure;
if ((sinfo->filled & STATION_INFO_BEACON_LOSS_COUNT) &&
nla_put_u32(msg, NL80211_STA_INFO_BEACON_LOSS,
sinfo->beacon_loss_count))
--
1.8.5.5
WARNING: multiple messages have this Message-ID (diff)
From: Antonio Quartulli <antonio@meshcoding.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: b.a.t.m.a.n@lists.open-mesh.org, devel@lists.open80211s.org,
linux-wireless@vger.kernel.org,
Antonio Quartulli <antonio@open-mesh.com>
Subject: [PATCHv3 2/4] cfg80211: export expected throughput via nl80211 (GET_STATION)
Date: Sat, 17 May 2014 18:41:44 +0200 [thread overview]
Message-ID: <1400344906-27984-3-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1400344906-27984-1-git-send-email-antonio@meshcoding.com>
From: Antonio Quartulli <antonio@open-mesh.com>
Send the expected throughput when replying to a GET_STATION
command via nl80211.
Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
---
include/uapi/linux/nl80211.h | 3 +++
net/wireless/nl80211.c | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 0cfa827..2964948 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2199,6 +2199,8 @@ enum nl80211_sta_bss_param {
* Contains a nested array of signal strength attributes (u8, dBm)
* @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
* Same format as NL80211_STA_INFO_CHAIN_SIGNAL.
+ * @NL80211_STA_EXPECTED_THROUGHPUT: expected throughput (considering also the
+ * 802.11 header) expressed in kbps
* @__NL80211_STA_INFO_AFTER_LAST: internal
* @NL80211_STA_INFO_MAX: highest possible station info attribute
*/
@@ -2230,6 +2232,7 @@ enum nl80211_sta_info {
NL80211_STA_INFO_TX_BYTES64,
NL80211_STA_INFO_CHAIN_SIGNAL,
NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
+ NL80211_STA_INFO_EXPECTED_THROUGHPUT,
/* keep last */
__NL80211_STA_INFO_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ca19b15..9631648 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3650,6 +3650,10 @@ static int nl80211_send_station(struct sk_buff *msg, u32 portid, u32 seq,
nla_put_u32(msg, NL80211_STA_INFO_TX_FAILED,
sinfo->tx_failed))
goto nla_put_failure;
+ if ((sinfo->filled & STATION_INFO_EXPECTED_THROUGHPUT) &&
+ nla_put_u32(msg, NL80211_STA_INFO_EXPECTED_THROUGHPUT,
+ sinfo->expected_throughput))
+ goto nla_put_failure;
if ((sinfo->filled & STATION_INFO_BEACON_LOSS_COUNT) &&
nla_put_u32(msg, NL80211_STA_INFO_BEACON_LOSS,
sinfo->beacon_loss_count))
--
1.8.5.5
next prev parent reply other threads:[~2014-05-17 16:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-17 16:41 [B.A.T.M.A.N.] [PATCHv3 0/6] Export the expected throughput towards a peer Antonio Quartulli
2014-05-17 16:41 ` Antonio Quartulli
2014-05-17 16:41 ` [B.A.T.M.A.N.] [PATCHv3 1/4] cfg80211: export expected throughput through get_station() Antonio Quartulli
2014-05-17 16:41 ` Antonio Quartulli
2014-05-17 16:41 ` Antonio Quartulli [this message]
2014-05-17 16:41 ` [PATCHv3 2/4] cfg80211: export expected throughput via nl80211 (GET_STATION) Antonio Quartulli
2014-05-19 14:59 ` [B.A.T.M.A.N.] " Johannes Berg
2014-05-19 14:59 ` Johannes Berg
2014-05-19 15:00 ` [B.A.T.M.A.N.] " Johannes Berg
2014-05-19 15:00 ` Johannes Berg
2014-05-19 15:49 ` [B.A.T.M.A.N.] " Antonio Quartulli
2014-05-19 15:49 ` Antonio Quartulli
2014-05-17 16:41 ` [B.A.T.M.A.N.] [PATCHv3 3/4] mac80211: export the expected throughput Antonio Quartulli
2014-05-17 16:41 ` Antonio Quartulli
2014-05-17 16:41 ` [B.A.T.M.A.N.] [PATCHv3 4/4] cfg80211: implement cfg80211_get_station cfg80211 API Antonio Quartulli
2014-05-17 16:41 ` Antonio Quartulli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400344906-27984-3-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--cc=antonio@open-mesh.com \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=devel@lists.open80211s.org \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.