How to hot-plug a wireless network card in Ubuntu

[159990.111599] WARNING: CPU: 3 PID: 66631 at /home/kernel/COD/linux/net/mac80211/driver-ops.h:18 drv_remove_interface+0x121/0x130 [mac80211]
[159990.111600] Modules linked in: snd_usb_audio snd_usbmidi_lib hid_generic usbhid hid acpi_call(OE) tp_smapi(OE) thinkpad_ec(OE) msr ccm devlink xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4 xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 iptable_mangle iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter bridge stp llc overlay binfmt_misc intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass intel_cstate intel_rapl_perf snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep input_leds snd_pcm arc4 wmi_bmof iwldvm serio_raw mac80211 snd_seq_midi
[159990.111639] snd_seq_midi_event thinkpad_acpi nvram snd_rawmidi iwlwifi snd_seq cfg80211 snd_seq_device snd_timer shpchp snd mei_me mei soundcore mac_hid sch_fq_codel cuse parport_pc ppdev lp parport sunrpc ip_tables x_tables autofs4 dm_crypt i915 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc aesni_intel i2c_algo_bit aes_x86_64 drm_kms_helper crypto_simd glue_helper cryptd syscopyarea sysfillrect sysimgblt fb_sys_fops psmouse sdhci_pci ahci e1000e drm libahci i2c_i801 sdhci lpc_ich ptp pps_core wmi video
[159990.111674] CPU: 3 PID: 66631 Comm: kworker/3:0 Tainted: G W OE 4.14.215-0414215-lowlatency #202101122110
[159990.111675] Hardware name: LENOVO 42912XG/42912XG, BIOS 8DET61WW (1.31 ) 04/25/2012
[159990.111691] Workqueue: events_freezable ieee80211_restart_work [mac80211]
[159990.111693] task: ffff99bcc5348000 task.stack: ffffc06282cd4000
[159990.111709] RIP: 0010:drv_remove_interface+0x121/0x130 [mac80211]
[159990.111710] RSP: 0018:ffffc06282cd7cd0 EFLAGS: 00010286
[159990.111712] RAX: 0000000000000036 RBX: ffff99bcc621ece0 RCX: 0000000000000006
[159990.111713] RDX: 0000000000000000 RSI: 0000000000000092 RDI: ffff99bcde2d65d0
[159990.111715] RBP: ffff99bcd2389020 R08: 00000000000005af R09: 0000000000000004
[159990.111716] R10: ffffc06282cd7b00 R11: 0000000000000001 R12: 0000000000000000
[159990.111717] R13: ffff99bcd2388780 R14: ffff99bcc621f3c0 R15: ffff99bcd2388f18
[159990.111719] FS: 0000000000000000(0000) GS:ffff99bcde2c0000(0000) knlGS:0000000000000000
[159990.111720] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[159990.111721] CR2: 0000559a2707d4fe CR3: 000000011fc0a006 CR4: 00000000000606e0
[159990.111722] Call Trace:
[159990.111744] ieee80211_do_stop+0x52d/0x860 [mac80211]
[159990.111751] ? qdisc_reset+0x27/0x70
[159990.111771] ieee80211_stop+0x16/0x20 [mac80211]
[159990.111774] __dev_close_many+0x92/0xf0
[159990.111777] dev_close_many+0x88/0x130
[159990.111780] dev_close.part.86+0x44/0x70
[159990.111802] cfg80211_shutdown_all_interfaces+0x6d/0xb0 [cfg80211]
[159990.111826] ieee80211_reconfig+0x270/0x1160 [mac80211]
[159990.111830] ? try_to_del_timer_sync+0x4d/0x80
[159990.111847] ieee80211_restart_work+0xb2/0xe0 [mac80211]
[159990.111850] process_one_work+0x1d1/0x410
[159990.111853] worker_thread+0x2b/0x3d0
[159990.111855] ? process_one_work+0x410/0x410
[159990.111858] kthread+0x11a/0x130
[159990.111862] ? kthread_create_on_node+0x70/0x70
[159990.111864] ret_from_fork+0x35/0x40
[159990.111867] Code: e8 7a c1 aa c8 e9 49 ff ff ff 48 8b b6 00 04 00 00 48 81 c3 20 04 00 00 48 c7 c7 b8 dd 9c c0 48 85 f6 48 0f 44 f3 e8 9a 2c b9 c8 <0f> 0b 5b 5d 41 5c c3 0f 1f 84 00 00 00 00 00 66 66 66 66 90 41
lspci -nn | grep Centrino

03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [Taylor Peak] [8086:0085] (rev 34)
echo 1 > /sys/bus/pci/devices/0000\:03\:00.0/remove
echo 1 > /sys/bus/pci/rescan

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store