eeprom.c (e981b060767b3c4ac9393ad8d2558d648e35dfcb) | eeprom.c (a180a13081708b78d42232c6d922ce3de63f12e0) |
---|---|
1/* 2 * Copyright (c) 2004-2008 Reyk Floeter <reyk@openbsd.org> 3 * Copyright (c) 2006-2009 Nick Kossifidis <mickflemm@gmail.com> 4 * Copyright (c) 2008-2009 Felix Fietkau <nbd@openwrt.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. --- 647 unchanged lines hidden (view full) --- 656 * exponential function. To recreate the curve we read 11 points 657 * here and interpolate later. 658 */ 659 660/* Used to match PCDAC steps with power values on RF5111 chips 661 * (eeprom versions < 4). For RF5111 we have 11 pre-defined PCDAC 662 * steps that match with the power values we read from eeprom. On 663 * older eeprom versions (< 3.2) these steps are equaly spaced at | 1/* 2 * Copyright (c) 2004-2008 Reyk Floeter <reyk@openbsd.org> 3 * Copyright (c) 2006-2009 Nick Kossifidis <mickflemm@gmail.com> 4 * Copyright (c) 2008-2009 Felix Fietkau <nbd@openwrt.org> 5 * 6 * Permission to use, copy, modify, and distribute this software for any 7 * purpose with or without fee is hereby granted, provided that the above 8 * copyright notice and this permission notice appear in all copies. --- 647 unchanged lines hidden (view full) --- 656 * exponential function. To recreate the curve we read 11 points 657 * here and interpolate later. 658 */ 659 660/* Used to match PCDAC steps with power values on RF5111 chips 661 * (eeprom versions < 4). For RF5111 we have 11 pre-defined PCDAC 662 * steps that match with the power values we read from eeprom. On 663 * older eeprom versions (< 3.2) these steps are equaly spaced at |
664 * 10% of the pcdac curve -until the curve reaches it's maximum- | 664 * 10% of the pcdac curve -until the curve reaches its maximum- |
665 * (11 steps from 0 to 100%) but on newer eeprom versions (>= 3.2) 666 * these 11 steps are spaced in a different way. This function returns 667 * the pcdac steps based on eeprom version and curve min/max so that we 668 * can have pcdac/pwr points. 669 */ 670static inline void 671ath5k_get_pcdac_intercepts(struct ath5k_hw *ah, u8 min, u8 max, u8 *vp) 672{ --- 435 unchanged lines hidden (view full) --- 1108 * To recreate the curves we read here the points and interpolate 1109 * later. Note that in most cases only 2 (higher and lower) curves are 1110 * used (like RF5112) but vendors have the oportunity to include all 1111 * 4 curves on eeprom. The final curve (higher power) has an extra 1112 * point for better accuracy like RF5112. 1113 */ 1114 1115/* For RF2413 power calibration data doesn't start on a fixed location and | 665 * (11 steps from 0 to 100%) but on newer eeprom versions (>= 3.2) 666 * these 11 steps are spaced in a different way. This function returns 667 * the pcdac steps based on eeprom version and curve min/max so that we 668 * can have pcdac/pwr points. 669 */ 670static inline void 671ath5k_get_pcdac_intercepts(struct ath5k_hw *ah, u8 min, u8 max, u8 *vp) 672{ --- 435 unchanged lines hidden (view full) --- 1108 * To recreate the curves we read here the points and interpolate 1109 * later. Note that in most cases only 2 (higher and lower) curves are 1110 * used (like RF5112) but vendors have the oportunity to include all 1111 * 4 curves on eeprom. The final curve (higher power) has an extra 1112 * point for better accuracy like RF5112. 1113 */ 1114 1115/* For RF2413 power calibration data doesn't start on a fixed location and |
1116 * if a mode is not supported, it's section is missing -not zeroed-. | 1116 * if a mode is not supported, its section is missing -not zeroed-. |
1117 * So we need to calculate the starting offset for each section by using 1118 * these two functions */ 1119 1120/* Return the size of each section based on the mode and the number of pd 1121 * gains available (maximum 4). */ 1122static inline unsigned int 1123ath5k_pdgains_size_2413(struct ath5k_eeprom_info *ee, unsigned int mode) 1124{ --- 697 unchanged lines hidden --- | 1117 * So we need to calculate the starting offset for each section by using 1118 * these two functions */ 1119 1120/* Return the size of each section based on the mode and the number of pd 1121 * gains available (maximum 4). */ 1122static inline unsigned int 1123ath5k_pdgains_size_2413(struct ath5k_eeprom_info *ee, unsigned int mode) 1124{ --- 697 unchanged lines hidden --- |