Home | History | Annotate | Download | only in iw

Lines Matching refs:tb

18 static int parse_beacon_hint_chan(struct nlattr *tb,
30 tb,
209 struct nlattr *tb[NUM_NL80211_WOWLAN_TRIG],
218 nla_parse(tb, MAX_NL80211_WOWLAN_TRIG,
222 if (tb[NL80211_WOWLAN_TRIG_DISCONNECT])
224 if (tb[NL80211_WOWLAN_TRIG_MAGIC_PKT])
226 if (tb[NL80211_WOWLAN_TRIG_PKT_PATTERN])
228 nla_get_u32(tb[NL80211_WOWLAN_TRIG_PKT_PATTERN]));
229 if (tb[NL80211_WOWLAN_TRIG_GTK_REKEY_FAILURE])
231 if (tb[NL80211_WOWLAN_TRIG_EAP_IDENT_REQUEST])
233 if (tb[NL80211_WOWLAN_TRIG_4WAY_HANDSHAKE])
235 if (tb[NL80211_WOWLAN_TRIG_RFKILL_RELEASE])
237 if (tb[NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS]) {
243 tb[NL80211_WOWLAN_TRIG_NET_DETECT_RESULTS],
262 if (tb[NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211]) {
263 uint8_t *d = nla_data(tb[NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211]);
264 int l = nla_len(tb[NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211]);
274 if (tb[NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023]) {
275 uint8_t *d = nla_data(tb[NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023]);
276 int l = nla_len(tb[NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023]);
286 if (tb[NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH])
288 if (tb[NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST])
290 if (tb[NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS])
297 struct nlattr *tb[NL80211_ATTR_MAX + 1], *nst;
323 nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
326 if (tb[NL80211_ATTR_IFINDEX] && tb[NL80211_ATTR_WIPHY]) {
327 if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), ifname);
328 printf("%s (phy #%d): ", ifname, nla_get_u32(tb[NL80211_ATTR_WIPHY]));
329 } else if (tb[NL80211_ATTR_WDEV] && tb[NL80211_ATTR_WIPHY]) {
331 (unsigned long long)nla_get_u64(tb[NL80211_ATTR_WDEV]),
332 nla_get_u32(tb[NL80211_ATTR_WIPHY]));
333 } else if (tb[NL80211_ATTR_IFINDEX]) {
334 if_indextoname(nla_get_u32(tb[NL80211_ATTR_IFINDEX]), ifname);
336 } else if (tb[NL80211_ATTR_WDEV]) {
337 printf("wdev 0x%llx: ", (unsigned long long)nla_get_u64(tb[NL80211_ATTR_WDEV]));
338 } else if (tb[NL80211_ATTR_WIPHY]) {
339 printf("phy #%d: ", nla_get_u32(tb[NL80211_ATTR_WIPHY]));
344 printf("renamed to %s\n", nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
354 if (tb[NL80211_ATTR_SCAN_FREQUENCIES]) {
355 nla_for_each_nested(nst, tb[NL80211_ATTR_SCAN_FREQUENCIES], rem_nst)
359 if (tb[NL80211_ATTR_SCAN_SSIDS]) {
360 nla_for_each_nested(nst, tb[NL80211_ATTR_SCAN_SSIDS], rem_nst) {
380 reg_type = nla_get_u8(tb[NL80211_ATTR_REG_TYPE]);
385 nla_get_string(tb[NL80211_ATTR_REG_ALPHA2]),
386 reg_initiator_to_string(nla_get_u8(tb[NL80211_ATTR_REG_INITIATOR])));
387 if (tb[NL80211_ATTR_WIPHY])
388 printf(" on phy%d", nla_get_u32(tb[NL80211_ATTR_WIPHY]));
392 reg_initiator_to_string(nla_get_u8(tb[NL80211_ATTR_REG_INITIATOR])));
396 nla_get_u32(tb[NL80211_ATTR_WIPHY]),
397 reg_initiator_to_string(nla_get_u32(tb[NL80211_ATTR_REG_INITIATOR])));
401 reg_initiator_to_string(nla_get_u32(tb[NL80211_ATTR_REG_INITIATOR])));
402 if (tb[NL80211_ATTR_WIPHY])
403 printf(" on phy%d", nla_get_u32(tb[NL80211_ATTR_WIPHY]));
414 wiphy_idx = nla_get_u32(tb[NL80211_ATTR_WIPHY]);
419 if (parse_beacon_hint_chan(tb[NL80211_ATTR_FREQ_BEFORE],
422 if (parse_beacon_hint_chan(tb[NL80211_ATTR_FREQ_AFTER],
448 mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
452 mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
456 mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
461 if (tb[NL80211_ATTR_FRAME])
462 print_frame(args, tb[NL80211_ATTR_FRAME]);
463 else if (tb[NL80211_ATTR_TIMED_OUT])
471 if (tb[NL80211_ATTR_FRAME])
472 print_frame(args, tb[NL80211_ATTR_FRAME]);
473 else if (tb[NL80211_ATTR_TIMED_OUT])
481 print_frame(args, tb[NL80211_ATTR_FRAME]);
486 print_frame(args, tb[NL80211_ATTR_FRAME]);
491 print_frame(args, tb[NL80211_ATTR_FRAME]);
496 print_frame(args, tb[NL80211_ATTR_FRAME]);
501 if (!tb[NL80211_ATTR_STATUS_CODE])
503 else if (nla_get_u16(tb[NL80211_ATTR_STATUS_CODE]) == 0)
506 status = nla_get_u16(tb[NL80211_ATTR_STATUS_CODE]);
509 if (tb[NL80211_ATTR_MAC]) {
510 mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
519 if (tb[NL80211_ATTR_MAC]) {
520 mac_addr_n2a(macbuf, nla_data(tb[NL80211_ATTR_MAC]));
527 if (tb[NL80211_ATTR_DISCONNECTED_BY_AP])
531 if (tb[NL80211_ATTR_REASON_CODE])
532 printf(" reason: %d: %s", nla_get_u16(tb[NL80211_ATTR_REASON_CODE]),
533 get_reason_str(nla_get_u16(tb[NL80211_ATTR_REASON_CODE])));
538 nla_get_u32(tb[NL80211_ATTR_WIPHY_FREQ]),
539 nla_get_u32(tb[NL80211_ATTR_DURATION]),
540 (unsigned long long)nla_get_u64(tb[NL80211_ATTR_COOKIE]));
544 nla_get_u32(tb[NL80211_ATTR_WIPHY_FREQ]),
545 (unsigned long long)nla_get_u64(tb[NL80211_ATTR_COOKIE]));
548 parse_cqm_event(tb);
551 parse_mic_failure(tb);
555 (unsigned long long)nla_get_u64(tb[NL80211_ATTR_COOKIE]),
556 tb[NL80211_ATTR_ACK] ? "acked" : "no ack");
562 parse_wowlan_wake_event(tb);
565 if (tb[NL80211_ATTR_MAC])
566 tb[NL80211_ATTR_MAC]));
571 (unsigned long long)nla_get_u64(tb[NL80211_ATTR_COOKIE]),
572 tb[NL80211_ATTR_ACK] ? "acked" : "no ack");
576 nla_get_u32(tb[NL80211_ATTR_VENDOR_ID]),
577 nla_get_u32(tb[NL80211_ATTR_VENDOR_SUBCMD]));
578 if (args->frame && tb[NL80211_ATTR_VENDOR_DATA])
580 nla_data(tb[NL80211_ATTR_VENDOR_DATA]),
581 nla_len(tb[NL80211_ATTR_VENDOR_DATA]));
585 if (tb[NL80211_ATTR_RADAR_EVENT]) {
586 switch (nla_get_u32(tb[NL80211_ATTR_RADAR_EVENT])) {