- Define macro for the number of channels. Use it instead of the magic
commit1b3f6ec4c2ce92a246b7d90a842fa23706478e08
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 Apr 2007 09:14:46 +0000 (22 09:14 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 Apr 2007 09:14:46 +0000 (22 09:14 +0000)
treecf887aa2e067ebbecf4516439977c5439d02b4fd
parent5b202219b4a2d8d2bb7f448b94a7cb0df61bc318
- Define macro for the number of channels.  Use it instead of the magic
  number.
- Define maximum and default channel TX power.
- The EEPROM regions, which contain 5GHz and 2GHz channels' TX power, are
  not contiguous.  Add rt2661_read_txpower_config() to read them seperately.
- Lower channel's TX power is in the lower byte of the 16bits EEPROM value,
  while upper channel's TX power is in the upper byte of the 16bits EEPROM
  value.
- Channel's TX power should never exceed maximum channel TX power, if it is
  set it to default channel TX power.
- Rename rt2661_read_eeprom() to rt2661_read_config(), since we already have
  rt2661_eeprom_read().

EEPROM layout, EEPROM values' layout and various limit values are obtained
from Ralink RT61 Linux driver.
sys/dev/netif/ral/rt2661.c
sys/dev/netif/ral/rt2661reg.h
sys/dev/netif/ral/rt2661var.h