diff options
author | Hante Meuleman <meuleman@broadcom.com> | 2013-02-08 15:54:01 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-02-08 14:51:42 -0500 |
commit | 4b3a89de8a2e91bf873a0044fa62b2f5afb6693a (patch) | |
tree | 54174a2690fbf743efd8975ed010e4545acab0e7 /drivers/net/wireless/brcm80211/brcmfmac/p2p.c | |
parent | dae3a27359adc277ea3b399b8240ce348304289e (diff) |
brcmfmac: Create netdev before returning from add_virtual_intf.
Currently netdev gets created possibly after returning from
add_virtual_intf. This is because add_if is handled asynch. This
is wrong and netdev should be up before returning.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/p2p.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/p2p.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c index fd090745b82..84d6acd9935 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/p2p.c @@ -1591,7 +1591,11 @@ struct wireless_dev *brcmf_p2p_add_vif(struct wiphy *wiphy, const char *name, } strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1); - brcmf_cfg80211_vif_complete(cfg); + err = brcmf_net_attach(ifp, true); + if (err) { + brcmf_err("Registering netdevice failed\n"); + goto fail; + } cfg->p2p.bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = vif; /* Disable firmware roaming for P2P interface */ brcmf_fil_iovar_int_set(ifp, "roam_off", 1); |