Commit 70963f98 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: removed 'hnd' from everything but function names

Code cleanup. 'hnd' is a company specific acronym.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 189aed09
......@@ -152,7 +152,7 @@ extern int dhdcdc_set_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf,
typedef struct dhd_console {
uint count; /* Poll interval msec counter */
uint log_addr; /* Log struct address (fixed) */
hndrte_log_t log; /* Log struct (host copy) */
rte_log_t log; /* Log struct (host copy) */
uint bufsize; /* Size of log buffer */
u8 *buf; /* Log buffer (host copy) */
uint last; /* Last buffer read index */
......@@ -1734,7 +1734,7 @@ static int dhdsdio_readshared(dhd_bus_t *bus, sdpcm_shared_t *sh)
return -EBADE;
}
/* Read hndrte_shared structure */
/* Read rte_shared structure */
rv = dhdsdio_membytes(bus, false, addr, (u8 *) sh,
sizeof(sdpcm_shared_t));
if (rv < 0)
......@@ -1949,7 +1949,7 @@ static int dhdsdio_readconsole(dhd_bus_t *bus)
return 0;
/* Read console log struct */
addr = bus->console_addr + offsetof(hndrte_cons_t, log);
addr = bus->console_addr + offsetof(rte_cons_t, log);
rv = dhdsdio_membytes(bus, false, addr, (u8 *)&c->log,
sizeof(c->log));
if (rv < 0)
......@@ -4826,20 +4826,20 @@ extern int dhd_bus_console_in(dhd_pub_t *dhdp, unsigned char *msg, uint msglen)
dhdsdio_clkctl(bus, CLK_AVAIL, false);
/* Zero cbuf_index */
addr = bus->console_addr + offsetof(hndrte_cons_t, cbuf_idx);
addr = bus->console_addr + offsetof(rte_cons_t, cbuf_idx);
val = cpu_to_le32(0);
rv = dhdsdio_membytes(bus, true, addr, (u8 *)&val, sizeof(val));
if (rv < 0)
goto done;
/* Write message into cbuf */
addr = bus->console_addr + offsetof(hndrte_cons_t, cbuf);
addr = bus->console_addr + offsetof(rte_cons_t, cbuf);
rv = dhdsdio_membytes(bus, true, addr, (u8 *)msg, msglen);
if (rv < 0)
goto done;
/* Write length into vcons_in */
addr = bus->console_addr + offsetof(hndrte_cons_t, vcons_in);
addr = bus->console_addr + offsetof(rte_cons_t, vcons_in);
val = cpu_to_le32(msglen);
rv = dhdsdio_membytes(bus, true, addr, (u8 *)&val, sizeof(val));
if (rv < 0)
......
......@@ -14,8 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _hndrte_armtrap_h
#define _hndrte_armtrap_h
#ifndef _rte_armtrap_h
#define _rte_armtrap_h
/* ARM trap handling */
......@@ -72,4 +72,4 @@ typedef struct _trap_struct {
#endif /* !_LANGUAGE_ASSEMBLY */
#endif /* _hndrte_armtrap_h */
#endif /* _rte_armtrap_h */
......@@ -13,8 +13,8 @@
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _hndrte_cons_h
#define _hndrte_cons_h
#ifndef _rte_cons_h
#define _rte_cons_h
#define CBUF_LEN (128)
......@@ -25,7 +25,7 @@ typedef struct {
uint buf_size;
uint idx;
char *_buf_compat; /* Redundant pointer for backward compat. */
} hndrte_log_t;
} rte_log_t;
typedef struct {
/* Virtual UART
......@@ -46,7 +46,7 @@ typedef struct {
* Output will be lost if the output wraps around faster than the host
* polls.
*/
hndrte_log_t log;
rte_log_t log;
/* Console input line buffer
* Characters are read one at a time into cbuf
......@@ -56,7 +56,6 @@ typedef struct {
*/
uint cbuf_idx;
char cbuf[CBUF_LEN];
} hndrte_cons_t;
#endif /* _hndrte_cons_h */
} rte_cons_t;
#endif /* _rte_cons_h */
......@@ -14,13 +14,13 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _hnddma_h_
#define _hnddma_h_
#ifndef _bcmdma_h_
#define _bcmdma_h_
#ifndef _hnddma_pub_
#define _hnddma_pub_
struct hnddma_pub;
#endif /* _hnddma_pub_ */
#ifndef _dma_pub_
#define _dma_pub_
struct dma_pub;
#endif /* _dma_pub_ */
/* map/unmap direction */
#define DMA_TX 1 /* TX direction for DMA */
......@@ -35,54 +35,54 @@ typedef enum txd_range {
} txd_range_t;
/* dma function type */
typedef void (*di_detach_t) (struct hnddma_pub *dmah);
typedef bool(*di_txreset_t) (struct hnddma_pub *dmah);
typedef bool(*di_rxreset_t) (struct hnddma_pub *dmah);
typedef bool(*di_rxidle_t) (struct hnddma_pub *dmah);
typedef void (*di_txinit_t) (struct hnddma_pub *dmah);
typedef bool(*di_txenabled_t) (struct hnddma_pub *dmah);
typedef void (*di_rxinit_t) (struct hnddma_pub *dmah);
typedef void (*di_txsuspend_t) (struct hnddma_pub *dmah);
typedef void (*di_txresume_t) (struct hnddma_pub *dmah);
typedef bool(*di_txsuspended_t) (struct hnddma_pub *dmah);
typedef bool(*di_txsuspendedidle_t) (struct hnddma_pub *dmah);
typedef int (*di_txfast_t) (struct hnddma_pub *dmah, struct sk_buff *p,
typedef void (*di_detach_t) (struct dma_pub *dmah);
typedef bool(*di_txreset_t) (struct dma_pub *dmah);
typedef bool(*di_rxreset_t) (struct dma_pub *dmah);
typedef bool(*di_rxidle_t) (struct dma_pub *dmah);
typedef void (*di_txinit_t) (struct dma_pub *dmah);
typedef bool(*di_txenabled_t) (struct dma_pub *dmah);
typedef void (*di_rxinit_t) (struct dma_pub *dmah);
typedef void (*di_txsuspend_t) (struct dma_pub *dmah);
typedef void (*di_txresume_t) (struct dma_pub *dmah);
typedef bool(*di_txsuspended_t) (struct dma_pub *dmah);
typedef bool(*di_txsuspendedidle_t) (struct dma_pub *dmah);
typedef int (*di_txfast_t) (struct dma_pub *dmah, struct sk_buff *p,
bool commit);
typedef int (*di_txunframed_t) (struct hnddma_pub *dmah, void *p, uint len,
typedef int (*di_txunframed_t) (struct dma_pub *dmah, void *p, uint len,
bool commit);
typedef void *(*di_getpos_t) (struct hnddma_pub *di, bool direction);
typedef void (*di_fifoloopbackenable_t) (struct hnddma_pub *dmah);
typedef bool(*di_txstopped_t) (struct hnddma_pub *dmah);
typedef bool(*di_rxstopped_t) (struct hnddma_pub *dmah);
typedef bool(*di_rxenable_t) (struct hnddma_pub *dmah);
typedef bool(*di_rxenabled_t) (struct hnddma_pub *dmah);
typedef void *(*di_rx_t) (struct hnddma_pub *dmah);
typedef bool(*di_rxfill_t) (struct hnddma_pub *dmah);
typedef void (*di_txreclaim_t) (struct hnddma_pub *dmah, txd_range_t range);
typedef void (*di_rxreclaim_t) (struct hnddma_pub *dmah);
typedef unsigned long (*di_getvar_t) (struct hnddma_pub *dmah,
typedef void *(*di_getpos_t) (struct dma_pub *di, bool direction);
typedef void (*di_fifoloopbackenable_t) (struct dma_pub *dmah);
typedef bool(*di_txstopped_t) (struct dma_pub *dmah);
typedef bool(*di_rxstopped_t) (struct dma_pub *dmah);
typedef bool(*di_rxenable_t) (struct dma_pub *dmah);
typedef bool(*di_rxenabled_t) (struct dma_pub *dmah);
typedef void *(*di_rx_t) (struct dma_pub *dmah);
typedef bool(*di_rxfill_t) (struct dma_pub *dmah);
typedef void (*di_txreclaim_t) (struct dma_pub *dmah, txd_range_t range);
typedef void (*di_rxreclaim_t) (struct dma_pub *dmah);
typedef unsigned long (*di_getvar_t) (struct dma_pub *dmah,
const char *name);
typedef void *(*di_getnexttxp_t) (struct hnddma_pub *dmah, txd_range_t range);
typedef void *(*di_getnextrxp_t) (struct hnddma_pub *dmah, bool forceall);
typedef void *(*di_peeknexttxp_t) (struct hnddma_pub *dmah);
typedef void *(*di_peeknextrxp_t) (struct hnddma_pub *dmah);
typedef void (*di_rxparam_get_t) (struct hnddma_pub *dmah, u16 *rxoffset,
typedef void *(*di_getnexttxp_t) (struct dma_pub *dmah, txd_range_t range);
typedef void *(*di_getnextrxp_t) (struct dma_pub *dmah, bool forceall);
typedef void *(*di_peeknexttxp_t) (struct dma_pub *dmah);
typedef void *(*di_peeknextrxp_t) (struct dma_pub *dmah);
typedef void (*di_rxparam_get_t) (struct dma_pub *dmah, u16 *rxoffset,
u16 *rxbufsize);
typedef void (*di_txblock_t) (struct hnddma_pub *dmah);
typedef void (*di_txunblock_t) (struct hnddma_pub *dmah);
typedef uint(*di_txactive_t) (struct hnddma_pub *dmah);
typedef void (*di_txrotate_t) (struct hnddma_pub *dmah);
typedef void (*di_counterreset_t) (struct hnddma_pub *dmah);
typedef uint(*di_ctrlflags_t) (struct hnddma_pub *dmah, uint mask, uint flags);
typedef char *(*di_dump_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b,
typedef void (*di_txblock_t) (struct dma_pub *dmah);
typedef void (*di_txunblock_t) (struct dma_pub *dmah);
typedef uint(*di_txactive_t) (struct dma_pub *dmah);
typedef void (*di_txrotate_t) (struct dma_pub *dmah);
typedef void (*di_counterreset_t) (struct dma_pub *dmah);
typedef uint(*di_ctrlflags_t) (struct dma_pub *dmah, uint mask, uint flags);
typedef char *(*di_dump_t) (struct dma_pub *dmah, struct bcmstrbuf *b,
bool dumpring);
typedef char *(*di_dumptx_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b,
typedef char *(*di_dumptx_t) (struct dma_pub *dmah, struct bcmstrbuf *b,
bool dumpring);
typedef char *(*di_dumprx_t) (struct hnddma_pub *dmah, struct bcmstrbuf *b,
typedef char *(*di_dumprx_t) (struct dma_pub *dmah, struct bcmstrbuf *b,
bool dumpring);
typedef uint(*di_rxactive_t) (struct hnddma_pub *dmah);
typedef uint(*di_txpending_t) (struct hnddma_pub *dmah);
typedef uint(*di_txcommitted_t) (struct hnddma_pub *dmah);
typedef uint(*di_rxactive_t) (struct dma_pub *dmah);
typedef uint(*di_txpending_t) (struct dma_pub *dmah);
typedef uint(*di_txcommitted_t) (struct dma_pub *dmah);
/* dma opsvec */
typedef struct di_fcn_s {
......@@ -136,7 +136,7 @@ typedef struct di_fcn_s {
* Exported data structure (read-only)
*/
/* export structure */
struct hnddma_pub {
struct dma_pub {
const di_fcn_t *di_fn; /* DMA function pointers */
uint txavail; /* # free tx descriptors */
uint dmactrlflags; /* dma control flags */
......@@ -148,7 +148,7 @@ struct hnddma_pub {
uint txnobuf; /* tx out of dma descriptors */
};
extern struct hnddma_pub *dma_attach(char *name, si_t *sih,
extern struct dma_pub *dma_attach(char *name, si_t *sih,
void *dmaregstx, void *dmaregsrx, uint ntxd,
uint nrxd, uint rxbufsize, int rxextheadroom,
uint nrxpost, uint rxoffset, uint *msg_level);
......@@ -202,7 +202,7 @@ extern const di_fcn_t dma64proc;
* This info is needed by DMA_ALLOC_CONSISTENT in dma attach
*/
extern uint dma_addrwidth(si_t *sih, void *dmaregs);
void dma_walk_packets(struct hnddma_pub *dmah, void (*callback_fnc)
void dma_walk_packets(struct dma_pub *dmah, void (*callback_fnc)
(void *pkt, void *arg_a), void *arg_a);
/*
......@@ -223,4 +223,4 @@ static inline void dma_spin_for_len(uint len, struct sk_buff *head)
#endif /* defined(__mips__) */
}
#endif /* _hnddma_h_ */
#endif /* _bcmdma_h_ */
......@@ -819,7 +819,7 @@ static int hndotp_nvread(void *oh, char *data, uint *len)
return rc;
}
static otp_fn_t hndotp_fn = {
static otp_fn_t otp_fn = {
(otp_size_t) hndotp_size,
(otp_read_bit_t) hndotp_read_bit,
......@@ -883,7 +883,7 @@ void *otp_init(si_t *sih)
#ifdef BCMHNDOTP
if (OTPTYPE_HND(oi->ccrev))
oi->fn = &hndotp_fn;
oi->fn = &otp_fn;
#endif
if (oi->fn == NULL) {
......
This diff is collapsed.
......@@ -2064,7 +2064,7 @@ void wlc_bmac_hw_up(struct wlc_hw_info *wlc_hw)
static bool wlc_dma_rxreset(struct wlc_hw_info *wlc_hw, uint fifo)
{
struct hnddma_pub *di = wlc_hw->di[fifo];
struct dma_pub *di = wlc_hw->di[fifo];
return dma_rxreset(di);
}
......
......@@ -5837,7 +5837,7 @@ void wlc_inval_dma_pkts(struct wlc_hw_info *hw,
struct ieee80211_sta *sta,
void (*dma_callback_fn))
{
struct hnddma_pub *dmah;
struct dma_pub *dmah;
int i;
for (i = 0; i < NFIFO; i++) {
dmah = hw->di[i];
......
......@@ -384,7 +384,7 @@ struct wlc_hw_info {
struct wlc_info *wlc;
/* fifo */
struct hnddma_pub *di[NFIFO]; /* hnddma handles, per fifo */
struct dma_pub *di[NFIFO]; /* dma handles, per fifo */
uint unit; /* device instance number */
......
......@@ -18,7 +18,6 @@
#define _wlc_types_h_
/* forward declarations */
struct wlc_info;
struct wlc_hw_info;
struct wlc_if;
......@@ -26,12 +25,7 @@ struct wl_if;
struct ampdu_info;
struct antsel_info;
struct bmac_pmq;
struct d11init;
#ifndef _hnddma_pub_
#define _hnddma_pub_
struct hnddma_pub;
#endif /* _hnddma_pub_ */
struct dma_pub;
#endif /* _wlc_types_h_ */
......@@ -89,7 +89,7 @@ typedef unsigned long dmaaddr_t;
typedef struct {
dmaaddr_t addr;
u32 length;
} hnddma_seg_t;
} dma_seg_t;
#define MAX_DMA_SEGS 4
......@@ -97,13 +97,13 @@ typedef struct {
void *oshdmah; /* Opaque handle for OSL to store its information */
uint origsize; /* Size of the virtual packet */
uint nsegs;
hnddma_seg_t segs[MAX_DMA_SEGS];
} hnddma_seg_map_t;
dma_seg_t segs[MAX_DMA_SEGS];
} dma_seg_map_t;
/* packet headroom necessary to accommodate the largest header in the system, (i.e TXOFF).
* By doing, we avoid the need to allocate an extra buffer for the header when bridging to WL.
* There is a compile time check in wlc.c which ensure that this value is at least as big
* as TXOFF. This value is used in dma_rxfill (hnddma.c).
* as TXOFF. This value is used in dma_rxfill (dma.c).
*/
#define BCMEXTRAHDROOM 172
......
......@@ -198,7 +198,7 @@ typedef struct {
u32 assert_exp_addr;
u32 assert_file_addr;
u32 assert_line;
u32 console_addr; /* Address of hndrte_cons_t */
u32 console_addr; /* Address of rte_cons_t */
u32 msgtrace_addr;
u8 tag[32];
} sdpcm_shared_t;
......
......@@ -14,8 +14,8 @@
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _sbhnddma_h_
#define _sbhnddma_h_
#ifndef _sbdma_h_
#define _sbdma_h_
/* DMA structure:
* support two DMA engines: 32 bits address or 64 bit addressing
......@@ -312,4 +312,4 @@ typedef volatile struct {
u16 flags;
} dma_rxh_t;
#endif /* _sbhnddma_h_ */
#endif /* _sbdma_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