diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2011-10-20 13:45:57 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:39:13 -0800 |
commit | f0b8fc78abc411e7cbf33adea9a277e59a5f6746 (patch) | |
tree | 196d1e43e7fcec9366a3973ac452e467d99f7d84 /drivers/net | |
parent | d3ca706d5f4e5f8735328b2fbc13d7df3e756384 (diff) |
net: wireless: bcmdhd: Fix crash in p2p OFF
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/bcmdhd/dhd_linux.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/bcmdhd/wl_cfg80211.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index 193625c8ccf6..5a96116501c7 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -1076,7 +1076,8 @@ _dhd_sysioc_thread(void *data) in_ap = (ap_net_dev != NULL); dhd_os_spin_unlock(&dhd->pub, flags); #endif /* SOFTAP */ - if (dhd->iflist[i]->state) + + if (dhd->iflist[i] && dhd->iflist[i]->state) dhd_op_if(dhd->iflist[i]); if (dhd->iflist[i] == NULL) { @@ -1084,6 +1085,7 @@ _dhd_sysioc_thread(void *data) "!\n\n", __FUNCTION__, i)); continue; } + #ifdef SOFTAP if (in_ap && dhd->set_macaddress) { DHD_TRACE(("attempt to set MAC for %s in AP Mode," diff --git a/drivers/net/wireless/bcmdhd/wl_cfg80211.c b/drivers/net/wireless/bcmdhd/wl_cfg80211.c index d269172a7711..6a3003244261 100644 --- a/drivers/net/wireless/bcmdhd/wl_cfg80211.c +++ b/drivers/net/wireless/bcmdhd/wl_cfg80211.c @@ -1135,8 +1135,7 @@ wl_cfg80211_notify_ifdel(struct net_device *net) { struct wl_priv *wl = wlcfg_drv_priv; - - if (wl->p2p->vif_created) { + if (wl->p2p && wl->p2p->vif_created) { s32 index = 0; WL_DBG(("IF_DEL event called from dongle, net %x, vif name: %s\n", (unsigned int)net, wl->p2p->vir_ifname)); |