Lines Matching refs:rdev

59 	struct cfg80211_registered_device *result = NULL, *rdev;  in cfg80211_rdev_by_wiphy_idx()  local
63 list_for_each_entry(rdev, &cfg80211_rdev_list, list) { in cfg80211_rdev_by_wiphy_idx()
64 if (rdev->wiphy_idx == wiphy_idx) { in cfg80211_rdev_by_wiphy_idx()
65 result = rdev; in cfg80211_rdev_by_wiphy_idx()
75 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in get_wiphy_idx() local
77 return rdev->wiphy_idx; in get_wiphy_idx()
82 struct cfg80211_registered_device *rdev; in wiphy_idx_to_wiphy() local
86 rdev = cfg80211_rdev_by_wiphy_idx(wiphy_idx); in wiphy_idx_to_wiphy()
87 if (!rdev) in wiphy_idx_to_wiphy()
89 return &rdev->wiphy; in wiphy_idx_to_wiphy()
92 static int cfg80211_dev_check_name(struct cfg80211_registered_device *rdev, in cfg80211_dev_check_name() argument
105 if (taken == strlen(newname) && wiphy_idx != rdev->wiphy_idx) { in cfg80211_dev_check_name()
126 int cfg80211_dev_rename(struct cfg80211_registered_device *rdev, in cfg80211_dev_rename() argument
134 if (strcmp(newname, wiphy_name(&rdev->wiphy)) == 0) in cfg80211_dev_rename()
137 result = cfg80211_dev_check_name(rdev, newname); in cfg80211_dev_rename()
141 result = device_rename(&rdev->wiphy.dev, newname); in cfg80211_dev_rename()
145 if (!IS_ERR_OR_NULL(rdev->wiphy.debugfsdir)) in cfg80211_dev_rename()
146 debugfs_rename(rdev->wiphy.debugfsdir->d_parent, in cfg80211_dev_rename()
147 rdev->wiphy.debugfsdir, in cfg80211_dev_rename()
148 rdev->wiphy.debugfsdir->d_parent, newname); in cfg80211_dev_rename()
150 nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY); in cfg80211_dev_rename()
155 int cfg80211_switch_netns(struct cfg80211_registered_device *rdev, in cfg80211_switch_netns() argument
161 if (!(rdev->wiphy.flags & WIPHY_FLAG_NETNS_OK)) in cfg80211_switch_netns()
164 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in cfg80211_switch_netns()
176 net = wiphy_net(&rdev->wiphy); in cfg80211_switch_netns()
179 &rdev->wiphy.wdev_list, in cfg80211_switch_netns()
193 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in cfg80211_switch_netns()
196 nl80211_notify_iface(rdev, wdev, NL80211_CMD_DEL_INTERFACE); in cfg80211_switch_netns()
198 nl80211_notify_wiphy(rdev, NL80211_CMD_DEL_WIPHY); in cfg80211_switch_netns()
200 wiphy_net_set(&rdev->wiphy, net); in cfg80211_switch_netns()
202 err = device_rename(&rdev->wiphy.dev, dev_name(&rdev->wiphy.dev)); in cfg80211_switch_netns()
205 nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY); in cfg80211_switch_netns()
206 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in cfg80211_switch_netns()
209 nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE); in cfg80211_switch_netns()
217 struct cfg80211_registered_device *rdev = data; in cfg80211_rfkill_poll() local
219 rdev_rfkill_poll(rdev); in cfg80211_rfkill_poll()
222 void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev, in cfg80211_stop_p2p_device() argument
225 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_stop_p2p_device()
233 rdev_stop_p2p_device(rdev, wdev); in cfg80211_stop_p2p_device()
236 rdev->opencount--; in cfg80211_stop_p2p_device()
238 if (rdev->scan_req && rdev->scan_req->wdev == wdev) { in cfg80211_stop_p2p_device()
239 if (WARN_ON(!rdev->scan_req->notified && in cfg80211_stop_p2p_device()
240 (!rdev->int_scan_req || in cfg80211_stop_p2p_device()
241 !rdev->int_scan_req->notified))) in cfg80211_stop_p2p_device()
242 rdev->scan_req->info.aborted = true; in cfg80211_stop_p2p_device()
243 ___cfg80211_scan_done(rdev, false); in cfg80211_stop_p2p_device()
247 void cfg80211_stop_nan(struct cfg80211_registered_device *rdev, in cfg80211_stop_nan() argument
250 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_stop_nan()
258 rdev_stop_nan(rdev, wdev); in cfg80211_stop_nan()
261 rdev->opencount--; in cfg80211_stop_nan()
266 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_shutdown_all_interfaces() local
271 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in cfg80211_shutdown_all_interfaces()
283 cfg80211_stop_p2p_device(rdev, wdev); in cfg80211_shutdown_all_interfaces()
286 cfg80211_stop_nan(rdev, wdev); in cfg80211_shutdown_all_interfaces()
299 struct cfg80211_registered_device *rdev = data; in cfg80211_rfkill_set_block() local
305 cfg80211_shutdown_all_interfaces(&rdev->wiphy); in cfg80211_rfkill_set_block()
313 struct cfg80211_registered_device *rdev; in cfg80211_rfkill_block_work() local
315 rdev = container_of(work, struct cfg80211_registered_device, in cfg80211_rfkill_block_work()
317 cfg80211_rfkill_set_block(rdev, true); in cfg80211_rfkill_block_work()
322 struct cfg80211_registered_device *rdev; in cfg80211_event_work() local
324 rdev = container_of(work, struct cfg80211_registered_device, in cfg80211_event_work()
327 wiphy_lock(&rdev->wiphy); in cfg80211_event_work()
328 cfg80211_process_rdev_events(rdev); in cfg80211_event_work()
329 wiphy_unlock(&rdev->wiphy); in cfg80211_event_work()
332 void cfg80211_destroy_ifaces(struct cfg80211_registered_device *rdev) in cfg80211_destroy_ifaces() argument
339 list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { in cfg80211_destroy_ifaces()
350 wiphy_lock(&rdev->wiphy); in cfg80211_destroy_ifaces()
351 list_for_each_entry_safe(wdev, tmp, &rdev->wiphy.wdev_list, list) { in cfg80211_destroy_ifaces()
353 cfg80211_leave(rdev, wdev); in cfg80211_destroy_ifaces()
354 rdev_del_virtual_intf(rdev, wdev); in cfg80211_destroy_ifaces()
357 wiphy_unlock(&rdev->wiphy); in cfg80211_destroy_ifaces()
362 struct cfg80211_registered_device *rdev; in cfg80211_destroy_iface_wk() local
364 rdev = container_of(work, struct cfg80211_registered_device, in cfg80211_destroy_iface_wk()
368 cfg80211_destroy_ifaces(rdev); in cfg80211_destroy_iface_wk()
374 struct cfg80211_registered_device *rdev; in cfg80211_sched_scan_stop_wk() local
377 rdev = container_of(work, struct cfg80211_registered_device, in cfg80211_sched_scan_stop_wk()
381 list_for_each_entry_safe(req, tmp, &rdev->sched_scan_req_list, list) { in cfg80211_sched_scan_stop_wk()
383 cfg80211_stop_sched_scan_req(rdev, req, false); in cfg80211_sched_scan_stop_wk()
390 struct cfg80211_registered_device *rdev; in cfg80211_propagate_radar_detect_wk() local
392 rdev = container_of(work, struct cfg80211_registered_device, in cfg80211_propagate_radar_detect_wk()
397 regulatory_propagate_dfs_state(&rdev->wiphy, &rdev->radar_chandef, in cfg80211_propagate_radar_detect_wk()
406 struct cfg80211_registered_device *rdev; in cfg80211_propagate_cac_done_wk() local
408 rdev = container_of(work, struct cfg80211_registered_device, in cfg80211_propagate_cac_done_wk()
413 regulatory_propagate_dfs_state(&rdev->wiphy, &rdev->cac_done_chandef, in cfg80211_propagate_cac_done_wk()
427 struct cfg80211_registered_device *rdev; in wiphy_new_nm() local
447 alloc_size = sizeof(*rdev) + sizeof_priv; in wiphy_new_nm()
449 rdev = kzalloc(alloc_size, GFP_KERNEL); in wiphy_new_nm()
450 if (!rdev) in wiphy_new_nm()
453 rdev->ops = ops; in wiphy_new_nm()
455 rdev->wiphy_idx = atomic_inc_return(&wiphy_counter); in wiphy_new_nm()
457 if (unlikely(rdev->wiphy_idx < 0)) { in wiphy_new_nm()
460 kfree(rdev); in wiphy_new_nm()
465 rdev->wiphy_idx--; in wiphy_new_nm()
472 rv = cfg80211_dev_check_name(rdev, requested_name); in wiphy_new_nm()
479 rv = dev_set_name(&rdev->wiphy.dev, "%s", requested_name); in wiphy_new_nm()
493 rv = dev_set_name(&rdev->wiphy.dev, PHY_NAME "%d", rdev->wiphy_idx); in wiphy_new_nm()
495 kfree(rdev); in wiphy_new_nm()
500 mutex_init(&rdev->wiphy.mtx); in wiphy_new_nm()
501 INIT_LIST_HEAD(&rdev->wiphy.wdev_list); in wiphy_new_nm()
502 INIT_LIST_HEAD(&rdev->beacon_registrations); in wiphy_new_nm()
503 spin_lock_init(&rdev->beacon_registrations_lock); in wiphy_new_nm()
504 spin_lock_init(&rdev->bss_lock); in wiphy_new_nm()
505 INIT_LIST_HEAD(&rdev->bss_list); in wiphy_new_nm()
506 INIT_LIST_HEAD(&rdev->sched_scan_req_list); in wiphy_new_nm()
507 INIT_WORK(&rdev->scan_done_wk, __cfg80211_scan_done); in wiphy_new_nm()
508 INIT_DELAYED_WORK(&rdev->dfs_update_channels_wk, in wiphy_new_nm()
511 rdev->wiphy.wext = &cfg80211_wext_handler; in wiphy_new_nm()
514 device_initialize(&rdev->wiphy.dev); in wiphy_new_nm()
515 rdev->wiphy.dev.class = &ieee80211_class; in wiphy_new_nm()
516 rdev->wiphy.dev.platform_data = rdev; in wiphy_new_nm()
517 device_enable_async_suspend(&rdev->wiphy.dev); in wiphy_new_nm()
519 INIT_WORK(&rdev->destroy_work, cfg80211_destroy_iface_wk); in wiphy_new_nm()
520 INIT_WORK(&rdev->sched_scan_stop_wk, cfg80211_sched_scan_stop_wk); in wiphy_new_nm()
521 INIT_WORK(&rdev->sched_scan_res_wk, cfg80211_sched_scan_results_wk); in wiphy_new_nm()
522 INIT_WORK(&rdev->propagate_radar_detect_wk, in wiphy_new_nm()
524 INIT_WORK(&rdev->propagate_cac_done_wk, cfg80211_propagate_cac_done_wk); in wiphy_new_nm()
525 INIT_WORK(&rdev->mgmt_registrations_update_wk, in wiphy_new_nm()
527 spin_lock_init(&rdev->mgmt_registrations_lock); in wiphy_new_nm()
530 rdev->wiphy.flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT; in wiphy_new_nm()
533 wiphy_net_set(&rdev->wiphy, &init_net); in wiphy_new_nm()
535 rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block; in wiphy_new_nm()
536 rdev->wiphy.rfkill = rfkill_alloc(dev_name(&rdev->wiphy.dev), in wiphy_new_nm()
537 &rdev->wiphy.dev, RFKILL_TYPE_WLAN, in wiphy_new_nm()
538 &rdev->rfkill_ops, rdev); in wiphy_new_nm()
540 if (!rdev->wiphy.rfkill) { in wiphy_new_nm()
541 wiphy_free(&rdev->wiphy); in wiphy_new_nm()
545 INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work); in wiphy_new_nm()
546 INIT_WORK(&rdev->conn_work, cfg80211_conn_work); in wiphy_new_nm()
547 INIT_WORK(&rdev->event_work, cfg80211_event_work); in wiphy_new_nm()
549 init_waitqueue_head(&rdev->dev_wait); in wiphy_new_nm()
556 rdev->wiphy.retry_short = 7; in wiphy_new_nm()
557 rdev->wiphy.retry_long = 4; in wiphy_new_nm()
558 rdev->wiphy.frag_threshold = (u32) -1; in wiphy_new_nm()
559 rdev->wiphy.rts_threshold = (u32) -1; in wiphy_new_nm()
560 rdev->wiphy.coverage_class = 0; in wiphy_new_nm()
562 rdev->wiphy.max_num_csa_counters = 1; in wiphy_new_nm()
564 rdev->wiphy.max_sched_scan_plans = 1; in wiphy_new_nm()
565 rdev->wiphy.max_sched_scan_plan_interval = U32_MAX; in wiphy_new_nm()
567 return &rdev->wiphy; in wiphy_new_nm()
663 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in wiphy_register() local
682 (!rdev->ops->tdls_channel_switch || in wiphy_register()
683 !rdev->ops->tdls_cancel_channel_switch))) in wiphy_register()
687 (!rdev->ops->start_nan || !rdev->ops->stop_nan || in wiphy_register()
688 !rdev->ops->add_nan_func || !rdev->ops->del_nan_func || in wiphy_register()
775 !rdev->ops->set_mac_acl))) in wiphy_register()
785 if (WARN_ON(wiphy_ext_feature_isset(&rdev->wiphy, in wiphy_register()
787 (!rdev->ops->set_pmk || !rdev->ops->del_pmk))) in wiphy_register()
790 if (WARN_ON(!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_FW_ROAM) && in wiphy_register()
791 rdev->ops->update_connect_params)) in wiphy_register()
899 for (i = 0; i < rdev->wiphy.n_vendor_commands; i++) { in wiphy_register()
905 if (WARN_ON(!rdev->wiphy.vendor_commands[i].policy)) in wiphy_register()
907 if (WARN_ON(!rdev->wiphy.vendor_commands[i].doit && in wiphy_register()
908 !rdev->wiphy.vendor_commands[i].dumpit)) in wiphy_register()
913 if (WARN_ON(rdev->wiphy.wowlan && rdev->wiphy.wowlan->n_patterns && in wiphy_register()
914 (!rdev->wiphy.wowlan->pattern_min_len || in wiphy_register()
915 rdev->wiphy.wowlan->pattern_min_len > in wiphy_register()
916 rdev->wiphy.wowlan->pattern_max_len))) in wiphy_register()
923 rdev->wiphy.features |= NL80211_FEATURE_SCAN_FLUSH; in wiphy_register()
926 res = device_add(&rdev->wiphy.dev); in wiphy_register()
932 list_add_rcu(&rdev->list, &cfg80211_rdev_list); in wiphy_register()
936 rdev->wiphy.debugfsdir = debugfs_create_dir(wiphy_name(&rdev->wiphy), in wiphy_register()
939 cfg80211_debugfs_rdev_add(rdev); in wiphy_register()
940 nl80211_notify_wiphy(rdev, NL80211_CMD_NEW_WIPHY); in wiphy_register()
986 rdev->wiphy.registered = true; in wiphy_register()
989 res = rfkill_register(rdev->wiphy.rfkill); in wiphy_register()
991 rfkill_destroy(rdev->wiphy.rfkill); in wiphy_register()
992 rdev->wiphy.rfkill = NULL; in wiphy_register()
993 wiphy_unregister(&rdev->wiphy); in wiphy_register()
1003 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in wiphy_rfkill_start_polling() local
1005 if (!rdev->ops->rfkill_poll) in wiphy_rfkill_start_polling()
1007 rdev->rfkill_ops.poll = cfg80211_rfkill_poll; in wiphy_rfkill_start_polling()
1014 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in wiphy_unregister() local
1016 wait_event(rdev->dev_wait, ({ in wiphy_unregister()
1018 wiphy_lock(&rdev->wiphy); in wiphy_unregister()
1019 __count = rdev->opencount; in wiphy_unregister()
1020 wiphy_unlock(&rdev->wiphy); in wiphy_unregister()
1023 if (rdev->wiphy.rfkill) in wiphy_unregister()
1024 rfkill_unregister(rdev->wiphy.rfkill); in wiphy_unregister()
1027 wiphy_lock(&rdev->wiphy); in wiphy_unregister()
1028 nl80211_notify_wiphy(rdev, NL80211_CMD_DEL_WIPHY); in wiphy_unregister()
1029 rdev->wiphy.registered = false; in wiphy_unregister()
1031 WARN_ON(!list_empty(&rdev->wiphy.wdev_list)); in wiphy_unregister()
1037 debugfs_remove_recursive(rdev->wiphy.debugfsdir); in wiphy_unregister()
1038 list_del_rcu(&rdev->list); in wiphy_unregister()
1048 device_del(&rdev->wiphy.dev); in wiphy_unregister()
1050 wiphy_unlock(&rdev->wiphy); in wiphy_unregister()
1053 flush_work(&rdev->scan_done_wk); in wiphy_unregister()
1054 cancel_work_sync(&rdev->conn_work); in wiphy_unregister()
1055 flush_work(&rdev->event_work); in wiphy_unregister()
1056 cancel_delayed_work_sync(&rdev->dfs_update_channels_wk); in wiphy_unregister()
1057 flush_work(&rdev->destroy_work); in wiphy_unregister()
1058 flush_work(&rdev->sched_scan_stop_wk); in wiphy_unregister()
1059 flush_work(&rdev->propagate_radar_detect_wk); in wiphy_unregister()
1060 flush_work(&rdev->propagate_cac_done_wk); in wiphy_unregister()
1061 flush_work(&rdev->mgmt_registrations_update_wk); in wiphy_unregister()
1064 if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup) in wiphy_unregister()
1065 rdev_set_wakeup(rdev, false); in wiphy_unregister()
1067 cfg80211_rdev_free_wowlan(rdev); in wiphy_unregister()
1068 cfg80211_rdev_free_coalesce(rdev); in wiphy_unregister()
1072 void cfg80211_dev_free(struct cfg80211_registered_device *rdev) in cfg80211_dev_free() argument
1076 rfkill_destroy(rdev->wiphy.rfkill); in cfg80211_dev_free()
1077 list_for_each_entry_safe(reg, treg, &rdev->beacon_registrations, list) { in cfg80211_dev_free()
1081 list_for_each_entry_safe(scan, tmp, &rdev->bss_list, list) in cfg80211_dev_free()
1082 cfg80211_put_bss(&rdev->wiphy, &scan->pub); in cfg80211_dev_free()
1083 mutex_destroy(&rdev->wiphy.mtx); in cfg80211_dev_free()
1092 kfree(rcu_dereference_raw(rdev->wiphy.regd)); in cfg80211_dev_free()
1094 kfree(rdev); in cfg80211_dev_free()
1106 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in wiphy_rfkill_set_hw_state_reason() local
1109 schedule_work(&rdev->rfkill_block); in wiphy_rfkill_set_hw_state_reason()
1122 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy); in _cfg80211_unregister_wdev() local
1125 lockdep_assert_held(&rdev->wiphy.mtx); in _cfg80211_unregister_wdev()
1129 nl80211_notify_iface(rdev, wdev, NL80211_CMD_DEL_INTERFACE); in _cfg80211_unregister_wdev()
1141 rdev->devlist_generation++; in _cfg80211_unregister_wdev()
1147 cfg80211_stop_p2p_device(rdev, wdev); in _cfg80211_unregister_wdev()
1150 cfg80211_stop_nan(rdev, wdev); in _cfg80211_unregister_wdev()
1189 void cfg80211_update_iface_num(struct cfg80211_registered_device *rdev, in cfg80211_update_iface_num() argument
1192 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_update_iface_num()
1194 rdev->num_running_ifaces += num; in cfg80211_update_iface_num()
1196 rdev->num_running_monitor_ifaces += num; in cfg80211_update_iface_num()
1199 void __cfg80211_leave(struct cfg80211_registered_device *rdev, in __cfg80211_leave() argument
1205 lockdep_assert_held(&rdev->wiphy.mtx); in __cfg80211_leave()
1212 __cfg80211_leave_ibss(rdev, dev, true); in __cfg80211_leave()
1216 list_for_each_entry_safe(pos, tmp, &rdev->sched_scan_req_list, in __cfg80211_leave()
1219 cfg80211_stop_sched_scan_req(rdev, pos, false); in __cfg80211_leave()
1228 cfg80211_disconnect(rdev, dev, in __cfg80211_leave()
1232 __cfg80211_leave_mesh(rdev, dev); in __cfg80211_leave()
1236 __cfg80211_stop_ap(rdev, dev, true); in __cfg80211_leave()
1239 __cfg80211_leave_ocb(rdev, dev); in __cfg80211_leave()
1257 void cfg80211_leave(struct cfg80211_registered_device *rdev, in cfg80211_leave() argument
1261 __cfg80211_leave(rdev, wdev); in cfg80211_leave()
1268 struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy); in cfg80211_stop_iface() local
1283 queue_work(cfg80211_wq, &rdev->event_work); in cfg80211_stop_iface()
1318 void cfg80211_register_wdev(struct cfg80211_registered_device *rdev, in cfg80211_register_wdev() argument
1322 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_register_wdev()
1332 wdev->identifier = ++rdev->wdev_id; in cfg80211_register_wdev()
1333 list_add_rcu(&wdev->list, &rdev->wiphy.wdev_list); in cfg80211_register_wdev()
1334 rdev->devlist_generation++; in cfg80211_register_wdev()
1338 sysfs_create_link(&wdev->netdev->dev.kobj, &rdev->wiphy.dev.kobj, in cfg80211_register_wdev()
1342 nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE); in cfg80211_register_wdev()
1348 struct cfg80211_registered_device *rdev; in cfg80211_register_netdevice() local
1356 rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_register_netdevice()
1358 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_register_netdevice()
1367 cfg80211_register_wdev(rdev, wdev); in cfg80211_register_netdevice()
1382 struct cfg80211_registered_device *rdev; in cfg80211_netdev_notifier_call() local
1388 rdev = wiphy_to_rdev(wdev->wiphy); in cfg80211_netdev_notifier_call()
1403 wiphy_lock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1404 cfg80211_register_wdev(rdev, wdev); in cfg80211_netdev_notifier_call()
1405 wiphy_unlock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1414 wiphy_lock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1416 wiphy_unlock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1420 wiphy_lock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1421 cfg80211_leave(rdev, wdev); in cfg80211_netdev_notifier_call()
1422 wiphy_unlock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1425 wiphy_lock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1426 cfg80211_update_iface_num(rdev, wdev->iftype, -1); in cfg80211_netdev_notifier_call()
1427 if (rdev->scan_req && rdev->scan_req->wdev == wdev) { in cfg80211_netdev_notifier_call()
1428 if (WARN_ON(!rdev->scan_req->notified && in cfg80211_netdev_notifier_call()
1429 (!rdev->int_scan_req || in cfg80211_netdev_notifier_call()
1430 !rdev->int_scan_req->notified))) in cfg80211_netdev_notifier_call()
1431 rdev->scan_req->info.aborted = true; in cfg80211_netdev_notifier_call()
1432 ___cfg80211_scan_done(rdev, false); in cfg80211_netdev_notifier_call()
1436 &rdev->sched_scan_req_list, list) { in cfg80211_netdev_notifier_call()
1438 cfg80211_stop_sched_scan_req(rdev, pos, false); in cfg80211_netdev_notifier_call()
1441 rdev->opencount--; in cfg80211_netdev_notifier_call()
1442 wiphy_unlock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1443 wake_up(&rdev->dev_wait); in cfg80211_netdev_notifier_call()
1446 wiphy_lock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1447 cfg80211_update_iface_num(rdev, wdev->iftype, 1); in cfg80211_netdev_notifier_call()
1452 cfg80211_ibss_wext_join(rdev, wdev); in cfg80211_netdev_notifier_call()
1455 cfg80211_mgd_wext_connect(rdev, wdev); in cfg80211_netdev_notifier_call()
1469 __cfg80211_join_mesh(rdev, dev, in cfg80211_netdev_notifier_call()
1479 rdev->opencount++; in cfg80211_netdev_notifier_call()
1487 rdev->ops->set_power_mgmt && in cfg80211_netdev_notifier_call()
1488 rdev_set_power_mgmt(rdev, dev, wdev->ps, in cfg80211_netdev_notifier_call()
1493 wiphy_unlock(&rdev->wiphy); in cfg80211_netdev_notifier_call()
1500 if (rfkill_blocked(rdev->wiphy.rfkill)) in cfg80211_netdev_notifier_call()
1518 struct cfg80211_registered_device *rdev; in cfg80211_pernet_exit() local
1521 list_for_each_entry(rdev, &cfg80211_rdev_list, list) { in cfg80211_pernet_exit()
1522 if (net_eq(wiphy_net(&rdev->wiphy), net)) in cfg80211_pernet_exit()
1523 WARN_ON(cfg80211_switch_netns(rdev, &init_net)); in cfg80211_pernet_exit()