810-b43_no_pio.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --- a/drivers/net/wireless/broadcom/b43/Makefile
  2. +++ b/drivers/net/wireless/broadcom/b43/Makefile
  3. @@ -17,7 +17,7 @@ b43-$(CPTCFG_B43_PHY_AC) += phy_ac.o
  4. b43-y += sysfs.o
  5. b43-y += xmit.o
  6. b43-y += dma.o
  7. -b43-y += pio.o
  8. +b43-$(CPTCFG_B43_PIO) += pio.o
  9. b43-y += rfkill.o
  10. b43-y += ppr.o
  11. b43-$(CPTCFG_B43_LEDS) += leds.o
  12. --- a/drivers/net/wireless/broadcom/b43/main.c
  13. +++ b/drivers/net/wireless/broadcom/b43/main.c
  14. @@ -2008,10 +2008,12 @@ static void b43_do_interrupt_thread(stru
  15. dma_reason[0], dma_reason[1],
  16. dma_reason[2], dma_reason[3],
  17. dma_reason[4], dma_reason[5]);
  18. +#ifdef CPTCFG_B43_PIO
  19. b43err(dev->wl, "This device does not support DMA "
  20. "on your system. It will now be switched to PIO.\n");
  21. /* Fall back to PIO transfers if we get fatal DMA errors! */
  22. dev->use_pio = true;
  23. +#endif
  24. b43_controller_restart(dev, "DMA error");
  25. return;
  26. }
  27. --- a/drivers/net/wireless/broadcom/b43/pio.h
  28. +++ b/drivers/net/wireless/broadcom/b43/pio.h
  29. @@ -150,7 +150,7 @@ static inline void b43_piorx_write32(str
  30. b43_write32(q->dev, q->mmio_base + offset, value);
  31. }
  32. -
  33. +#ifdef CPTCFG_B43_PIO
  34. int b43_pio_init(struct b43_wldev *dev);
  35. void b43_pio_free(struct b43_wldev *dev);
  36. @@ -161,5 +161,37 @@ void b43_pio_rx(struct b43_pio_rxqueue *
  37. void b43_pio_tx_suspend(struct b43_wldev *dev);
  38. void b43_pio_tx_resume(struct b43_wldev *dev);
  39. +#else
  40. +static inline int b43_pio_init(struct b43_wldev *dev)
  41. +{
  42. + return 0;
  43. +}
  44. +
  45. +static inline void b43_pio_free(struct b43_wldev *dev)
  46. +{
  47. +}
  48. +
  49. +static inline int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)
  50. +{
  51. + return 0;
  52. +}
  53. +
  54. +static inline void b43_pio_handle_txstatus(struct b43_wldev *dev,
  55. + const struct b43_txstatus *status)
  56. +{
  57. +}
  58. +
  59. +static inline void b43_pio_rx(struct b43_pio_rxqueue *q)
  60. +{
  61. +}
  62. +
  63. +static inline void b43_pio_tx_suspend(struct b43_wldev *dev)
  64. +{
  65. +}
  66. +
  67. +static inline void b43_pio_tx_resume(struct b43_wldev *dev)
  68. +{
  69. +}
  70. +#endif /* CPTCFG_B43_PIO */
  71. #endif /* B43_PIO_H_ */
  72. --- a/drivers/net/wireless/broadcom/b43/Kconfig
  73. +++ b/drivers/net/wireless/broadcom/b43/Kconfig
  74. @@ -98,7 +98,7 @@ config B43_BCMA_PIO
  75. default y
  76. config B43_PIO
  77. - bool
  78. + bool "Broadcom 43xx PIO support"
  79. depends on B43 && B43_SSB
  80. select SSB_BLOCKIO
  81. default y