bcm-v4

[Specification

PHY Noise Sample Request (u8 reason, u8 channel)

  1. Save phynoise_state

  2. Set wait to TRUE
  3. If reason is 1
    1. Set phynoise_chan_watchdog to channel

    2. OR phynoise_state with 0x1

  4. Else if reason is 2
    1. Set phy_noise_list[channel] to -92

    2. Set phynoise_chan_scan to channel

    3. OR phynoise_state with 0x2

  5. Else if reason is 3
    1. Set phynoise_chan_cqrm to channel

    2. OR phynoise_state with 0x4

  6. Otherwise
    1. Warn on improper value
  7. If the saved value of phynoise_state is not zero

    1. Return
  8. Copy now to phynoise_now

  9. If phy_fixed_noise is not zero

    1. If this is an N PHY
      1. *** TODO ***
    2. If this is an LP PHY
      1. noise = -95
    3. Otherwise
      1. Error - A/B/G PHYs do not use this routine
    4. Set wait to FALSE
    5. Go to finish
  10. If this is an LP PHY
    1. If phynoise_polling is not zero OR reason is 3

      1. Write 0 to shared memory location 0x88
      2. Write 0 to shared memory location 0x8A
      3. Write 0 to shared memory location 0x310
      4. Write 0 to shared memory location 0x314
      5. Write 0 to shared memory location 0x318
      6. Write 0 to shared memory location 0x31C
      7. Bitwise OR the MAC command register with 0x10
    2. Otherwise
      1. Suspend MAC
      2. Call LP PHY Set Deaf with argument 0

      3. Call LP PHY RX Signal Power with argument 20. Save the result as noise

      4. Call LP PHY Clear Deaf with argument 0

      5. Enable MAC
      6. Set wait to 0
  11. Else if this is an N PHY
    1. *** TODO ***
  12. Otherwise
    1. Error - This PHY is not supported here.
  13. If wait is zero
    1. Call PHY Noise CB with channel, noise as arguments


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