1/* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2004 Atheros Communications, Inc. 4 * 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 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 *
| 1/* 2 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting 3 * Copyright (c) 2002-2004 Atheros Communications, Inc. 4 * 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 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 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 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 *
|
17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c 223459 2011-06-23 02:38:36Z adrian $
| 17 * $FreeBSD: head/sys/dev/ath/ath_hal/ar5210/ar5210_beacon.c 225444 2011-09-08 01:23:05Z adrian $
|
18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_desc.h" 24 25#include "ar5210/ar5210.h" 26#include "ar5210/ar5210reg.h" 27#include "ar5210/ar5210desc.h" 28 29/*
| 18 */ 19#include "opt_ah.h" 20 21#include "ah.h" 22#include "ah_internal.h" 23#include "ah_desc.h" 24 25#include "ar5210/ar5210.h" 26#include "ar5210/ar5210reg.h" 27#include "ar5210/ar5210desc.h" 28 29/*
|
| 30 * Return the hardware NextTBTT in TSF 31 */ 32uint64_t 33ar5210GetNextTBTT(struct ath_hal *ah) 34{ 35#define TU_TO_TSF(_tu) (((uint64_t)(_tu)) << 10) 36 return TU_TO_TSF(OS_REG_READ(ah, AR_TIMER0)); 37#undef TU_TO_TSF 38} 39 40/*
|
30 * Initialize all of the hardware registers used to send beacons. 31 */ 32void 33ar5210SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) 34{ 35 36 OS_REG_WRITE(ah, AR_TIMER0, bt->bt_nexttbtt); 37 OS_REG_WRITE(ah, AR_TIMER1, bt->bt_nextdba);
--- 154 unchanged lines hidden --- | 41 * Initialize all of the hardware registers used to send beacons. 42 */ 43void 44ar5210SetBeaconTimers(struct ath_hal *ah, const HAL_BEACON_TIMERS *bt) 45{ 46 47 OS_REG_WRITE(ah, AR_TIMER0, bt->bt_nexttbtt); 48 OS_REG_WRITE(ah, AR_TIMER1, bt->bt_nextdba);
--- 154 unchanged lines hidden --- |