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 <[email protected]>
---
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
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
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