fix assertion failure
authorLawrence Mok <lawrence.mok@amlogic.com>
Wed, 27 Nov 2013 21:35:56 +0000 (13:35 -0800)
committerLawrence Mok <lawrence.mok@amlogic.com>
Wed, 27 Nov 2013 21:35:56 +0000 (13:35 -0800)
broadcm_40181/wl_cfgp2p.c

index 77a23f3b9933159daef724d0a3cede994a18aa75..45246a2ec69f8f7b164fcabdcf193f3ca23c962b 100755 (executable)
@@ -18,6 +18,7 @@
 #include <linux/timer.h>
 #include <linux/if_arp.h>
 #include <asm/uaccess.h>
+#include <net/rtnetlink.h>
 
 #include <bcmutils.h>
 #include <bcmendian.h>
@@ -2629,12 +2630,16 @@ wl_cfgp2p_del_p2p_disc_if(struct wireless_dev *wdev)
 
        WL_TRACE(("Enter\n"));
 
+       rtnl_lock();
+
        cfg80211_unregister_wdev(wdev);
 
        kfree(wdev);
 
        wl->p2p_wdev = NULL;
 
+       rtnl_unlock();
+
        CFGP2P_ERR(("P2P interface unregistered\n"));
 
        return 0;