K 10 svn:author V 3 sam K 8 svn:date V 27 2009-01-21T01:31:08.426979Z K 7 svn:log V 3290 Checkpoint regulatory gutting: o move toward eliminating HAL_CHANNEL; for now it's still present but rework api's so a switch to an 802.11 channel is more possible o move toward stripping duplicate info from HAL_CHANNEL_INTERNAL; this is now referenced using ic_devdata in the 802.11 channel and real soon all callers will have the 802.11 channel to find the frequency and channel attributes (the only issue remaining is ath_hal_process_noisefloor) o eliminate code to write the HAL_CHANNEL on channel change; this was done to update the tx power for AR/DFS after a reset (so tx power scaling and CTL enforcement was applied) but was wrong and needs to be handled differently o change getChipPowerLimits api to work on a single channel o change ath_hal_getctl api to work on an internal channel o overhaul regulatory code: - remove per-country regulatory constraint work: having the hal construct this state duplicates what's already done in layers above; instead we'll push any initial sku/country code up as a hint that can be acted on to form regulatory state that is plumbed - switch to net80211 country code definitions - strip 900Mhz stuff; we can now handle this entirely in the driver - remove channel sorting; instead tag 802.11 channels with the index of the internal channel table (for now we check the frequency and flags to insure a match but eventually we'll ditch that and also compress all entries for a frequency into one) - remove various enforcements that are now meaningless; all we want to do is construct an initial regulatory hint/channel list from the EEPROM and thereafter trust channel lists that come down from above - move CTL to HAL_CHANNEL_INTERNAL for now; it'll be constructed on the fly once we merge channel entries for the same frequency - change ath_hal_init_channels api to operate directly on 802.11 channels; this call is used to check the EEPROM and construct an initial channel list (but the api also permits explicit override, use CTRY_DEFAULT/SKU_NONE to use the EEPROM contents) - add ath_hal_getchannels api to retrieve a channel list according to builtin rules but without altering any runtime state (unlike ath_hal_init_channels); this is used, in particular, to retrieve the device capabilities needed by the getradiocaps driver callback - add ath_hal_set_channels api to take 802.11 regulatory state and setup required internal state such as CTL's; this is used to implement the setregdomain driver callback - remove ah_countryCode from the internal state; it's no longer needed - move CHANNEL_NFCREQUIRED from privFlags to channelFlags (for now); it will eventually use one of the driver-private bits in ic_flags - change ar5212GetChipPowerLimits to not apply power scaling and CTL's to the values returned for min/max tx power; using ar5212SetRateTable to do this was bad as it clobbers runtime state (need to revisit) - add new status codes to disambiguate errors in regulatory calls - move CHANNEL_DFS to match net80211 definition - move CHANNEL_4MS_LIMIT to match net80211 definition - remove CTRY_DEBUG and CTRY_DEFAULT in favor of net80211 defs - remove ath_hal_isgsmsku; the hal no longer knows about GSM END