2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 15:13:55 +08:00
linux-next/drivers/net/wireless/brcm80211/brcmfmac
Arend van Spriel a538ae3189 brcmfmac: inform cfg80211 about disconnect when device is unplugged
When the brcmfmac device is physically removed cfg80211 gives a
warning upon unregistering the net device (see below).

[23052.390197] WARNING: CPU: 0 PID: 30 at net/wireless/core.c:937 cfg80211_netdev_notifier_call+0x164/0x600 [cfg80211]()
[23052.400843] Modules linked in: brcmfmac(O) brcmutil(O) cfg80211(O) pl2303 usbserial binfmt_misc snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_rawmidi snd_seq_midi_event lpc_ich snd_seq snd_timer snd_seq_device snd psmouse mfd_core serio_raw soundcore snd_page_alloc intel_ips dell_laptop dell_wmi sparse_keymap dcdbas nouveau ttm drm_kms_helper drm i2c_algo_bit mxm_wmi ahci libahci sdhci_pci firewire_ohci firewire_core sdhci crc_itu_t mmc_core intel_agp intel_gtt e1000e ptp pps_core agpgart video [last unloaded: brcmfmac]
[23052.452987] CPU: 0 PID: 30 Comm: khubd Tainted: G           O 3.11.0-rc1-wl-testing-lockdep-00002-g41cc093-dirty #1
[23052.463480] Hardware name: Dell Inc. Latitude E6410/07XJP9, BIOS A07 02/15/2011
[23052.470852]  00000000 00000000 f4efdc18 c1522e3d f845bed2 f4efdc48 c103fbe4 c16a9254
[23052.478762]  00000000 0000001e f845bed2 000003a9 f841da44 f841da44 f3790004 f25539c0
[23052.486741]  e2700200 f4efdc58 c103fc22 00000009 00000000 f4efdcc0 f841da44 00000002
[23052.494712] Call Trace:
[23052.497165]  [<c1522e3d>] dump_stack+0x4b/0x66
[23052.501685]  [<c103fbe4>] warn_slowpath_common+0x84/0xa0
[23052.507085]  [<f841da44>] ? cfg80211_netdev_notifier_call+0x164/0x600 [cfg80211]
[23052.514542]  [<f841da44>] ? cfg80211_netdev_notifier_call+0x164/0x600 [cfg80211]
[23052.521981]  [<c103fc22>] warn_slowpath_null+0x22/0x30
[23052.527191]  [<f841da44>] cfg80211_netdev_notifier_call+0x164/0x600 [cfg80211]
[23052.534494]  [<c150abe8>] ? packet_notifier+0xc8/0x1d0
[23052.539703]  [<c150abfc>] ? packet_notifier+0xdc/0x1d0
[23052.544880]  [<c150ab20>] ? packet_seq_stop+0x30/0x30
[23052.550002]  [<c152d655>] notifier_call_chain+0x45/0x60
[23052.555298]  [<c106839f>] raw_notifier_call_chain+0x1f/0x30
[23052.560963]  [<c143c693>] call_netdevice_notifiers_info+0x33/0x70
[23052.567153]  [<c1459869>] ? qdisc_destroy+0x99/0xb0
[23052.572116]  [<c143c6e3>] call_netdevice_notifiers+0x13/0x20
[23052.577861]  [<c143df93>] rollback_registered_many+0xf3/0x1d0
[23052.583687]  [<c1524cfc>] ? mutex_lock_nested+0x25c/0x350
[23052.589150]  [<c143e0f4>] rollback_registered+0x24/0x40
[23052.594445]  [<c143e15f>] unregister_netdevice_queue+0x4f/0xb0
[23052.600344]  [<c143e299>] unregister_netdev+0x19/0x30
[23052.605484]  [<f865b38f>] brcmf_del_if+0xbf/0x160 [brcmfmac]
[23052.611223]  [<f865b7ae>] brcmf_detach+0x5e/0xd0 [brcmfmac]
[23052.616881]  [<f8667413>] brcmf_usb_disconnect+0x63/0xa0 [brcmfmac]
[23052.623217]  [<c13e09aa>] usb_unbind_interface+0x4a/0x180

When the device is physically connected the driver sends a disassoc
command to the device and response triggers the driver to inform cfg80211
about it. However, with the device removed the disassoc command fails.
This patch adds a call to cfg80211_disconnected() when that command fails.

The warning was added by commit below and also cleans up, but better
doing it in the driver if only to get rid of the warning.

commit f9bef3df52
Author: Ben Greear <greearb@candelatech.com>
Date:   Wed Jun 19 14:06:26 2013 -0700

    wireless: check for dangling wdev->current_bss pointer

Cc: Ben Greear <greearb@candelatech.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-07-26 16:59:01 -04:00
..
bcmsdh_sdmmc.c brcmfmac: add sdio sg list support 2013-06-18 14:46:51 -04:00
bcmsdh.c brcmfmac: add broken scatter-gather DMA support 2013-06-27 13:42:18 -04:00
btcoex.c brcmfmac: support critical protocol API for DHCP 2013-04-23 14:16:52 -04:00
btcoex.h brcmfmac: support critical protocol API for DHCP 2013-04-23 14:16:52 -04:00
dhd_bus.h brcmfmac: add optional bus callback definition for tx queue cleanup 2013-04-03 15:07:05 -04:00
dhd_cdc.c brcmfmac: add trace event for capturing BDC header 2013-06-12 15:06:24 -04:00
dhd_common.c brcmfmac: Turn off ARP offloading when configured for AP. 2013-05-28 13:43:08 -04:00
dhd_dbg.c brcmfmac: add debugfs statistics for firmware-signalling 2013-06-12 15:07:44 -04:00
dhd_dbg.h brcmfmac: add debugfs statistics for firmware-signalling 2013-06-12 15:07:44 -04:00
dhd_linux.c brcmfmac: bail out of brcmf_txflowblock_if() for non-netdev interface 2013-07-22 16:04:09 -04:00
dhd_proto.h brcmfmac: add parameter to brcmf_proto_hdrpush() for data offset 2013-03-06 16:28:50 -05:00
dhd_sdio.c brcmfmac: add sdio sg list support 2013-06-18 14:46:51 -04:00
dhd.h brcmfmac: Take bus flowcontrol at credit mgmt into account. 2013-06-12 15:02:16 -04:00
fweh.c brcmfmac: free net device when registration fails 2013-05-28 13:43:09 -04:00
fweh.h brcmfmac: Only use credits for bcmc when firmware indicates it. 2013-06-18 14:46:48 -04:00
fwil_types.h brcmfmac: Turn off ARP offloading when configured for AP. 2013-05-28 13:43:08 -04:00
fwil.c brcmfmac: add hexadecimal trace of message payload 2013-04-08 15:28:43 -04:00
fwil.h brcmfmac: use struct brcmf_if as interface object for fwil functions 2012-10-29 15:28:27 -04:00
fwsignal.c brcmfmac: decrement pending 8021x count upon tx failure 2013-07-22 16:04:09 -04:00
fwsignal.h brcmfmac: Take bus flowcontrol at credit mgmt into account. 2013-06-12 15:02:16 -04:00
Makefile brcmfmac: support critical protocol API for DHCP 2013-04-23 14:16:52 -04:00
p2p.c brcmfmac: use struct net_device::destructor to remove interfaces 2013-05-28 13:43:09 -04:00
p2p.h brcmfmac: Add tx p2p off-channel support. 2013-02-08 14:51:43 -05:00
sdio_chip.c brcmfmac: Add drive strength programming for SDIO 43143. 2013-04-12 14:27:55 -04:00
sdio_chip.h brcmfmac: add support for dongle ARM CR4 core 2013-04-12 14:27:54 -04:00
sdio_host.h brcmfmac: use unified dongle address preparation function 2013-06-27 13:42:17 -04:00
tracepoint.c brcmfmac: introduce tracepoints for message logging 2013-03-06 16:28:31 -05:00
tracepoint.h brcmfmac: add trace event for capturing BDC header 2013-06-12 15:06:24 -04:00
usb_rdl.h brcm80211: fmac: add USB support for bcm43235/6/8 chipsets 2012-02-22 14:48:53 -05:00
usb.c brcmfmac: Take bus flowcontrol at credit mgmt into account. 2013-06-12 15:02:16 -04:00
usb.h brcmfmac: usb suspend/resume. 2012-11-16 14:28:47 -05:00
wl_cfg80211.c brcmfmac: inform cfg80211 about disconnect when device is unplugged 2013-07-26 16:59:01 -04:00
wl_cfg80211.h brcmfmac: add additional parameter to brcmf_free_vif() 2013-05-28 13:43:09 -04:00