* [PATCH] iw: add support for NL80211_CMD_SET_STATION event
@ 2012-01-29 14:50 Antonio Quartulli
2012-01-30 1:04 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Antonio Quartulli @ 2012-01-29 14:50 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Johannes Berg, Antonio Quartulli
This patch makes iw print an appropriate message in case of
NL80211_CMD_SET_STATION event. Involved flag with their values are printed too.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
event.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/event.c b/event.c
index bc39662..21cd426 100644
--- a/event.c
+++ b/event.c
@@ -188,6 +188,7 @@ static int print_event(struct nl_msg *msg, void *arg)
struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
struct nlattr *tb[NL80211_ATTR_MAX + 1], *nst;
struct print_event_args *args = arg;
+ struct nl80211_sta_flag_update *sta_flags_upd;
char ifname[100];
char macbuf[6*3];
__u8 reg_type;
@@ -317,6 +318,17 @@ static int print_event(struct nl_msg *msg, void *arg)
printf("\to beaconing enabled\n");
break;
+ case NL80211_CMD_SET_STATION:
+ mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
+ printf("set station %s\n", macbuf);
+ if (tb[NL80211_ATTR_STA_FLAGS2]) {
+ sta_flags_upd = nla_data(tb[NL80211_ATTR_STA_FLAGS2]);
+ printf("\tflag_mask =\t0x%.8x\n"
+ "\tflag_set =\t0x%.8x\n",
+ sta_flags_upd->mask, sta_flags_upd->set);
+ } else
+ printf("\tno flags set\n");
+ break;
case NL80211_CMD_NEW_STATION:
mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
printf("new station %s\n", macbuf);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] iw: add support for NL80211_CMD_SET_STATION event
2012-01-29 14:50 [PATCH] iw: add support for NL80211_CMD_SET_STATION event Antonio Quartulli
@ 2012-01-30 1:04 ` Johannes Berg
2012-01-30 9:53 ` Antonio Quartulli
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2012-01-30 1:04 UTC (permalink / raw)
To: Antonio Quartulli; +Cc: John W. Linville, linux-wireless
On Sun, 2012-01-29 at 15:50 +0100, Antonio Quartulli wrote:
> This patch makes iw print an appropriate message in case of
> NL80211_CMD_SET_STATION event. Involved flag with their values are printed too.
How can you even generate this message?
johannes
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iw: add support for NL80211_CMD_SET_STATION event
2012-01-30 1:04 ` Johannes Berg
@ 2012-01-30 9:53 ` Antonio Quartulli
0 siblings, 0 replies; 3+ messages in thread
From: Antonio Quartulli @ 2012-01-30 9:53 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 602 bytes --]
On Sun, Jan 29, 2012 at 05:04:02PM -0800, Johannes Berg wrote:
> On Sun, 2012-01-29 at 15:50 +0100, Antonio Quartulli wrote:
> > This patch makes iw print an appropriate message in case of
> > NL80211_CMD_SET_STATION event. Involved flag with their values are printed too.
>
> How can you even generate this message?
no way to generate such message. I thought that sending a SET_STATION from us to
ks would generate such event, but that's false. I realised it too late.
Please drop this patch.
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-30 9:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-29 14:50 [PATCH] iw: add support for NL80211_CMD_SET_STATION event Antonio Quartulli
2012-01-30 1:04 ` Johannes Berg
2012-01-30 9:53 ` Antonio Quartulli
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).