Skip to content

Commit

Permalink
staging: brcm80211: removed fullmac BRCMF_IOCTL_MAGIC support
Browse files Browse the repository at this point in the history
Linux will never call brcmf_netdev_ioctl_entry() with the value
BRCMF_IOCTL_MAGIC in a user space buffer. Thus, unused code could be
removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed Sep 12, 2011
1 parent 6514e85 commit b78f721
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 1,147 deletions.
33 changes: 0 additions & 33 deletions drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,39 +235,6 @@ brcmf_sdcard_cfg_write(struct brcmf_sdio_dev *sdiodev, uint fnc_num, u32 addr,
fnc_num, addr, data);
}

int brcmf_sdcard_cis_read(struct brcmf_sdio_dev *sdiodev, uint func, u8 * cis,
uint length)
{
int status;

u8 *tmp_buf, *tmp_ptr;
u8 *ptr;
bool ascii = func & ~0xf;
func &= 0x7;

status = brcmf_sdioh_cis_read(sdiodev, func, cis, length);

if (ascii) {
/* Move binary bits to tmp and format them
into the provided buffer. */
tmp_buf = kmalloc(length, GFP_ATOMIC);
if (tmp_buf == NULL) {
brcmf_dbg(ERROR, "out of memory\n");
return -ENOMEM;
}
memcpy(tmp_buf, cis, length);
for (tmp_ptr = tmp_buf, ptr = cis; ptr < (cis + length - 4);
tmp_ptr++) {
ptr += sprintf((char *)ptr, "%.2x ", *tmp_ptr & 0xff);
if ((((tmp_ptr - tmp_buf) + 1) & 0xf) == 0)
ptr += sprintf((char *)ptr, "\n");
}
kfree(tmp_buf);
}

return status;
}

int
brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev, u32 address)
{
Expand Down
33 changes: 0 additions & 33 deletions drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,39 +423,6 @@ static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr)
return scratch;
}

int brcmf_sdioh_cis_read(struct brcmf_sdio_dev *sdiodev, uint func,
u8 *cisd, u32 length)
{
u32 count;
int offset;
u32 foo;
u8 *cis = cisd;

brcmf_dbg(TRACE, "Func = %d\n", func);

if (!sdiodev->func_cis_ptr[func]) {
memset(cis, 0, length);
brcmf_dbg(ERROR, "no func_cis_ptr[%d]\n", func);
return -ENOTSUPP;
}

brcmf_dbg(ERROR, "func_cis_ptr[%d]=0x%04x\n",
func, sdiodev->func_cis_ptr[func]);

for (count = 0; count < length; count++) {
offset = sdiodev->func_cis_ptr[func] + count;
if (brcmf_sdioh_card_regread(sdiodev, 0, offset, 1, &foo) < 0) {
brcmf_dbg(ERROR, "regread failed: Can't read CIS\n");
return -EIO;
}

*cis = (u8) (foo & 0xff);
cis++;
}

return 0;
}

static int brcmf_sdioh_enablefuncs(struct brcmf_sdio_dev *sdiodev)
{
int err_ret;
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ struct brcmf_c_ioctl {
#define BRCMF_IOCTL_MAXLEN 8192 /* max length ioctl buffer required */

/* common ioctl definitions */
#define BRCMF_GET_MAGIC 0
#define BRCMF_GET_VERSION 1
#define BRCMF_GET_VAR 2
#define BRCMF_SET_VAR 3
Expand Down
12 changes: 0 additions & 12 deletions drivers/staging/brcm80211/brcmfmac/dhd_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,6 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen);
extern int
brcmf_sdbrcm_bus_rxctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen);

/* Check for and handle local prot-specific iovar commands */
extern int brcmf_sdbrcm_bus_iovar_op(struct brcmf_pub *drvr, const char *name,
void *params, int plen, void *arg, int len,
bool set);

/* Add bus dump output to a buffer */
extern void brcmf_sdbrcm_bus_dump(struct brcmf_pub *drvr,
struct brcmu_strbuf *strbuf);

/* Clear any bus counters */
extern void brcmf_bus_clearcounts(struct brcmf_pub *drvr);

extern void brcmf_sdbrcm_wd_timer(struct brcmf_bus *bus, uint wdtick);

#endif /* _BRCMF_BUS_H_ */
5 changes: 0 additions & 5 deletions drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,6 @@ static void pkt_set_sum_good(struct sk_buff *skb, bool x)
skb->ip_summed = (x ? CHECKSUM_UNNECESSARY : CHECKSUM_NONE);
}

void brcmf_proto_dump(struct brcmf_pub *drvr, struct brcmu_strbuf *strbuf)
{
brcmu_bprintf(strbuf, "Protocol CDC: reqid %d\n", drvr->prot->reqid);
}

void brcmf_proto_hdrpush(struct brcmf_pub *drvr, int ifidx,
struct sk_buff *pktbuf)
{
Expand Down
Loading

0 comments on commit b78f721

Please sign in to comment.