aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcm43xx/bcm43xx.h
diff options
context:
space:
mode:
authorMichael Buesch <mbuesch@freenet.de>2006-02-12 10:47:44 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-03-27 11:18:32 -0500
commit77db31ea4322f2dd12dc814d6664ae96517604c0 (patch)
tree358519550cf715249ba836d06eb651d1fdf86079 /drivers/net/wireless/bcm43xx/bcm43xx.h
parent5c57807afcc28a6b8fb579ef2c79e49f0b688425 (diff)
[PATCH] bcm43xx: Partially fix PIO code. Add Kconfig option for PIO or DMA mode (or both).
Signed-off-by: Michael Buesch <mbuesch@freenet.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/bcm43xx/bcm43xx.h')
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx.h b/drivers/net/wireless/bcm43xx/bcm43xx.h
index 981d563f5738..3d8ac7e952cc 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx.h
+++ b/drivers/net/wireless/bcm43xx/bcm43xx.h
@@ -639,7 +639,7 @@ struct bcm43xx_private {
639 u32 initialized:1, /* init_board() succeed */ 639 u32 initialized:1, /* init_board() succeed */
640 was_initialized:1, /* for PCI suspend/resume. */ 640 was_initialized:1, /* for PCI suspend/resume. */
641 shutting_down:1, /* free_board() in progress */ 641 shutting_down:1, /* free_board() in progress */
642 pio_mode:1, /* PIO (if true), or DMA (if false) used. */ 642 __using_pio:1, /* Internal, use bcm43xx_using_pio(). */
643 bad_frames_preempt:1, /* Use "Bad Frames Preemption" (default off) */ 643 bad_frames_preempt:1, /* Use "Bad Frames Preemption" (default off) */
644 reg124_set_0x4:1, /* Some variable to keep track of IRQ stuff. */ 644 reg124_set_0x4:1, /* Some variable to keep track of IRQ stuff. */
645 powersaving:1, /* TRUE if we are in PowerSaving mode. FALSE otherwise. */ 645 powersaving:1, /* TRUE if we are in PowerSaving mode. FALSE otherwise. */
@@ -749,6 +749,33 @@ struct bcm43xx_private * bcm43xx_priv(struct net_device *dev)
749 return ieee80211softmac_priv(dev); 749 return ieee80211softmac_priv(dev);
750} 750}
751 751
752
753/* Helper function, which returns a boolean.
754 * TRUE, if PIO is used; FALSE, if DMA is used.
755 */
756#if defined(CONFIG_BCM43XX_DMA) && defined(CONFIG_BCM43XX_PIO)
757static inline
758int bcm43xx_using_pio(struct bcm43xx_private *bcm)
759{
760 return bcm->__using_pio;
761}
762#elif defined(CONFIG_BCM43XX_DMA)
763static inline
764int bcm43xx_using_pio(struct bcm43xx_private *bcm)
765{
766 return 0;
767}
768#elif defined(CONFIG_BCM43XX_PIO)
769static inline
770int bcm43xx_using_pio(struct bcm43xx_private *bcm)
771{
772 return 1;
773}
774#else
775# error "Using neither DMA nor PIO? Confused..."
776#endif
777
778
752static inline 779static inline
753int bcm43xx_num_80211_cores(struct bcm43xx_private *bcm) 780int bcm43xx_num_80211_cores(struct bcm43xx_private *bcm)
754{ 781{