Lines Matching refs:msg
296 struct sk_buff *msg; in cfg80211_pmsr_complete() local
301 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); in cfg80211_pmsr_complete()
302 if (!msg) in cfg80211_pmsr_complete()
305 hdr = nl80211hdr_put(msg, 0, 0, 0, in cfg80211_pmsr_complete()
310 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || in cfg80211_pmsr_complete()
311 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), in cfg80211_pmsr_complete()
315 if (nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, req->cookie, in cfg80211_pmsr_complete()
319 genlmsg_end(msg, hdr); in cfg80211_pmsr_complete()
320 genlmsg_unicast(wiphy_net(wdev->wiphy), msg, req->nl_portid); in cfg80211_pmsr_complete()
323 nlmsg_free(msg); in cfg80211_pmsr_complete()
332 static int nl80211_pmsr_send_ftm_res(struct sk_buff *msg, in nl80211_pmsr_send_ftm_res() argument
336 if (nla_put_u32(msg, NL80211_PMSR_FTM_RESP_ATTR_FAIL_REASON, in nl80211_pmsr_send_ftm_res()
343 nla_put_u32(msg, NL80211_PMSR_FTM_RESP_ATTR_BUSY_RETRY_TIME, in nl80211_pmsr_send_ftm_res()
352 if (nla_put_##tp(msg, \ in nl80211_pmsr_send_ftm_res()
366 if (nla_put_u64_64bit(msg, \ in nl80211_pmsr_send_ftm_res()
389 !nl80211_put_sta_rate(msg, &res->ftm.tx_rate, in nl80211_pmsr_send_ftm_res()
393 !nl80211_put_sta_rate(msg, &res->ftm.rx_rate, in nl80211_pmsr_send_ftm_res()
403 nla_put(msg, NL80211_PMSR_FTM_RESP_ATTR_LCI, in nl80211_pmsr_send_ftm_res()
407 nla_put(msg, NL80211_PMSR_FTM_RESP_ATTR_CIVICLOC, in nl80211_pmsr_send_ftm_res()
420 static int nl80211_pmsr_send_result(struct sk_buff *msg, in nl80211_pmsr_send_result() argument
425 pmsr = nla_nest_start_noflag(msg, NL80211_ATTR_PEER_MEASUREMENTS); in nl80211_pmsr_send_result()
429 peers = nla_nest_start_noflag(msg, NL80211_PMSR_ATTR_PEERS); in nl80211_pmsr_send_result()
433 peer = nla_nest_start_noflag(msg, 1); in nl80211_pmsr_send_result()
437 if (nla_put(msg, NL80211_PMSR_PEER_ATTR_ADDR, ETH_ALEN, res->addr)) in nl80211_pmsr_send_result()
440 resp = nla_nest_start_noflag(msg, NL80211_PMSR_PEER_ATTR_RESP); in nl80211_pmsr_send_result()
444 if (nla_put_u32(msg, NL80211_PMSR_RESP_ATTR_STATUS, res->status) || in nl80211_pmsr_send_result()
445 nla_put_u64_64bit(msg, NL80211_PMSR_RESP_ATTR_HOST_TIME, in nl80211_pmsr_send_result()
450 nla_put_u64_64bit(msg, NL80211_PMSR_RESP_ATTR_AP_TSF, in nl80211_pmsr_send_result()
454 if (res->final && nla_put_flag(msg, NL80211_PMSR_RESP_ATTR_FINAL)) in nl80211_pmsr_send_result()
457 data = nla_nest_start_noflag(msg, NL80211_PMSR_RESP_ATTR_DATA); in nl80211_pmsr_send_result()
461 typedata = nla_nest_start_noflag(msg, res->type); in nl80211_pmsr_send_result()
467 if (nl80211_pmsr_send_ftm_res(msg, res)) in nl80211_pmsr_send_result()
474 nla_nest_end(msg, typedata); in nl80211_pmsr_send_result()
475 nla_nest_end(msg, data); in nl80211_pmsr_send_result()
476 nla_nest_end(msg, resp); in nl80211_pmsr_send_result()
477 nla_nest_end(msg, peer); in nl80211_pmsr_send_result()
478 nla_nest_end(msg, peers); in nl80211_pmsr_send_result()
479 nla_nest_end(msg, pmsr); in nl80211_pmsr_send_result()
492 struct sk_buff *msg; in cfg80211_pmsr_report() local
504 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); in cfg80211_pmsr_report()
505 if (!msg) in cfg80211_pmsr_report()
508 hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_PEER_MEASUREMENT_RESULT); in cfg80211_pmsr_report()
512 if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || in cfg80211_pmsr_report()
513 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev), in cfg80211_pmsr_report()
517 if (nla_put_u64_64bit(msg, NL80211_ATTR_COOKIE, req->cookie, in cfg80211_pmsr_report()
521 err = nl80211_pmsr_send_result(msg, result); in cfg80211_pmsr_report()
527 genlmsg_end(msg, hdr); in cfg80211_pmsr_report()
528 genlmsg_unicast(wiphy_net(wdev->wiphy), msg, req->nl_portid); in cfg80211_pmsr_report()
531 nlmsg_free(msg); in cfg80211_pmsr_report()