Lines Matching defs:skb

1009 		*wdev = __cfg80211_wdev_from_attrs(NULL, sock_net(cb->skb->sk),
1055 void *nl80211hdr_put(struct sk_buff *skb, u32 portid, u32 seq,
1059 return genlmsg_put(skb, portid, seq, &nl80211_fam, flags, cmd);
3007 static int nl80211_dump_wiphy_parse(struct sk_buff *skb,
3037 netdev = __dev_get_by_index(sock_net(skb->sk), ifidx);
3055 static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
3069 ret = nl80211_dump_wiphy_parse(skb, cb, state);
3079 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk)))
3087 /* attempt to fit multiple wiphy data chunks into the skb */
3090 skb,
3091 NETLINK_CB(cb->skb).portid,
3099 * wiphy dataset is already in the skb) and
3102 * bigger, and return 1 but with the empty skb.
3109 !skb->len && !state->split &&
3128 return skb->len;
3137 static int nl80211_get_wiphy(struct sk_buff *skb, struct genl_info *info)
3421 static int nl80211_set_channel(struct sk_buff *skb, struct genl_info *info)
3435 static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info)
3953 static int nl80211_dump_interface(struct sk_buff *skb, struct netlink_callback *cb)
3970 ret = nl80211_dump_wiphy_parse(skb, cb, &state);
3989 if (!net_eq(wiphy_net(&rdev->wiphy), sock_net(skb->sk)))
4006 if (nl80211_send_iface(skb, NETLINK_CB(cb->skb).portid,
4022 ret = skb->len;
4029 static int nl80211_get_interface(struct sk_buff *skb, struct genl_info *info)
4168 static int nl80211_set_interface(struct sk_buff *skb, struct genl_info *info)
4241 static int _nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
4338 static int nl80211_new_interface(struct sk_buff *skb, struct genl_info *info)
4347 ret = _nl80211_new_interface(skb, info);
4353 static int nl80211_del_interface(struct sk_buff *skb, struct genl_info *info)
4389 static int nl80211_set_noack_map(struct sk_buff *skb, struct genl_info *info)
4485 static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info)
4582 static int nl80211_set_key(struct sk_buff *skb, struct genl_info *info)
4707 static int nl80211_new_key(struct sk_buff *skb, struct genl_info *info)
4778 static int nl80211_del_key(struct sk_buff *skb, struct genl_info *info)
4907 static int nl80211_set_mac_acl(struct sk_buff *skb, struct genl_info *info)
5930 static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
6246 static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
6279 static int nl80211_stop_ap(struct sk_buff *skb, struct genl_info *info)
6758 static int nl80211_dump_station(struct sk_buff *skb,
6793 if (nl80211_send_station(skb, NL80211_CMD_NEW_STATION,
6794 NETLINK_CB(cb->skb).portid,
6805 err = skb->len;
6812 static int nl80211_get_station(struct sk_buff *skb, struct genl_info *info)
7179 static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info)
7340 static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info)
7623 static int nl80211_del_station(struct sk_buff *skb, struct genl_info *info)
7743 static int nl80211_dump_mpath(struct sk_buff *skb,
7778 if (nl80211_send_mpath(skb, NETLINK_CB(cb->skb).portid,
7789 err = skb->len;
7795 static int nl80211_get_mpath(struct sk_buff *skb, struct genl_info *info)
7835 static int nl80211_set_mpath(struct sk_buff *skb, struct genl_info *info)
7860 static int nl80211_new_mpath(struct sk_buff *skb, struct genl_info *info)
7885 static int nl80211_del_mpath(struct sk_buff *skb, struct genl_info *info)
7903 static int nl80211_get_mpp(struct sk_buff *skb, struct genl_info *info)
7943 static int nl80211_dump_mpp(struct sk_buff *skb,
7978 if (nl80211_send_mpath(skb, NETLINK_CB(cb->skb).portid,
7989 err = skb->len;
7995 static int nl80211_set_bss(struct sk_buff *skb, struct genl_info *info)
8071 static int nl80211_req_set_reg(struct sk_buff *skb, struct genl_info *info)
8116 static int nl80211_reload_regdb(struct sk_buff *skb, struct genl_info *info)
8121 static int nl80211_get_mesh_config(struct sk_buff *skb,
8501 static int nl80211_update_mesh_config(struct sk_buff *skb,
8594 static int nl80211_get_reg_do(struct sk_buff *skb, struct genl_info *info)
8674 void *hdr = nl80211hdr_put(msg, NETLINK_CB(cb->skb).portid, seq, flags,
8706 static int nl80211_get_reg_dump(struct sk_buff *skb,
8716 err = nl80211_send_regdom(skb, cb, cb->nlh->nlmsg_seq,
8733 err = nl80211_send_regdom(skb, cb, cb->nlh->nlmsg_seq,
8742 err = skb->len;
8799 static int nl80211_set_reg(struct sk_buff *skb, struct genl_info *info)
9145 static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
9390 static int nl80211_abort_scan(struct sk_buff *skb, struct genl_info *info)
9875 static int nl80211_start_sched_scan(struct sk_buff *skb,
9928 static int nl80211_stop_sched_scan(struct sk_buff *skb,
9954 static int nl80211_start_radar_detection(struct sk_buff *skb,
10036 static int nl80211_notify_radar_detection(struct sk_buff *skb,
10090 static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
10317 hdr = nl80211hdr_put(msg, NETLINK_CB(cb->skb).portid, seq, flags,
10450 static int nl80211_dump_scan(struct sk_buff *skb, struct netlink_callback *cb)
10481 if (nl80211_send_bss(skb, cb,
10495 return skb->len;
10577 static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb)
10628 if (nl80211_send_survey(skb,
10629 NETLINK_CB(cb->skb).portid,
10638 res = skb->len;
10652 static int nl80211_authenticate(struct sk_buff *skb, struct genl_info *info)
10967 static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
11228 static int nl80211_deauthenticate(struct sk_buff *skb, struct genl_info *info)
11276 static int nl80211_disassociate(struct sk_buff *skb, struct genl_info *info)
11352 static int nl80211_join_ibss(struct sk_buff *skb, struct genl_info *info)
11510 static int nl80211_leave_ibss(struct sk_buff *skb, struct genl_info *info)
11524 static int nl80211_set_mcast_rate(struct sk_buff *skb, struct genl_info *info)
11559 struct sk_buff *skb;
11563 skb = nlmsg_new(approxlen + 100, gfp);
11564 if (!skb)
11567 hdr = nl80211hdr_put(skb, portid, seq, 0, cmd);
11569 kfree_skb(skb);
11573 if (nla_put_u32(skb, NL80211_ATTR_WIPHY, rdev->wiphy_idx))
11577 if (nla_put_u32(skb, NL80211_ATTR_VENDOR_ID,
11580 if (nla_put_u32(skb, NL80211_ATTR_VENDOR_SUBCMD,
11586 if (nla_put_u64_64bit(skb, NL80211_ATTR_WDEV,
11590 nla_put_u32(skb, NL80211_ATTR_IFINDEX,
11595 data = nla_nest_start_noflag(skb, attr);
11599 ((void **)skb->cb)[0] = rdev;
11600 ((void **)skb->cb)[1] = hdr;
11601 ((void **)skb->cb)[2] = data;
11603 return skb;
11606 kfree_skb(skb);
11643 void __cfg80211_send_event_skb(struct sk_buff *skb, gfp_t gfp)
11645 struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0];
11646 void *hdr = ((void **)skb->cb)[1];
11647 struct nlmsghdr *nlhdr = nlmsg_hdr(skb);
11648 struct nlattr *data = ((void **)skb->cb)[2];
11652 memset(skb->cb, 0, sizeof(skb->cb));
11654 nla_nest_end(skb, data);
11655 genlmsg_end(skb, hdr);
11658 genlmsg_unicast(wiphy_net(&rdev->wiphy), skb,
11665 skb, 0, mcgrp, gfp);
11671 static int nl80211_testmode_do(struct sk_buff *skb, struct genl_info *info)
11706 static int nl80211_testmode_dump(struct sk_buff *skb,
11745 rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), attrbuf);
11767 void *hdr = nl80211hdr_put(skb, NETLINK_CB(cb->skb).portid,
11775 if (nla_put_u32(skb, NL80211_ATTR_WIPHY, phy_idx)) {
11776 genlmsg_cancel(skb, hdr);
11780 tmdata = nla_nest_start_noflag(skb, NL80211_ATTR_TESTDATA);
11782 genlmsg_cancel(skb, hdr);
11785 err = rdev_testmode_dump(rdev, skb, cb, data, data_len);
11786 nla_nest_end(skb, tmdata);
11789 genlmsg_cancel(skb, hdr);
11792 genlmsg_cancel(skb, hdr);
11796 genlmsg_end(skb, hdr);
11799 err = skb->len;
11809 static int nl80211_connect(struct sk_buff *skb, struct genl_info *info)
12059 static int nl80211_update_connect_params(struct sk_buff *skb,
12140 static int nl80211_disconnect(struct sk_buff *skb, struct genl_info *info)
12169 static int nl80211_wiphy_netns(struct sk_buff *skb, struct genl_info *info)
12200 static int nl80211_setdel_pmksa(struct sk_buff *skb, struct genl_info *info)
12267 static int nl80211_flush_pmksa(struct sk_buff *skb, struct genl_info *info)
12282 static int nl80211_tdls_mgmt(struct sk_buff *skb, struct genl_info *info)
12321 static int nl80211_tdls_oper(struct sk_buff *skb, struct genl_info *info)
12342 static int nl80211_remain_on_channel(struct sk_buff *skb,
12433 static int nl80211_cancel_remain_on_channel(struct sk_buff *skb,
12451 static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
12477 static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info)
12527 static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
12680 static int nl80211_tx_mgmt_cancel_wait(struct sk_buff *skb, struct genl_info *info)
12715 static int nl80211_set_power_save(struct sk_buff *skb, struct genl_info *info)
12745 static int nl80211_get_power_save(struct sk_buff *skb, struct genl_info *info)
12977 static int nl80211_set_cqm(struct sk_buff *skb, struct genl_info *info)
13020 static int nl80211_join_ocb(struct sk_buff *skb, struct genl_info *info)
13034 static int nl80211_leave_ocb(struct sk_buff *skb, struct genl_info *info)
13042 static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
13165 static int nl80211_leave_mesh(struct sk_buff *skb, struct genl_info *info)
13341 static int nl80211_get_wowlan(struct sk_buff *skb, struct genl_info *info)
13594 static int nl80211_set_wowlan(struct sk_buff *skb, struct genl_info *info)
13856 static int nl80211_get_coalesce(struct sk_buff *skb, struct genl_info *info)
13996 static int nl80211_set_coalesce(struct sk_buff *skb, struct genl_info *info)
14064 static int nl80211_set_rekey_data(struct sk_buff *skb, struct genl_info *info)
14121 static int nl80211_register_unexpected_frame(struct sk_buff *skb,
14138 static int nl80211_probe_client(struct sk_buff *skb,
14192 static int nl80211_register_beacons(struct sk_buff *skb, struct genl_info *info)
14226 static int nl80211_start_p2p_device(struct sk_buff *skb, struct genl_info *info)
14254 static int nl80211_stop_p2p_device(struct sk_buff *skb, struct genl_info *info)
14270 static int nl80211_start_nan(struct sk_buff *skb, struct genl_info *info)
14314 static int nl80211_stop_nan(struct sk_buff *skb, struct genl_info *info)
14390 static int nl80211_nan_add_func(struct sk_buff *skb,
14628 static int nl80211_nan_del_func(struct sk_buff *skb,
14651 static int nl80211_nan_change_config(struct sk_buff *skb,
14833 static int nl80211_get_protocol_features(struct sk_buff *skb,
14860 static int nl80211_update_ft_ies(struct sk_buff *skb, struct genl_info *info)
14881 static int nl80211_crit_protocol_start(struct sk_buff *skb,
14920 static int nl80211_crit_protocol_stop(struct sk_buff *skb,
14958 static int nl80211_vendor_cmd(struct sk_buff *skb, struct genl_info *info)
15034 static int nl80211_prepare_vendor_dump(struct sk_buff *skb,
15087 *wdev = __cfg80211_wdev_from_attrs(NULL, sock_net(skb->sk), attrbuf);
15091 *rdev = __cfg80211_rdev_from_attrs(sock_net(skb->sk), attrbuf);
15149 static int nl80211_vendor_cmd_dump(struct sk_buff *skb,
15162 err = nl80211_prepare_vendor_dump(skb, cb, &rdev, &wdev);
15192 void *hdr = nl80211hdr_put(skb, NETLINK_CB(cb->skb).portid,
15198 if (nla_put_u32(skb, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
15199 (wdev && nla_put_u64_64bit(skb, NL80211_ATTR_WDEV,
15202 genlmsg_cancel(skb, hdr);
15206 vendor_data = nla_nest_start_noflag(skb,
15209 genlmsg_cancel(skb, hdr);
15213 err = vcmd->dumpit(&rdev->wiphy, wdev, skb, data, data_len,
15215 nla_nest_end(skb, vendor_data);
15218 genlmsg_cancel(skb, hdr);
15221 genlmsg_cancel(skb, hdr);
15225 genlmsg_end(skb, hdr);
15228 err = skb->len;
15251 int cfg80211_vendor_cmd_reply(struct sk_buff *skb)
15253 struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0];
15254 void *hdr = ((void **)skb->cb)[1];
15255 struct nlattr *data = ((void **)skb->cb)[2];
15258 memset(skb->cb, 0, sizeof(skb->cb));
15261 kfree_skb(skb);
15265 nla_nest_end(skb, data);
15266 genlmsg_end(skb, hdr);
15267 return genlmsg_reply(skb, rdev->cur_cmd_info);
15282 static int nl80211_set_qos_map(struct sk_buff *skb,
15332 static int nl80211_add_tx_ts(struct sk_buff *skb, struct genl_info *info)
15390 static int nl80211_del_tx_ts(struct sk_buff *skb, struct genl_info *info)
15412 static int nl80211_tdls_channel_switch(struct sk_buff *skb,
15472 static int nl80211_tdls_cancel_channel_switch(struct sk_buff *skb,
15505 static int nl80211_set_multicast_to_unicast(struct sk_buff *skb,
15527 static int nl80211_set_pmk(struct sk_buff *skb, struct genl_info *info)
15576 static int nl80211_del_pmk(struct sk_buff *skb, struct genl_info *info)
15603 static int nl80211_external_auth(struct sk_buff *skb, struct genl_info *info)
15645 static int nl80211_tx_control_port(struct sk_buff *skb, struct genl_info *info)
15719 static int nl80211_get_ftm_responder_stats(struct sk_buff *skb,
15792 static int nl80211_update_owe_info(struct sk_buff *skb, struct genl_info *info)
15817 static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info)
15961 static int nl80211_set_tid_config(struct sk_buff *skb,
16021 static int nl80211_color_change(struct sk_buff *skb, struct genl_info *info)
16127 static int nl80211_set_fils_aad(struct sk_buff *skb,
16150 static int nl80211_add_link(struct sk_buff *skb, struct genl_info *info)
16187 static int nl80211_remove_link(struct sk_buff *skb, struct genl_info *info)
16212 nl80211_add_mod_link_station(struct sk_buff *skb, struct genl_info *info,
16307 nl80211_add_link_station(struct sk_buff *skb, struct genl_info *info)
16309 return nl80211_add_mod_link_station(skb, info, true);
16313 nl80211_modify_link_station(struct sk_buff *skb, struct genl_info *info)
16315 return nl80211_add_mod_link_station(skb, info, false);
16319 nl80211_remove_link_station(struct sk_buff *skb, struct genl_info *info)
16343 static int nl80211_set_hw_timestamp(struct sk_buff *skb,
16455 struct sk_buff *skb,
16557 struct sk_buff *skb,
16590 struct nlmsghdr *nlh = nlmsg_hdr(skb);
16629 static int nl80211_set_sar_specs(struct sk_buff *skb, struct genl_info *info)
18997 struct sk_buff *skb,
19004 struct ethhdr *ehdr = eth_hdr(skb);
19006 u16 proto = be16_to_cpu(skb->protocol);
19016 msg = nlmsg_new(100 + skb->len, gfp);
19038 frame = nla_reserve(msg, NL80211_ATTR_FRAME, skb->len);
19042 skb_copy_bits(skb, 0, nla_data(frame), skb->len);
19052 bool cfg80211_rx_control_port(struct net_device *dev, struct sk_buff *skb,
19057 trace_cfg80211_rx_control_port(dev, skb, unencrypted, link_id);
19058 ret = __nl80211_rx_control_port(dev, skb, unencrypted, link_id,