Wed Dec 31 14:08:46 2008 UTC ()
KNF.
NB: These were not imported properly. The Id RCS keyword lines were not
cleaned up, and there were no NetBSD keywords added. Perhaps Re-import
correctly?


(christos)
diff -r1.3 -r1.4 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c

cvs diff -r1.3 -r1.4 src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c (expand / switch to unified diff)

--- src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c 2008/12/31 07:24:01 1.3
+++ src/sys/external/isc/atheros_hal/dist/ah_eeprom_v14.c 2008/12/31 14:08:46 1.4
@@ -4,27 +4,27 @@ @@ -4,27 +4,27 @@
4 * 4 *
5 * Permission to use, copy, modify, and/or distribute this software for any 5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above 6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies. 7 * copyright notice and this permission notice appear in all copies.
8 * 8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 * 16 *
17 * $Id: ah_eeprom_v14.c,v 1.3 2008/12/31 07:24:01 phil Exp $ 17 * $Id: ah_eeprom_v14.c,v 1.4 2008/12/31 14:08:46 christos Exp $
18 */ 18 */
19#include <sys/endian.h> 19#include <sys/endian.h>
20#include "opt_ah.h" 20#include "opt_ah.h"
21 21
22#include "ah.h" 22#include "ah.h"
23#include "ah_internal.h" 23#include "ah_internal.h"
24#include "ah_eeprom_v14.h" 24#include "ah_eeprom_v14.h"
25 25
26static HAL_STATUS 26static HAL_STATUS
27v14EepromGet(struct ath_hal *ah, int param, void *val) 27v14EepromGet(struct ath_hal *ah, int param, void *val)
28{ 28{
29#define CHAN_A_IDX 0 29#define CHAN_A_IDX 0
30#define CHAN_B_IDX 1 30#define CHAN_B_IDX 1
@@ -44,29 +44,28 @@ v14EepromGet(struct ath_hal *ah, int par @@ -44,29 +44,28 @@ v14EepromGet(struct ath_hal *ah, int par
44 *(int16_t *)val = pModal[1].noiseFloorThreshCh[0]; 44 *(int16_t *)val = pModal[1].noiseFloorThreshCh[0];
45 return HAL_OK; 45 return HAL_OK;
46 case AR_EEP_MACADDR: /* Get MAC Address */ 46 case AR_EEP_MACADDR: /* Get MAC Address */
47 sum = 0; 47 sum = 0;
48 macaddr = val; 48 macaddr = val;
49 for (i = 0; i < 6; i++) { 49 for (i = 0; i < 6; i++) {
50 macaddr[i] = pBase->macAddr[i]; 50 macaddr[i] = pBase->macAddr[i];
51 sum += pBase->macAddr[i]; 51 sum += pBase->macAddr[i];
52 } 52 }
53 if (sum == 0 || sum == 0xffff*3) { 53 if (sum == 0 || sum == 0xffff*3) {
54 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: bad mac address %s\n", 54 HALDEBUG(ah, HAL_DEBUG_ANY, "%s: bad mac address %s\n",
55 __func__, ath_hal_ether_sprintf(macaddr)); 55 __func__, ath_hal_ether_sprintf(macaddr));
56 return HAL_EEBADMAC; 56 return HAL_EEBADMAC;
57 } else { 57 } else
58 return HAL_OK; 58 return HAL_OK;
59 } 
60 case AR_EEP_REGDMN_0: 59 case AR_EEP_REGDMN_0:
61 return pBase->regDmn[0]; 60 return pBase->regDmn[0];
62 case AR_EEP_REGDMN_1: 61 case AR_EEP_REGDMN_1:
63 return pBase->regDmn[1]; 62 return pBase->regDmn[1];
64 case AR_EEP_OPCAP: 63 case AR_EEP_OPCAP:
65 return pBase->deviceCap; 64 return pBase->deviceCap;
66 case AR_EEP_OPMODE: 65 case AR_EEP_OPMODE:
67 return pBase->opCapFlags; 66 return pBase->opCapFlags;
68 case AR_EEP_RFSILENT: 67 case AR_EEP_RFSILENT:
69 return pBase->rfSilent; 68 return pBase->rfSilent;
70 case AR_EEP_OB_5: 69 case AR_EEP_OB_5:
71 return pModal[CHAN_A_IDX].ob; 70 return pModal[CHAN_A_IDX].ob;
72 case AR_EEP_DB_5: 71 case AR_EEP_DB_5: