Lines Matching refs:msg

347 	struct sk_buff *msg;  in cfg80211_pmsr_complete()  local
352 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); in cfg80211_pmsr_complete()
353 if (!msg) in cfg80211_pmsr_complete()
356 hdr = nl80211hdr_put(msg, 0, 0, 0, in cfg80211_pmsr_complete()
361 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || in cfg80211_pmsr_complete()
362 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), in cfg80211_pmsr_complete()
366 if (nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, req->cookie, in cfg80211_pmsr_complete()
370 genlmsg_end(msg, hdr); in cfg80211_pmsr_complete()
371 genlmsg_unicast(wiphy_net(wdev->wiphy), msg, req->nl_portid); in cfg80211_pmsr_complete()
374 nlmsg_free(msg); in cfg80211_pmsr_complete()
394 static int nl80211_pmsr_send_ftm_res(struct sk_buff *msg, in nl80211_pmsr_send_ftm_res() argument
398 if (nla_put_u32(msg, NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON, in nl80211_pmsr_send_ftm_res()
405 nla_put_u32(msg, NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME, in nl80211_pmsr_send_ftm_res()
414 if (nla_put_##tp(msg, \ in nl80211_pmsr_send_ftm_res()
428 if (nla_put_u64_64bit(msg, \ in nl80211_pmsr_send_ftm_res()
451 !nl80211_put_sta_rate(msg, &res->ftm.tx_rate, in nl80211_pmsr_send_ftm_res()
455 !nl80211_put_sta_rate(msg, &res->ftm.rx_rate, in nl80211_pmsr_send_ftm_res()
465 nla_put(msg, NL80211_PMSR_FTM_RESP_ATTR_LCI, in nl80211_pmsr_send_ftm_res()
469 nla_put(msg, NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC, in nl80211_pmsr_send_ftm_res()
482 static int nl80211_pmsr_send_result(struct sk_buff *msg, in nl80211_pmsr_send_result() argument
487 pmsr = nla_nest_start_noflag(msg, NL80211_ATTR_PEER_MEASUREMENTS); in nl80211_pmsr_send_result()
491 peers = nla_nest_start_noflag(msg, NL80211_PMSR_ATTR_PEERS); in nl80211_pmsr_send_result()
495 peer = nla_nest_start_noflag(msg, 1); in nl80211_pmsr_send_result()
499 if (nla_put(msg, NL80211_PMSR_PEER_ATTR_ADDR, ETH_ALEN, res->addr)) in nl80211_pmsr_send_result()
502 resp = nla_nest_start_noflag(msg, NL80211_PMSR_PEER_ATTR_RESP); in nl80211_pmsr_send_result()
506 if (nla_put_u32(msg, NL80211_PMSR_RESP_ATTR_STATUS, res->status) || in nl80211_pmsr_send_result()
507 nla_put_u64_64bit(msg, NL80211_PMSR_RESP_ATTR_HOST_TIME, in nl80211_pmsr_send_result()
512 nla_put_u64_64bit(msg, NL80211_PMSR_RESP_ATTR_AP_TSF, in nl80211_pmsr_send_result()
516 if (res->final && nla_put_flag(msg, NL80211_PMSR_RESP_ATTR_FINAL)) in nl80211_pmsr_send_result()
519 data = nla_nest_start_noflag(msg, NL80211_PMSR_RESP_ATTR_DATA); in nl80211_pmsr_send_result()
523 typedata = nla_nest_start_noflag(msg, res->type); in nl80211_pmsr_send_result()
529 if (nl80211_pmsr_send_ftm_res(msg, res)) in nl80211_pmsr_send_result()
536 nla_nest_end(msg, typedata); in nl80211_pmsr_send_result()
537 nla_nest_end(msg, data); in nl80211_pmsr_send_result()
538 nla_nest_end(msg, resp); in nl80211_pmsr_send_result()
539 nla_nest_end(msg, peer); in nl80211_pmsr_send_result()
540 nla_nest_end(msg, peers); in nl80211_pmsr_send_result()
541 nla_nest_end(msg, pmsr); in nl80211_pmsr_send_result()
554 struct sk_buff *msg; in cfg80211_pmsr_report() local
566 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); in cfg80211_pmsr_report()
567 if (!msg) in cfg80211_pmsr_report()
570 hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_PEER_MEASUREMENT_RESULT); in cfg80211_pmsr_report()
574 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || in cfg80211_pmsr_report()
575 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), in cfg80211_pmsr_report()
579 if (nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, req->cookie, in cfg80211_pmsr_report()
583 err = nl80211_pmsr_send_result(msg, result); in cfg80211_pmsr_report()
589 genlmsg_end(msg, hdr); in cfg80211_pmsr_report()
590 genlmsg_unicast(wiphy_net(wdev->wiphy), msg, req->nl_portid); in cfg80211_pmsr_report()
593 nlmsg_free(msg); in cfg80211_pmsr_report()