bcm-specs

[Specification

From the settings provided by the driver, it appears that the chipset uses only spatial diversity techniques for improving reception (which makes sense as a common configuration is two identical antennas). The settings allowed by the driver are:

Antenna Diversity Value

Setting

0

Force use of antenna 0

1

Force use of antenna 1

2

Unknown

3

Automatic antenna diversity selection

Setting the Antenna Diversity

  1. If the antenna diversity is unset (0xFFFF), we force the antenna diversity to Automatic antenna diversity selection
  2. Clear the antenna diversity bit in SHM offset 0x005E

  3. If this is an A PHY or a G PHY
    1. If we have an A PHY, the offset is 0x0000, if we have a G PHY, the offset is 0x0400, which is added to the offsets below
    2. MaskSet PHYRegister at the offset + 1 with mask 0x7E7F and set with the Antenna Diversity Value << 7, but if the Antenna Diversity Value is 2, set with Automatic antenna diversity selection instead.

    3. If the antenna diversity is >= 2, MaskSet PHYRegister offset + 2B with mask 0xFEFF and set with one of the following:

      1. If the antenna diversity is 2, set with the antenna diversity << 7

    4. If this is a G PHY
      1. If the antenna diversity is 2 or greater, set bit 0x2000 in PHYRegister 0x48C, otherwise unset that bit

      2. If the PHY Revision is 2 or higher
        1. Bitwise OR PHYRegister 0x461 with 0x10

        2. MaskSet PHYRegister 0x4AD with mask 0xFF and set with 0x15

        3. If the PHY Revision is 2
          1. Write 0x8 to PHYRegister 0x427

        4. Otherwise
          1. MaskSet PHYRegister 0x427 with mask 0xFF and set with 0x8

      3. If the PHY Revision is 6 or higher
        1. Write 0xDC to PHYRegister 0x49B

    5. Otherwise (A PHY)
      1. If the PHY Revision is less than 3
        1. MaskSet PHYRegister 0x2B with mask 0xFF and set with 0x24

      2. Otherwise
        1. Bitwise OR PHYRegister 0x61 with 0x10

        2. If the PHY Version is 3
          1. Write 0x1D to PHYRegister 0x93

          2. Write 0x8 to PHYRegister 0x27

        3. Otherwise
          1. Write 0x3A to PHYRegister 0x93

          2. MaskSet PHYRegister 0x27 with mask 0xFF and set with 0x8

  4. Otherwise (B PHY)
    1. MaskSet PHYRegister 0x3E2 with mask 0xFE7F and set with one of the following:

      1. If the core revision the current core is 2, set with Automatic antenna diversity << 7

      2. Otherwise, set with the Antenna Diversity Value << 7

  5. If the antenna diversity value is 2 or greater, set the antenna diversity bit in SHM offset 0x005E, the MicrocodeFlagsBitfield

Getting the Antenna Diversity

  1. Lock the PHY Registers (see PHYRegisterLock)

  2. If this is a G PHY
    1. Read from PHYRegister 0x401, AND with 0x180 and right shift by 7

  3. Otherwise
    1. Read from PHYRegister 0x3E2, AND with 0x180 and right shift by 7

  4. Unlock the PHY Registers (see PHYRegisterLock)


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