qcacld-3.0: Check for HDD context validity

Check for HDD context validity for SAP Net dev stop ioctl to
resolve crash during SSR.

Change-Id: I09c57da5db4b072a8066f3c2b22c748cd79c293c
CRs-fixed: 2007350
This commit is contained in:
Manikandan Mohan 2017-02-15 14:53:31 -08:00 • committed by qcabuildsw
commit fa7b7fe5d4

View file

@ -297,8 +297,13 @@ static int hdd_hostapd_open(struct net_device *dev)
static int __hdd_hostapd_stop(struct net_device *dev)
{
hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
int ret;
ENTER_DEV(dev);
ret = wlan_hdd_validate_context(hdd_ctx);
if (ret)
return ret;
clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
/* Stop all tx queues */