aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath/ath_hal/ah_regdomain.c
Commit message (Collapse)AuthorAgeFilesLines
* PicoStation M2HP presents reg domain 0x2a which is not found in atheros or linuxHiren Panchasara2014-02-231-0/+5
| | | | | | | | | reference code. Add this workaround for now. Reviewed by: adrian Notes: svn path=/head/; revision=262375
* Add XC900 SKU mapping.Adrian Chadd2012-12-071-0/+3
| | | | Notes: svn path=/head/; revision=243975
* Fix a corner case in the HAL debugging changes, where ah was NULL.Adrian Chadd2011-09-301-2/+2
| | | | | | | | | | | | | | | | Although I tried to fix this earlier by introducing HALDEBUG_G(), it turns out there seem to be other cases where the pointer value is still NULL. * Fix DO_HALDEBUG() and the HALDEBUG macro to check whether ah is NULL before deferencing it * Remove HALDEBUG_G() as it's no longer needed This is hopefully a merge candidate for 9.0-RELEASE as enabling debugging at startup could result in a kernel panic. Notes: svn path=/head/; revision=225883
* Bitten again by the optional HALDEBUG compilation.Adrian Chadd2011-08-081-4/+0
| | | | | | | | | | | Remove this debugging, it's not needed anymore and when not enabled, those variables trigger a compiler warning. Approved by: re (kib, blanket) Pointy-hat-to: adrian, for not testing a non-debug compile of this code enough Notes: svn path=/head/; revision=224719
* The older HAL code sets up the regulatory domain once; FreeBSD/net80211Adrian Chadd2011-08-081-13/+42
| | | | | | | | | | | | allows it to be overridden at runtime. Thus, add a function which updates ah_dfsDomain after a channel set call to ath_hal_set_channels(). Approved by: re (kib, blanket) Notes: svn path=/head/; revision=224718
* Introduce some more DFS related hooks, inspired both by local workAdrian Chadd2011-08-081-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and the Atheros reference code. The radar detection code needs to know what the current DFS domain is. Since net80211 doesn't currently know this information, it's extracted from the HAL regulatory domain information. The specifics: * add a new ath_dfs API hook, ath_dfs_init_radar_filters(), which updates the radar filters whenever the regulatory domain changes. * add HAL_DFS_DOMAIN which describes the currently configured DFS domain . * add a new HAL internal variable which tracks the currently configured HAL DFS domain. * add a new HAL capability, HAL_CAP_DFS_DMN, which returns the currently configured HAL DFS domain setting. * update the HAL DFS domain setting whenever the channel setting is updated. Since this isn't currently used by any radar code, these should all be no-ops for existing users. Obtained from: Atheros Submitted by: KBC Networks, sibridge Approved by: re (kib, blanket) Notes: svn path=/head/; revision=224716
* This re-enables HT40 channels for use when DFS is enabled.Adrian Chadd2011-07-211-0/+2
| | | | | | | | | | | These should be disabled for the AR5416 in hostap/mesh/ibss mode, as the AR5416 doesn't have support for radar detection on the ext channel of a HT40 setup. Later chips do. Approved by: re (kib) Notes: svn path=/head/; revision=224242
* Re-introduce a global ath_hal_debug again for now, whilst I figure out whatAdrian Chadd2011-06-231-2/+2
| | | | | | | | | | | | | | | to do about the few cases where the HAL state isn't available (regdomain) or isn't yet setup (probe/attach.) The global ath_hal_debug now affects all instances of the HAL. This also restores the ability for probe/attach debugging to work; as the sysctl tree may not be attached at that point. Users can just set the global "hw.ath.hal.debug" to a suitable value to enable probe/attach related debugging. Notes: svn path=/head/; revision=223466
* Migrate the regulatory database definitions into separate header filesAdrian Chadd2011-03-101-1577/+20
| | | | | | | | | | | | | to both make things clearer, and to make it easier to write userland code which pulls in these definitions without needing to pull in the rest of the HAL. This stuff should be deprecated at some point in the future once the net80211 regulatory domain support encapsulates all of the defintions here. Notes: svn path=/head/; revision=219442
* Break out the ath regulatory domain structures into a separate header file.Adrian Chadd2011-03-081-66/+3
| | | | Notes: svn path=/head/; revision=219394
* Add WorldB SKU.Rui Paulo2009-11-181-0/+27
| | | | | | | | Reviewed by: sam MFC after: 1 week Notes: svn path=/head/; revision=199491
* change default regdomain for thailandSam Leffler2009-08-271-1/+1
| | | | | | | Obtained from: linux-wireless@kernel.org Notes: svn path=/head/; revision=196603
* fix 11n channel constructionSam Leffler2009-02-071-6/+6
| | | | Notes: svn path=/head/; revision=188264
* add macro for future regulatory modsSam Leffler2009-02-071-0/+5
| | | | Notes: svn path=/head/; revision=188263
* add PSB channels to the calibration listSam Leffler2009-02-061-3/+12
| | | | Notes: svn path=/head/; revision=188213
* fix compilation w/ AH_DEBUGSam Leffler2009-02-031-1/+1
| | | | Notes: svn path=/head/; revision=188084
* Overhaul regulatory support:Sam Leffler2009-01-281-1285/+821
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o remove HAL_CHANNEL; convert the hal to use net80211 channels; this mostly involves mechanical changes to variable names and channel attribute macros o gut HAL_CHANNEL_PRIVATE as most of the contents are now redundant with the net80211 channel available o change api for ath_hal_init_channels: no more reglass id's, no more outdoor indication (was a noop), anM contents o add ath_hal_getchannels to have the hal construct a channel list without altering runtime state; this is used to retrieve the calibration list for the device in ath_getradiocaps o add ath_hal_set_channels to take a channel list and regulatory data from above and construct internal state to match (maps frequencies for 900MHz cards, setup for CTL lookups, etc) o compact the private channel table: we keep one private channel per frequency instead of one per HAL_CHANNEL; this gives a big space savings and potentially improves ani and calibration by sharing state (to be seen; didn't see anything in testing); a new config option AH_MAXCHAN controls the table size (default to 96 which was chosen to be ~3x the largest expected size) o shrink ani state and change to mirror private channel table (one entry per frequency indexed by ic_devdata) o move ani state flags to private channel state o remove country codes; use net80211 definitions instead o remove GSM regulatory support; it's no longer needed now that we pass in channel lists from above o consolidate ADHOC_NO_11A attribute with DISALLOW_ADHOC_11A o simplify initial channel list construction based on the EEPROM contents; we preserve country code support for now but may want to just fallback to a WWR sku and dispatch the discovered country code up to user space so the channel list can be constructed using the master regdomain tables o defer to net80211 for max antenna gain o eliminate sorting of internal channel table; now that we use ic_devdata as an index, table lookups are O(1) o remove internal copy of the country code; the public one is sufficient o remove AH_SUPPORT_11D conditional compilation; we always support 11d o remove ath_hal_ispublicsafetysku; not needed any more o remove ath_hal_isgsmsku; no more GSM stuff o move Conformance Test Limit (CTL) state from private channel to a lookup using per-band pointers cached in the private state block o remove regulatory class id support; was unused and belongs in net80211 o fix channel list construction to set IEEE80211_CHAN_NOADHOC, IEEE80211_CHAN_NOHOSTAP, and IEEE80211_CHAN_4MSXMIT o remove private channel flags CHANNEL_DFS and CHANNEL_4MS_LIMIT; these are now set in the constructed net80211 channel o store CHANNEL_NFCREQUIRED (Noise Floor Required) channel attribute in one of the driver-private flag bits of the net80211 channel o move 900MHz frequency mapping into the hal; the mapped frequency is stored in the private channel and used throughout the hal (no more mapping in the driver and/or net80211) o remove ath_hal_mhz2ieee; it's no longer needed as net80211 does the calculation and available in the net80211 channel o change noise floor calibration logic to work with compacted private channel table setup; this may require revisiting as we no longer can distinguish channel attributes (e.g. 11b vs 11g vs turbo) but since the data is used only to calculate status data we can live with it for now o change ah_getChipPowerLimits internal method to operate on a single channel instead of all channels in the private channel table o add ath_hal_gethwchannel to map a net80211 channel to a h/w frequency (always the same except for 900MHz channels) o add HAL_EEBADREG and HAL_EEBADCC status codes to better identify regulatory problems o remove CTRY_DEBUG and CTRY_DEFAULT enum's; these come from net80211 now o change ath_hal_getwirelessmodes to really return wireless modes supported by the hardware (was previously applying regulatory constraints) o return channel interference status with IEEE80211_CHANSTATE_CWINT (should change to a callback so hal api's can take const pointers) o remove some #define's no longer needed with the inclusion of <net80211/_ieee80211.h> Sponsored by: Carlson Wireless Notes: svn path=/head/; revision=187831
* export PSB frequenciesSam Leffler2009-01-161-4/+13
| | | | Notes: svn path=/head/; revision=187345
* import ath halSam Leffler2008-12-011-0/+2861
Notes: svn path=/head/; revision=185521