extern struct device *brcmf_bus_get_device(struct brcmf_bus *bus);
/* Stop bus module: clear pending frames, disable data flow */
-extern void brcmf_sdbrcm_bus_stop(struct brcmf_bus *bus, bool enforce_mutex);
+extern void brcmf_sdbrcm_bus_stop(struct brcmf_bus *bus);
/* Initialize bus module: prepare for communication w/dongle */
-extern int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr, bool enforce_mutex);
+extern int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr);
/* Send a data frame to the dongle. Callee disposes of txp. */
extern int brcmf_sdbrcm_bus_txdata(struct brcmf_bus *bus, struct sk_buff *txp);
brcmf_dbg(TRACE, "\n");
/* Bring up the bus */
- ret = brcmf_sdbrcm_bus_init(&drvr_priv->pub, true);
+ ret = brcmf_sdbrcm_bus_init(&drvr_priv->pub);
if (ret != 0) {
brcmf_dbg(ERROR, "brcmf_sdbrcm_bus_init failed %d\n", ret);
return ret;
brcmf_proto_stop(&drvr_priv->pub);
/* Stop the bus module */
- brcmf_sdbrcm_bus_stop(drvr_priv->pub.bus, true);
+ brcmf_sdbrcm_bus_stop(drvr_priv->pub.bus);
}
}
}
if (brcmf_sdbrcm_dpc(bus))
complete(&bus->dpc_wait);
} else {
- brcmf_sdbrcm_bus_stop(bus, true);
+ brcmf_sdbrcm_bus_stop(bus);
}
} else
break;
if (bus->drvr->busstate != BRCMF_BUS_DOWN) {
if (brcmf_sdbrcm_dpc(bus))
tasklet_schedule(&bus->tasklet);
- } else
- brcmf_sdbrcm_bus_stop(bus, true);
+ } else {
+ brcmf_sdbrcm_bus_stop(bus);
+ }
}
static void brcmf_sdbrcm_sched_dpc(struct brcmf_bus *bus)
return ret;
}
-void brcmf_sdbrcm_bus_stop(struct brcmf_bus *bus, bool enforce_mutex)
+void brcmf_sdbrcm_bus_stop(struct brcmf_bus *bus)
{
u32 local_hostintmask;
u8 saveclk;
brcmf_dbg(TRACE, "Enter\n");
- if (enforce_mutex)
- down(&bus->sdsem);
+ down(&bus->sdsem);
bus_wake(bus);
bus->rxskip = false;
bus->tx_seq = bus->rx_seq = 0;
- if (enforce_mutex)
- up(&bus->sdsem);
+ up(&bus->sdsem);
}
-int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr, bool enforce_mutex)
+int brcmf_sdbrcm_bus_init(struct brcmf_pub *drvr)
{
struct brcmf_bus *bus = drvr->bus;
unsigned long timeout;
bus->drvr->tickcnt = 0;
brcmf_sdbrcm_wd_timer(bus, BRCMF_WD_POLL_MS);
- if (enforce_mutex)
- down(&bus->sdsem);
+ down(&bus->sdsem);
/* Make sure backplane clock is on, needed to generate F2 interrupt */
brcmf_sdbrcm_clkctl(bus, CLK_AVAIL, false);
brcmf_sdbrcm_clkctl(bus, CLK_NONE, false);
exit:
- if (enforce_mutex)
- up(&bus->sdsem);
+ up(&bus->sdsem);
return ret;
}