Commit 474a64c8 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

brcm80211: fmac: register primary net device with device mac address

The primary net device was registered with a primary mac address and
upon IFUP it was set to match the actual mac address from the device.
This patch changes that and moves the brcmf_add_if() call to the common
part of the driver.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3625c149
......@@ -1073,6 +1073,11 @@ int brcmf_bus_start(struct device *dev)
if (ret < 0)
return ret;
/* add primary networking interface */
ret = brcmf_add_if(dev, 0, "wlan%d", drvr->mac);
if (ret < 0)
return ret;
/* signal bus ready */
bus_if->state = BRCMF_BUS_DATA;
return 0;
......
......@@ -3948,12 +3948,6 @@ void *brcmf_sdbrcm_probe(u32 regsva, struct brcmf_sdio_dev *sdiodev)
}
}
/* add interface and open for business */
if (brcmf_add_if(bus->sdiodev->dev, 0, "wlan%d", NULL)) {
brcmf_dbg(ERROR, "Add primary net device interface failed!!\n");
goto fail;
}
return bus;
fail:
......
......@@ -1383,14 +1383,6 @@ static int brcmf_usb_probe_cb(struct device *dev, const char *desc,
goto fail;
}
/* add interface and open for business */
ret = brcmf_add_if(dev, 0, "wlan%d", NULL);
if (ret) {
brcmf_dbg(ERROR, "Add primary net device interface failed!!\n");
brcmf_detach(dev);
goto fail;
}
return 0;
fail:
/* Release resources in reverse order */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment