Lines Matching defs:wdev

90 		struct wireless_dev *wdev;
98 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
99 if (have_ifidx && wdev->netdev &&
100 wdev->netdev->ifindex == ifidx) {
101 result = wdev;
104 if (have_wdev_id && wdev->identifier == (u32)wdev_id) {
105 result = wdev;
138 struct wireless_dev *wdev;
143 /* make sure wdev exists */
144 list_for_each_entry(wdev, &tmp->wiphy.wdev_list, list) {
145 if (wdev->identifier != (u32)wdev_id)
888 struct wireless_dev **wdev)
909 *wdev = __cfg80211_wdev_from_attrs(sock_net(cb->skb->sk),
912 if (IS_ERR(*wdev))
913 return PTR_ERR(*wdev);
914 *rdev = wiphy_to_rdev((*wdev)->wiphy);
917 cb->args[1] = (*wdev)->identifier;
926 *wdev = NULL;
930 *wdev = tmp;
935 if (!*wdev)
1396 static int nl80211_key_allowed(struct wireless_dev *wdev)
1398 ASSERT_WDEV_LOCK(wdev);
1400 switch (wdev->iftype) {
1409 if (!wdev->current_bss)
2869 static bool nl80211_can_set_dev_channel(struct wireless_dev *wdev)
2886 return !wdev ||
2887 wdev->iftype == NL80211_IFTYPE_AP ||
2888 wdev->iftype == NL80211_IFTYPE_MESH_POINT ||
2889 wdev->iftype == NL80211_IFTYPE_MONITOR ||
2890 wdev->iftype == NL80211_IFTYPE_P2P_GO;
3025 struct wireless_dev *wdev = NULL;
3028 wdev = dev->ieee80211_ptr;
3029 if (!nl80211_can_set_dev_channel(wdev))
3031 if (wdev)
3032 iftype = wdev->iftype;
3046 if (wdev->beacon_interval) {
3055 if (chandef.chan != wdev->preset_chandef.chan) {
3063 wdev->preset_chandef = chandef;
3067 result = cfg80211_set_mesh_channel(rdev, wdev, &chandef);
3091 struct wireless_dev *wdev = dev->ieee80211_ptr;
3103 if (wdev->iftype != NL80211_IFTYPE_WDS)
3114 struct wireless_dev *wdev;
3150 wdev = NULL;
3154 wdev = netdev->ieee80211_ptr;
3158 * and locked, and wdev may or may not be NULL.
3209 nl80211_can_set_dev_channel(wdev) ? netdev : NULL,
3216 struct wireless_dev *txp_wdev = wdev;
3438 struct wireless_dev *wdev,
3441 struct net_device *dev = wdev->netdev;
3458 nla_put_u32(msg, NL80211_ATTR_IFTYPE, wdev->iftype) ||
3459 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
3461 nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, wdev_address(wdev)) ||
3465 nla_put_u8(msg, NL80211_ATTR_4ADDR, wdev->use_4addr))
3472 ret = rdev_get_channel(rdev, wdev, &chandef);
3482 ret = rdev_get_tx_power(rdev, wdev, &dbm);
3489 wdev_lock(wdev);
3490 switch (wdev->iftype) {
3493 if (wdev->ssid_len &&
3494 nla_put(msg, NL80211_ATTR_SSID, wdev->ssid_len, wdev->ssid))
3501 if (!wdev->current_bss)
3504 ssid_ie = ieee80211_bss_get_ie(&wdev->current_bss->pub,
3516 wdev_unlock(wdev);
3520 int ret = rdev_get_txq_stats(rdev, wdev, &txqstats);
3534 wdev_unlock(wdev);
3548 struct wireless_dev *wdev;
3588 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
3595 rdev, wdev,
3619 struct wireless_dev *wdev = info->user_ptr[1];
3626 rdev, wdev, NL80211_CMD_NEW_INTERFACE) < 0) {
3774 struct wireless_dev *wdev = dev->ieee80211_ptr;
3783 wdev_lock(wdev);
3786 wdev->mesh_id_up_len =
3788 memcpy(wdev->ssid, nla_data(info->attrs[NL80211_ATTR_MESH_ID]),
3789 wdev->mesh_id_up_len);
3790 wdev_unlock(wdev);
3818 struct wireless_dev *wdev = dev->ieee80211_ptr;
3820 nl80211_notify_iface(rdev, wdev, NL80211_CMD_SET_INTERFACE);
3830 struct wireless_dev *wdev;
3876 wdev = rdev_add_virtual_intf(rdev,
3879 if (WARN_ON(!wdev)) {
3882 } else if (IS_ERR(wdev)) {
3884 return PTR_ERR(wdev);
3888 wdev->owner_nlportid = info->snd_portid;
3894 wdev_lock(wdev);
3897 wdev->mesh_id_up_len =
3899 memcpy(wdev->ssid, nla_data(info->attrs[NL80211_ATTR_MESH_ID]),
3900 wdev->mesh_id_up_len);
3901 wdev_unlock(wdev);
3909 cfg80211_init_wdev(wdev);
3910 cfg80211_register_wdev(rdev, wdev);
3917 rdev, wdev, NL80211_CMD_NEW_INTERFACE) < 0) {
3928 struct wireless_dev *wdev = info->user_ptr[1];
3937 * since the wdev has been freed, unlike with a netdev where
3940 if (!wdev->netdev)
3943 return rdev_del_virtual_intf(rdev, wdev);
4567 struct wireless_dev *wdev = dev->ieee80211_ptr;
4570 switch (wdev->chandef.width) {
4585 struct wireless_dev *wdev,
4595 he_cap = ieee80211_get_he_iftype_cap(sband, wdev->iftype);
4624 struct wireless_dev *wdev = dev->ieee80211_ptr;
4650 he_cap = ieee80211_get_he_iftype_cap(sband, wdev->iftype);
4715 !he_set_mcs_mask(info, wdev, sband,
4732 ieee80211_get_he_iftype_cap(sband, wdev->iftype)))
5076 struct wireless_dev *wdev;
5079 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
5080 if (wdev->iftype != NL80211_IFTYPE_AP &&
5081 wdev->iftype != NL80211_IFTYPE_P2P_GO)
5084 if (!wdev->preset_chandef.chan)
5087 params->chandef = wdev->preset_chandef;
5151 struct wireless_dev *wdev = dev->ieee80211_ptr;
5162 if (wdev->beacon_interval)
5255 } else if (wdev->preset_chandef.chan) {
5256 params.chandef = wdev->preset_chandef;
5261 wdev->iftype))
5351 wdev_lock(wdev);
5354 wdev->preset_chandef = params.chandef;
5355 wdev->beacon_interval = params.beacon_interval;
5356 wdev->chandef = params.chandef;
5357 wdev->ssid_len = params.ssid_len;
5358 memcpy(wdev->ssid, params.ssid, wdev->ssid_len);
5361 wdev->conn_owner_nlportid = info->snd_portid;
5363 wdev_unlock(wdev);
5375 struct wireless_dev *wdev = dev->ieee80211_ptr;
5386 if (!wdev->beacon_interval)
5393 wdev_lock(wdev);
5395 wdev_unlock(wdev);
5825 struct wireless_dev *wdev;
5831 err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
5835 if (!wdev->netdev) {
5847 err = rdev_dump_station(rdev, wdev->netdev, sta_idx,
5857 rdev, wdev->netdev, mac_addr,
6720 struct wireless_dev *wdev;
6727 err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
6736 if (wdev->iftype != NL80211_IFTYPE_MESH_POINT) {
6742 err = rdev_dump_mpath(rdev, wdev->netdev, path_idx, dst,
6751 wdev->netdev, dst, next_hop,
6919 struct wireless_dev *wdev;
6926 err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
6935 if (wdev->iftype != NL80211_IFTYPE_MESH_POINT) {
6941 err = rdev_dump_mpp(rdev, wdev->netdev, path_idx, dst,
6950 wdev->netdev, dst, mpp,
6969 struct wireless_dev *wdev = dev->ieee80211_ptr;
7033 wdev_lock(wdev);
7035 wdev_unlock(wdev);
7095 struct wireless_dev *wdev = dev->ieee80211_ptr;
7102 if (wdev->iftype != NL80211_IFTYPE_MESH_POINT)
7108 wdev_lock(wdev);
7110 if (!wdev->mesh_id_len)
7114 wdev_unlock(wdev);
7475 struct wireless_dev *wdev = dev->ieee80211_ptr;
7480 if (wdev->iftype != NL80211_IFTYPE_MESH_POINT)
7490 wdev_lock(wdev);
7491 if (!wdev->mesh_id_len)
7497 wdev_unlock(wdev);
7967 static bool cfg80211_off_channel_oper_allowed(struct wireless_dev *wdev)
7969 ASSERT_WDEV_LOCK(wdev);
7971 if (!cfg80211_beaconing_iface_active(wdev))
7974 if (!(wdev->chandef.chan->flags & IEEE80211_CHAN_RADAR))
7977 return regulatory_pre_cac_allowed(wdev->wiphy);
7991 nl80211_check_scan_flags(struct wiphy *wiphy, struct wireless_dev *wdev,
8005 randomness_flag = wdev ?
8057 (wdev && wdev->current_bss))
8071 struct wireless_dev *wdev = info->user_ptr[1];
8082 if (wdev->iftype == NL80211_IFTYPE_NAN)
8193 wdev_lock(wdev);
8194 if (!cfg80211_off_channel_oper_allowed(wdev)) {
8198 wdev_unlock(wdev);
8204 if (chan->center_freq != wdev->chandef.chan->center_freq) {
8205 wdev_unlock(wdev);
8210 wdev_unlock(wdev);
8273 err = nl80211_check_scan_flags(wiphy, wdev, request, info->attrs,
8300 request->wdev = wdev;
8310 nl80211_send_scan_start(rdev, wdev);
8311 if (wdev->netdev)
8312 dev_hold(wdev->netdev);
8326 struct wireless_dev *wdev = info->user_ptr[1];
8337 rdev_abort_scan(rdev, wdev);
8462 nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev,
8765 err = nl80211_check_scan_flags(wiphy, wdev, request, attrs, true);
8811 struct wireless_dev *wdev = dev->ieee80211_ptr;
8824 sched_scan_req = nl80211_parse_sched_scan(&rdev->wiphy, wdev,
8890 struct wireless_dev *wdev = dev->ieee80211_ptr;
8891 struct wiphy *wiphy = wdev->wiphy;
8908 if (wdev->cac_started)
8911 err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
8934 wdev->chandef = chandef;
8935 wdev->cac_started = true;
8936 wdev->cac_start_time = jiffies;
8937 wdev->cac_time_ms = cac_time_ms;
8947 struct wireless_dev *wdev = dev->ieee80211_ptr;
8948 struct wiphy *wiphy = wdev->wiphy;
8966 err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
9000 struct wireless_dev *wdev = dev->ieee80211_ptr;
9028 if (!wdev->beacon_interval)
9032 if (!wdev->ssid_len)
9036 if (!wdev->mesh_id_len)
9140 wdev->iftype))
9143 err = cfg80211_chandef_dfs_required(wdev->wiphy,
9145 wdev->iftype);
9160 wdev_lock(wdev);
9162 wdev_unlock(wdev);
9170 struct wireless_dev *wdev,
9178 ASSERT_WDEV_LOCK(wdev);
9189 if (wdev->netdev &&
9190 nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex))
9192 if (nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
9276 switch (wdev->iftype) {
9279 if (intbss == wdev->current_bss &&
9285 if (intbss == wdev->current_bss &&
9310 struct wireless_dev *wdev;
9315 err = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
9321 wdev_lock(wdev);
9340 rdev, wdev, scan) < 0) {
9347 wdev_unlock(wdev);
9439 struct wireless_dev *wdev;
9449 res = nl80211_prepare_wdev_dump(cb, &rdev, &wdev);
9456 if (!wdev->netdev) {
9467 res = rdev_dump_survey(rdev, wdev->netdev, survey_idx, &survey);
9483 wdev->netdev, radio_stats, &survey) < 0)
10228 struct wireless_dev *wdev, int approxlen,
10260 if (wdev) {
10262 wdev_id(wdev), NL80211_ATTR_PAD))
10264 if (wdev->netdev &&
10266 wdev->netdev->ifindex))
10286 struct wireless_dev *wdev,
10313 return __cfg80211_alloc_vendor_skb(rdev, wdev, approxlen, portid, 0,
10349 struct wireless_dev *wdev =
10356 if (IS_ERR(wdev)) {
10357 err = PTR_ERR(wdev);
10360 wdev = NULL;
10361 } else if (wdev->wiphy != &rdev->wiphy) {
10369 err = rdev_testmode_cmd(rdev, wdev,
10727 struct wireless_dev *wdev = dev->ieee80211_ptr;
10793 if (!wdev->current_bss)
11006 struct wireless_dev *wdev = info->user_ptr[1];
11037 wdev_lock(wdev);
11038 if (!cfg80211_off_channel_oper_allowed(wdev) &&
11039 !cfg80211_chandef_identical(&wdev->chandef, &chandef)) {
11040 compat_chandef = cfg80211_chandef_compatible(&wdev->chandef,
11043 wdev_unlock(wdev);
11047 wdev_unlock(wdev);
11060 err = rdev_remain_on_channel(rdev, wdev, chandef.chan,
11085 struct wireless_dev *wdev = info->user_ptr[1];
11096 return rdev_cancel_remain_on_channel(rdev, wdev, cookie);
11105 struct wireless_dev *wdev = dev->ieee80211_ptr;
11111 wdev_lock(wdev);
11120 wdev_unlock(wdev);
11127 struct wireless_dev *wdev = info->user_ptr[1];
11136 switch (wdev->iftype) {
11163 return cfg80211_mlme_register_mgmt(wdev, info->snd_portid, frame_type,
11173 struct wireless_dev *wdev = info->user_ptr[1];
11190 switch (wdev->iftype) {
11241 wdev_lock(wdev);
11242 if (params.offchan && !cfg80211_off_channel_oper_allowed(wdev)) {
11243 wdev_unlock(wdev);
11246 wdev_unlock(wdev);
11283 err = cfg80211_mlme_mgmt_tx(rdev, wdev, &params, &cookie);
11308 struct wireless_dev *wdev = info->user_ptr[1];
11317 switch (wdev->iftype) {
11333 return rdev_mgmt_tx_cancel_wait(rdev, wdev, cookie);
11339 struct wireless_dev *wdev;
11350 wdev = dev->ieee80211_ptr;
11357 if (state == wdev->ps)
11360 err = rdev_set_power_mgmt(rdev, dev, state, wdev->ps_timeout);
11362 wdev->ps = state;
11370 struct wireless_dev *wdev;
11376 wdev = dev->ieee80211_ptr;
11392 if (wdev->ps)
11426 struct wireless_dev *wdev = dev->ieee80211_ptr;
11434 if (wdev->iftype != NL80211_IFTYPE_STATION &&
11435 wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
11444 struct wireless_dev *wdev = dev->ieee80211_ptr;
11451 if (!wdev->cqm_config)
11460 if (!wdev->cqm_config->last_rssi_event_value && wdev->current_bss &&
11465 mac_addr = wdev->current_bss->pub.bssid;
11473 wdev->cqm_config->last_rssi_event_value =
11477 last = wdev->cqm_config->last_rssi_event_value;
11478 hyst = wdev->cqm_config->rssi_hyst;
11479 n = wdev->cqm_config->n_rssi_thresholds;
11483 if (last < wdev->cqm_config->rssi_thresholds[i])
11490 low = wdev->cqm_config->rssi_thresholds[low_index] - hyst;
11496 high = wdev->cqm_config->rssi_thresholds[i] + hyst - 1;
11510 struct wireless_dev *wdev = dev->ieee80211_ptr;
11522 if (wdev->iftype != NL80211_IFTYPE_STATION &&
11523 wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
11526 wdev_lock(wdev);
11527 cfg80211_cqm_config_free(wdev);
11528 wdev_unlock(wdev);
11545 wdev_lock(wdev);
11561 wdev->cqm_config = cqm_config;
11567 wdev_unlock(wdev);
12663 struct wireless_dev *wdev = dev->ieee80211_ptr;
12697 wdev_lock(wdev);
12698 if (!wdev->current_bss) {
12710 wdev_unlock(wdev);
12718 struct wireless_dev *wdev = dev->ieee80211_ptr;
12720 if (wdev->iftype != NL80211_IFTYPE_AP &&
12721 wdev->iftype != NL80211_IFTYPE_P2P_GO)
12724 if (wdev->ap_unexpected_nlportid)
12727 wdev->ap_unexpected_nlportid = info->snd_portid;
12736 struct wireless_dev *wdev = dev->ieee80211_ptr;
12743 if (wdev->iftype != NL80211_IFTYPE_AP &&
12744 wdev->iftype != NL80211_IFTYPE_P2P_GO)
12822 struct wireless_dev *wdev = info->user_ptr[1];
12828 if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
12831 if (wdev_running(wdev))
12837 err = rdev_start_p2p_device(rdev, wdev);
12841 wdev->is_running = true;
12850 struct wireless_dev *wdev = info->user_ptr[1];
12852 if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
12858 cfg80211_stop_p2p_device(rdev, wdev);
12866 struct wireless_dev *wdev = info->user_ptr[1];
12870 if (wdev->iftype != NL80211_IFTYPE_NAN)
12873 if (wdev_running(wdev))
12888 if (bands & ~(u32)wdev->wiphy->nan_supported_bands)
12897 err = rdev_start_nan(rdev, wdev, &conf);
12901 wdev->is_running = true;
12910 struct wireless_dev *wdev = info->user_ptr[1];
12912 if (wdev->iftype != NL80211_IFTYPE_NAN)
12915 cfg80211_stop_nan(rdev, wdev);
12987 struct wireless_dev *wdev = info->user_ptr[1];
12994 if (wdev->iftype != NL80211_IFTYPE_NAN)
12997 if (!wdev_running(wdev))
13190 err = rdev_add_nan_func(rdev, wdev, func);
13225 struct wireless_dev *wdev = info->user_ptr[1];
13228 if (wdev->iftype != NL80211_IFTYPE_NAN)
13231 if (!wdev_running(wdev))
13239 rdev_del_nan_func(rdev, wdev, cookie);
13248 struct wireless_dev *wdev = info->user_ptr[1];
13252 if (wdev->iftype != NL80211_IFTYPE_NAN)
13255 if (!wdev_running(wdev))
13270 if (bands & ~(u32)wdev->wiphy->nan_supported_bands)
13283 return rdev_nan_change_conf(rdev, wdev, &conf, changed);
13286 void cfg80211_nan_match(struct wireless_dev *wdev,
13289 struct wiphy *wiphy = wdev->wiphy;
13309 (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX,
13310 wdev->netdev->ifindex)) ||
13311 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
13352 if (!wdev->owner_nlportid)
13357 wdev->owner_nlportid);
13366 void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
13371 struct wiphy *wiphy = wdev->wiphy;
13391 (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX,
13392 wdev->netdev->ifindex)) ||
13393 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
13412 if (!wdev->owner_nlportid)
13417 wdev->owner_nlportid);
13478 struct wireless_dev *wdev = info->user_ptr[1];
13506 ret = rdev_crit_proto_start(rdev, wdev, proto, duration);
13517 struct wireless_dev *wdev = info->user_ptr[1];
13524 rdev_crit_proto_stop(rdev, wdev);
13554 struct wireless_dev *wdev =
13562 if (IS_ERR(wdev)) {
13563 err = PTR_ERR(wdev);
13566 wdev = NULL;
13567 } else if (wdev->wiphy != &rdev->wiphy) {
13589 if (!wdev)
13592 !wdev->netdev)
13596 if (!wdev_running(wdev))
13600 wdev = NULL;
13618 err = vcmd->doit(&rdev->wiphy, wdev, data, len);
13629 struct wireless_dev **wdev)
13647 *wdev = NULL;
13652 *wdev = tmp;
13679 *wdev = __cfg80211_wdev_from_attrs(sock_net(skb->sk), attrbuf);
13680 if (IS_ERR(*wdev))
13681 *wdev = NULL;
13729 cb->args[1] = *wdev ? (*wdev)->identifier + 1 : 0;
13745 struct wireless_dev *wdev;
13754 err = nl80211_prepare_vendor_dump(skb, cb, &rdev, &wdev);
13765 if (!wdev) {
13770 !wdev->netdev) {
13776 if (!wdev_running(wdev)) {
13791 (wdev && nla_put_u64_64bit(skb, NL80211_ATTR_WDEV,
13792 wdev_id(wdev),
13805 err = vcmd->dumpit(&rdev->wiphy, wdev, skb, data, data_len,
13928 struct wireless_dev *wdev = dev->ieee80211_ptr;
13962 wdev_lock(wdev);
13963 switch (wdev->iftype) {
13966 if (wdev->current_bss)
13978 wdev_unlock(wdev);
13986 struct wireless_dev *wdev = dev->ieee80211_ptr;
13997 wdev_lock(wdev);
13999 wdev_unlock(wdev);
14009 struct wireless_dev *wdev = dev->ieee80211_ptr;
14047 wdev->iftype))
14051 if (cfg80211_chandef_dfs_required(wdev->wiphy, &chandef, wdev->iftype))
14057 wdev_lock(wdev);
14059 wdev_unlock(wdev);
14069 struct wireless_dev *wdev = dev->ieee80211_ptr;
14090 wdev_lock(wdev);
14092 wdev_unlock(wdev);
14102 struct wireless_dev *wdev = dev->ieee80211_ptr;
14109 if (wdev->iftype != NL80211_IFTYPE_AP &&
14110 wdev->iftype != NL80211_IFTYPE_P2P_GO)
14123 struct wireless_dev *wdev = dev->ieee80211_ptr;
14127 if (wdev->iftype != NL80211_IFTYPE_STATION &&
14128 wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
14138 wdev_lock(wdev);
14139 if (!wdev->current_bss) {
14145 if (memcmp(pmk_conf.aa, wdev->current_bss->pub.bssid, ETH_ALEN)) {
14164 wdev_unlock(wdev);
14172 struct wireless_dev *wdev = dev->ieee80211_ptr;
14176 if (wdev->iftype != NL80211_IFTYPE_STATION &&
14177 wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
14187 wdev_lock(wdev);
14190 wdev_unlock(wdev);
14242 struct wireless_dev *wdev = dev->ieee80211_ptr;
14265 wdev_lock(wdev);
14267 switch (wdev->iftype) {
14275 if (wdev->current_bss)
14284 wdev_unlock(wdev);
14300 wdev_unlock(wdev);
14309 struct wireless_dev *wdev = dev->ieee80211_ptr;
14316 if (wdev->iftype != NL80211_IFTYPE_AP || !wdev->beacon_interval)
14404 struct wireless_dev *wdev = dev->ieee80211_ptr;
14420 if (wdev->iftype != NL80211_IFTYPE_MESH_POINT)
14614 struct wireless_dev *wdev;
14633 wdev = __cfg80211_wdev_from_attrs(genl_info_net(info),
14635 if (IS_ERR(wdev)) {
14638 return PTR_ERR(wdev);
14641 dev = wdev->netdev;
14642 rdev = wiphy_to_rdev(wdev->wiphy);
14653 info->user_ptr[1] = wdev;
14657 !wdev_running(wdev)) {
14677 struct wireless_dev *wdev = info->user_ptr[1];
14679 if (wdev->netdev)
14680 dev_put(wdev->netdev);
15608 struct wireless_dev *wdev,
15617 if (nl80211_send_iface(msg, 0, 0, 0, rdev, wdev, cmd) < 0) {
15692 struct wireless_dev *wdev,
15703 (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX,
15704 wdev->netdev->ifindex)) ||
15705 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
15746 struct wireless_dev *wdev)
15754 if (nl80211_prep_scan_msg(msg, rdev, wdev, 0, 0, 0,
15765 struct wireless_dev *wdev, bool aborted)
15773 if (nl80211_prep_scan_msg(msg, rdev, wdev, 0, 0, 0,
15979 struct wireless_dev *wdev = dev->ieee80211_ptr;
15980 struct wiphy *wiphy = wdev->wiphy;
15993 if (wdev->unprot_beacon_reported &&
15994 elapsed_jiffies_msecs(wdev->unprot_beacon_reported) < 10000)
15997 wdev->unprot_beacon_reported = jiffies;
16270 struct wireless_dev *wdev = dev->ieee80211_ptr;
16271 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
16275 if (WARN_ON(wdev->iftype != NL80211_IFTYPE_MESH_POINT))
16405 struct wireless_dev *wdev, u64 cookie,
16423 (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX,
16424 wdev->netdev->ifindex)) ||
16425 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
16448 void cfg80211_ready_on_channel(struct wireless_dev *wdev, u64 cookie,
16452 struct wiphy *wiphy = wdev->wiphy;
16455 trace_cfg80211_ready_on_channel(wdev, cookie, chan, duration);
16457 rdev, wdev, cookie, chan,
16462 void cfg80211_remain_on_channel_expired(struct wireless_dev *wdev, u64 cookie,
16466 struct wiphy *wiphy = wdev->wiphy;
16469 trace_cfg80211_ready_on_channel_expired(wdev, cookie, chan);
16471 rdev, wdev, cookie, chan, 0, gfp);
16475 void cfg80211_tx_mgmt_expired(struct wireless_dev *wdev, u64 cookie,
16479 struct wiphy *wiphy = wdev->wiphy;
16482 trace_cfg80211_tx_mgmt_expired(wdev, cookie, chan);
16484 rdev, wdev, cookie, chan, 0, gfp);
16580 struct wireless_dev *wdev = dev->ieee80211_ptr;
16581 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
16584 u32 nlportid = READ_ONCE(wdev->ap_unexpected_nlportid);
16616 struct wireless_dev *wdev = dev->ieee80211_ptr;
16621 if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP &&
16622 wdev->iftype != NL80211_IFTYPE_P2P_GO)) {
16636 struct wireless_dev *wdev = dev->ieee80211_ptr;
16641 if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP &&
16642 wdev->iftype != NL80211_IFTYPE_P2P_GO &&
16643 wdev->iftype != NL80211_IFTYPE_AP_VLAN)) {
16656 struct wireless_dev *wdev, u32 nlportid,
16660 struct net_device *netdev = wdev->netdev;
16677 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
16697 static void nl80211_frame_tx_status(struct wireless_dev *wdev, u64 cookie,
16701 struct wiphy *wiphy = wdev->wiphy;
16703 struct net_device *netdev = wdev->netdev;
16708 trace_cfg80211_mgmt_tx_status(wdev, cookie, ack);
16710 trace_cfg80211_control_port_tx_status(wdev, cookie, ack);
16725 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
16743 void cfg80211_control_port_tx_status(struct wireless_dev *wdev, u64 cookie,
16747 nl80211_frame_tx_status(wdev, cookie, buf, len, ack, gfp,
16752 void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
16755 nl80211_frame_tx_status(wdev, cookie, buf, len, ack, gfp,
16764 struct wireless_dev *wdev = dev->ieee80211_ptr;
16765 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
16773 u32 nlportid = READ_ONCE(wdev->conn_owner_nlportid);
16790 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
16827 struct wireless_dev *wdev = dev->ieee80211_ptr;
16828 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
16881 struct wireless_dev *wdev = dev->ieee80211_ptr;
16882 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
16890 if (wdev->cqm_config) {
16891 wdev->cqm_config->last_rssi_event_value = rssi_level;
16896 rssi_level = wdev->cqm_config->last_rssi_event_value;
17034 struct wireless_dev *wdev = dev->ieee80211_ptr;
17035 struct wiphy *wiphy = wdev->wiphy;
17091 struct wireless_dev *wdev = dev->ieee80211_ptr;
17092 struct wiphy *wiphy = wdev->wiphy;
17143 struct wireless_dev *wdev = dev->ieee80211_ptr;
17144 struct wiphy *wiphy = wdev->wiphy;
17147 ASSERT_WDEV_LOCK(wdev);
17151 wdev->chandef = *chandef;
17152 wdev->preset_chandef = *chandef;
17154 if ((wdev->iftype == NL80211_IFTYPE_STATION ||
17155 wdev->iftype == NL80211_IFTYPE_P2P_CLIENT) &&
17156 !WARN_ON(!wdev->current_bss))
17157 cfg80211_update_assoc_bss_entry(wdev, chandef->chan);
17170 struct wireless_dev *wdev = dev->ieee80211_ptr;
17171 struct wiphy *wiphy = wdev->wiphy;
17205 struct wireless_dev *wdev = netdev->ieee80211_ptr;
17208 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
17234 struct wireless_dev *wdev = dev->ieee80211_ptr;
17235 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
17288 struct wireless_dev *wdev = dev->ieee80211_ptr;
17289 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
17433 void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev,
17437 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
17442 trace_cfg80211_report_wowlan_wakeup(wdev->wiphy, wdev, wakeup);
17456 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
17460 if (wdev->netdev && nla_put_u32(msg, NL80211_ATTR_IFINDEX,
17461 wdev->netdev->ifindex))
17552 struct wireless_dev *wdev = dev->ieee80211_ptr;
17553 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
17557 trace_cfg80211_tdls_oper_request(wdev->wiphy, dev, peer, oper,
17595 struct wireless_dev *wdev;
17615 list_for_each_entry_rcu(wdev, &rdev->wiphy.wdev_list, list) {
17616 cfg80211_mlme_unregister_socket(wdev, notify->portid);
17618 if (wdev->owner_nlportid == notify->portid) {
17619 wdev->nl_owner_dead = true;
17621 } else if (wdev->conn_owner_nlportid == notify->portid) {
17622 schedule_work(&wdev->disconnect_wk);
17625 cfg80211_release_pmsr(wdev, notify->portid);
17699 void cfg80211_crit_proto_stopped(struct wireless_dev *wdev, gfp_t gfp)
17706 rdev = wiphy_to_rdev(wdev->wiphy);
17722 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
17736 void nl80211_send_ap_stopped(struct wireless_dev *wdev)
17738 struct wiphy *wiphy = wdev->wiphy;
17752 nla_put_u32(msg, NL80211_ATTR_IFINDEX, wdev->netdev->ifindex) ||
17753 nla_put_u64_64bit(msg, NL80211_ATTR_WDEV, wdev_id(wdev),
17770 struct wireless_dev *wdev = dev->ieee80211_ptr;
17771 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
17775 if (!wdev->conn_owner_nlportid)
17798 wdev->conn_owner_nlportid);