810-b43-gpio-mask-module-option.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. --- a/drivers/net/wireless/broadcom/b43/b43.h
  2. +++ b/drivers/net/wireless/broadcom/b43/b43.h
  3. @@ -839,6 +839,7 @@ struct b43_wldev {
  4. bool qos_enabled; /* TRUE, if QoS is used. */
  5. bool hwcrypto_enabled; /* TRUE, if HW crypto acceleration is enabled. */
  6. bool use_pio; /* TRUE if next init should use PIO */
  7. + int gpiomask; /* GPIO LED mask as a module parameter */
  8. /* PHY/Radio device. */
  9. struct b43_phy phy;
  10. --- a/drivers/net/wireless/broadcom/b43/main.c
  11. +++ b/drivers/net/wireless/broadcom/b43/main.c
  12. @@ -75,6 +75,11 @@ MODULE_FIRMWARE("b43/ucode16_mimo.fw");
  13. MODULE_FIRMWARE("b43/ucode5.fw");
  14. MODULE_FIRMWARE("b43/ucode9.fw");
  15. +static int modparam_gpiomask = 0x000F;
  16. +module_param_named(gpiomask, modparam_gpiomask, int, 0444);
  17. +MODULE_PARM_DESC(gpiomask,
  18. + "GPIO mask for LED control (default 0x000F)");
  19. +
  20. static int modparam_bad_frames_preempt;
  21. module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
  22. MODULE_PARM_DESC(bad_frames_preempt,
  23. @@ -2882,10 +2887,10 @@ static int b43_gpio_init(struct b43_wlde
  24. u32 mask, set;
  25. b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
  26. - b43_maskset16(dev, B43_MMIO_GPIO_MASK, ~0, 0xF);
  27. + b43_maskset16(dev, B43_MMIO_GPIO_MASK, ~0, modparam_gpiomask);
  28. mask = 0x0000001F;
  29. - set = 0x0000000F;
  30. + set = modparam_gpiomask;
  31. if (dev->dev->chip_id == 0x4301) {
  32. mask |= 0x0060;
  33. set |= 0x0060;