Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249302
b: refs/heads/master
c: e10d82d
h: refs/heads/master
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed May 3, 2011
1 parent 863546c commit 0b75378
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 143 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c2be548d3d23dd996e42863bb02122032fbba6bb
refs/heads/master: e10d82d47dc4fe1d98ab46337324a2f7facc0491
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
ASSERT(sdh);

/* don't support yet */
return -BCME_UNSUPPORTED;
return -ENOTSUPP;
}

u8 bcmsdh_cfg_read(void *sdh, uint fnc_num, u32 addr, int *err)
Expand Down Expand Up @@ -317,7 +317,7 @@ int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
tmp_buf = kmalloc(length, GFP_ATOMIC);
if (tmp_buf == NULL) {
BCMSDH_ERROR(("%s: out of memory\n", __func__));
return -BCME_NOMEM;
return -ENOMEM;
}
memcpy(tmp_buf, cis, length);
for (tmp_ptr = tmp_buf, ptr = cis; ptr < (cis + length - 4);
Expand Down Expand Up @@ -467,7 +467,7 @@ bcmsdh_recv_buf(void *sdh, u32 addr, uint fn, uint flags,
/* Async not implemented yet */
ASSERT(!(flags & SDIO_REQ_ASYNC));
if (flags & SDIO_REQ_ASYNC)
return -BCME_UNSUPPORTED;
return -ENOTSUPP;

if (bar0 != bcmsdh->sbwad) {
err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
Expand Down Expand Up @@ -512,7 +512,7 @@ bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
/* Async not implemented yet */
ASSERT(!(flags & SDIO_REQ_ASYNC));
if (flags & SDIO_REQ_ASYNC)
return -BCME_UNSUPPORTED;
return -ENOTSUPP;

if (bar0 != bcmsdh->sbwad) {
err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,

vi = bcm_iovar_lookup(sdioh_iovars, name);
if (vi == NULL) {
bcmerror = -BCME_UNSUPPORTED;
bcmerror = -ENOTSUPP;
goto exit;
}

Expand Down Expand Up @@ -472,7 +472,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,

case IOV_GVAL(IOV_BLOCKSIZE):
if ((u32) int_val > si->num_funcs) {
bcmerror = -BCME_BADARG;
bcmerror = -EINVAL;
break;
}
int_val = (s32) si->client_block_size[int_val];
Expand All @@ -486,7 +486,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
uint maxsize;

if (func > si->num_funcs) {
bcmerror = -BCME_BADARG;
bcmerror = -EINVAL;
break;
}

Expand All @@ -504,7 +504,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
maxsize = 0;
}
if (blksize > maxsize) {
bcmerror = -BCME_BADARG;
bcmerror = -EINVAL;
break;
}
if (!blksize)
Expand Down Expand Up @@ -607,7 +607,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
|| sd_ptr->offset > SD_MaxCurCap) {
sd_err(("%s: bad offset 0x%x\n", __func__,
sd_ptr->offset));
bcmerror = -BCME_BADARG;
bcmerror = -EINVAL;
break;
}

Expand Down Expand Up @@ -637,7 +637,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
|| sd_ptr->offset > SD_MaxCurCap) {
sd_err(("%s: bad offset 0x%x\n", __func__,
sd_ptr->offset));
bcmerror = -BCME_BADARG;
bcmerror = -EINVAL;
break;
}

Expand Down Expand Up @@ -679,7 +679,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
}

default:
bcmerror = -BCME_UNSUPPORTED;
bcmerror = -ENOTSUPP;
break;
}
exit:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int sdioh_sdmmc_osinit(sdioh_info_t *sd)
sdos = kmalloc(sizeof(struct sdos_info), GFP_ATOMIC);
sd->sdos_info = (void *)sdos;
if (sdos == NULL)
return -BCME_NOMEM;
return -ENOMEM;

sdos->sd = sd;
spin_lock_init(&sdos->lock);
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ int
dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
void *params, int plen, void *arg, int len, bool set)
{
return -BCME_UNSUPPORTED;
return -ENOTSUPP;
}

void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf)
Expand Down Expand Up @@ -416,7 +416,7 @@ int dhd_prot_attach(dhd_pub_t *dhd)

fail:
kfree(cdc);
return -BCME_NOMEM;
return -ENOMEM;
}

/* ~NOTE~ What if another thread is waiting on the semaphore? Holding it? */
Expand Down
24 changes: 12 additions & 12 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static int dhd_dump(dhd_pub_t *dhdp, char *buf, int buflen)
/* Add any bus info */
dhd_bus_dump(dhdp, strbuf);

return !strbuf->size ? -BCME_BUFTOOSHORT : 0;
return !strbuf->size ? -EOVERFLOW : 0;
}

static int
Expand Down Expand Up @@ -242,7 +242,7 @@ dhd_doiovar(dhd_pub_t *dhd_pub, const bcm_iovar_t *vi, u32 actionid,

case IOV_SVAL(IOV_WDTICK):
if (!dhd_pub->up) {
bcmerror = -BCME_NOTUP;
bcmerror = -ENOLINK;
break;
}
dhd_os_wd_timer(dhd_pub, (uint) int_val);
Expand Down Expand Up @@ -289,15 +289,15 @@ dhd_doiovar(dhd_pub_t *dhd_pub, const bcm_iovar_t *vi, u32 actionid,

case IOV_SVAL(IOV_IOCTLTIMEOUT):{
if (int_val <= 0)
bcmerror = -BCME_BADARG;
bcmerror = -EINVAL;
else
dhd_os_set_ioctl_resp_timeout((unsigned int)
int_val);
break;
}

default:
bcmerror = -BCME_UNSUPPORTED;
bcmerror = -ENOTSUPP;
break;
}

Expand Down Expand Up @@ -381,7 +381,7 @@ dhd_iovar_op(dhd_pub_t *dhd_pub, const char *name,

vi = bcm_iovar_lookup(dhd_iovars, name);
if (vi == NULL) {
bcmerror = -BCME_UNSUPPORTED;
bcmerror = -ENOTSUPP;
goto exit;
}

Expand Down Expand Up @@ -420,19 +420,19 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)
DHD_TRACE(("%s: Enter\n", __func__));

if (!buf)
return -BCME_BADARG;
return -EINVAL;

switch (ioc->cmd) {
case DHD_GET_MAGIC:
if (buflen < sizeof(int))
bcmerror = -BCME_BUFTOOSHORT;
bcmerror = -EOVERFLOW;
else
*(int *)buf = DHD_IOCTL_MAGIC;
break;

case DHD_GET_VERSION:
if (buflen < sizeof(int))
bcmerror = -BCME_BUFTOOSHORT;
bcmerror = -EOVERFLOW;
else
*(int *)buf = DHD_IOCTL_VERSION;
break;
Expand All @@ -448,7 +448,7 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)
;

if (*arg) {
bcmerror = -BCME_BUFTOOSHORT;
bcmerror = -EOVERFLOW;
break;
}

Expand All @@ -464,7 +464,7 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)
bcmerror =
dhd_iovar_op(dhd_pub, buf, NULL, 0, arg,
arglen, IOV_SET);
if (bcmerror != -BCME_UNSUPPORTED)
if (bcmerror != -ENOTSUPP)
break;

/* not in generic table, try protocol module */
Expand All @@ -476,7 +476,7 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)
bcmerror = dhd_prot_iovar_op(dhd_pub, buf,
NULL, 0, arg,
arglen, IOV_SET);
if (bcmerror != -BCME_UNSUPPORTED)
if (bcmerror != -ENOTSUPP)
break;

/* if still not found, try bus module */
Expand All @@ -493,7 +493,7 @@ int dhd_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf, uint buflen)
}

default:
bcmerror = -BCME_UNSUPPORTED;
bcmerror = -ENOTSUPP;
}

return bcmerror;
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,7 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)

/* Copy the ioc control structure part of ioctl request */
if (copy_from_user(&ioc, ifr->ifr_data, sizeof(wl_ioctl_t))) {
bcmerror = -BCME_BADADDR;
bcmerror = -EINVAL;
goto done;
}

Expand All @@ -1715,11 +1715,11 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
{
buf = kmalloc(buflen, GFP_ATOMIC);
if (!buf) {
bcmerror = -BCME_NOMEM;
bcmerror = -ENOMEM;
goto done;
}
if (copy_from_user(buf, ioc.buf, buflen)) {
bcmerror = -BCME_BADADDR;
bcmerror = -EINVAL;
goto done;
}
}
Expand All @@ -1728,12 +1728,12 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
/* To differentiate between wl and dhd read 4 more byes */
if ((copy_from_user(&driver, (char *)ifr->ifr_data + sizeof(wl_ioctl_t),
sizeof(uint)) != 0)) {
bcmerror = -BCME_BADADDR;
bcmerror = -EINVAL;
goto done;
}

if (!capable(CAP_NET_ADMIN)) {
bcmerror = -BCME_EPERM;
bcmerror = -EPERM;
goto done;
}

Expand Down
Loading

0 comments on commit 0b75378

Please sign in to comment.