Skip to content

Commit

Permalink
net: wireless: bcmdhd: Fix crash in p2p OFF
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
  • Loading branch information
Dmitry Shmidt authored and renaudallard committed Nov 16, 2011
1 parent ab78dc7 commit 5abaa95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion drivers/net/wireless/bcmdhd/dhd_linux.c
Expand Up @@ -1076,14 +1076,16 @@ _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) {
DHD_TRACE(("\n\n %s: interface %d just been removed,"
"!\n\n", __FUNCTION__, i));
continue;
}

#ifdef SOFTAP
if (in_ap && dhd->set_macaddress) {
DHD_TRACE(("attempt to set MAC for %s in AP Mode,"
Expand Down
3 changes: 1 addition & 2 deletions drivers/net/wireless/bcmdhd/wl_cfg80211.c
Expand Up @@ -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));
Expand Down

0 comments on commit 5abaa95

Please sign in to comment.