#ifndef _osl_h_
#define _osl_h_
-struct osl_pubinfo {
- uint pktalloced; /* Number of allocated packet buffers */
- bool mmbus; /* Bus supports memory-mapped registers */
-};
-
/* osl handle type forward declaration */
struct osl_info {
- struct osl_pubinfo pub;
+ uint pktalloced; /* Number of allocated packet buffers */
+ bool mmbus; /* Bus supports memory-mapped registers */
uint magic;
void *pdev;
uint bustype;
#if defined(BCMSDIO)
#define SELECT_BUS_WRITE(osh, mmap_op, bus_op) \
- if (((struct osl_pubinfo *)(osh))->mmbus) \
+ if ((osh)->mmbus) \
mmap_op else bus_op
#define SELECT_BUS_READ(osh, mmap_op, bus_op) \
- (((struct osl_pubinfo *)(osh))->mmbus) ? mmap_op : bus_op
+ ((osh)->mmbus) ? mmap_op : bus_op
#else
#define SELECT_BUS_WRITE(osh, mmap_op, bus_op) mmap_op
#define SELECT_BUS_READ(osh, mmap_op, bus_op) mmap_op
#ifdef BRCM_FULLMAC
static inline void *
-osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb)
+osl_pkt_frmnative(struct osl_info *osh, struct sk_buff *skb)
{
struct sk_buff *nskb;
return (void *)skb;
}
#define PKTFRMNATIVE(osh, skb) \
- osl_pkt_frmnative(((struct osl_pubinfo *)osh), (struct sk_buff*)(skb))
+ osl_pkt_frmnative((osh), (struct sk_buff *)(skb))
static inline struct sk_buff *
-osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt)
+osl_pkt_tonative(struct osl_info *osh, void *pkt)
{
struct sk_buff *nskb;
return (struct sk_buff *)pkt;
}
#define PKTTONATIVE(osh, pkt) \
- osl_pkt_tonative((struct osl_pubinfo *)(osh), (pkt))
+ osl_pkt_tonative((osh), (pkt))
#else /* !BRCM_FULLMAC */
#define PKTSETSKIPCT(osh, skb)
#define PKTCLRSKIPCT(osh, skb)
extern uint si_flag(si_t *sih);
extern uint si_coreidx(si_t *sih);
extern uint si_corerev(si_t *sih);
-extern void *si_osh(si_t *sih);
+struct osl_info *si_osh(si_t *sih);
extern uint si_corereg(si_t *sih, uint coreidx, uint regoff, uint mask,
uint val);
extern void si_write_wrapperreg(si_t *sih, u32 offset, u32 val);
/* Verify all packets are flushed from the driver */
- if (wlc->osh->pub.pktalloced != 0) {
+ if (wlc->osh->pktalloced != 0) {
WL_ERROR(("%d packets not freed at wlc_down!!!!!!\n",
- wlc->osh->pub.pktalloced));
+ wlc->osh->pktalloced));
}
#ifdef BCMDBG
/* Since all the packets should have been freed,
ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p);
WLCNTINCR(wlc->pub->_cnt->ieee_rx);
- osh->pub.pktalloced--;
+ osh->pktalloced--;
return;
}