bcm-v4

[Specification

N PHY TX Power Control Enable (u8 type)

  1. If phyhang_avoid

    1. Call N PHY Stay in Carrier Search with argument TRUE

  2. If type is 0 or 1
    1. Set nphy_txpwrctrl to type

  3. Otherwise
    1. Warn on bad value for type
  4. If type is 0
    1. If PHY revision >= 3

      1. If PHY register 0x1e7 ANDed with 0x27 is not zero
        1. Loop 2 times with core as index
          1. If core is zero
            1. Set nphy_txpwr_idx[core] to phy register 0x1ed ANDed with 0x7f

          2. else
            1. Set nphy_txpwr_idx[core] to phy register 0x1ee ANDed with 0x7f

    2. Fill 84-element u16 array regval with 0
    3. Write N PHY table with ID 26, length 84, offset 64, width 16, and data regval
    4. Write N PHY table with ID 27, length 84, offset 64, width 16, and data regval
    5. If PHY Revision >= 3

      1. Mask PHY Register 0x1E7 with mask 0x1FFF
    6. Otherwise
      1. Mask PHY Register 0x1E7 with mask 0x9FFF
    7. If PHY Revision >= 3

      1. Set bit 0x100 in PHY Register 0x8F
      2. Set bit 0x100 in PHY Register 0xA5
    8. Otherwise
      1. Set bit 0x4000 PHY Register 0xA5
    9. If PHY Revision is 2
      1. Maskset PHY Register 0xDC with mask 0xFF00 and set with 0x53
    10. Otherwise
      1. Maskset PHY Register 0xDC with mask 0xFF00 and set with 0x5A
    11. Set bit 0x200 in MAC control
  5. Otherwise
    1. Write N PHY Table with ID 26, length 84, offset 64, and data at adj_pwr_tbl_nphy

    2. Write N PHY Table with ID 27, length 84, offset 64, and data at adj_pwr_tbl_nphy

    3. Set bmask to 0x6000
    4. If type is 1
      1. Set val to 0x6000
    5. Otherwise
      1. Set val to 0
    6. If PHY Revision >= 3

      1. Set bmask to 0xE000
      2. Set bit 0x8000 in val
    7. MaskSet PHY Register 0x1E7 with mask ~(bmask) and set with val

    8. If band is 5G
      1. If PHY Revision >= 7

        1. MaskSet PHY Register 0x1E7 with mask 0xFF80 and set with 0x0032

        2. MaskSet PHY Register 0x222ith mask 0xFF80 and set with 0x0032

      2. Otherwise
        1. MaskSet PHY Register 0x1E7 with mask 0xFF80 and set with 0x0064

        2. If PHY Revision > 1

          1. MaskSet PHY Register 0x222 with mask 0xFF00 and set with 0x0064

    9. If PHY Revision >= 3

      1. If nphy_txpwr_idx[0] != 128 and nphy_txpwr_idx[1] != 128

        1. Maskset PHY Register 0x1E7 with mask 0xFF80 and set with nphy_txpwr_idx[0]

        2. If PHY Revision > 1

          1. Maskset PHY Register 0x222 with mask 0xFF00 and set with nphy_txpwr_idx[1]

    10. If PHY Revision >= 3

      1. Mask PHY Register 0x8F with mask 0xFEFF
      2. Mask PHY Register 0xA5 with mask 0xFEFF
    11. Otherwise
      1. Mask PHY Register 0xA5 with mask 0xBFFF
    12. If PHY Revision is 2
      1. MaskSet PHY Register 0xDC with mask 0xFF00 and set with 0x003B

    13. Else if PHY Revision < 2

      1. MaskSet PHY Register 0xDC with mask 0xFF00 and set with 0x0040

    14. If PHY Revision < 2 AND the band width is 40 MHz

      1. Clear bit 0x200 in MAC control
    15. If (nphy_ipa2g_on AND bandtype is 2.4 GHz) OR (nphy_ipa5g_on AND bandtype is 5 GHz)

      1. Maskset PHY Register 0x297 with mask 0xFFFB and set with 0
      2. Maskset PHY Register 0x29B with mask 0xFFFB and set with 0
  6. If phyhang_avoid

    1. Call N PHY Stay in Carrier Search with argument FALSE


Exported/Archived from the wiki to HTML on 2016-10-27