diff options
| author | Adrian Chadd <adrian@FreeBSD.org> | 2015-11-30 06:26:59 +0000 |
|---|---|---|
| committer | Adrian Chadd <adrian@FreeBSD.org> | 2015-11-30 06:26:59 +0000 |
| commit | ff066b54ec978e362726f843aa16713d875b9d4c (patch) | |
| tree | 1b4cc32f46eb65d0f03652736218021a06084242 /sys/dev/ath | |
| parent | c00c4e46e3c4d16c751677e43c16e34dd7bcfaa0 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ath')
| -rw-r--r-- | sys/dev/ath/ath_hal/ah.c | 10 | ||||
| -rw-r--r-- | sys/dev/ath/ath_hal/ah_internal.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c index 4d3ac3d4ec32..a0baa69faee0 100644 --- a/sys/dev/ath/ath_hal/ah.c +++ b/sys/dev/ath/ath_hal/ah.c @@ -1431,15 +1431,15 @@ ath_hal_EepromDataRead(struct ath_hal *ah, u_int off, uint16_t *data) * This is the unmapped frequency which is programmed into the hardware. */ int -ath_hal_mhz2ieee_2ghz(struct ath_hal *ah, HAL_CHANNEL_INTERNAL *ichan) +ath_hal_mhz2ieee_2ghz(struct ath_hal *ah, int freq) { - if (ichan->channel == 2484) + if (freq == 2484) return 14; - if (ichan->channel < 2484) - return ((int) ichan->channel - 2407) / 5; + if (freq < 2484) + return ((int) freq - 2407) / 5; else - return 15 + ((ichan->channel - 2512) / 20); + return 15 + ((freq - 2512) / 20); } /* diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h index 0c855d4c30ac..a4c76562fd20 100644 --- a/sys/dev/ath/ath_hal/ah_internal.h +++ b/sys/dev/ath/ath_hal/ah_internal.h @@ -1031,7 +1031,7 @@ ath_hal_getantennaallowed(struct ath_hal *ah, /* * Map the given 2GHz channel to an IEEE number. */ -extern int ath_hal_mhz2ieee_2ghz(struct ath_hal *, HAL_CHANNEL_INTERNAL *); +extern int ath_hal_mhz2ieee_2ghz(struct ath_hal *, int freq); /* * Clear the channel survey data. |
