- Define macro for the number of channels. Use it instead of the magic
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 Apr 2007 09:14:46 +0000 (09:14 +0000)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 22 Apr 2007 09:14:46 +0000 (09:14 +0000)
commitce42f143a3b53a241a6d9818365c1f9c4dc1d076
tree59b48940f9d225c21b498393a0f34fc8d7670deb
parent68a1e41522ad413a32b5be2ae4ba20d4f6af1dad
- 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