bcmdhd:fix kernel panic due to early free of ndev
because of http://git-master/r/555458, net_device
structure was moved to some other context, which
eventually was doing free_netdev and an early
release of memory which resulted in kernel panic.
moving free_netdev back to it original context.
However, free_netdev has to be synchronized with
thread wl_event_handler as per Bug
200040067. So,
this syncronization has to be done by semaphore
netif_sem using a writers lock.
This ensures Bug
200040067 also remains fixed
Bug
200040067
Bug
200048503
Change-Id: Ie2c664dc747cac4fba49c5edfe7a818d1bcae7ca
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com>
Reviewed-on: http://git-master/r/562973
Reviewed-by: Dhiren Parmar <dparmar@nvidia.com>