860-brcmsmac-use-bcma-PCIe-up-and-down-functions.patch 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. brcmsmac: use bcma PCIe up and down functions
  2. replace the calls to bcma_core_pci_extend_L1timer() by calls to the
  3. newly introduced bcma_core_pci_ip() and bcma_core_pci_down()
  4. Signed-off-by: Hauke Mehrtens <[email protected]>
  5. --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
  6. +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c
  7. @@ -679,27 +679,6 @@ bool ai_clkctl_cc(struct si_pub *sih, en
  8. return mode == BCMA_CLKMODE_FAST;
  9. }
  10. -void ai_pci_up(struct si_pub *sih)
  11. -{
  12. - struct si_info *sii;
  13. -
  14. - sii = container_of(sih, struct si_info, pub);
  15. -
  16. - if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
  17. - bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], true);
  18. -}
  19. -
  20. -/* Unconfigure and/or apply various WARs when going down */
  21. -void ai_pci_down(struct si_pub *sih)
  22. -{
  23. - struct si_info *sii;
  24. -
  25. - sii = container_of(sih, struct si_info, pub);
  26. -
  27. - if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI)
  28. - bcma_core_pci_extend_L1timer(&sii->icbus->drv_pci[0], false);
  29. -}
  30. -
  31. /* Enable BT-COEX & Ex-PA for 4313 */
  32. void ai_epa_4313war(struct si_pub *sih)
  33. {
  34. --- a/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h
  35. +++ b/drivers/net/wireless/brcm80211/brcmsmac/aiutils.h
  36. @@ -183,9 +183,6 @@ extern u16 ai_clkctl_fast_pwrup_delay(st
  37. extern bool ai_clkctl_cc(struct si_pub *sih, enum bcma_clkmode mode);
  38. extern bool ai_deviceremoved(struct si_pub *sih);
  39. -extern void ai_pci_down(struct si_pub *sih);
  40. -extern void ai_pci_up(struct si_pub *sih);
  41. -
  42. /* Enable Ex-PA for 4313 */
  43. extern void ai_epa_4313war(struct si_pub *sih);
  44. --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
  45. +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
  46. @@ -4667,7 +4667,7 @@ static int brcms_b_attach(struct brcms_c
  47. brcms_c_coredisable(wlc_hw);
  48. /* Match driver "down" state */
  49. - ai_pci_down(wlc_hw->sih);
  50. + bcma_core_pci_down(wlc_hw->d11core->bus);
  51. /* turn off pll and xtal to match driver "down" state */
  52. brcms_b_xtal(wlc_hw, OFF);
  53. @@ -5010,12 +5010,12 @@ static int brcms_b_up_prep(struct brcms_
  54. */
  55. if (brcms_b_radio_read_hwdisabled(wlc_hw)) {
  56. /* put SB PCI in down state again */
  57. - ai_pci_down(wlc_hw->sih);
  58. + bcma_core_pci_down(wlc_hw->d11core->bus);
  59. brcms_b_xtal(wlc_hw, OFF);
  60. return -ENOMEDIUM;
  61. }
  62. - ai_pci_up(wlc_hw->sih);
  63. + bcma_core_pci_up(wlc_hw->d11core->bus);
  64. /* reset the d11 core */
  65. brcms_b_corereset(wlc_hw, BRCMS_USE_COREFLAGS);
  66. @@ -5212,7 +5212,7 @@ static int brcms_b_down_finish(struct br
  67. /* turn off primary xtal and pll */
  68. if (!wlc_hw->noreset) {
  69. - ai_pci_down(wlc_hw->sih);
  70. + bcma_core_pci_down(wlc_hw->d11core->bus);
  71. brcms_b_xtal(wlc_hw, OFF);
  72. }
  73. }