提交 96c75e48 编写于 作者: A Arend van Spriel 提交者: Greg Kroah-Hartman

staging: brcm80211: rename macros in dhd_dbg.h

The header file dhd_dbg.h contains several macros used throughout
the code starting with DHD_. These have been renamed to get rid
of this broadcom specific acronym.
Reviewed-by: NRoland Vossen <rvossen@broadcom.com>
Reviewed-by: NFranky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c4eae44c
...@@ -105,7 +105,7 @@ static int brcmf_proto_cdc_msg(struct brcmf_pub *drvr) ...@@ -105,7 +105,7 @@ static int brcmf_proto_cdc_msg(struct brcmf_pub *drvr)
int len = le32_to_cpu(prot->msg.len) + int len = le32_to_cpu(prot->msg.len) +
sizeof(struct brcmf_proto_cdc_ioctl); sizeof(struct brcmf_proto_cdc_ioctl);
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
/* NOTE : cdc->msg.len holds the desired length of the buffer to be /* NOTE : cdc->msg.len holds the desired length of the buffer to be
* returned. Only up to CDC_MAX_MSG_SIZE of this buffer area * returned. Only up to CDC_MAX_MSG_SIZE of this buffer area
...@@ -124,7 +124,7 @@ static int brcmf_proto_cdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len) ...@@ -124,7 +124,7 @@ static int brcmf_proto_cdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len)
int ret; int ret;
struct brcmf_proto *prot = drvr->prot; struct brcmf_proto *prot = drvr->prot;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
do { do {
ret = brcmf_sdbrcm_bus_rxctl(drvr->bus, ret = brcmf_sdbrcm_bus_rxctl(drvr->bus,
...@@ -147,8 +147,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, ...@@ -147,8 +147,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,
int ret = 0, retries = 0; int ret = 0, retries = 0;
u32 id, flags = 0; u32 id, flags = 0;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
DHD_CTL(("%s: cmd %d len %d\n", __func__, cmd, len)); BRCMF_CTL(("%s: cmd %d len %d\n", __func__, cmd, len));
/* Respond "bcmerror" and "bcmerrorstr" with local cache */ /* Respond "bcmerror" and "bcmerrorstr" with local cache */
if (cmd == BRCMF_C_GET_VAR && buf) { if (cmd == BRCMF_C_GET_VAR && buf) {
...@@ -175,8 +175,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, ...@@ -175,8 +175,8 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,
ret = brcmf_proto_cdc_msg(drvr); ret = brcmf_proto_cdc_msg(drvr);
if (ret < 0) { if (ret < 0) {
DHD_ERROR(("brcmf_proto_cdc_query_ioctl: brcmf_proto_cdc_msg " BRCMF_ERROR(("brcmf_proto_cdc_query_ioctl: brcmf_proto_cdc_msg "
"failed w/status %d\n", ret)); "failed w/status %d\n", ret));
goto done; goto done;
} }
...@@ -192,9 +192,9 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, ...@@ -192,9 +192,9 @@ brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,
if ((id < prot->reqid) && (++retries < RETRIES)) if ((id < prot->reqid) && (++retries < RETRIES))
goto retry; goto retry;
if (id != prot->reqid) { if (id != prot->reqid) {
DHD_ERROR(("%s: %s: unexpected request id %d (expected %d)\n", BRCMF_ERROR(("%s: %s: unexpected request id %d (expected %d)\n",
brcmf_ifname(drvr, ifidx), __func__, id, brcmf_ifname(drvr, ifidx), __func__, id,
prot->reqid)); prot->reqid));
ret = -EINVAL; ret = -EINVAL;
goto done; goto done;
} }
...@@ -228,8 +228,8 @@ int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, ...@@ -228,8 +228,8 @@ int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,
int ret = 0; int ret = 0;
u32 flags, id; u32 flags, id;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
DHD_CTL(("%s: cmd %d len %d\n", __func__, cmd, len)); BRCMF_CTL(("%s: cmd %d len %d\n", __func__, cmd, len));
memset(msg, 0, sizeof(struct brcmf_proto_cdc_ioctl)); memset(msg, 0, sizeof(struct brcmf_proto_cdc_ioctl));
...@@ -254,9 +254,9 @@ int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd, ...@@ -254,9 +254,9 @@ int brcmf_proto_cdc_set_ioctl(struct brcmf_pub *drvr, int ifidx, uint cmd,
id = (flags & CDCF_IOC_ID_MASK) >> CDCF_IOC_ID_SHIFT; id = (flags & CDCF_IOC_ID_MASK) >> CDCF_IOC_ID_SHIFT;
if (id != prot->reqid) { if (id != prot->reqid) {
DHD_ERROR(("%s: %s: unexpected request id %d (expected %d)\n", BRCMF_ERROR(("%s: %s: unexpected request id %d (expected %d)\n",
brcmf_ifname(drvr, ifidx), __func__, id, brcmf_ifname(drvr, ifidx), __func__, id,
prot->reqid)); prot->reqid));
ret = -EINVAL; ret = -EINVAL;
goto done; goto done;
} }
...@@ -280,13 +280,13 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc, ...@@ -280,13 +280,13 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
int ret = -1; int ret = -1;
if (drvr->busstate == BRCMF_BUS_DOWN) { if (drvr->busstate == BRCMF_BUS_DOWN) {
DHD_ERROR(("%s : bus is down. we have nothing to do\n", BRCMF_ERROR(("%s : bus is down. we have nothing to do\n",
__func__)); __func__));
return ret; return ret;
} }
brcmf_os_proto_block(drvr); brcmf_os_proto_block(drvr);
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
ASSERT(len <= BRCMF_C_IOCTL_MAXLEN); ASSERT(len <= BRCMF_C_IOCTL_MAXLEN);
...@@ -294,13 +294,13 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc, ...@@ -294,13 +294,13 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
goto done; goto done;
if (prot->pending == true) { if (prot->pending == true) {
DHD_TRACE(("CDC packet is pending!!!! cmd=0x%x (%lu) " BRCMF_TRACE(("CDC packet is pending!!!! cmd=0x%x (%lu) "
"lastcmd=0x%x (%lu)\n", "lastcmd=0x%x (%lu)\n",
ioc->cmd, (unsigned long)ioc->cmd, prot->lastcmd, ioc->cmd, (unsigned long)ioc->cmd, prot->lastcmd,
(unsigned long)prot->lastcmd)); (unsigned long)prot->lastcmd));
if ((ioc->cmd == BRCMF_C_SET_VAR) || if ((ioc->cmd == BRCMF_C_SET_VAR) ||
(ioc->cmd == BRCMF_C_GET_VAR)) (ioc->cmd == BRCMF_C_GET_VAR))
DHD_TRACE(("iovar cmd=%s\n", (char *)buf)); BRCMF_TRACE(("iovar cmd=%s\n", (char *)buf));
goto done; goto done;
} }
...@@ -361,7 +361,7 @@ void brcmf_proto_hdrpush(struct brcmf_pub *drvr, int ifidx, ...@@ -361,7 +361,7 @@ void brcmf_proto_hdrpush(struct brcmf_pub *drvr, int ifidx,
{ {
struct brcmf_proto_bdc_header *h; struct brcmf_proto_bdc_header *h;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
/* Push BDC header used to convey priority for buses that don't */ /* Push BDC header used to convey priority for buses that don't */
...@@ -384,13 +384,13 @@ int brcmf_proto_hdrpull(struct brcmf_pub *drvr, int *ifidx, ...@@ -384,13 +384,13 @@ int brcmf_proto_hdrpull(struct brcmf_pub *drvr, int *ifidx,
{ {
struct brcmf_proto_bdc_header *h; struct brcmf_proto_bdc_header *h;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
/* Pop BDC header used to convey priority for buses that don't */ /* Pop BDC header used to convey priority for buses that don't */
if (pktbuf->len < BDC_HEADER_LEN) { if (pktbuf->len < BDC_HEADER_LEN) {
DHD_ERROR(("%s: rx data too short (%d < %d)\n", __func__, BRCMF_ERROR(("%s: rx data too short (%d < %d)\n", __func__,
pktbuf->len, BDC_HEADER_LEN)); pktbuf->len, BDC_HEADER_LEN));
return -EBADE; return -EBADE;
} }
...@@ -398,22 +398,22 @@ int brcmf_proto_hdrpull(struct brcmf_pub *drvr, int *ifidx, ...@@ -398,22 +398,22 @@ int brcmf_proto_hdrpull(struct brcmf_pub *drvr, int *ifidx,
*ifidx = BDC_GET_IF_IDX(h); *ifidx = BDC_GET_IF_IDX(h);
if (*ifidx >= BRCMF_MAX_IFS) { if (*ifidx >= BRCMF_MAX_IFS) {
DHD_ERROR(("%s: rx data ifnum out of range (%d)\n", BRCMF_ERROR(("%s: rx data ifnum out of range (%d)\n",
__func__, *ifidx)); __func__, *ifidx));
return -EBADE; return -EBADE;
} }
if (((h->flags & BDC_FLAG_VER_MASK) >> BDC_FLAG_VER_SHIFT) != if (((h->flags & BDC_FLAG_VER_MASK) >> BDC_FLAG_VER_SHIFT) !=
BDC_PROTO_VER) { BDC_PROTO_VER) {
DHD_ERROR(("%s: non-BDC packet received, flags 0x%x\n", BRCMF_ERROR(("%s: non-BDC packet received, flags 0x%x\n",
brcmf_ifname(drvr, *ifidx), h->flags)); brcmf_ifname(drvr, *ifidx), h->flags));
return -EBADE; return -EBADE;
} }
if (h->flags & BDC_FLAG_SUM_GOOD) { if (h->flags & BDC_FLAG_SUM_GOOD) {
DHD_INFO(("%s: BDC packet received with good rx-csum, " BRCMF_INFO(("%s: BDC packet received with good rx-csum, "
"flags 0x%x\n", "flags 0x%x\n",
brcmf_ifname(drvr, *ifidx), h->flags)); brcmf_ifname(drvr, *ifidx), h->flags));
PKTSETSUMGOOD(pktbuf, true); PKTSETSUMGOOD(pktbuf, true);
} }
...@@ -430,13 +430,13 @@ int brcmf_proto_attach(struct brcmf_pub *drvr) ...@@ -430,13 +430,13 @@ int brcmf_proto_attach(struct brcmf_pub *drvr)
cdc = kzalloc(sizeof(struct brcmf_proto), GFP_ATOMIC); cdc = kzalloc(sizeof(struct brcmf_proto), GFP_ATOMIC);
if (!cdc) { if (!cdc) {
DHD_ERROR(("%s: kmalloc failed\n", __func__)); BRCMF_ERROR(("%s: kmalloc failed\n", __func__));
goto fail; goto fail;
} }
/* ensure that the msg buf directly follows the cdc msg struct */ /* ensure that the msg buf directly follows the cdc msg struct */
if ((unsigned long)(&cdc->msg + 1) != (unsigned long)cdc->buf) { if ((unsigned long)(&cdc->msg + 1) != (unsigned long)cdc->buf) {
DHD_ERROR(("struct brcmf_proto is not correctly defined\n")); BRCMF_ERROR(("struct brcmf_proto is not correctly defined\n"));
goto fail; goto fail;
} }
...@@ -475,7 +475,7 @@ int brcmf_proto_init(struct brcmf_pub *drvr) ...@@ -475,7 +475,7 @@ int brcmf_proto_init(struct brcmf_pub *drvr)
int ret = 0; int ret = 0;
char buf[128]; char buf[128];
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
brcmf_os_proto_block(drvr); brcmf_os_proto_block(drvr);
......
...@@ -176,7 +176,7 @@ brcmf_c_doiovar(struct brcmf_pub *drvr, const struct brcmu_iovar *vi, ...@@ -176,7 +176,7 @@ brcmf_c_doiovar(struct brcmf_pub *drvr, const struct brcmu_iovar *vi,
int bcmerror = 0; int bcmerror = 0;
s32 int_val = 0; s32 int_val = 0;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
bcmerror = brcmu_iovar_lencheck(vi, arg, len, IOV_ISSET(actionid)); bcmerror = brcmu_iovar_lencheck(vi, arg, len, IOV_ISSET(actionid));
if (bcmerror != 0) if (bcmerror != 0)
...@@ -288,8 +288,8 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, ...@@ -288,8 +288,8 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
p = discard_oldest ? brcmu_pktq_pdeq(q, eprec) : p = discard_oldest ? brcmu_pktq_pdeq(q, eprec) :
brcmu_pktq_pdeq_tail(q, eprec); brcmu_pktq_pdeq_tail(q, eprec);
if (p == NULL) { if (p == NULL) {
DHD_ERROR(("%s: brcmu_pktq_penq() failed, oldest %d.", BRCMF_ERROR(("%s: brcmu_pktq_penq() failed, oldest %d.",
__func__, discard_oldest)); __func__, discard_oldest));
ASSERT(p); ASSERT(p);
} }
...@@ -299,7 +299,7 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, ...@@ -299,7 +299,7 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
/* Enqueue */ /* Enqueue */
p = brcmu_pktq_penq(q, prec, pkt); p = brcmu_pktq_penq(q, prec, pkt);
if (p == NULL) { if (p == NULL) {
DHD_ERROR(("%s: brcmu_pktq_penq() failed.", __func__)); BRCMF_ERROR(("%s: brcmu_pktq_penq() failed.", __func__));
ASSERT(p); ASSERT(p);
} }
...@@ -315,7 +315,7 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name, ...@@ -315,7 +315,7 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name,
const struct brcmu_iovar *vi = NULL; const struct brcmu_iovar *vi = NULL;
u32 actionid; u32 actionid;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
ASSERT(name); ASSERT(name);
ASSERT(len >= 0); ASSERT(len >= 0);
...@@ -332,8 +332,8 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name, ...@@ -332,8 +332,8 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name,
goto exit; goto exit;
} }
DHD_CTL(("%s: %s %s, len %d plen %d\n", __func__, BRCMF_CTL(("%s: %s %s, len %d plen %d\n", __func__,
name, (set ? "set" : "get"), len, plen)); name, (set ? "set" : "get"), len, plen));
/* set up 'params' pointer in case this is a set command so that /* set up 'params' pointer in case this is a set command so that
* the convenience int and bool code can be common to set and get * the convenience int and bool code can be common to set and get
...@@ -365,7 +365,7 @@ int brcmf_c_ioctl(struct brcmf_pub *drvr, struct brcmf_c_ioctl *ioc, void *buf, ...@@ -365,7 +365,7 @@ int brcmf_c_ioctl(struct brcmf_pub *drvr, struct brcmf_c_ioctl *ioc, void *buf,
{ {
int bcmerror = 0; int bcmerror = 0;
DHD_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
if (!buf) if (!buf)
return -EINVAL; return -EINVAL;
...@@ -521,9 +521,9 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -521,9 +521,9 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
event_name = event_names[i].event_name; event_name = event_names[i].event_name;
} }
DHD_EVENT(("EVENT: %s, event ID = %d\n", event_name, event_type)); BRCMF_EVENT(("EVENT: %s, event ID = %d\n", event_name, event_type));
DHD_EVENT(("flags 0x%04x, status %d, reason %d, auth_type %d MAC %s\n", BRCMF_EVENT(("flags 0x%04x, status %d, reason %d, auth_type %d"
flags, status, reason, auth_type, eabuf)); " MAC %s\n", flags, status, reason, auth_type, eabuf));
if (flags & BRCMF_EVENT_MSG_LINK) if (flags & BRCMF_EVENT_MSG_LINK)
link = true; link = true;
...@@ -536,35 +536,36 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -536,35 +536,36 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
case BRCMF_E_START: case BRCMF_E_START:
case BRCMF_E_DEAUTH: case BRCMF_E_DEAUTH:
case BRCMF_E_DISASSOC: case BRCMF_E_DISASSOC:
DHD_EVENT(("MACEVENT: %s, MAC %s\n", event_name, eabuf)); BRCMF_EVENT(("MACEVENT: %s, MAC %s\n", event_name, eabuf));
break; break;
case BRCMF_E_ASSOC_IND: case BRCMF_E_ASSOC_IND:
case BRCMF_E_REASSOC_IND: case BRCMF_E_REASSOC_IND:
DHD_EVENT(("MACEVENT: %s, MAC %s\n", event_name, eabuf)); BRCMF_EVENT(("MACEVENT: %s, MAC %s\n", event_name, eabuf));
break; break;
case BRCMF_E_ASSOC: case BRCMF_E_ASSOC:
case BRCMF_E_REASSOC: case BRCMF_E_REASSOC:
if (status == BRCMF_E_STATUS_SUCCESS) { if (status == BRCMF_E_STATUS_SUCCESS) {
DHD_EVENT(("MACEVENT: %s, MAC %s, SUCCESS\n", BRCMF_EVENT(("MACEVENT: %s, MAC %s, SUCCESS\n",
event_name, eabuf)); event_name, eabuf));
} else if (status == BRCMF_E_STATUS_TIMEOUT) { } else if (status == BRCMF_E_STATUS_TIMEOUT) {
DHD_EVENT(("MACEVENT: %s, MAC %s, TIMEOUT\n", BRCMF_EVENT(("MACEVENT: %s, MAC %s, TIMEOUT\n",
event_name, eabuf)); event_name, eabuf));
} else if (status == BRCMF_E_STATUS_FAIL) { } else if (status == BRCMF_E_STATUS_FAIL) {
DHD_EVENT(("MACEVENT: %s, MAC %s, FAILURE, reason %d\n", BRCMF_EVENT(("MACEVENT: %s, MAC %s, FAILURE,"
event_name, eabuf, (int)reason)); " reason %d\n", event_name, eabuf,
(int)reason));
} else { } else {
DHD_EVENT(("MACEVENT: %s, MAC %s, unexpected status " BRCMF_EVENT(("MACEVENT: %s, MAC %s, unexpected status "
"%d\n", event_name, eabuf, (int)status)); "%d\n", event_name, eabuf, (int)status));
} }
break; break;
case BRCMF_E_DEAUTH_IND: case BRCMF_E_DEAUTH_IND:
case BRCMF_E_DISASSOC_IND: case BRCMF_E_DISASSOC_IND:
DHD_EVENT(("MACEVENT: %s, MAC %s, reason %d\n", event_name, BRCMF_EVENT(("MACEVENT: %s, MAC %s, reason %d\n", event_name,
eabuf, (int)reason)); eabuf, (int)reason));
break; break;
case BRCMF_E_AUTH: case BRCMF_E_AUTH:
...@@ -578,18 +579,18 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -578,18 +579,18 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
auth_str = err_msg; auth_str = err_msg;
} }
if (event_type == BRCMF_E_AUTH_IND) { if (event_type == BRCMF_E_AUTH_IND) {
DHD_EVENT(("MACEVENT: %s, MAC %s, %s\n", event_name, BRCMF_EVENT(("MACEVENT: %s, MAC %s, %s\n", event_name,
eabuf, auth_str)); eabuf, auth_str));
} else if (status == BRCMF_E_STATUS_SUCCESS) { } else if (status == BRCMF_E_STATUS_SUCCESS) {
DHD_EVENT(("MACEVENT: %s, MAC %s, %s, SUCCESS\n", BRCMF_EVENT(("MACEVENT: %s, MAC %s, %s, SUCCESS\n",
event_name, eabuf, auth_str)); event_name, eabuf, auth_str));
} else if (status == BRCMF_E_STATUS_TIMEOUT) { } else if (status == BRCMF_E_STATUS_TIMEOUT) {
DHD_EVENT(("MACEVENT: %s, MAC %s, %s, TIMEOUT\n", BRCMF_EVENT(("MACEVENT: %s, MAC %s, %s, TIMEOUT\n",
event_name, eabuf, auth_str)); event_name, eabuf, auth_str));
} else if (status == BRCMF_E_STATUS_FAIL) { } else if (status == BRCMF_E_STATUS_FAIL) {
DHD_EVENT(("MACEVENT: %s, MAC %s, %s, FAILURE, " BRCMF_EVENT(("MACEVENT: %s, MAC %s, %s, FAILURE, "
"reason %d\n", "reason %d\n",
event_name, eabuf, auth_str, (int)reason)); event_name, eabuf, auth_str, (int)reason));
} }
break; break;
...@@ -598,64 +599,64 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -598,64 +599,64 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
case BRCMF_E_ROAM: case BRCMF_E_ROAM:
case BRCMF_E_SET_SSID: case BRCMF_E_SET_SSID:
if (status == BRCMF_E_STATUS_SUCCESS) { if (status == BRCMF_E_STATUS_SUCCESS) {
DHD_EVENT(("MACEVENT: %s, MAC %s\n", event_name, BRCMF_EVENT(("MACEVENT: %s, MAC %s\n", event_name,
eabuf)); eabuf));
} else if (status == BRCMF_E_STATUS_FAIL) { } else if (status == BRCMF_E_STATUS_FAIL) {
DHD_EVENT(("MACEVENT: %s, failed\n", event_name)); BRCMF_EVENT(("MACEVENT: %s, failed\n", event_name));
} else if (status == BRCMF_E_STATUS_NO_NETWORKS) { } else if (status == BRCMF_E_STATUS_NO_NETWORKS) {
DHD_EVENT(("MACEVENT: %s, no networks found\n", BRCMF_EVENT(("MACEVENT: %s, no networks found\n",
event_name)); event_name));
} else { } else {
DHD_EVENT(("MACEVENT: %s, unexpected status %d\n", BRCMF_EVENT(("MACEVENT: %s, unexpected status %d\n",
event_name, (int)status)); event_name, (int)status));
} }
break; break;
case BRCMF_E_BEACON_RX: case BRCMF_E_BEACON_RX:
if (status == BRCMF_E_STATUS_SUCCESS) { if (status == BRCMF_E_STATUS_SUCCESS) {
DHD_EVENT(("MACEVENT: %s, SUCCESS\n", event_name)); BRCMF_EVENT(("MACEVENT: %s, SUCCESS\n", event_name));
} else if (status == BRCMF_E_STATUS_FAIL) { } else if (status == BRCMF_E_STATUS_FAIL) {
DHD_EVENT(("MACEVENT: %s, FAIL\n", event_name)); BRCMF_EVENT(("MACEVENT: %s, FAIL\n", event_name));
} else { } else {
DHD_EVENT(("MACEVENT: %s, status %d\n", event_name, BRCMF_EVENT(("MACEVENT: %s, status %d\n", event_name,
status)); status));
} }
break; break;
case BRCMF_E_LINK: case BRCMF_E_LINK:
DHD_EVENT(("MACEVENT: %s %s\n", event_name, BRCMF_EVENT(("MACEVENT: %s %s\n", event_name,
link ? "UP" : "DOWN")); link ? "UP" : "DOWN"));
break; break;
case BRCMF_E_MIC_ERROR: case BRCMF_E_MIC_ERROR:
DHD_EVENT(("MACEVENT: %s, MAC %s, Group %d, Flush %d\n", BRCMF_EVENT(("MACEVENT: %s, MAC %s, Group %d, Flush %d\n",
event_name, eabuf, group, flush_txq)); event_name, eabuf, group, flush_txq));
break; break;
case BRCMF_E_ICV_ERROR: case BRCMF_E_ICV_ERROR:
case BRCMF_E_UNICAST_DECODE_ERROR: case BRCMF_E_UNICAST_DECODE_ERROR:
case BRCMF_E_MULTICAST_DECODE_ERROR: case BRCMF_E_MULTICAST_DECODE_ERROR:
DHD_EVENT(("MACEVENT: %s, MAC %s\n", event_name, eabuf)); BRCMF_EVENT(("MACEVENT: %s, MAC %s\n", event_name, eabuf));
break; break;
case BRCMF_E_TXFAIL: case BRCMF_E_TXFAIL:
DHD_EVENT(("MACEVENT: %s, RA %s\n", event_name, eabuf)); BRCMF_EVENT(("MACEVENT: %s, RA %s\n", event_name, eabuf));
break; break;
case BRCMF_E_SCAN_COMPLETE: case BRCMF_E_SCAN_COMPLETE:
case BRCMF_E_PMKID_CACHE: case BRCMF_E_PMKID_CACHE:
DHD_EVENT(("MACEVENT: %s\n", event_name)); BRCMF_EVENT(("MACEVENT: %s\n", event_name));
break; break;
case BRCMF_E_PFN_NET_FOUND: case BRCMF_E_PFN_NET_FOUND:
case BRCMF_E_PFN_NET_LOST: case BRCMF_E_PFN_NET_LOST:
case BRCMF_E_PFN_SCAN_COMPLETE: case BRCMF_E_PFN_SCAN_COMPLETE:
DHD_EVENT(("PNOEVENT: %s\n", event_name)); BRCMF_EVENT(("PNOEVENT: %s\n", event_name));
break; break;
case BRCMF_E_PSK_SUP: case BRCMF_E_PSK_SUP:
case BRCMF_E_PRUNE: case BRCMF_E_PRUNE:
DHD_EVENT(("MACEVENT: %s, status %d, reason %d\n", BRCMF_EVENT(("MACEVENT: %s, status %d, reason %d\n",
event_name, (int)status, (int)reason)); event_name, (int)status, (int)reason));
break; break;
...@@ -670,7 +671,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -670,7 +671,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
memcpy(&hdr, buf, sizeof(struct msgtrace_hdr)); memcpy(&hdr, buf, sizeof(struct msgtrace_hdr));
if (hdr.version != MSGTRACE_VERSION) { if (hdr.version != MSGTRACE_VERSION) {
DHD_ERROR( BRCMF_ERROR(
("\nMACEVENT: %s [unsupported version --> " ("\nMACEVENT: %s [unsupported version --> "
"brcmf version:%d dongle version:%d]\n", "brcmf version:%d dongle version:%d]\n",
event_name, MSGTRACE_VERSION, hdr.version) event_name, MSGTRACE_VERSION, hdr.version)
...@@ -686,7 +687,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -686,7 +687,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
if (be32_to_cpu(hdr.discarded_bytes) if (be32_to_cpu(hdr.discarded_bytes)
|| be32_to_cpu(hdr.discarded_printf)) { || be32_to_cpu(hdr.discarded_printf)) {
DHD_ERROR( BRCMF_ERROR(
("\nWLC_E_TRACE: [Discarded traces in dongle -->" ("\nWLC_E_TRACE: [Discarded traces in dongle -->"
"discarded_bytes %d discarded_printf %d]\n", "discarded_bytes %d discarded_printf %d]\n",
be32_to_cpu(hdr.discarded_bytes), be32_to_cpu(hdr.discarded_bytes),
...@@ -695,7 +696,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -695,7 +696,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
nblost = be32_to_cpu(hdr.seqnum) - seqnum_prev - 1; nblost = be32_to_cpu(hdr.seqnum) - seqnum_prev - 1;
if (nblost > 0) { if (nblost > 0) {
DHD_ERROR( BRCMF_ERROR(
("\nWLC_E_TRACE: [Event lost --> seqnum %d nblost %d\n", ("\nWLC_E_TRACE: [Event lost --> seqnum %d nblost %d\n",
be32_to_cpu(hdr.seqnum), nblost)); be32_to_cpu(hdr.seqnum), nblost));
} }
...@@ -719,24 +720,24 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) ...@@ -719,24 +720,24 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data)
break; break;
case BRCMF_E_RSSI: case BRCMF_E_RSSI:
DHD_EVENT(("MACEVENT: %s %d\n", event_name, BRCMF_EVENT(("MACEVENT: %s %d\n", event_name,
be32_to_cpu(*((int *)event_data)))); be32_to_cpu(*((int *)event_data))));
break; break;
default: default:
DHD_EVENT(("MACEVENT: %s %d, MAC %s, status %d, reason %d, " BRCMF_EVENT(("MACEVENT: %s %d, MAC %s, status %d, reason %d, "
"auth %d\n", event_name, event_type, eabuf, "auth %d\n", event_name, event_type, eabuf,
(int)status, (int)reason, (int)auth_type)); (int)status, (int)reason, (int)auth_type));
break; break;
} }
/* show any appended data */ /* show any appended data */
if (datalen) { if (datalen) {
buf = (unsigned char *) event_data; buf = (unsigned char *) event_data;
DHD_EVENT((" data (%d) : ", datalen)); BRCMF_EVENT((" data (%d) : ", datalen));
for (i = 0; i < datalen; i++) for (i = 0; i < datalen; i++)
DHD_EVENT((" 0x%02x ", *buf++)); BRCMF_EVENT((" 0x%02x ", *buf++));
DHD_EVENT(("\n")); BRCMF_EVENT(("\n"));
} }
} }
#endif /* SHOW_EVENTS */ #endif /* SHOW_EVENTS */
...@@ -753,14 +754,14 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, ...@@ -753,14 +754,14 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata,
int evlen; int evlen;
if (memcmp(BRCM_OUI, &pvt_data->hdr.oui[0], DOT11_OUI_LEN)) { if (memcmp(BRCM_OUI, &pvt_data->hdr.oui[0], DOT11_OUI_LEN)) {
DHD_ERROR(("%s: mismatched OUI, bailing\n", __func__)); BRCMF_ERROR(("%s: mismatched OUI, bailing\n", __func__));
return -EBADE; return -EBADE;
} }
/* BRCM event pkt may be unaligned - use xxx_ua to load user_subtype. */ /* BRCM event pkt may be unaligned - use xxx_ua to load user_subtype. */
if (get_unaligned_be16(&pvt_data->hdr.usr_subtype) != if (get_unaligned_be16(&pvt_data->hdr.usr_subtype) !=
BCMILCP_BCM_SUBTYPE_EVENT) { BCMILCP_BCM_SUBTYPE_EVENT) {
DHD_ERROR(("%s: mismatched subtype, bailing\n", __func__)); BRCMF_ERROR(("%s: mismatched subtype, bailing\n", __func__));
return -EBADE; return -EBADE;
} }
...@@ -781,7 +782,7 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, ...@@ -781,7 +782,7 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata,
{ {
struct brcmf_if_event *ifevent = struct brcmf_if_event *ifevent =
(struct brcmf_if_event *) event_data; (struct brcmf_if_event *) event_data;
DHD_TRACE(("%s: if event\n", __func__)); BRCMF_TRACE(("%s: if event\n", __func__));
if (ifevent->ifidx > 0 && if (ifevent->ifidx > 0 &&
ifevent->ifidx < BRCMF_MAX_IFS) { ifevent->ifidx < BRCMF_MAX_IFS) {
...@@ -794,9 +795,9 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, ...@@ -794,9 +795,9 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata,
else else
brcmf_del_if(drvr_priv, ifevent->ifidx); brcmf_del_if(drvr_priv, ifevent->ifidx);
} else { } else {
DHD_ERROR(("%s: Invalid ifidx %d for %s\n", BRCMF_ERROR(("%s: Invalid ifidx %d for %s\n",
__func__, ifevent->ifidx, __func__, ifevent->ifidx,
event->ifname)); event->ifname));
} }
} }
/* send up the if event: btamp user needs it */ /* send up the if event: btamp user needs it */
...@@ -813,15 +814,16 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, ...@@ -813,15 +814,16 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata,
/* Fall through: this should get _everything_ */ /* Fall through: this should get _everything_ */
*ifidx = brcmf_ifname2idx(drvr_priv, event->ifname); *ifidx = brcmf_ifname2idx(drvr_priv, event->ifname);
DHD_TRACE(("%s: MAC event %d, flags %x, status %x\n", BRCMF_TRACE(("%s: MAC event %d, flags %x, status %x\n",
__func__, type, flags, status)); __func__, type, flags, status));
/* put it back to BRCMF_E_NDIS_LINK */ /* put it back to BRCMF_E_NDIS_LINK */
if (type == BRCMF_E_NDIS_LINK) { if (type == BRCMF_E_NDIS_LINK) {
u32 temp; u32 temp;
temp = get_unaligned_be32(&event->event_type); temp = get_unaligned_be32(&event->event_type);
DHD_TRACE(("Converted to WLC_E_LINK type %d\n", temp)); BRCMF_TRACE(("Converted to WLC_E_LINK type %d\n",
temp));
temp = be32_to_cpu(BRCMF_E_NDIS_LINK); temp = be32_to_cpu(BRCMF_E_NDIS_LINK);
memcpy((void *)(&pvt_data->msg.event_type), &temp, memcpy((void *)(&pvt_data->msg.event_type), &temp,
...@@ -842,12 +844,12 @@ static int brcmf_c_pattern_atoh(char *src, char *dst) ...@@ -842,12 +844,12 @@ static int brcmf_c_pattern_atoh(char *src, char *dst)
{ {
int i; int i;
if (strncmp(src, "0x", 2) != 0 && strncmp(src, "0X", 2) != 0) { if (strncmp(src, "0x", 2) != 0 && strncmp(src, "0X", 2) != 0) {
DHD_ERROR(("Mask invalid format. Needs to start with 0x\n")); BRCMF_ERROR(("Mask invalid format. Needs to start with 0x\n"));
return -1; return -1;
} }
src = src + 2; /* Skip past 0x */ src = src + 2; /* Skip past 0x */
if (strlen(src) % 2 != 0) { if (strlen(src) % 2 != 0) {
DHD_ERROR(("Mask invalid format. Length must be even.\n")); BRCMF_ERROR(("Mask invalid format. Length must be even.\n"));
return -1; return -1;
} }
for (i = 0; *src != '\0'; i++) { for (i = 0; *src != '\0'; i++) {
...@@ -877,7 +879,7 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable, ...@@ -877,7 +879,7 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable,
arg_save = kmalloc(strlen(arg) + 1, GFP_ATOMIC); arg_save = kmalloc(strlen(arg) + 1, GFP_ATOMIC);
if (!arg_save) { if (!arg_save) {
DHD_ERROR(("%s: kmalloc failed\n", __func__)); BRCMF_ERROR(("%s: kmalloc failed\n", __func__));
goto fail; goto fail;
} }
arg_org = arg_save; arg_org = arg_save;
...@@ -887,7 +889,7 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable, ...@@ -887,7 +889,7 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable,
i = 0; i = 0;
if (NULL == argv[i]) { if (NULL == argv[i]) {
DHD_ERROR(("No args provided\n")); BRCMF_ERROR(("No args provided\n"));
goto fail; goto fail;
} }
...@@ -912,11 +914,11 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable, ...@@ -912,11 +914,11 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable,
rc = brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_VAR, buf, buf_len); rc = brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_VAR, buf, buf_len);
rc = rc >= 0 ? 0 : rc; rc = rc >= 0 ? 0 : rc;
if (rc) if (rc)
DHD_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n", BRCMF_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n",
__func__, arg, rc)); __func__, arg, rc));
else else
DHD_TRACE(("%s: successfully added pktfilter %s\n", BRCMF_TRACE(("%s: successfully added pktfilter %s\n",
__func__, arg)); __func__, arg));
/* Contorl the master mode */ /* Contorl the master mode */
brcmu_mkiovar("pkt_filter_mode", (char *)&master_mode, 4, buf, brcmu_mkiovar("pkt_filter_mode", (char *)&master_mode, 4, buf,
...@@ -925,8 +927,8 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable, ...@@ -925,8 +927,8 @@ brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg, int enable,
sizeof(buf)); sizeof(buf));
rc = rc >= 0 ? 0 : rc; rc = rc >= 0 ? 0 : rc;
if (rc) if (rc)
DHD_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n", BRCMF_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n",
__func__, arg, rc)); __func__, arg, rc));
fail: fail:
kfree(arg_org); kfree(arg_org);
...@@ -948,7 +950,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -948,7 +950,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
arg_save = kmalloc(strlen(arg) + 1, GFP_ATOMIC); arg_save = kmalloc(strlen(arg) + 1, GFP_ATOMIC);
if (!arg_save) { if (!arg_save) {
DHD_ERROR(("%s: kmalloc failed\n", __func__)); BRCMF_ERROR(("%s: kmalloc failed\n", __func__));
goto fail; goto fail;
} }
...@@ -956,15 +958,15 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -956,15 +958,15 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
buf = kmalloc(PKTFILTER_BUF_SIZE, GFP_ATOMIC); buf = kmalloc(PKTFILTER_BUF_SIZE, GFP_ATOMIC);
if (!buf) { if (!buf) {
DHD_ERROR(("%s: kmalloc failed\n", __func__)); BRCMF_ERROR(("%s: kmalloc failed\n", __func__));
goto fail; goto fail;
} }
memcpy(arg_save, arg, strlen(arg) + 1); memcpy(arg_save, arg, strlen(arg) + 1);
if (strlen(arg) > PKTFILTER_BUF_SIZE) { if (strlen(arg) > PKTFILTER_BUF_SIZE) {
DHD_ERROR(("Not enough buffer %d < %d\n", (int)strlen(arg), BRCMF_ERROR(("Not enough buffer %d < %d\n", (int)strlen(arg),
(int)sizeof(buf))); (int)sizeof(buf)));
goto fail; goto fail;
} }
...@@ -974,7 +976,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -974,7 +976,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
i = 0; i = 0;
if (NULL == argv[i]) { if (NULL == argv[i]) {
DHD_ERROR(("No args provided\n")); BRCMF_ERROR(("No args provided\n"));
goto fail; goto fail;
} }
...@@ -990,7 +992,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -990,7 +992,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
pkt_filter.id = simple_strtoul(argv[i], NULL, 0); pkt_filter.id = simple_strtoul(argv[i], NULL, 0);
if (NULL == argv[++i]) { if (NULL == argv[++i]) {
DHD_ERROR(("Polarity not provided\n")); BRCMF_ERROR(("Polarity not provided\n"));
goto fail; goto fail;
} }
...@@ -998,7 +1000,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -998,7 +1000,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
pkt_filter.negate_match = simple_strtoul(argv[i], NULL, 0); pkt_filter.negate_match = simple_strtoul(argv[i], NULL, 0);
if (NULL == argv[++i]) { if (NULL == argv[++i]) {
DHD_ERROR(("Filter type not provided\n")); BRCMF_ERROR(("Filter type not provided\n"));
goto fail; goto fail;
} }
...@@ -1006,7 +1008,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -1006,7 +1008,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
pkt_filter.type = simple_strtoul(argv[i], NULL, 0); pkt_filter.type = simple_strtoul(argv[i], NULL, 0);
if (NULL == argv[++i]) { if (NULL == argv[++i]) {
DHD_ERROR(("Offset not provided\n")); BRCMF_ERROR(("Offset not provided\n"));
goto fail; goto fail;
} }
...@@ -1014,7 +1016,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -1014,7 +1016,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
pkt_filter.u.pattern.offset = simple_strtoul(argv[i], NULL, 0); pkt_filter.u.pattern.offset = simple_strtoul(argv[i], NULL, 0);
if (NULL == argv[++i]) { if (NULL == argv[++i]) {
DHD_ERROR(("Bitmask not provided\n")); BRCMF_ERROR(("Bitmask not provided\n"));
goto fail; goto fail;
} }
...@@ -1024,7 +1026,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -1024,7 +1026,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
(argv[i], (char *)pkt_filterp->u.pattern.mask_and_pattern); (argv[i], (char *)pkt_filterp->u.pattern.mask_and_pattern);
if (NULL == argv[++i]) { if (NULL == argv[++i]) {
DHD_ERROR(("Pattern not provided\n")); BRCMF_ERROR(("Pattern not provided\n"));
goto fail; goto fail;
} }
...@@ -1035,7 +1037,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -1035,7 +1037,7 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
mask_and_pattern[mask_size]); mask_and_pattern[mask_size]);
if (mask_size != pattern_size) { if (mask_size != pattern_size) {
DHD_ERROR(("Mask and pattern not the same size\n")); BRCMF_ERROR(("Mask and pattern not the same size\n"));
goto fail; goto fail;
} }
...@@ -1056,11 +1058,11 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg) ...@@ -1056,11 +1058,11 @@ void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg)
rc = rc >= 0 ? 0 : rc; rc = rc >= 0 ? 0 : rc;
if (rc) if (rc)
DHD_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n", BRCMF_TRACE(("%s: failed to add pktfilter %s, retcode = %d\n",
__func__, arg, rc)); __func__, arg, rc));
else else
DHD_TRACE(("%s: successfully added pktfilter %s\n", BRCMF_TRACE(("%s: successfully added pktfilter %s\n",
__func__, arg)); __func__, arg));
fail: fail:
kfree(arg_org); kfree(arg_org);
...@@ -1078,11 +1080,11 @@ void brcmf_c_arp_offload_set(struct brcmf_pub *drvr, int arp_mode) ...@@ -1078,11 +1080,11 @@ void brcmf_c_arp_offload_set(struct brcmf_pub *drvr, int arp_mode)
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
retcode = retcode >= 0 ? 0 : retcode; retcode = retcode >= 0 ? 0 : retcode;
if (retcode) if (retcode)
DHD_TRACE(("%s: failed to set ARP offload mode to 0x%x, " BRCMF_TRACE(("%s: failed to set ARP offload mode to 0x%x, "
"retcode = %d\n", __func__, arp_mode, retcode)); "retcode = %d\n", __func__, arp_mode, retcode));
else else
DHD_TRACE(("%s: successfully set ARP offload mode to 0x%x\n", BRCMF_TRACE(("%s: successfully set ARP offload mode to 0x%x\n",
__func__, arp_mode)); __func__, arp_mode));
} }
void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable) void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable)
...@@ -1095,11 +1097,11 @@ void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable) ...@@ -1095,11 +1097,11 @@ void brcmf_c_arp_offload_enable(struct brcmf_pub *drvr, int arp_enable)
iovbuf, sizeof(iovbuf)); iovbuf, sizeof(iovbuf));
retcode = retcode >= 0 ? 0 : retcode; retcode = retcode >= 0 ? 0 : retcode;
if (retcode) if (retcode)
DHD_TRACE(("%s: failed to enabe ARP offload to %d, " BRCMF_TRACE(("%s: failed to enabe ARP offload to %d, "
"retcode = %d\n", __func__, arp_enable, retcode)); "retcode = %d\n", __func__, arp_enable, retcode));
else else
DHD_TRACE(("%s: successfully enabed ARP offload to %d\n", BRCMF_TRACE(("%s: successfully enabed ARP offload to %d\n",
__func__, arp_enable)); __func__, arp_enable));
} }
int brcmf_c_preinit_ioctls(struct brcmf_pub *drvr) int brcmf_c_preinit_ioctls(struct brcmf_pub *drvr)
...@@ -1123,8 +1125,8 @@ int brcmf_c_preinit_ioctls(struct brcmf_pub *drvr) ...@@ -1123,8 +1125,8 @@ int brcmf_c_preinit_ioctls(struct brcmf_pub *drvr)
if (brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_COUNTRY, if (brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_COUNTRY,
drvr->country_code, drvr->country_code,
sizeof(drvr->country_code)) < 0) { sizeof(drvr->country_code)) < 0) {
DHD_ERROR(("%s: country code setting failed\n", BRCMF_ERROR(("%s: country code setting failed\n",
__func__)); __func__));
} }
} }
...@@ -1135,7 +1137,7 @@ int brcmf_c_preinit_ioctls(struct brcmf_pub *drvr) ...@@ -1135,7 +1137,7 @@ int brcmf_c_preinit_ioctls(struct brcmf_pub *drvr)
brcmf_proto_cdc_query_ioctl(drvr, 0, BRCMF_C_GET_VAR, buf, sizeof(buf)); brcmf_proto_cdc_query_ioctl(drvr, 0, BRCMF_C_GET_VAR, buf, sizeof(buf));
strsep(&ptr, "\n"); strsep(&ptr, "\n");
/* Print fw version info */ /* Print fw version info */
DHD_ERROR(("Firmware version = %s\n", buf)); BRCMF_ERROR(("Firmware version = %s\n", buf));
/* Set PowerSave mode */ /* Set PowerSave mode */
brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_PM, (char *)&power_mode, brcmf_proto_cdc_set_ioctl(drvr, 0, BRCMF_C_SET_PM, (char *)&power_mode,
......
...@@ -19,55 +19,49 @@ ...@@ -19,55 +19,49 @@
#if defined(BCMDBG) #if defined(BCMDBG)
#define DHD_ERROR(args) \ #define BRCMF_ERROR(args) \
do {if ((brcmf_msg_level & BRCMF_ERROR_VAL) && (net_ratelimit())) \ do {if ((brcmf_msg_level & BRCMF_ERROR_VAL) && (net_ratelimit())) \
printk args; } while (0) printk args; } while (0)
#define DHD_TRACE(args) do {if (brcmf_msg_level & BRCMF_TRACE_VAL) \ #define BRCMF_TRACE(args) do {if (brcmf_msg_level & BRCMF_TRACE_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_INFO(args) do {if (brcmf_msg_level & BRCMF_INFO_VAL) \ #define BRCMF_INFO(args) do {if (brcmf_msg_level & BRCMF_INFO_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_DATA(args) do {if (brcmf_msg_level & BRCMF_DATA_VAL) \ #define BRCMF_DATA(args) do {if (brcmf_msg_level & BRCMF_DATA_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_CTL(args) do {if (brcmf_msg_level & BRCMF_CTL_VAL) \ #define BRCMF_CTL(args) do {if (brcmf_msg_level & BRCMF_CTL_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_TIMER(args) do {if (brcmf_msg_level & BRCMF_TIMER_VAL) \ #define BRCMF_TIMER(args) do {if (brcmf_msg_level & BRCMF_TIMER_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_HDRS(args) do {if (brcmf_msg_level & BRCMF_HDRS_VAL) \ #define BRCMF_INTR(args) do {if (brcmf_msg_level & BRCMF_INTR_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_BYTES(args) do {if (brcmf_msg_level & BRCMF_BYTES_VAL) \ #define BRCMF_GLOM(args) do {if (brcmf_msg_level & BRCMF_GLOM_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_INTR(args) do {if (brcmf_msg_level & BRCMF_INTR_VAL) \ #define BRCMF_EVENT(args) do {if (brcmf_msg_level & BRCMF_EVENT_VAL) \
printk args; } while (0)
#define DHD_GLOM(args) do {if (brcmf_msg_level & BRCMF_GLOM_VAL) \
printk args; } while (0)
#define DHD_EVENT(args) do {if (brcmf_msg_level & BRCMF_EVENT_VAL) \
printk args; } while (0) printk args; } while (0)
#define DHD_DATA_ON() (brcmf_msg_level & BRCMF_DATA_VAL) #define BRCMF_DATA_ON() (brcmf_msg_level & BRCMF_DATA_VAL)
#define DHD_CTL_ON() (brcmf_msg_level & BRCMF_CTL_VAL) #define BRCMF_CTL_ON() (brcmf_msg_level & BRCMF_CTL_VAL)
#define DHD_HDRS_ON() (brcmf_msg_level & BRCMF_HDRS_VAL) #define BRCMF_HDRS_ON() (brcmf_msg_level & BRCMF_HDRS_VAL)
#define DHD_BYTES_ON() (brcmf_msg_level & BRCMF_BYTES_VAL) #define BRCMF_BYTES_ON() (brcmf_msg_level & BRCMF_BYTES_VAL)
#define DHD_GLOM_ON() (brcmf_msg_level & BRCMF_GLOM_VAL) #define BRCMF_GLOM_ON() (brcmf_msg_level & BRCMF_GLOM_VAL)
#else /* (defined BCMDBG) || (defined BCMDBG) */ #else /* (defined BCMDBG) || (defined BCMDBG) */
#define DHD_ERROR(args) do {if (net_ratelimit()) printk args; } while (0) #define BRCMF_ERROR(args) do {if (net_ratelimit()) printk args; } while (0)
#define DHD_TRACE(args) #define BRCMF_TRACE(args)
#define DHD_INFO(args) #define BRCMF_INFO(args)
#define DHD_DATA(args) #define BRCMF_DATA(args)
#define DHD_CTL(args) #define BRCMF_CTL(args)
#define DHD_TIMER(args) #define BRCMF_TIMER(args)
#define DHD_HDRS(args) #define BRCMF_INTR(args)
#define DHD_BYTES(args) #define BRCMF_GLOM(args)
#define DHD_INTR(args) #define BRCMF_EVENT(args)
#define DHD_GLOM(args)
#define DHD_EVENT(args)
#define DHD_DATA_ON() 0 #define BRCMF_DATA_ON() 0
#define DHD_CTL_ON() 0 #define BRCMF_CTL_ON() 0
#define DHD_HDRS_ON() 0 #define BRCMF_HDRS_ON() 0
#define DHD_BYTES_ON() 0 #define BRCMF_BYTES_ON() 0
#define DHD_GLOM_ON() 0 #define BRCMF_GLOM_ON() 0
#endif /* defined(BCMDBG) */ #endif /* defined(BCMDBG) */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册