bcm-v4

[Specification

See 2056 Radio Channel Table and 2055 Radio Channel Table for tables and description

u8 N PHY Get Channel Frequency Range (int channel)

  1. If the band is 2G
    1. Return 0
  2. If channel is zero
    1. Get current channel from wherever it is available
  3. If PHY Revision < 3

    1. Set channel_ptr to 2055 Radio Channel Table

    2. Set len to length of that table
  4. Else if PHY Revision is 3
    1. Set channel_ptr to PHY Revision 3 Table

    2. Set len to length of that table
  5. Else if PHY Revision is 4
    1. Set channel_ptr to PHY Revision 4 Table

    2. Set len to length of that table
  6. Else if Radio Revision is 5
    1. Set channel_ptr to PHY Revision 5 Table

    2. Set len to length of that table
  7. Else if Radio Revision is 6
    1. Set channel_ptr to PHY Revision 6 Table

    2. Set len to length of that table
  8. Else if Radio Revision is 7 or 9
    1. Set channel_ptr to PHY Revision 7 or 9 Table

    2. Set len to length of that table
  9. Else if Radio Revision is 8
    1. Set channel_ptr to PHY Revision 8 Table

    2. Set len to length of that table
  10. Otherwise
    1. Return 0
  11. Loop len times with i as index
    1. If the channel entry in the table equals channel
      1. Break
    2. If i >= len

      1. Return 0
    3. Set freq to the frequency value from the table
  12. If (freq >= 4900) and (freq < 5100)

    1. Return 1
  13. Else if (freq >= 5100) and (freq < 5500)

    1. Return 2
  14. Return 3

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