#else
irq_flags = IRQF_TRIGGER_FALLING;
#endif /* HW_OOB */
- irq = dhd_customer_oob_irq_map(&irq_flags);
+ irq = brcmf_customer_oob_irq_map(&irq_flags);
if (irq < 0) {
SDLX_MSG(("%s: Host irq is not defined\n", __func__));
return 1;
* Returned structure should have bus and prot pointers filled in.
* bus_hdrlen specifies required headroom for bus module header.
*/
-extern dhd_pub_t *dhd_attach(struct dhd_bus *bus,
+extern dhd_pub_t *brcmf_attach(struct dhd_bus *bus,
uint bus_hdrlen);
-extern int dhd_net_attach(dhd_pub_t *dhdp, int idx);
+extern int brcmf_net_attach(dhd_pub_t *dhdp, int idx);
/* Indication from bus module regarding removal/absence of dongle */
-extern void dhd_detach(dhd_pub_t *dhdp);
+extern void brcmf_detach(dhd_pub_t *dhdp);
/* Indication from bus module to change flow-control state */
-extern void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool on);
+extern void brcmf_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool on);
extern bool brcmf_c_prec_enq(dhd_pub_t *dhdp, struct pktq *q,
struct sk_buff *pkt, int prec);
/* Receive frame for delivery to OS. Callee disposes of rxp. */
-extern void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx,
+extern void brcmf_rx_frame(dhd_pub_t *dhdp, int ifidx,
struct sk_buff *rxp, int numpkt);
/* Return pointer to interface name */
-extern char *dhd_ifname(dhd_pub_t *dhdp, int idx);
+extern char *brcmf_ifname(dhd_pub_t *dhdp, int idx);
/* Request scheduling of the bus dpc */
-extern void dhd_sched_dpc(dhd_pub_t *dhdp);
+extern void brcmf_sched_dpc(dhd_pub_t *dhdp);
/* Notify tx completion */
-extern void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success);
+extern void brcmf_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp,
+ bool success);
/* Query ioctl */
extern int dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf,
uint len);
/* OS independent layer functions */
-extern int dhd_os_proto_block(dhd_pub_t *pub);
-extern int dhd_os_proto_unblock(dhd_pub_t *pub);
-extern int dhd_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition,
+extern int brcmf_os_proto_block(dhd_pub_t *pub);
+extern int brcmf_os_proto_unblock(dhd_pub_t *pub);
+extern int brcmf_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition,
bool *pending);
-extern int dhd_os_ioctl_resp_wake(dhd_pub_t *pub);
-extern unsigned int dhd_os_get_ioctl_resp_timeout(void);
-extern void dhd_os_set_ioctl_resp_timeout(unsigned int timeout_msec);
-extern void *dhd_os_open_image(char *filename);
-extern int dhd_os_get_image_block(char *buf, int len, void *image);
-extern void dhd_os_close_image(void *image);
-extern void dhd_os_wd_timer(void *bus, uint wdtick);
-extern void dhd_os_sdlock(dhd_pub_t *pub);
-extern void dhd_os_sdunlock(dhd_pub_t *pub);
-extern void dhd_os_sdlock_sndup_rxq(dhd_pub_t *pub);
-extern void dhd_customer_gpio_wlan_ctrl(int onoff);
-extern int dhd_custom_get_mac_address(unsigned char *buf);
-extern void dhd_os_sdunlock_sndup_rxq(dhd_pub_t *pub);
-extern void dhd_os_sdlock_eventq(dhd_pub_t *pub);
-extern void dhd_os_sdunlock_eventq(dhd_pub_t *pub);
+extern int brcmf_os_ioctl_resp_wake(dhd_pub_t *pub);
+extern unsigned int brcmf_os_get_ioctl_resp_timeout(void);
+extern void brcmf_os_set_ioctl_resp_timeout(unsigned int timeout_msec);
+extern void *brcmf_os_open_image(char *filename);
+extern int brcmf_os_get_image_block(char *buf, int len, void *image);
+extern void brcmf_os_close_image(void *image);
+extern void brcmf_os_wd_timer(void *bus, uint wdtick);
+extern void brcmf_os_sdlock(dhd_pub_t *pub);
+extern void brcmf_os_sdunlock(dhd_pub_t *pub);
+extern void brcmf_os_sdlock_sndup_rxq(dhd_pub_t *pub);
+extern void brcmf_customer_gpio_wlan_ctrl(int onoff);
+extern int brcmf_custom_get_mac_address(unsigned char *buf);
+extern void brcmf_os_sdunlock_sndup_rxq(dhd_pub_t *pub);
+extern void brcmf_os_sdlock_eventq(dhd_pub_t *pub);
+extern void brcmf_os_sdunlock_eventq(dhd_pub_t *pub);
#ifdef DHD_DEBUG
-extern int write_to_file(dhd_pub_t *dhd, u8 *buf, int size);
+extern int brcmf_write_to_file(dhd_pub_t *dhd, u8 *buf, int size);
#endif /* DHD_DEBUG */
#if defined(OOB_INTR_ONLY)
-extern int dhd_customer_oob_irq_map(unsigned long *irq_flags_ptr);
+extern int brcmf_customer_oob_irq_map(unsigned long *irq_flags_ptr);
#endif /* defined(OOB_INTR_ONLY) */
-extern void dhd_timeout_start(dhd_timeout_t *tmo, uint usec);
-extern int dhd_timeout_expired(dhd_timeout_t *tmo);
+extern void brcmf_timeout_start(dhd_timeout_t *tmo, uint usec);
+extern int brcmf_timeout_expired(dhd_timeout_t *tmo);
-extern int dhd_ifname2idx(struct dhd_info *dhd, char *name);
+extern int brcmf_ifname2idx(struct dhd_info *dhd, char *name);
extern u8 *dhd_bssidx2bssid(dhd_pub_t *dhd, int idx);
extern int brcmf_c_host_event(struct dhd_info *dhd, int *idx, void *pktdata,
brcmf_event_msg_t *, void **data_ptr);
extern void brcmf_c_init(void);
-extern int dhd_add_if(struct dhd_info *dhd, int ifidx, void *handle,
+extern int brcmf_add_if(struct dhd_info *dhd, int ifidx, void *handle,
char *name, u8 *mac_addr, u32 flags, u8 bssidx);
-extern void dhd_del_if(struct dhd_info *dhd, int ifidx);
+extern void brcmf_del_if(struct dhd_info *dhd, int ifidx);
-extern void dhd_vif_add(struct dhd_info *dhd, int ifidx, char *name);
-extern void dhd_vif_del(struct dhd_info *dhd, int ifidx);
+extern void brcmf_vif_add(struct dhd_info *dhd, int ifidx, char *name);
+extern void brcmf_vif_del(struct dhd_info *dhd, int ifidx);
-extern void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx);
-extern void dhd_vif_sendup(struct dhd_info *dhd, int ifidx, unsigned char * cp,
- int len);
+extern void brcmf_event(struct dhd_info *dhd, char *evpkt, int evlen,
+ int ifidx);
+extern void brcmf_vif_sendup(struct dhd_info *dhd, int ifidx,
+ unsigned char *cp, int len);
/* Send packet to dongle via data channel */
-extern int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pkt);
+extern int brcmf_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pkt);
/* Send event to host */
extern void dhd_sendup_event(dhd_pub_t *dhdp, brcmf_event_msg_t *event,
void *data);
-extern int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag);
+extern int brcmf_bus_devreset(dhd_pub_t *dhdp, u8 flag);
extern uint dhd_bus_status(dhd_pub_t *dhdp);
-extern int dhd_bus_start(dhd_pub_t *dhdp);
+extern int brcmf_bus_start(dhd_pub_t *dhdp);
-extern void dhd_wait_for_event(dhd_pub_t *dhd, bool * lockvar);
-extern void dhd_wait_event_wakeup(dhd_pub_t *dhd);
+extern void brcmf_wait_for_event(dhd_pub_t *dhd, bool * lockvar);
+extern void brcmf_wait_event_wakeup(dhd_pub_t *dhd);
#ifdef PKT_FILTER_SUPPORT
extern void brcmf_c_pktfilter_offload_set(dhd_pub_t *dhd, char *arg);
goto retry;
if (id != prot->reqid) {
DHD_ERROR(("%s: %s: unexpected request id %d (expected %d)\n",
- dhd_ifname(dhd, ifidx), __func__, id, prot->reqid));
+ brcmf_ifname(dhd, ifidx), __func__, id,
+ prot->reqid));
ret = -EINVAL;
goto done;
}
if (id != prot->reqid) {
DHD_ERROR(("%s: %s: unexpected request id %d (expected %d)\n",
- dhd_ifname(dhd, ifidx), __func__, id, prot->reqid));
+ brcmf_ifname(dhd, ifidx), __func__, id,
+ prot->reqid));
ret = -EINVAL;
goto done;
}
__func__));
return ret;
}
- dhd_os_proto_block(dhd);
+ brcmf_os_proto_block(dhd);
DHD_TRACE(("%s: Enter\n", __func__));
prot->pending = false;
done:
- dhd_os_proto_unblock(dhd);
+ brcmf_os_proto_unblock(dhd);
return ret;
}
if (((h->flags & BDC_FLAG_VER_MASK) >> BDC_FLAG_VER_SHIFT) !=
BDC_PROTO_VER) {
DHD_ERROR(("%s: non-BDC packet received, flags 0x%x\n",
- dhd_ifname(dhd, *ifidx), h->flags));
+ brcmf_ifname(dhd, *ifidx), h->flags));
return -EBADE;
}
if (h->flags & BDC_FLAG_SUM_GOOD) {
DHD_INFO(("%s: BDC packet received with good rx-csum, "
"flags 0x%x\n",
- dhd_ifname(dhd, *ifidx), h->flags));
+ brcmf_ifname(dhd, *ifidx), h->flags));
PKTSETSUMGOOD(pktbuf, true);
}
DHD_TRACE(("%s: Enter\n", __func__));
- dhd_os_proto_block(dhd);
+ brcmf_os_proto_block(dhd);
/* Get the device MAC address */
strcpy(buf, "cur_etheraddr");
ret = dhdcdc_query_ioctl(dhd, 0, BRCMF_C_GET_VAR, buf, sizeof(buf));
if (ret < 0) {
- dhd_os_proto_unblock(dhd);
+ brcmf_os_proto_unblock(dhd);
return ret;
}
memcpy(dhd->mac, buf, ETH_ALEN);
- dhd_os_proto_unblock(dhd);
+ brcmf_os_proto_unblock(dhd);
#ifdef EMBEDDED_PLATFORM
ret = brcmf_c_preinit_ioctls(dhd);
bcmerror = -ENOLINK;
break;
}
- dhd_os_wd_timer(dhd_pub, (uint) int_val);
+ brcmf_os_wd_timer(dhd_pub, (uint) int_val);
break;
case IOV_GVAL(IOV_DUMP):
break;
case IOV_GVAL(IOV_IOCTLTIMEOUT):{
- int_val = (s32) dhd_os_get_ioctl_resp_timeout();
+ int_val = (s32) brcmf_os_get_ioctl_resp_timeout();
memcpy(arg, &int_val, sizeof(int_val));
break;
}
if (int_val <= 0)
bcmerror = -EINVAL;
else
- dhd_os_set_ioctl_resp_timeout((unsigned int)
+ brcmf_os_set_ioctl_resp_timeout((unsigned int)
int_val);
break;
}
if (ifevent->ifidx > 0 &&
ifevent->ifidx < DHD_MAX_IFS) {
if (ifevent->action == BRCMF_E_IF_ADD)
- dhd_add_if(dhd, ifevent->ifidx,
+ brcmf_add_if(dhd, ifevent->ifidx,
NULL, event->ifname,
pvt_data->eth.h_dest,
ifevent->flags,
ifevent->bssidx);
else
- dhd_del_if(dhd, ifevent->ifidx);
+ brcmf_del_if(dhd, ifevent->ifidx);
} else {
DHD_ERROR(("%s: Invalid ifidx %d for %s\n",
__func__, ifevent->ifidx,
}
}
/* send up the if event: btamp user needs it */
- *ifidx = dhd_ifname2idx(dhd, event->ifname);
+ *ifidx = brcmf_ifname2idx(dhd, event->ifname);
/* push up to external supp/auth */
- dhd_event(dhd, (char *)pvt_data, evlen, *ifidx);
+ brcmf_event(dhd, (char *)pvt_data, evlen, *ifidx);
break;
#ifdef P2P
default:
/* Fall through: this should get _everything_ */
- *ifidx = dhd_ifname2idx(dhd, event->ifname);
+ *ifidx = brcmf_ifname2idx(dhd, event->ifname);
/* push up to external supp/auth */
- dhd_event(dhd, (char *)pvt_data, evlen, *ifidx);
+ brcmf_event(dhd, (char *)pvt_data, evlen, *ifidx);
DHD_TRACE(("%s: MAC event %d, flags %x, status %x\n",
__func__, type, flags, status));
u8 ea_addr[ETH_ALEN];
#endif /* GET_CUSTOM_MAC_ENABLE */
- dhd_os_proto_block(dhd);
+ brcmf_os_proto_block(dhd);
#ifdef GET_CUSTOM_MAC_ENABLE
/* Read MAC address from external customer place
** firmware but unique per board mac address maybe provided by
** customer code
*/
- ret = dhd_custom_get_mac_address(ea_addr);
+ ret = brcmf_custom_get_mac_address(ea_addr);
if (!ret) {
brcmu_mkiovar("cur_etheraddr", (void *)ea_addr, ETH_ALEN,
buf, sizeof(buf));
}
#endif /* PKT_FILTER_SUPPORT */
- dhd_os_proto_unblock(dhd);
+ brcmf_os_proto_unblock(dhd);
return 0;
}
module_param(dhd_oob_gpio_num, int, 0644);
MODULE_PARM_DESC(dhd_oob_gpio_num, "DHD oob gpio number");
-int dhd_customer_oob_irq_map(unsigned long *irq_flags_ptr)
+int brcmf_customer_oob_irq_map(unsigned long *irq_flags_ptr)
{
int host_oob_irq = 0;
#endif /* defined(OOB_INTR_ONLY) */
/* Customer function to control hw specific wlan gpios */
-void dhd_customer_gpio_wlan_ctrl(int onoff)
+void brcmf_customer_gpio_wlan_ctrl(int onoff)
{
switch (onoff) {
case WLAN_RESET_OFF:
#ifdef GET_CUSTOM_MAC_ENABLE
/* Function to get custom MAC address */
-int dhd_custom_get_mac_address(unsigned char *buf)
+int brcmf_custom_get_mac_address(unsigned char *buf)
{
WL_TRACE("%s Enter\n", __func__);
if (!buf)
{
dhd_pub_t *dhdp = &dhd->pub;
- dhd_os_proto_block(dhdp);
+ brcmf_os_proto_block(dhdp);
/* Set flag when early suspend was called */
dhdp->in_suspend = val;
if (!dhdp->suspend_disable_flag)
dhd_set_suspend(val, dhdp);
- dhd_os_proto_unblock(dhdp);
+ brcmf_os_proto_unblock(dhdp);
}
static void dhd_early_suspend(struct early_suspend *h)
* back-off until
* the sleep time reaches one jiffy, then switches over to task delay. Usage:
*
- * dhd_timeout_start(&tmo, usec);
- * while (!dhd_timeout_expired(&tmo))
+ * brcmf_timeout_start(&tmo, usec);
+ * while (!brcmf_timeout_expired(&tmo))
* if (poll_something())
* break;
- * if (dhd_timeout_expired(&tmo))
+ * if (brcmf_timeout_expired(&tmo))
* fatal();
*/
-void dhd_timeout_start(dhd_timeout_t *tmo, uint usec)
+void brcmf_timeout_start(dhd_timeout_t *tmo, uint usec)
{
tmo->limit = usec;
tmo->increment = 0;
tmo->tick = 1000000 / HZ;
}
-int dhd_timeout_expired(dhd_timeout_t *tmo)
+int brcmf_timeout_expired(dhd_timeout_t *tmo)
{
/* Does nothing the first call */
if (tmo->increment == 0) {
return DHD_BAD_IF;
}
-int dhd_ifname2idx(dhd_info_t *dhd, char *name)
+int brcmf_ifname2idx(dhd_info_t *dhd, char *name)
{
int i = DHD_MAX_IFS;
return i; /* default - the primary interface */
}
-char *dhd_ifname(dhd_pub_t *dhdp, int ifidx)
+char *brcmf_ifname(dhd_pub_t *dhdp, int ifidx)
{
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
bufp = buf = kmalloc(buflen, GFP_ATOMIC);
if (!bufp) {
DHD_ERROR(("%s: out of memory for mcast_list, cnt %d\n",
- dhd_ifname(&dhd->pub, ifidx), cnt));
+ brcmf_ifname(&dhd->pub, ifidx), cnt));
return;
}
ret = dhd_prot_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len);
if (ret < 0) {
DHD_ERROR(("%s: set mcast_list failed, cnt %d\n",
- dhd_ifname(&dhd->pub, ifidx), cnt));
+ brcmf_ifname(&dhd->pub, ifidx), cnt));
allmulti = cnt ? true : allmulti;
}
buf = kmalloc(buflen, GFP_ATOMIC);
if (!buf) {
DHD_ERROR(("%s: out of memory for allmulti\n",
- dhd_ifname(&dhd->pub, ifidx)));
+ brcmf_ifname(&dhd->pub, ifidx)));
return;
}
allmulti = cpu_to_le32(allmulti);
if (!brcmu_mkiovar
("allmulti", (void *)&allmulti, sizeof(allmulti), buf, buflen)) {
DHD_ERROR(("%s: mkiovar failed for allmulti, datalen %d "
- "buflen %u\n", dhd_ifname(&dhd->pub, ifidx),
+ "buflen %u\n", brcmf_ifname(&dhd->pub, ifidx),
(int)sizeof(allmulti), buflen));
kfree(buf);
return;
ret = dhd_prot_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len);
if (ret < 0) {
DHD_ERROR(("%s: set allmulti %d failed\n",
- dhd_ifname(&dhd->pub, ifidx),
+ brcmf_ifname(&dhd->pub, ifidx),
le32_to_cpu(allmulti)));
}
ret = dhd_prot_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len);
if (ret < 0) {
DHD_ERROR(("%s: set promisc %d failed\n",
- dhd_ifname(&dhd->pub, ifidx),
+ brcmf_ifname(&dhd->pub, ifidx),
le32_to_cpu(allmulti)));
}
}
if (!brcmu_mkiovar
("cur_etheraddr", (char *)addr, ETH_ALEN, buf, 32)) {
DHD_ERROR(("%s: mkiovar failed for cur_etheraddr\n",
- dhd_ifname(&dhd->pub, ifidx)));
+ brcmf_ifname(&dhd->pub, ifidx)));
return -1;
}
memset(&ioc, 0, sizeof(ioc));
ret = dhd_prot_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len);
if (ret < 0) {
DHD_ERROR(("%s: set cur_etheraddr failed\n",
- dhd_ifname(&dhd->pub, ifidx)));
+ brcmf_ifname(&dhd->pub, ifidx)));
} else {
memcpy(dhd->iflist[ifidx]->net->dev_addr, addr, ETH_ALEN);
}
if (ret == 0) {
strcpy(ifp->net->name, ifp->name);
memcpy(netdev_priv(ifp->net), &dhd, sizeof(dhd));
- err = dhd_net_attach(&dhd->pub, ifp->idx);
+ err = brcmf_net_attach(&dhd->pub, ifp->idx);
if (err != 0) {
DHD_ERROR(("%s: dhd_net_attach failed, "
"err %d\n",
up(&dhd->sysioc_sem);
}
-int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf)
+int brcmf_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf)
{
int ret;
dhd_info_t *dhd = (dhd_info_t *) (dhdp->info);
struct sk_buff *skb2;
DHD_INFO(("%s: insufficient headroom\n",
- dhd_ifname(&dhd->pub, ifidx)));
+ brcmf_ifname(&dhd->pub, ifidx)));
dhd->pub.tx_realloc++;
skb2 = skb_realloc_headroom(skb, dhd->pub.hdrlen);
dev_kfree_skb(skb);
skb = skb2;
if (skb == NULL) {
DHD_ERROR(("%s: skb_realloc_headroom failed\n",
- dhd_ifname(&dhd->pub, ifidx)));
+ brcmf_ifname(&dhd->pub, ifidx)));
ret = -ENOMEM;
goto done;
}
pktbuf = PKTFRMNATIVE(dhd->pub.osh, skb);
if (!pktbuf) {
DHD_ERROR(("%s: PKTFRMNATIVE failed\n",
- dhd_ifname(&dhd->pub, ifidx)));
+ brcmf_ifname(&dhd->pub, ifidx)));
dev_kfree_skb_any(skb);
ret = -ENOMEM;
goto done;
}
- ret = dhd_sendpkt(&dhd->pub, ifidx, pktbuf);
+ ret = brcmf_sendpkt(&dhd->pub, ifidx, pktbuf);
done:
if (ret)
return 0;
}
-void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool state)
+void brcmf_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool state)
{
struct net_device *net;
dhd_info_t *dhd = dhdp->info;
netif_wake_queue(net);
}
-void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf,
+void brcmf_rx_frame(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf,
int numpkt)
{
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
}
}
-void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx)
+void brcmf_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx)
{
/* Linux version has nothing to do */
return;
}
-void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success)
+void brcmf_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success)
{
uint ifidx;
dhd_info_t *dhd = (dhd_info_t *) (dhdp->info);
}
}
-void dhd_sched_dpc(dhd_pub_t *dhdp)
+void brcmf_sched_dpc(dhd_pub_t *dhdp)
{
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
/* Check for older dongle image that doesn't support toe_ol */
if (ret == -EIO) {
DHD_ERROR(("%s: toe not supported by device\n",
- dhd_ifname(&dhd->pub, ifidx)));
+ brcmf_ifname(&dhd->pub, ifidx)));
return -EOPNOTSUPP;
}
DHD_INFO(("%s: could not get toe_ol: ret=%d\n",
- dhd_ifname(&dhd->pub, ifidx), ret));
+ brcmf_ifname(&dhd->pub, ifidx), ret));
return ret;
}
ret = dhd_prot_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len);
if (ret < 0) {
DHD_ERROR(("%s: could not set toe_ol: ret=%d\n",
- dhd_ifname(&dhd->pub, ifidx), ret));
+ brcmf_ifname(&dhd->pub, ifidx), ret));
return ret;
}
ret = dhd_prot_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len);
if (ret < 0) {
DHD_ERROR(("%s: could not set toe: ret=%d\n",
- dhd_ifname(&dhd->pub, ifidx), ret));
+ brcmf_ifname(&dhd->pub, ifidx), ret));
return ret;
}
if (ifidx == 0) { /* do it only for primary eth0 */
/* try to bring up bus */
- ret = dhd_bus_start(&dhd->pub);
+ ret = brcmf_bus_start(&dhd->pub);
if (ret != 0) {
DHD_ERROR(("%s: failed with code %d\n", __func__, ret));
return -1;
}
int
-dhd_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name,
+brcmf_add_if(dhd_info_t *dhd, int ifidx, void *handle, char *name,
u8 *mac_addr, u32 flags, u8 bssidx)
{
dhd_if_t *ifp;
return 0;
}
-void dhd_del_if(dhd_info_t *dhd, int ifidx)
+void brcmf_del_if(dhd_info_t *dhd, int ifidx)
{
dhd_if_t *ifp;
up(&dhd->sysioc_sem);
}
-dhd_pub_t *dhd_attach(struct dhd_bus *bus, uint bus_hdrlen)
+dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen)
{
dhd_info_t *dhd = NULL;
struct net_device *net;
strcat(net->name, "%d");
}
- if (dhd_add_if(dhd, 0, (void *)net, net->name, NULL, 0, 0) ==
+ if (brcmf_add_if(dhd, 0, (void *)net, net->name, NULL, 0, 0) ==
DHD_BAD_IF)
goto fail;
if (net)
free_netdev(net);
if (dhd)
- dhd_detach(&dhd->pub);
+ brcmf_detach(&dhd->pub);
return NULL;
}
-int dhd_bus_start(dhd_pub_t *dhdp)
+int brcmf_bus_start(dhd_pub_t *dhdp)
{
int ret = -1;
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
/* Start the watchdog timer */
dhd->pub.tickcnt = 0;
- dhd_os_wd_timer(&dhd->pub, brcmf_watchdog_ms);
+ brcmf_os_wd_timer(&dhd->pub, brcmf_watchdog_ms);
/* Bring up the bus */
ret = brcmf_sdbrcm_bus_init(&dhd->pub, true);
.ndo_set_multicast_list = dhd_set_multicast_list
};
-int dhd_net_attach(dhd_pub_t *dhdp, int ifidx)
+int brcmf_net_attach(dhd_pub_t *dhdp, int ifidx)
{
dhd_info_t *dhd = (dhd_info_t *) dhdp->info;
struct net_device *net;
}
}
-void dhd_detach(dhd_pub_t *dhdp)
+void brcmf_detach(dhd_pub_t *dhdp)
{
dhd_info_t *dhd;
for (i = 1; i < DHD_MAX_IFS; i++)
if (dhd->iflist[i])
- dhd_del_if(dhd, i);
+ brcmf_del_if(dhd, i);
ifp = dhd->iflist[0];
ASSERT(ifp);
wifi_del_dev();
#endif
/* Call customer gpio to turn off power with WL_REG_ON signal */
- dhd_customer_gpio_wlan_ctrl(WLAN_POWER_OFF);
+ brcmf_customer_gpio_wlan_ctrl(WLAN_POWER_OFF);
}
static int __init dhd_module_init(void)
return -EINVAL;
} while (0);
/* Call customer gpio to turn on power with WL_REG_ON signal */
- dhd_customer_gpio_wlan_ctrl(WLAN_POWER_ON);
+ brcmf_customer_gpio_wlan_ctrl(WLAN_POWER_ON);
#if defined(CUSTOMER_HW2) && defined(CONFIG_WIFI_CONTROL_FUNC)
sema_init(&wifi_control_sem, 0);
failed:
/* turn off power and exit */
- dhd_customer_gpio_wlan_ctrl(WLAN_POWER_OFF);
+ brcmf_customer_gpio_wlan_ctrl(WLAN_POWER_OFF);
return -EINVAL;
}
/*
* OS specific functions required to implement DHD driver in OS independent way
*/
-int dhd_os_proto_block(dhd_pub_t *pub)
+int brcmf_os_proto_block(dhd_pub_t *pub)
{
dhd_info_t *dhd = (dhd_info_t *) (pub->info);
return 0;
}
-int dhd_os_proto_unblock(dhd_pub_t *pub)
+int brcmf_os_proto_unblock(dhd_pub_t *pub)
{
dhd_info_t *dhd = (dhd_info_t *) (pub->info);
return 0;
}
-unsigned int dhd_os_get_ioctl_resp_timeout(void)
+unsigned int brcmf_os_get_ioctl_resp_timeout(void)
{
return (unsigned int)dhd_ioctl_timeout_msec;
}
-void dhd_os_set_ioctl_resp_timeout(unsigned int timeout_msec)
+void brcmf_os_set_ioctl_resp_timeout(unsigned int timeout_msec)
{
dhd_ioctl_timeout_msec = (int)timeout_msec;
}
-int dhd_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition, bool *pending)
+int brcmf_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition, bool *pending)
{
dhd_info_t *dhd = (dhd_info_t *) (pub->info);
DECLARE_WAITQUEUE(wait, current);
return timeout;
}
-int dhd_os_ioctl_resp_wake(dhd_pub_t *pub)
+int brcmf_os_ioctl_resp_wake(dhd_pub_t *pub)
{
dhd_info_t *dhd = (dhd_info_t *) (pub->info);
return 0;
}
-void dhd_os_wd_timer(void *bus, uint wdtick)
+void brcmf_os_wd_timer(void *bus, uint wdtick)
{
dhd_pub_t *pub = bus;
static uint save_dhd_watchdog_ms;
}
}
-void *dhd_os_open_image(char *filename)
+void *brcmf_os_open_image(char *filename)
{
struct file *fp;
return fp;
}
-int dhd_os_get_image_block(char *buf, int len, void *image)
+int brcmf_os_get_image_block(char *buf, int len, void *image)
{
struct file *fp = (struct file *)image;
int rdlen;
return rdlen;
}
-void dhd_os_close_image(void *image)
+void brcmf_os_close_image(void *image)
{
if (!dhd_no_fw_req)
return wl_cfg80211_release_fw();
filp_close((struct file *)image, NULL);
}
-void dhd_os_sdlock(dhd_pub_t *pub)
+void brcmf_os_sdlock(dhd_pub_t *pub)
{
dhd_info_t *dhd;
spin_lock_bh(&dhd->sdlock);
}
-void dhd_os_sdunlock(dhd_pub_t *pub)
+void brcmf_os_sdunlock(dhd_pub_t *pub)
{
dhd_info_t *dhd;
}
}
-void dhd_wait_for_event(dhd_pub_t *dhd, bool *lockvar)
+void brcmf_wait_for_event(dhd_pub_t *dhd, bool *lockvar)
{
struct dhd_info *dhdinfo = dhd->info;
- dhd_os_sdunlock(dhd);
+ brcmf_os_sdunlock(dhd);
wait_event_interruptible_timeout(dhdinfo->ctrl_wait,
(*lockvar == false), HZ * 2);
- dhd_os_sdlock(dhd);
+ brcmf_os_sdlock(dhd);
return;
}
-void dhd_wait_event_wakeup(dhd_pub_t *dhd)
+void brcmf_wait_event_wakeup(dhd_pub_t *dhd)
{
struct dhd_info *dhdinfo = dhd->info;
if (waitqueue_active(&dhdinfo->ctrl_wait))
/* Turning off watchdog */
if (flag)
- dhd_os_wd_timer(&dhd->pub, 0);
+ brcmf_os_wd_timer(&dhd->pub, 0);
- dhd_bus_devreset(&dhd->pub, flag);
+ brcmf_bus_devreset(&dhd->pub, flag);
/* Turning on watchdog back */
if (!flag)
- dhd_os_wd_timer(&dhd->pub, brcmf_watchdog_ms);
+ brcmf_os_wd_timer(&dhd->pub, brcmf_watchdog_ms);
DHD_ERROR(("%s: WLAN OFF DONE\n", __func__));
return 1;
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
if (dhd) {
- dhd_os_proto_block(&dhd->pub);
+ brcmf_os_proto_block(&dhd->pub);
ret = dhd_set_suspend(val, &dhd->pub);
- dhd_os_proto_unblock(&dhd->pub);
+ brcmf_os_proto_unblock(&dhd->pub);
}
#endif /* defined(CONFIG_HAS_EARLYSUSPEND) */
return ret;
* back ON only if suspend_disable_flag was not set
*/
if (dhd && dhd->pub.up) {
- dhd_os_proto_block(&dhd->pub);
+ brcmf_os_proto_block(&dhd->pub);
if (dhd->pub.in_suspend) {
if (!val || (val && !dhd->pub.suspend_disable_flag))
dhd_set_packet_filter(val, &dhd->pub);
}
- dhd_os_proto_unblock(&dhd->pub);
+ brcmf_os_proto_unblock(&dhd->pub);
}
return ret;
}
{
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(ndev);
- dhd_os_wd_timer(&dhd->pub, wdtick);
+ brcmf_os_wd_timer(&dhd->pub, wdtick);
}
#ifdef DHD_DEBUG
-int write_to_file(dhd_pub_t *dhd, u8 *buf, int size)
+int brcmf_write_to_file(dhd_pub_t *dhd, u8 *buf, int size)
{
int ret = 0;
struct file *fp;
/* Early exit if we're already there */
if (bus->clkstate == target) {
if (target == CLK_AVAIL) {
- dhd_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
+ brcmf_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
bus->activity = true;
}
return 0;
brcmf_sdbrcm_sdclk(bus, true);
/* Now request HT Avail on the backplane */
brcmf_sdbrcm_htclk(bus, true, pendok);
- dhd_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
+ brcmf_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
bus->activity = true;
break;
else
DHD_ERROR(("brcmf_sdbrcm_clkctl: request for %d -> %d"
"\n", bus->clkstate, target));
- dhd_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
+ brcmf_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
break;
case CLK_NONE:
brcmf_sdbrcm_htclk(bus, false, false);
/* Now remove the SD clock */
brcmf_sdbrcm_sdclk(bus, false);
- dhd_os_wd_timer(bus->dhd, 0);
+ brcmf_os_wd_timer(bus->dhd, 0);
break;
}
#ifdef DHD_DEBUG
done:
/* restore pkt buffer pointer before calling tx complete routine */
skb_pull(pkt, SDPCM_HDRLEN + pad);
- dhd_os_sdunlock(bus->dhd);
- dhd_txcomplete(bus->dhd, pkt, ret != 0);
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
+ brcmf_txcomplete(bus->dhd, pkt, ret != 0);
+ brcmf_os_sdlock(bus->dhd);
if (free_pkt)
brcmu_pkt_buf_free_skb(pkt);
spin_lock_bh(&bus->txqlock);
if (brcmf_c_prec_enq(bus->dhd, &bus->txq, pkt, prec) == false) {
skb_pull(pkt, SDPCM_HDRLEN);
- dhd_txcomplete(bus->dhd, pkt, false);
+ brcmf_txcomplete(bus->dhd, pkt, false);
brcmu_pkt_buf_free_skb(pkt);
DHD_ERROR(("%s: out of bus->txq !!!\n", __func__));
ret = -ENOSR;
spin_unlock_bh(&bus->txqlock);
if (pktq_len(&bus->txq) >= TXHI)
- dhd_txflowcontrol(bus->dhd, 0, ON);
+ brcmf_txflowcontrol(bus->dhd, 0, ON);
#ifdef DHD_DEBUG
if (pktq_plen(&bus->txq, prec) > qcount[prec])
/* Schedule DPC if needed to send queued packet(s) */
if (dhd_deferred_tx && !bus->dpc_sched) {
bus->dpc_sched = true;
- dhd_sched_dpc(bus->dhd);
+ brcmf_sched_dpc(bus->dhd);
}
} else {
/* Lock: we're about to use shared data/code (and SDIO) */
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
/* Otherwise, send it now */
BUS_WAKE(bus);
brcmf_sdbrcm_clkctl(bus, CLK_NONE, true);
}
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
}
return ret;
/* Deflow-control stack if needed */
if (dhd->up && (dhd->busstate == DHD_BUS_DATA) &&
dhd->txoff && (pktq_len(&bus->txq) < TXLOW))
- dhd_txflowcontrol(dhd, 0, OFF);
+ brcmf_txflowcontrol(dhd, 0, OFF);
return cnt;
}
ASSERT(IS_ALIGNED((unsigned long)frame, 2));
/* Need to lock here to protect txseq and SDIO tx calls */
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
BUS_WAKE(bus);
bus->ctrl_frame_buf = frame;
bus->ctrl_frame_len = len;
- dhd_wait_for_event(bus->dhd, &bus->ctrl_frame_stat);
+ brcmf_wait_for_event(bus->dhd, &bus->ctrl_frame_stat);
if (bus->ctrl_frame_stat == false) {
DHD_INFO(("%s: ctrl_frame_stat == false\n", __func__));
brcmf_sdbrcm_clkctl(bus, CLK_NONE, true);
}
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
if (ret)
bus->dhd->tx_ctlerrs++;
return -EIO;
/* Wait until control frame is available */
- timeleft = dhd_os_ioctl_resp_wait(bus->dhd, &bus->rxlen, &pending);
+ timeleft = brcmf_os_ioctl_resp_wait(bus->dhd, &bus->rxlen, &pending);
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
rxlen = bus->rxlen;
memcpy(msg, bus->rxctl, min(msglen, rxlen));
bus->rxlen = 0;
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
if (rxlen) {
DHD_CTL(("%s: resumed on rxctl frame, got %d expected %d\n",
} else if (timeleft == 0) {
DHD_ERROR(("%s: resumed on timeout\n", __func__));
#ifdef DHD_DEBUG
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
brcmf_sdbrcm_checkdied(bus, NULL, 0);
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
#endif /* DHD_DEBUG */
} else if (pending == true) {
DHD_CTL(("%s: cancelled\n", __func__));
} else {
DHD_CTL(("%s: resumed for unknown reason?\n", __func__));
#ifdef DHD_DEBUG
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
brcmf_sdbrcm_checkdied(bus, NULL, 0);
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
#endif /* DHD_DEBUG */
}
printk(KERN_DEBUG "Done\n");
/* free buf before return !!! */
- if (write_to_file(bus->dhd, buf, bus->ramsize)) {
+ if (brcmf_write_to_file(bus->dhd, buf, bus->ramsize)) {
DHD_ERROR(("%s: Error writing to files\n", __func__));
return -1;
}
- /* buf free handled in write_to_file, not here */
+ /* buf free handled in brcmf_write_to_file, not here */
return 0;
}
bool_val = (int_val != 0) ? true : false;
/* Some ioctls use the bus */
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
/* Check if dongle is in reset. If so, only allow DEVRESET iovars */
if (bus->dhd->dongle_reset && !(actionid == IOV_SVAL(IOV_DEVRESET) ||
__func__, bool_val, bus->dhd->dongle_reset,
bus->dhd->busstate));
- dhd_bus_devreset(bus->dhd, (u8) bool_val);
+ brcmf_bus_devreset(bus->dhd, (u8) bool_val);
break;
brcmf_sdbrcm_clkctl(bus, CLK_NONE, true);
}
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
if (actionid == IOV_SVAL(IOV_DEVRESET) && bool_val == false)
brcmf_c_preinit_ioctls((dhd_pub_t *) bus->dhd);
/* Look up var locally; if not found pass to host driver */
vi = brcmu_iovar_lookup(dhdsdio_iovars, name);
if (vi == NULL) {
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
BUS_WAKE(bus);
brcmf_sdbrcm_clkctl(bus, CLK_NONE, true);
}
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
goto exit;
}
DHD_TRACE(("%s: Enter\n", __func__));
if (enforce_mutex)
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
BUS_WAKE(bus);
/* Clear rx control and wake any waiters */
bus->rxlen = 0;
- dhd_os_ioctl_resp_wake(bus->dhd);
+ brcmf_os_ioctl_resp_wake(bus->dhd);
/* Reset some F2 state stuff */
bus->rxskip = false;
bus->tx_seq = bus->rx_seq = 0;
if (enforce_mutex)
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
}
int brcmf_sdbrcm_bus_init(dhd_pub_t *dhdp, bool enforce_mutex)
return 0;
if (enforce_mutex)
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
/* Make sure backplane clock is on, needed to generate F2 interrupt */
brcmf_sdbrcm_clkctl(bus, CLK_AVAIL, false);
NULL);
/* Give the dongle some time to do its thing and set IOR2 */
- dhd_timeout_start(&tmo, DHD_WAIT_F2RDY * 1000);
+ brcmf_timeout_start(&tmo, DHD_WAIT_F2RDY * 1000);
ready = 0;
- while (ready != enable && !dhd_timeout_expired(&tmo))
+ while (ready != enable && !brcmf_timeout_expired(&tmo))
ready =
brcmf_sdcard_cfg_read(bus->sdh, SDIO_FUNC_0, SDIO_CCCR_IORx,
NULL);
exit:
if (enforce_mutex)
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
return ret;
}
done:
/* Awake any waiters */
- dhd_os_ioctl_resp_wake(bus->dhd);
+ brcmf_os_ioctl_resp_wake(bus->dhd);
}
static u8 brcmf_sdbrcm_rxglom(dhd_bus_t *bus, u8 rxseq)
#endif /* DHD_DEBUG */
}
if (num) {
- dhd_os_sdunlock(bus->dhd);
- dhd_rx_frame(bus->dhd, ifidx, save_pfirst, num);
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
+ brcmf_rx_frame(bus->dhd, ifidx, save_pfirst, num);
+ brcmf_os_sdlock(bus->dhd);
}
bus->rxglomframes++;
}
/* Unlock during rx call */
- dhd_os_sdunlock(bus->dhd);
- dhd_rx_frame(bus->dhd, ifidx, pkt, 1);
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
+ brcmf_rx_frame(bus->dhd, ifidx, pkt, 1);
+ brcmf_os_sdlock(bus->dhd);
}
rxcount = maxframes - rxleft;
#ifdef DHD_DEBUG
/* Start with leftover status bits */
intstatus = bus->intstatus;
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
/* If waiting for HTAVAIL, check status */
if (bus->clkstate == CLK_PENDING) {
DHD_INFO(("Return_dpc value is : %d\n", ret));
bus->ctrl_frame_stat = false;
- dhd_wait_event_wakeup(bus->dhd);
+ brcmf_wait_event_wakeup(bus->dhd);
}
/* Send queued frames (limit 1 if rx may still be pending) */
else if ((bus->clkstate == CLK_AVAIL) && !bus->fcstate &&
brcmf_sdbrcm_clkctl(bus, CLK_NONE, false);
}
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
return resched;
}
;
#else
bus->dpc_sched = true;
- dhd_sched_dpc(bus->dhd);
+ brcmf_sched_dpc(bus->dhd);
#endif
}
if (bus->sleeping)
return false;
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
/* Poll period: check device if appropriate. */
if (bus->poll && (++bus->polltick >= bus->pollrate)) {
brcmf_sdcard_intr_disable(bus->sdh);
bus->dpc_sched = true;
- dhd_sched_dpc(bus->dhd);
+ brcmf_sched_dpc(bus->dhd);
}
}
bus->idlecount = 0;
if (bus->activity) {
bus->activity = false;
- dhd_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
+ brcmf_os_wd_timer(bus->dhd, brcmf_watchdog_ms);
} else {
brcmf_sdbrcm_clkctl(bus, CLK_NONE, false);
}
}
}
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
return bus->ipend;
}
return -ENOTSUPP;
/* Exclusive bus access */
- dhd_os_sdlock(bus->dhd);
+ brcmf_os_sdlock(bus->dhd);
/* Don't allow input if dongle is in reset */
if (bus->dhd->dongle_reset) {
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
return -EPERM;
}
brcmf_sdbrcm_clkctl(bus, CLK_NONE, true);
}
- dhd_os_sdunlock(bus->dhd);
+ brcmf_os_sdunlock(bus->dhd);
return rv;
}
spin_lock_init(&bus->txqlock);
/* Attach to the dhd/OS/network interface */
- bus->dhd = dhd_attach(bus, SDPCM_RESERVE);
+ bus->dhd = brcmf_attach(bus, SDPCM_RESERVE);
if (!bus->dhd) {
DHD_ERROR(("%s: dhd_attach failed\n", __func__));
goto fail;
DHD_INFO(("%s: completed!!\n", __func__));
/* if firmware path present try to download and bring up bus */
- ret = dhd_bus_start(bus->dhd);
+ ret = brcmf_bus_start(bus->dhd);
if (ret != 0) {
if (ret == -ENOLINK) {
DHD_ERROR(("%s: dongle is not responding\n", __func__));
}
}
/* Ok, have the per-port tell the stack we're open for business */
- if (dhd_net_attach(bus->dhd, 0) != 0) {
+ if (brcmf_net_attach(bus->dhd, 0) != 0) {
DHD_ERROR(("%s: Net attach failed!!\n", __func__));
goto fail;
}
brcmf_sdcard_intr_dereg(bus->sdh);
if (bus->dhd) {
- dhd_detach(bus->dhd);
+ brcmf_detach(bus->dhd);
brcmf_sdbrcm_release_dongle(bus);
bus->dhd = NULL;
}
DHD_INFO(("%s: download firmware %s\n", __func__, brcmf_fw_path));
- image = dhd_os_open_image(fw_path);
+ image = brcmf_os_open_image(fw_path);
if (image == NULL)
goto err;
/* Download image */
while ((len =
- dhd_os_get_image_block((char *)memptr, MEMBLOCK, image))) {
+ brcmf_os_get_image_block((char *)memptr, MEMBLOCK, image))) {
bcmerror = brcmf_sdbrcm_membytes(bus, true, offset, memptr,
len);
if (bcmerror) {
kfree(memblock);
if (image)
- dhd_os_close_image(image);
+ brcmf_os_close_image(image);
return bcmerror;
}
return 0;
if (nvram_file_exists) {
- image = dhd_os_open_image(nv_path);
+ image = brcmf_os_open_image(nv_path);
if (image == NULL)
goto err;
}
/* Download variables */
if (nvram_file_exists) {
- len = dhd_os_get_image_block(memblock, MEMBLOCK, image);
+ len = brcmf_os_get_image_block(memblock, MEMBLOCK, image);
} else {
len = strlen(bus->nvram_params);
ASSERT(len <= MEMBLOCK);
kfree(memblock);
if (image)
- dhd_os_close_image(image);
+ brcmf_os_close_image(image);
return bcmerror;
}
return SDPCM_HDRLEN;
}
-int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag)
+int brcmf_bus_devreset(dhd_pub_t *dhdp, u8 flag)
{
int bcmerror = 0;
dhd_bus_t *bus;