c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Use is subject to license terms.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Copyright (c) 2007, Intel Corporation
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * All rights reserved.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Sun elects to use this software under the BSD license.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * This file is provided under a dual BSD/GPLv2 license. When using or
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * redistributing this file, you may do so under either license.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * GPL LICENSE SUMMARY
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * This program is free software; you can redistribute it and/or modify
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * it under the terms of version 2 of the GNU Geeral Public License as
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * published by the Free Software Foundation.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * This program is distributed in the hope that it will be useful, but
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * WITHOUT ANY WARRANTY; without even the implied warranty of
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * General Public License for more details.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * You should have received a copy of the GNU General Public License
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * along with this program; if not, write to the Free Software
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * The full GNU General Public License is included in this distribution
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * in the file called LICENSE.GPL.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Contact Information:
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * James P. Ketrenos <ipw2100-admin@linux.intel.com>
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * BSD LICENSE
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Copyright(c) 2005 - 2007 Intel Corporation. All rights reserved.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * All rights reserved.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Redistribution and use in source and binary forms, with or without
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * modification, are permitted provided that the following conditions
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * are met:
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * * Redistributions of source code must retain the above copyright
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * notice, this list of conditions and the following disclaimer.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * * Redistributions in binary form must reproduce the above copyright
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * notice, this list of conditions and the following disclaimer in
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * the documentation and/or other materials provided with the
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * distribution.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * * Neither the name Intel Corporation nor the names of its
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * contributors may be used to endorse or promote products derived
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * from this software without specific prior written permission.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * This file defines EEPROM related constants, enums, and inline functions.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * EEPROM field values
c533a883a71cff9ff32df1c53c31201e1cbf371fhx EEPROM_CHANNEL_VALID = (1 << 0), /* usable for this SKU/geo */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx EEPROM_CHANNEL_IBSS = (1 << 1), /* usable as an IBSS channel */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx /* Bit 2 Reserved */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx EEPROM_CHANNEL_ACTIVE = (1 << 3), /* active scanning allowed */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx EEPROM_CHANNEL_RADAR = (1 << 4), /* radar detection required */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx EEPROM_CHANNEL_DFS = (1 << 7), /* dynamic freq selection candidate */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * EEPROM field lengths
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * EEPROM field lengths
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * SKU Capabilities
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * *regulatory* channel data from eeprom, one for each channel
c533a883a71cff9ff32df1c53c31201e1cbf371fhx int8_t max_power_avg; /* max power (dBm) on this chnl, limit 31 */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Mapping of a Tx power level, at factory calibration temperature,
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * to a radio/DSP gain table index.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * One for each of 5 "sample" power levels in each band.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * v_det is measured at the factory, using the 3945's built-in power amplifier
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * (PA) output voltage detector. This same detector is used during Tx of
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * long packets in normal operation to provide feedback as to proper output
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Data copied from EEPROM.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx uint8_t gain_index; /* index into power (gain) setup table ... */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx int8_t power; /* ... for this pwr level for this chnl group */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Mappings of Tx power levels -> nominal radio/DSP gain table indexes.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * One for each channel group (a.k.a. "band") (1 for BG, 4 for A).
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Tx power setup code interpolates between the 5 "sample" power levels
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * to determine the nominal setup for a requested power level.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Data copied from EEPROM.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * DO NOT ALTER THIS STRUCTURE!!!
c533a883a71cff9ff32df1c53c31201e1cbf371fhx /* 5 power levels */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx /* coefficients for voltage->power formula (signed) */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx uint32_t a, b, c, d, e;
c533a883a71cff9ff32df1c53c31201e1cbf371fhx /* these modify coeffs based on frequency (signed) */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx /* highest power possible by h/w in this * band */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx /* "representative" channel # in this band */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx /* h/w temperature at factory calib this band (signed) */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Temperature-based Tx-power compensation data, not band-specific.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * These coefficients are use to modify a/b/c/d/e coeffs based on
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * difference between current temperature and factory calib temperature.
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * Data copied from EEPROM.
cdc64593cc1046229f4ac4daf5ead688b5efe6ebxinghua wen - Sun Microsystems - Beijing China#define EEP_TX_POWER_BANDS (8)
cdc64593cc1046229f4ac4daf5ead688b5efe6ebxinghua wen - Sun Microsystems - Beijing China#define EEP_TX_POWER_MEASUREMENTS (3)
cdc64593cc1046229f4ac4daf5ead688b5efe6ebxinghua wen - Sun Microsystems - Beijing China#define EEP_TX_POWER_VERSION (2)
cdc64593cc1046229f4ac4daf5ead688b5efe6ebxinghua wen - Sun Microsystems - Beijing China measure[EEP_TX_POWER_TX_CHAINS][EEP_TX_POWER_MEASUREMENTS];
c533a883a71cff9ff32df1c53c31201e1cbf371fhx struct iwk_eep_calib_subband_info band_info_tbl[EEP_TX_POWER_BANDS];
c533a883a71cff9ff32df1c53c31201e1cbf371fhx int8_t max_power_avg; /* each channel's maximum power, 31 as limit */
c533a883a71cff9ff32df1c53c31201e1cbf371fhx * eeprom map
c533a883a71cff9ff32df1c53c31201e1cbf371fhx#endif /* _IWK_EEPROM_H_ */