Commit 1f660b9c authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: removed occurrences of 'dhd'

DHD is a Broadcom internal term and has been replaced by BRCMF.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8fbc6dda
......@@ -18,8 +18,8 @@
* Common types *
*/
#ifndef _dhd_h_
#define _dhd_h_
#ifndef _BRCMF_H_
#define _BRCMF_H_
#define BRCMF_VERSION_STR "4.218.248.5"
......@@ -310,10 +310,10 @@ struct brcmf_event {
#define BRCMF_E_LINK_BSSCFG_DIS 4
/* The level of bus communication with the dongle */
enum dhd_bus_state {
DHD_BUS_DOWN, /* Not ready for frame transfers */
DHD_BUS_LOAD, /* Download access only (CPU reset) */
DHD_BUS_DATA /* Ready for frame transfers */
enum brcmf_bus_state {
BRCMF_BUS_DOWN, /* Not ready for frame transfers */
BRCMF_BUS_LOAD, /* Download access only (CPU reset) */
BRCMF_BUS_DATA /* Ready for frame transfers */
};
/* Pattern matching filter. Specifies an offset within received packets to
......@@ -533,12 +533,12 @@ struct brcmf_pub {
struct brcmf_proto *prot;
struct brcmf_info *info;
/* Internal dhd items */
/* Internal brcmf items */
bool up; /* Driver up/down (to OS) */
bool txoff; /* Transmit flow-controlled */
bool dongle_reset; /* true = DEVRESET put dongle into reset */
enum dhd_bus_state busstate;
uint hdrlen; /* Total DHD header length (proto + bus) */
enum brcmf_bus_state busstate;
uint hdrlen; /* Total BRCMF header length (proto + bus) */
uint maxctl; /* Max size rxctl request from proto to bus */
uint rxsz; /* Rx buffer size bus module should use */
u8 wme_dp; /* wme discard priority */
......@@ -564,7 +564,7 @@ struct brcmf_pub {
unsigned long rx_dropped; /* Packets dropped locally (no memory) */
unsigned long rx_flushed; /* Packets flushed due to
unscheduled sendup thread */
unsigned long wd_dpc_sched; /* Number of times dhd dpc scheduled by
unsigned long wd_dpc_sched; /* Number of times dpc scheduled by
watchdog timer */
unsigned long rx_readahead_cnt; /* Number of packets where header read-ahead
......@@ -744,10 +744,6 @@ static inline void MUTEX_UNLOCK_WL_SCAN_SET(void)
{
}
/*
* Exported from dhd OS modules (dhd_linux/dhd_ndis)
*/
/* Indication from bus module regarding presence/insertion of dongle.
* Return struct brcmf_pub pointer, used as handle to OS module in later calls.
* Returned structure should have bus and prot pointers filled in.
......@@ -902,4 +898,4 @@ struct brcmf_pktgen {
#define BRCMF_IDLE_ACTIVE 0 /* Do not request any SD clock change
when idle */
#endif /* _dhd_h_ */
#endif /* _BRCMF_H_ */
......@@ -14,8 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _dhd_bus_h_
#define _dhd_bus_h_
#ifndef _BRCMF_BUS_H_
#define _BRCMF_BUS_H_
/* Packet alignment for most efficient SDIO (can change based on platform) */
#ifndef BRCMF_SDALIGN
......@@ -26,7 +26,7 @@
#endif
/*
* Exported from dhd bus module (dhd_usb, dhd_sdio)
* Exported from brcmf bus module (brcmf_usb, brcmf_sdio)
*/
/* Watchdog timer interval */
......@@ -68,4 +68,4 @@ extern void brcmf_bus_clearcounts(struct brcmf_pub *drvr);
extern void brcmf_sdbrcm_wd_timer(struct brcmf_bus *bus, uint wdtick);
#endif /* _dhd_bus_h_ */
#endif /* _BRCMF_BUS_H_ */
......@@ -82,7 +82,6 @@ struct brcmf_proto_bdc_header {
#define RETRIES 2 /* # of retries to retrieve matching ioctl response */
#define BUS_HEADER_LEN (16+BRCMF_SDALIGN) /* Must be atleast SDPCM_RESERVE
* defined in dhd_sdio.c
* (amount of header tha might be added)
* plus any space that might be needed
* for alignment padding.
......@@ -176,8 +175,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,
ret = brcmf_proto_cdc_msg(drvr);
if (ret < 0) {
DHD_ERROR(("dhdcdc_query_ioctl: dhdcdc_msg failed w/status "
"%d\n", ret));
DHD_ERROR(("brcmf_proto_cdc_query_ioctl: brcmf_proto_cdc_msg "
"failed w/status %d\n", ret));
goto done;
}
......@@ -280,7 +279,7 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
struct brcmf_proto *prot = drvr->prot;
int ret = -1;
if (drvr->busstate == DHD_BUS_DOWN) {
if (drvr->busstate == BRCMF_BUS_DOWN) {
DHD_ERROR(("%s : bus is down. we have nothing to do\n",
__func__));
return ret;
......
......@@ -118,7 +118,7 @@ static int brcmf_c_dump(struct brcmf_pub *drvr, char *buf, int buflen)
brcmu_binit(strbuf, buf, buflen);
/* Base DHD info */
/* Base info */
brcmu_bprintf(strbuf, "%s\n", brcmf_version);
brcmu_bprintf(strbuf, "\n");
brcmu_bprintf(strbuf, "pub.up %d pub.txoff %d pub.busstate %d\n",
......@@ -672,7 +672,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
if (hdr.version != MSGTRACE_VERSION) {
DHD_ERROR(
("\nMACEVENT: %s [unsupported version --> "
"dhd version:%d dongle version:%d]\n",
"brcmf version:%d dongle version:%d]\n",
event_name, MSGTRACE_VERSION, hdr.version)
);
/* Reset datalen to avoid display below */
......
......@@ -14,8 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _dhd_dbg_
#define _dhd_dbg_
#ifndef _BRCMF_DBG_H_
#define _BRCMF_DBG_H_
#if defined(BCMDBG)
......@@ -73,4 +73,4 @@
extern int brcmf_msg_level;
#endif /* _dhd_dbg_ */
#endif /* _BRCMF_DBG_H_ */
......@@ -50,7 +50,6 @@ u32 g_assert_type;
#if defined(CONFIG_PM_SLEEP)
#include <linux/suspend.h>
atomic_t brcmf_mmc_suspend;
DECLARE_WAIT_QUEUE_HEAD(dhd_dpc_wait);
#endif /* defined(CONFIG_PM_SLEEP) */
MODULE_AUTHOR("Broadcom Corporation");
......@@ -175,13 +174,6 @@ uint brcmf_pktgen_len;
module_param(brcmf_pktgen_len, uint, 0);
#endif
/* Version string to report */
#ifdef BCMDBG
#define DHD_COMPILED "\nCompiled in " SRCBASE
#else
#define DHD_COMPILED
#endif
static int brcmf_toe_get(struct brcmf_info *drvr_priv, int idx, u32 *toe_ol);
static int brcmf_toe_set(struct brcmf_info *drvr_priv, int idx, u32 toe_ol);
static int brcmf_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata,
......@@ -274,7 +266,7 @@ static void brcmf_early_suspend(struct early_suspend *h)
DHD_TRACE(("%s: enter\n", __func__));
if (drvr_priv)
dhd_suspend_resume_helper(drvr_priv, 1);
brcmf_suspend_resume_helper(drvr_priv, 1);
}
......@@ -286,7 +278,7 @@ static void brcmf_late_resume(struct early_suspend *h)
DHD_TRACE(("%s: enter\n", __func__));
if (drvr_priv)
dhd_suspend_resume_helper(drvr_priv, 0);
brcmf_suspend_resume_helper(drvr_priv, 0);
}
#endif /* defined(CONFIG_HAS_EARLYSUSPEND) */
......@@ -589,7 +581,7 @@ static void brcmf_op_if(struct brcmf_if *ifp)
memcpy(netdev_priv(ifp->net), &drvr_priv, sizeof(drvr_priv));
err = brcmf_net_attach(&drvr_priv->pub, ifp->idx);
if (err != 0) {
DHD_ERROR(("%s: dhd_net_attach failed, "
DHD_ERROR(("%s: brcmf_net_attach failed, "
"err %d\n",
__func__, err));
ret = -EOPNOTSUPP;
......@@ -741,7 +733,7 @@ int brcmf_sendpkt(struct brcmf_pub *drvr, int ifidx, struct sk_buff *pktbuf)
struct brcmf_info *drvr_priv = drvr->info;
/* Reject if down */
if (!drvr->up || (drvr->busstate == DHD_BUS_DOWN))
if (!drvr->up || (drvr->busstate == BRCMF_BUS_DOWN))
return -ENODEV;
/* Update multicast statistic */
......@@ -771,7 +763,7 @@ static int brcmf_netdev_start_xmit(struct sk_buff *skb, struct net_device *net)
DHD_TRACE(("%s: Enter\n", __func__));
/* Reject if down */
if (!drvr_priv->pub.up || (drvr_priv->pub.busstate == DHD_BUS_DOWN)) {
if (!drvr_priv->pub.up || (drvr_priv->pub.busstate == BRCMF_BUS_DOWN)) {
DHD_ERROR(("%s: xmit rejected pub.up=%d busstate=%d\n",
__func__, drvr_priv->pub.up, drvr_priv->pub.busstate));
netif_stop_queue(net);
......@@ -1087,7 +1079,7 @@ static int brcmf_ethtool(struct brcmf_info *drvr_priv, void *uaddr)
memset(&info, 0, sizeof(info));
info.cmd = cmd;
/* if dhd requested, identify ourselves */
/* if requested, identify ourselves */
if (strcmp(drvname, "?dhd") == 0) {
sprintf(info.driver, "dhd");
strcpy(info.version, BRCMF_VERSION_STR);
......@@ -1225,7 +1217,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
}
}
/* To differentiate between wl and dhd read 4 more byes */
/* To differentiate read 4 more byes */
if ((copy_from_user(&driver, (char *)ifr->ifr_data +
sizeof(struct brcmf_ioctl), sizeof(uint)) != 0)) {
bcmerror = -EINVAL;
......@@ -1237,7 +1229,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
goto done;
}
/* check for local dhd ioctl and handle it */
/* check for local brcmf ioctl and handle it */
if (driver == BRCMF_IOCTL_MAGIC) {
bcmerror = brcmf_c_ioctl((void *)&drvr_priv->pub, &ioc, buf, buflen);
if (bcmerror)
......@@ -1246,7 +1238,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
}
/* send to dongle (must be up, and wl) */
if ((drvr_priv->pub.busstate != DHD_BUS_DATA)) {
if ((drvr_priv->pub.busstate != BRCMF_BUS_DATA)) {
DHD_ERROR(("%s DONGLE_DOWN,__func__\n", __func__));
bcmerror = -EIO;
goto done;
......@@ -1362,7 +1354,7 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle, char *name,
if (!ifp) {
ifp = kmalloc(sizeof(struct brcmf_if), GFP_ATOMIC);
if (!ifp) {
DHD_ERROR(("%s: OOM - struct dhd_if\n", __func__));
DHD_ERROR(("%s: OOM - struct brcmf_if\n", __func__));
return -ENOMEM;
}
}
......@@ -1421,7 +1413,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
/* Allocate primary brcmf_info */
drvr_priv = kzalloc(sizeof(struct brcmf_info), GFP_ATOMIC);
if (!drvr_priv) {
DHD_ERROR(("%s: OOM - alloc dhd_info\n", __func__));
DHD_ERROR(("%s: OOM - alloc brcmf_info\n", __func__));
goto fail;
}
......@@ -1460,7 +1452,7 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
/* Attach and link in the protocol */
if (brcmf_proto_attach(&drvr_priv->pub) != 0) {
DHD_ERROR(("dhd_prot_attach failed\n"));
DHD_ERROR(("brcmf_proto_attach failed\n"));
goto fail;
}
......@@ -1473,10 +1465,10 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
if (brcmf_sysioc) {
sema_init(&drvr_priv->sysioc_sem, 0);
drvr_priv->sysioc_tsk = kthread_run(_brcmf_sysioc_thread, drvr_priv,
"_dhd_sysioc");
"_brcmf_sysioc");
if (IS_ERR(drvr_priv->sysioc_tsk)) {
printk(KERN_WARNING
"_dhd_sysioc thread failed to start\n");
"_brcmf_sysioc thread failed to start\n");
drvr_priv->sysioc_tsk = NULL;
}
} else
......@@ -1493,7 +1485,6 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen)
#if defined(CONFIG_PM_SLEEP)
atomic_set(&brcmf_mmc_suspend, false);
#endif /* defined(CONFIG_PM_SLEEP) */
/* && defined(DHD_GPL) */
/* Init lock suspend to prevent kernel going to suspend */
#ifdef CONFIG_HAS_EARLYSUSPEND
drvr_priv->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20;
......@@ -1533,7 +1524,7 @@ int brcmf_bus_start(struct brcmf_pub *drvr)
}
/* If bus is not ready, can't come up */
if (drvr_priv->pub.busstate != DHD_BUS_DATA) {
if (drvr_priv->pub.busstate != BRCMF_BUS_DATA) {
DHD_ERROR(("%s failed bus is not ready\n", __func__));
return -ENODEV;
}
......@@ -1703,7 +1694,6 @@ void brcmf_detach(struct brcmf_pub *drvr)
brcmf_cfg80211_detach();
/* && defined(DHD_GPL) */
free_netdev(ifp->net);
kfree(ifp);
kfree(drvr_priv);
......@@ -1727,7 +1717,7 @@ static int __init brcmf_module_init(void)
error = brcmf_bus_register();
if (error) {
DHD_ERROR(("%s: dhd_bus_register failed\n", __func__));
DHD_ERROR(("%s: brcmf_bus_register failed\n", __func__));
goto failed;
}
return 0;
......@@ -1739,9 +1729,6 @@ static int __init brcmf_module_init(void)
module_init(brcmf_module_init);
module_exit(brcmf_module_cleanup);
/*
* OS specific functions required to implement DHD driver in OS independent way
*/
int brcmf_os_proto_block(struct brcmf_pub *drvr)
{
struct brcmf_info *drvr_priv = drvr->info;
......
......@@ -14,8 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _dhd_proto_h_
#define _dhd_proto_h_
#ifndef _BRCMF_PROTO_H_
#define _BRCMF_PROTO_H_
#ifndef IOCTL_RESP_TIMEOUT
#define IOCTL_RESP_TIMEOUT 2000 /* In milli second */
......@@ -26,22 +26,22 @@
#endif
/*
* Exported from the dhd protocol module (dhd_cdc, dhd_rndis)
* Exported from the brcmf protocol module (brcmf_cdc)
*/
/* Linkage, sets prot link and updates hdrlen in pub */
extern int brcmf_proto_attach(struct brcmf_pub *dhdp);
extern int brcmf_proto_attach(struct brcmf_pub *drvr);
/* Unlink, frees allocated protocol memory (including dhd_prot) */
extern void brcmf_proto_detach(struct brcmf_pub *dhdp);
/* Unlink, frees allocated protocol memory (including brcmf_proto) */
extern void brcmf_proto_detach(struct brcmf_pub *drvr);
/* Initialize protocol: sync w/dongle state.
* Sets dongle media info (iswl, drv_version, mac address).
*/
extern int brcmf_proto_init(struct brcmf_pub *dhdp);
extern int brcmf_proto_init(struct brcmf_pub *drvr);
/* Stop protocol: sync w/dongle state. */
extern void brcmf_proto_stop(struct brcmf_pub *dhdp);
extern void brcmf_proto_stop(struct brcmf_pub *drvr);
/* Add any protocol-specific data header.
* Caller must reserve prot_hdrlen prepend space.
......@@ -54,22 +54,22 @@ extern int brcmf_proto_hdrpull(struct brcmf_pub *, int *ifidx,
struct sk_buff *rxp);
/* Use protocol to issue ioctl to dongle */
extern int brcmf_proto_ioctl(struct brcmf_pub *dhd, int ifidx,
extern int brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx,
struct brcmf_ioctl *ioc, void *buf, int len);
/* Add prot dump output to a buffer */
extern void brcmf_proto_dump(struct brcmf_pub *dhdp,
extern void brcmf_proto_dump(struct brcmf_pub *drvr,
struct brcmu_strbuf *strbuf);
/* Update local copy of dongle statistics */
extern void brcmf_proto_dstats(struct brcmf_pub *dhdp);
extern void brcmf_proto_dstats(struct brcmf_pub *drvr);
extern int brcmf_c_ioctl(struct brcmf_pub *dhd_pub, struct brcmf_c_ioctl *ioc,
extern int brcmf_c_ioctl(struct brcmf_pub *drvr, struct brcmf_c_ioctl *ioc,
void *buf, uint buflen);
extern int brcmf_c_preinit_ioctls(struct brcmf_pub *dhd);
extern int brcmf_c_preinit_ioctls(struct brcmf_pub *drvr);
extern int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *dhd, int ifidx, uint cmd,
void *buf, uint len);
extern int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *drvr, int ifidx,
uint cmd, void *buf, uint len);
#endif /* _dhd_proto_h_ */
#endif /* _BRCMF_PROTO_H_ */
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