• Arend van Spriel's avatar
    brcmfmac: inform cfg80211 when changing the CONNECTED state · 43dffbc6
    Arend van Spriel authored
    Upon unload of the brcmfmac driver it gave a kernel warning because
    cfg80211 still believed to be connected to an AP. The brcmfmac had
    already transitioned to disconnected state during unload. This patch
    adds informing cfg80211 about this transition. This will get rid of
    warning from cfg80211 seen upon module unload:
    
     ------------[ cut here ]------------
     WARNING: CPU: 3 PID: 24303 at net/wireless/core.c:952
    	cfg80211_netdev_notifier_call+0x193/0x640 [cfg80211]()
     Modules linked in: brcmfmac(O-) brcmutil(O) cfg80211(O) ... [last unloaded: bcma]
     CPU: 3 PID: 24303 Comm: rmmod Tainted: G        W  O 3.13.0-rc4-wl-testing-x64-00002-gb472b6d-dirty #1
     Hardware name: Dell Inc. Latitude E6410/07XJP9, BIOS A07 02/15/2011
      00000000000003b8 ffff8800b211faf8 ffffffff815a7fcd 0000000000000007
      0000000000000000 ffff8800b211fb38 ffffffff8104819c ffff880000000000
      ffff8800c889d008 ffff8800b2000220 ffff8800c889a000 ffff8800c889d018
     Call Trace:
      [<ffffffff815a7fcd>] dump_stack+0x46/0x58
      [<ffffffff8104819c>] warn_slowpath_common+0x8c/0xc0
      [<ffffffff810481ea>] warn_slowpath_null+0x1a/0x20
      [<ffffffffa173fd83>] cfg80211_netdev_notifier_call+0x193/0x640 [cfg80211]
      [<ffffffff81521ca8>] ? arp_ifdown+0x18/0x20
      [<ffffffff8152d75a>] ? fib_disable_ip+0x3a/0x50
      [<ffffffff815b143d>] notifier_call_chain+0x4d/0x70
      [<ffffffff8106d6e6>] raw_notifier_call_chain+0x16/0x20
      [<ffffffff814b9ae0>] call_netdevice_notifiers_info+0x40/0x70
      [<ffffffff814b9b26>] call_netdevice_notifiers+0x16/0x20
      [<ffffffff814bb59d>] rollback_registered_many+0x17d/0x280
      [<ffffffff814bb74d>] rollback_registered+0x2d/0x40
      [<ffffffff814bb7c8>] unregister_netdevice_queue+0x68/0xd0
      [<ffffffff814bb9c0>] unregister_netdev+0x20/0x30
      [<ffffffffa180069e>] brcmf_del_if+0xce/0x180 [brcmfmac]
      [<ffffffffa1800b3c>] brcmf_detach+0x6c/0xe0 [brcmfmac]
    Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
    Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
    Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    43dffbc6
wl_cfg80211.c 145 KB