struct brcmf_bus {
        u8 type;                /* bus type */
        void *bus_priv;         /* pointer to bus private structure */
+       void *drvr;             /* pointer to driver pub structure brcmf_pub */
        enum brcmf_bus_state state;
 };
 
                              void *pktdata, struct brcmf_event_msg *,
                              void **data_ptr);
 
-extern int brcmf_add_if(struct brcmf_pub *drvr, int ifidx,
+extern int brcmf_add_if(struct device *dev, int ifidx,
                        char *name, u8 *mac_addr);
 extern void brcmf_del_if(struct brcmf_pub *drvr, int ifidx);
 
 
 
                if (ifevent->ifidx > 0 && ifevent->ifidx < BRCMF_MAX_IFS) {
                        if (ifevent->action == BRCMF_E_IF_ADD)
-                               brcmf_add_if(drvr, ifevent->ifidx,
+                               brcmf_add_if(drvr->dev, ifevent->ifidx,
                                             event->ifname,
                                             pvt_data->eth.h_dest);
                        else
 
 };
 
 int
-brcmf_add_if(struct brcmf_pub *drvr, int ifidx, char *name, u8 *mac_addr)
+brcmf_add_if(struct device *dev, int ifidx, char *name, u8 *mac_addr)
 {
        struct brcmf_if *ifp;
        struct net_device *ndev;
+       struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+       struct brcmf_pub *drvr = bus_if->drvr;
 
        brcmf_dbg(TRACE, "idx %d\n", ifidx);
 
        drvr->bus = bus;
        drvr->hdrlen = bus_hdrlen;
        drvr->bus_if = dev_get_drvdata(dev);
+       drvr->bus_if->drvr = drvr;
        drvr->dev = dev;
 
        /* Attach and link in the protocol */
                if (drvr->prot)
                        brcmf_proto_detach(drvr);
 
+               drvr->bus_if->drvr = NULL;
                kfree(drvr);
        }
 }
 
        }
 
        /* add interface and open for business */
-       if (brcmf_add_if(bus->drvr, 0, "wlan%d", NULL)) {
+       if (brcmf_add_if(bus->sdiodev->dev, 0, "wlan%d", NULL)) {
                brcmf_dbg(ERROR, "Add primary net device interface failed!!\n");
                goto fail;
        }