From d7b05da5fe75ce852d4c809ce4d0eb27dadbd7fb Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Tue, 4 Oct 2011 23:18:50 +0200 Subject: [PATCH] --- yaml --- r: 268691 b: refs/heads/master c: 412e4fdf124a6747d789035fa641c06243afaabf h: refs/heads/master i: 268689: 8cc7467be9c82ec300f372bb76b113b5c4a4e53f 268687: 2d6fefb9dc69ea01353a9f0fc04f96c029234969 v: v3 --- [refs] | 2 +- .../staging/brcm80211/brcmsmac/types.h | 1 - .../staging/brcm80211/brcmutil/utils.c | 34 ------------------- .../staging/brcm80211/include/brcmu_utils.h | 15 -------- 4 files changed, 1 insertion(+), 51 deletions(-) diff --git a/[refs] b/[refs] index 16fb11019f16..9149492a143d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 67064f27ab1b13152dc0d21423a14499fd5c34e2 +refs/heads/master: 412e4fdf124a6747d789035fa641c06243afaabf diff --git a/trunk/drivers/staging/brcm80211/brcmsmac/types.h b/trunk/drivers/staging/brcm80211/brcmsmac/types.h index 23969fe90068..27a814b07462 100644 --- a/trunk/drivers/staging/brcm80211/brcmsmac/types.h +++ b/trunk/drivers/staging/brcm80211/brcmsmac/types.h @@ -329,7 +329,6 @@ struct ieee80211_tx_queue_params; struct brcms_info; struct brcms_c_info; struct brcms_hardware; -struct brcmu_strbuf; struct brcms_txq_info; struct brcms_band; struct dma_pub; diff --git a/trunk/drivers/staging/brcm80211/brcmutil/utils.c b/trunk/drivers/staging/brcm80211/brcmutil/utils.c index 1fe47fe66e33..62bcc71eadf6 100644 --- a/trunk/drivers/staging/brcm80211/brcmutil/utils.c +++ b/trunk/drivers/staging/brcm80211/brcmutil/utils.c @@ -598,37 +598,3 @@ uint brcmu_bitcount(u8 *bitmap, uint length) return bitcount; } EXPORT_SYMBOL(brcmu_bitcount); - -/* Initialization of brcmu_strbuf structure */ -void brcmu_binit(struct brcmu_strbuf *b, char *buf, uint size) -{ - b->origsize = b->size = size; - b->origbuf = b->buf = buf; -} -EXPORT_SYMBOL(brcmu_binit); - -/* Buffer sprintf wrapper to guard against buffer overflow */ -int brcmu_bprintf(struct brcmu_strbuf *b, const char *fmt, ...) -{ - va_list ap; - int r; - - va_start(ap, fmt); - r = vsnprintf(b->buf, b->size, fmt, ap); - - /* Non Ansi C99 compliant returns -1, - * Ansi compliant return r >= b->size, - * stdlib returns 0, handle all - */ - if ((r == -1) || (r >= (int)b->size) || (r == 0)) { - b->size = 0; - } else { - b->size -= r; - b->buf += r; - } - - va_end(ap); - - return r; -} -EXPORT_SYMBOL(brcmu_bprintf); diff --git a/trunk/drivers/staging/brcm80211/include/brcmu_utils.h b/trunk/drivers/staging/brcm80211/include/brcmu_utils.h index cf34bd3e252e..a7d3df23661f 100644 --- a/trunk/drivers/staging/brcm80211/include/brcmu_utils.h +++ b/trunk/drivers/staging/brcm80211/include/brcmu_utils.h @@ -19,18 +19,6 @@ #include -/* Buffer structure for collecting string-formatted data -* using brcmu_bprintf() API. -* Use brcmu_binit() to initialize before use -*/ - -struct brcmu_strbuf { - char *buf; /* pointer to current position in origbuf */ - unsigned int size; /* current (residual) size in bytes */ - char *origbuf; /* unmodified pointer to orignal buffer */ - unsigned int origsize; /* unmodified orignal buffer size in bytes */ -}; - /* * Spin at most 'us' microseconds while 'exp' is true. * Caller should explicitly test 'exp' when this completes @@ -228,9 +216,6 @@ extern struct brcmu_tlv *brcmu_parse_tlvs(void *buf, int buflen, extern u16 brcmu_qdbm_to_mw(u8 qdbm); extern u8 brcmu_mw_to_qdbm(u16 mw); -extern void brcmu_binit(struct brcmu_strbuf *b, char *buf, uint size); -extern int brcmu_bprintf(struct brcmu_strbuf *b, const char *fmt, ...); - extern uint brcmu_mkiovar(char *name, char *data, uint datalen, char *buf, uint len); extern uint brcmu_bitcount(u8 *bitmap, uint bytelength);