Commit e6a12a07 authored by Brett Rudley's avatar Brett Rudley Committed by Greg Kroah-Hartman

staging: brcm80211: completely remove osl_pubinfo_t typedef

Signed-off-by: default avatarBrett Rudley <brudley@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1070137d
...@@ -56,16 +56,16 @@ extern uint osl_pci_slot(osl_t *osh); ...@@ -56,16 +56,16 @@ extern uint osl_pci_slot(osl_t *osh);
#define PKTFREESETCB(osh, _tx_fn, _tx_ctx) \ #define PKTFREESETCB(osh, _tx_fn, _tx_ctx) \
do { \ do { \
((osl_pubinfo_t *)osh)->tx_fn = _tx_fn; \ ((struct osl_pubinfo *)osh)->tx_fn = _tx_fn; \
((osl_pubinfo_t *)osh)->tx_ctx = _tx_ctx; \ ((struct osl_pubinfo *)osh)->tx_ctx = _tx_ctx; \
} while (0) } while (0)
#if defined(BCMSDIO) && !defined(BRCM_FULLMAC) #if defined(BCMSDIO) && !defined(BRCM_FULLMAC)
#define REGOPSSET(osh, rreg, wreg, ctx) \ #define REGOPSSET(osh, rreg, wreg, ctx) \
do { \ do { \
((osl_pubinfo_t *)osh)->rreg_fn = rreg; \ ((struct osl_pubinfo *)osh)->rreg_fn = rreg; \
((osl_pubinfo_t *)osh)->wreg_fn = wreg; \ ((struct osl_pubinfo *)osh)->wreg_fn = wreg; \
((osl_pubinfo_t *)osh)->reg_ctx = ctx; \ ((struct osl_pubinfo *)osh)->reg_ctx = ctx; \
} while (0) } while (0)
#endif #endif
...@@ -111,10 +111,11 @@ extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction); ...@@ -111,10 +111,11 @@ extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction);
#endif #endif
#if defined(BCMSDIO) #if defined(BCMSDIO)
#define SELECT_BUS_WRITE(osh, mmap_op, bus_op) if (((osl_pubinfo_t *)(osh))->mmbus) \ #define SELECT_BUS_WRITE(osh, mmap_op, bus_op) \
if (((struct osl_pubinfo *)(osh))->mmbus) \
mmap_op else bus_op mmap_op else bus_op
#define SELECT_BUS_READ(osh, mmap_op, bus_op) (((osl_pubinfo_t *)(osh))->mmbus) ? \ #define SELECT_BUS_READ(osh, mmap_op, bus_op) \
mmap_op : bus_op (((struct osl_pubinfo *)(osh))->mmbus) ? mmap_op : bus_op
#else #else
#define SELECT_BUS_WRITE(osh, mmap_op, bus_op) mmap_op #define SELECT_BUS_WRITE(osh, mmap_op, bus_op) mmap_op
#define SELECT_BUS_READ(osh, mmap_op, bus_op) mmap_op #define SELECT_BUS_READ(osh, mmap_op, bus_op) mmap_op
...@@ -271,7 +272,7 @@ extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction); ...@@ -271,7 +272,7 @@ extern void osl_dma_unmap(osl_t *osh, uint pa, uint size, int direction);
#define PKTSETLEN(skb, len) __skb_trim((struct sk_buff *)(skb), (len)) #define PKTSETLEN(skb, len) __skb_trim((struct sk_buff *)(skb), (len))
#define PKTPUSH(skb, bytes) skb_push((struct sk_buff *)(skb), (bytes)) #define PKTPUSH(skb, bytes) skb_push((struct sk_buff *)(skb), (bytes))
#define PKTPULL(skb, bytes) skb_pull((struct sk_buff *)(skb), (bytes)) #define PKTPULL(skb, bytes) skb_pull((struct sk_buff *)(skb), (bytes))
#define PKTALLOCED(osh) (((osl_pubinfo_t *)(osh))->pktalloced) #define PKTALLOCED(osh) (((struct osl_pubinfo *)(osh))->pktalloced)
#define PKTSETPOOL(osh, skb, x, y) do {} while (0) #define PKTSETPOOL(osh, skb, x, y) do {} while (0)
#define PKTPOOL(osh, skb) false #define PKTPOOL(osh, skb) false
extern void *osl_pktget(osl_t *osh, uint len); extern void *osl_pktget(osl_t *osh, uint len);
...@@ -279,7 +280,7 @@ extern void osl_pktfree(osl_t *osh, void *skb, bool send); ...@@ -279,7 +280,7 @@ extern void osl_pktfree(osl_t *osh, void *skb, bool send);
#ifdef BRCM_FULLMAC #ifdef BRCM_FULLMAC
static inline void * static inline void *
osl_pkt_frmnative(osl_pubinfo_t *osh, struct sk_buff *skb) osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb)
{ {
struct sk_buff *nskb; struct sk_buff *nskb;
...@@ -289,10 +290,10 @@ osl_pkt_frmnative(osl_pubinfo_t *osh, struct sk_buff *skb) ...@@ -289,10 +290,10 @@ osl_pkt_frmnative(osl_pubinfo_t *osh, struct sk_buff *skb)
return (void *)skb; return (void *)skb;
} }
#define PKTFRMNATIVE(osh, skb) \ #define PKTFRMNATIVE(osh, skb) \
osl_pkt_frmnative(((osl_pubinfo_t *)osh), (struct sk_buff*)(skb)) osl_pkt_frmnative(((struct osl_pubinfo *)osh), (struct sk_buff*)(skb))
static inline struct sk_buff * static inline struct sk_buff *
osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt) osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt)
{ {
struct sk_buff *nskb; struct sk_buff *nskb;
...@@ -302,9 +303,9 @@ osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt) ...@@ -302,9 +303,9 @@ osl_pkt_tonative(osl_pubinfo_t *osh, void *pkt)
return (struct sk_buff *)pkt; return (struct sk_buff *)pkt;
} }
#define PKTTONATIVE(osh, pkt) \ #define PKTTONATIVE(osh, pkt) \
osl_pkt_tonative((osl_pubinfo_t *)(osh), (pkt)) osl_pkt_tonative((struct osl_pubinfo *)(osh), (pkt))
#else /* !BRCM_FULLMAC */ #else /* !BRCM_FULLMAC */
#define PKTUNALLOC(osh) (((osl_pubinfo_t *)(osh))->pktalloced--) #define PKTUNALLOC(osh) (((struct osl_pubinfo *)(osh))->pktalloced--)
#define PKTSETSKIPCT(osh, skb) #define PKTSETSKIPCT(osh, skb)
#define PKTCLRSKIPCT(osh, skb) #define PKTCLRSKIPCT(osh, skb)
......
...@@ -42,7 +42,6 @@ struct osl_info { ...@@ -42,7 +42,6 @@ struct osl_info {
}; };
typedef struct osl_info osl_t; typedef struct osl_info osl_t;
typedef struct osl_pubinfo osl_pubinfo_t;
typedef struct osl_dmainfo osldma_t; typedef struct osl_dmainfo osldma_t;
......
...@@ -245,48 +245,48 @@ void osl_assert(char *exp, char *file, int line) ...@@ -245,48 +245,48 @@ void osl_assert(char *exp, char *file, int line)
#if defined(BCMSDIO) && !defined(BRCM_FULLMAC) #if defined(BCMSDIO) && !defined(BRCM_FULLMAC)
u8 osl_readb(osl_t *osh, volatile u8 *r) u8 osl_readb(osl_t *osh, volatile u8 *r)
{ {
osl_rreg_fn_t rreg = ((osl_pubinfo_t *) osh)->rreg_fn; osl_rreg_fn_t rreg = ((struct osl_pubinfo *) osh)->rreg_fn;
void *ctx = ((osl_pubinfo_t *) osh)->reg_ctx; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx;
return (u8) ((rreg) (ctx, (void *)r, sizeof(u8))); return (u8) ((rreg) (ctx, (void *)r, sizeof(u8)));
} }
u16 osl_readw(osl_t *osh, volatile u16 *r) u16 osl_readw(osl_t *osh, volatile u16 *r)
{ {
osl_rreg_fn_t rreg = ((osl_pubinfo_t *) osh)->rreg_fn; osl_rreg_fn_t rreg = ((struct osl_pubinfo *) osh)->rreg_fn;
void *ctx = ((osl_pubinfo_t *) osh)->reg_ctx; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx;
return (u16) ((rreg) (ctx, (void *)r, sizeof(u16))); return (u16) ((rreg) (ctx, (void *)r, sizeof(u16)));
} }
u32 osl_readl(osl_t *osh, volatile u32 *r) u32 osl_readl(osl_t *osh, volatile u32 *r)
{ {
osl_rreg_fn_t rreg = ((osl_pubinfo_t *) osh)->rreg_fn; osl_rreg_fn_t rreg = ((struct osl_pubinfo *) osh)->rreg_fn;
void *ctx = ((osl_pubinfo_t *) osh)->reg_ctx; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx;
return (u32) ((rreg) (ctx, (void *)r, sizeof(u32))); return (u32) ((rreg) (ctx, (void *)r, sizeof(u32)));
} }
void osl_writeb(osl_t *osh, volatile u8 *r, u8 v) void osl_writeb(osl_t *osh, volatile u8 *r, u8 v)
{ {
osl_wreg_fn_t wreg = ((osl_pubinfo_t *) osh)->wreg_fn; osl_wreg_fn_t wreg = ((struct osl_pubinfo *) osh)->wreg_fn;
void *ctx = ((osl_pubinfo_t *) osh)->reg_ctx; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx;
((wreg) (ctx, (void *)r, v, sizeof(u8))); ((wreg) (ctx, (void *)r, v, sizeof(u8)));
} }
void osl_writew(osl_t *osh, volatile u16 *r, u16 v) void osl_writew(osl_t *osh, volatile u16 *r, u16 v)
{ {
osl_wreg_fn_t wreg = ((osl_pubinfo_t *) osh)->wreg_fn; osl_wreg_fn_t wreg = ((struct osl_pubinfo *) osh)->wreg_fn;
void *ctx = ((osl_pubinfo_t *) osh)->reg_ctx; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx;
((wreg) (ctx, (void *)r, v, sizeof(u16))); ((wreg) (ctx, (void *)r, v, sizeof(u16)));
} }
void osl_writel(osl_t *osh, volatile u32 *r, u32 v) void osl_writel(osl_t *osh, volatile u32 *r, u32 v)
{ {
osl_wreg_fn_t wreg = ((osl_pubinfo_t *) osh)->wreg_fn; osl_wreg_fn_t wreg = ((struct osl_pubinfo *) osh)->wreg_fn;
void *ctx = ((osl_pubinfo_t *) osh)->reg_ctx; void *ctx = ((struct osl_pubinfo *) osh)->reg_ctx;
((wreg) (ctx, (void *)r, v, sizeof(u32))); ((wreg) (ctx, (void *)r, v, sizeof(u32)));
} }
......
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