Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 228280
b: refs/heads/master
c: 7a9b48b
h: refs/heads/master
v: v3
  • Loading branch information
Brett Rudley authored and Greg Kroah-Hartman committed Dec 7, 2010
1 parent 703c988 commit 4078ee1
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 98ede2ed46cef38e98c8341d410323895f60570e
refs/heads/master: 7a9b48b3d3e0f373dc996efde56a5bff0944d8de
20 changes: 8 additions & 12 deletions trunk/drivers/staging/brcm80211/include/osl.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@
#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;
Expand Down Expand Up @@ -106,10 +102,10 @@ extern void osl_dma_unmap(struct osl_info *osh, uint pa, uint size,

#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
Expand Down Expand Up @@ -255,7 +251,7 @@ extern void osl_pktfree(struct osl_info *osh, void *skb, bool send);

#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;

Expand All @@ -265,10 +261,10 @@ osl_pkt_frmnative(struct osl_pubinfo *osh, struct sk_buff *skb)
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;

Expand All @@ -278,7 +274,7 @@ osl_pkt_tonative(struct osl_pubinfo *osh, void *pkt)
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)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/include/siutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ extern uint si_coreid(si_t *sih);
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);
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/brcm80211/sys/wlc_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2733,9 +2733,9 @@ uint wlc_down(wlc_info_t *wlc)


/* 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,
Expand Down Expand Up @@ -6935,7 +6935,7 @@ wlc_recvctl(wlc_info_t *wlc, struct osl_info *osh, d11rxhdr_t *rxh,
ieee80211_rx_irqsafe(wlc->pub->ieee_hw, p);

WLCNTINCR(wlc->pub->_cnt->ieee_rx);
osh->pub.pktalloced--;
osh->pktalloced--;
return;
}

Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/util/linux_osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ struct osl_info *osl_attach(void *pdev, uint bustype)
case PCI_BUS:
case SI_BUS:
case PCMCIA_BUS:
osh->pub.mmbus = true;
osh->mmbus = true;
break;
case JTAG_BUS:
case SDIO_BUS:
case USB_BUS:
case SPI_BUS:
case RPC_BUS:
osh->pub.mmbus = false;
osh->mmbus = false;
break;
default:
ASSERT(false);
Expand Down Expand Up @@ -88,7 +88,7 @@ void *BCMFASTPATH osl_pktget(struct osl_info *osh, uint len)
skb_put(skb, len);
skb->priority = 0;

osh->pub.pktalloced++;
osh->pktalloced++;
}

return (void *)skb;
Expand Down Expand Up @@ -119,7 +119,7 @@ void BCMFASTPATH osl_pktfree(struct osl_info *osh, void *p, bool send)
*/
dev_kfree_skb(skb);

osh->pub.pktalloced--;
osh->pktalloced--;
nest++;
skb = nskb;
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/brcm80211/util/siutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ void si_detach(si_t *sih)
kfree(sii);
}

void *si_osh(si_t *sih)
struct osl_info *si_osh(si_t *sih)
{
si_info_t *sii;

Expand Down

0 comments on commit 4078ee1

Please sign in to comment.