[PATCH 386/510] staging: brcm80211: Move osl_pub into osl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Brett Rudley <brudley@xxxxxxxxxxxx>

Signed-off-by: Brett Rudley <brudley@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/brcm80211/include/osl.h      |   20 ++++++++------------
 drivers/staging/brcm80211/include/siutils.h  |    2 +-
 drivers/staging/brcm80211/sys/wlc_mac80211.c |    6 +++---
 drivers/staging/brcm80211/util/linux_osl.c   |    8 ++++----
 drivers/staging/brcm80211/util/siutils.c     |    2 +-
 5 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/brcm80211/include/osl.h b/drivers/staging/brcm80211/include/osl.h
index b543bbb..2cea5c1 100644
--- a/drivers/staging/brcm80211/include/osl.h
+++ b/drivers/staging/brcm80211/include/osl.h
@@ -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;
@@ -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
@@ -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;
 
@@ -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;
 
@@ -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)
diff --git a/drivers/staging/brcm80211/include/siutils.h b/drivers/staging/brcm80211/include/siutils.h
index d6115cd..a935092 100644
--- a/drivers/staging/brcm80211/include/siutils.h
+++ b/drivers/staging/brcm80211/include/siutils.h
@@ -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);
diff --git a/drivers/staging/brcm80211/sys/wlc_mac80211.c b/drivers/staging/brcm80211/sys/wlc_mac80211.c
index 9aae340..fcd3bd1 100644
--- a/drivers/staging/brcm80211/sys/wlc_mac80211.c
+++ b/drivers/staging/brcm80211/sys/wlc_mac80211.c
@@ -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,
@@ -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;
 }
 
diff --git a/drivers/staging/brcm80211/util/linux_osl.c b/drivers/staging/brcm80211/util/linux_osl.c
index 6a06d61..2efce7a 100644
--- a/drivers/staging/brcm80211/util/linux_osl.c
+++ b/drivers/staging/brcm80211/util/linux_osl.c
@@ -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);
@@ -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;
@@ -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;
 	}
diff --git a/drivers/staging/brcm80211/util/siutils.c b/drivers/staging/brcm80211/util/siutils.c
index 29d2d68..5916712 100644
--- a/drivers/staging/brcm80211/util/siutils.c
+++ b/drivers/staging/brcm80211/util/siutils.c
@@ -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;
 
-- 
1.7.3.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux