svn commit: r222818 - in projects/largeSMP: contrib/top share/misc
share/mk sys/dev/ath sys/dev/ath/ath_hal
sys/dev/ath/ath_hal/ar5212 sys/dev/ath/ath_hal/ar5416
usr.bin/calendar/calendars
Attilio Rao
attilio at FreeBSD.org
Tue Jun 7 09:37:09 UTC 2011
Author: attilio
Date: Tue Jun 7 09:37:08 2011
New Revision: 222818
URL: http://svn.freebsd.org/changeset/base/222818
Log:
MFC
Modified:
projects/largeSMP/share/misc/committers-ports.dot
projects/largeSMP/sys/dev/ath/ath_hal/ah.h
projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h
projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h
projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
projects/largeSMP/sys/dev/ath/if_athvar.h
projects/largeSMP/usr.bin/calendar/calendars/calendar.freebsd
Directory Properties:
projects/largeSMP/ (props changed)
projects/largeSMP/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/contrib/bind9/ (props changed)
projects/largeSMP/contrib/binutils/ (props changed)
projects/largeSMP/contrib/bzip2/ (props changed)
projects/largeSMP/contrib/compiler-rt/ (props changed)
projects/largeSMP/contrib/dialog/ (props changed)
projects/largeSMP/contrib/ee/ (props changed)
projects/largeSMP/contrib/expat/ (props changed)
projects/largeSMP/contrib/file/ (props changed)
projects/largeSMP/contrib/gcc/ (props changed)
projects/largeSMP/contrib/gdb/ (props changed)
projects/largeSMP/contrib/gdtoa/ (props changed)
projects/largeSMP/contrib/gnu-sort/ (props changed)
projects/largeSMP/contrib/groff/ (props changed)
projects/largeSMP/contrib/less/ (props changed)
projects/largeSMP/contrib/libpcap/ (props changed)
projects/largeSMP/contrib/libstdc++/ (props changed)
projects/largeSMP/contrib/llvm/ (props changed)
projects/largeSMP/contrib/llvm/tools/clang/ (props changed)
projects/largeSMP/contrib/ncurses/ (props changed)
projects/largeSMP/contrib/netcat/ (props changed)
projects/largeSMP/contrib/ntp/ (props changed)
projects/largeSMP/contrib/one-true-awk/ (props changed)
projects/largeSMP/contrib/openbsm/ (props changed)
projects/largeSMP/contrib/openpam/ (props changed)
projects/largeSMP/contrib/pf/ (props changed)
projects/largeSMP/contrib/sendmail/ (props changed)
projects/largeSMP/contrib/tcpdump/ (props changed)
projects/largeSMP/contrib/tcsh/ (props changed)
projects/largeSMP/contrib/top/ (props changed)
projects/largeSMP/contrib/top/install-sh (props changed)
projects/largeSMP/contrib/tzcode/stdtime/ (props changed)
projects/largeSMP/contrib/tzcode/zic/ (props changed)
projects/largeSMP/contrib/tzdata/ (props changed)
projects/largeSMP/contrib/wpa/ (props changed)
projects/largeSMP/contrib/xz/ (props changed)
projects/largeSMP/crypto/openssh/ (props changed)
projects/largeSMP/crypto/openssl/ (props changed)
projects/largeSMP/gnu/lib/ (props changed)
projects/largeSMP/gnu/usr.bin/binutils/ (props changed)
projects/largeSMP/gnu/usr.bin/cc/cc_tools/ (props changed)
projects/largeSMP/gnu/usr.bin/gdb/ (props changed)
projects/largeSMP/lib/libc/ (props changed)
projects/largeSMP/lib/libc/stdtime/ (props changed)
projects/largeSMP/lib/libutil/ (props changed)
projects/largeSMP/lib/libz/ (props changed)
projects/largeSMP/sbin/ (props changed)
projects/largeSMP/sbin/ipfw/ (props changed)
projects/largeSMP/share/mk/bsd.arch.inc.mk (props changed)
projects/largeSMP/share/zoneinfo/ (props changed)
projects/largeSMP/sys/ (props changed)
projects/largeSMP/sys/amd64/include/xen/ (props changed)
projects/largeSMP/sys/boot/ (props changed)
projects/largeSMP/sys/boot/i386/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/efi/ (props changed)
projects/largeSMP/sys/boot/ia64/ski/ (props changed)
projects/largeSMP/sys/boot/powerpc/boot1.chrp/ (props changed)
projects/largeSMP/sys/boot/powerpc/ofw/ (props changed)
projects/largeSMP/sys/cddl/contrib/opensolaris/ (props changed)
projects/largeSMP/sys/conf/ (props changed)
projects/largeSMP/sys/contrib/dev/acpica/ (props changed)
projects/largeSMP/sys/contrib/octeon-sdk/ (props changed)
projects/largeSMP/sys/contrib/pf/ (props changed)
projects/largeSMP/sys/contrib/x86emu/ (props changed)
projects/largeSMP/usr.bin/calendar/ (props changed)
projects/largeSMP/usr.bin/csup/ (props changed)
projects/largeSMP/usr.bin/procstat/ (props changed)
projects/largeSMP/usr.sbin/ndiscvt/ (props changed)
projects/largeSMP/usr.sbin/zic/ (props changed)
Modified: projects/largeSMP/share/misc/committers-ports.dot
==============================================================================
--- projects/largeSMP/share/misc/committers-ports.dot Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/share/misc/committers-ports.dot Tue Jun 7 09:37:08 2011 (r222818)
@@ -205,6 +205,8 @@ arved -> stefan
asami -> obrien
+bapt -> jlaffaye
+
beat -> decke
beech -> glarkin
@@ -402,6 +404,7 @@ tabthorpe -> dhn
tabthorpe -> fluffy
tabthorpe -> jacula
tabthorpe -> jadawin
+tabthorpe -> jlaffaye
tabthorpe -> pgj
tabthorpe -> rene
Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ah.h Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ah.h Tue Jun 7 09:37:08 2011 (r222818)
@@ -745,6 +745,17 @@ typedef enum {
HAL_QUIET_ADD_SWBA_RESP_TIME = 0x4, /* add beacon response time to next_start offset */
} HAL_QUIET_FLAG;
+#define HAL_DFS_EVENT_PRICH 0x0000001
+
+struct dfs_event {
+ uint64_t re_full_ts; /* 64-bit full timestamp from interrupt time */
+ uint32_t re_ts; /* Original 15 bit recv timestamp */
+ uint8_t re_rssi; /* rssi of radar event */
+ uint8_t re_dur; /* duration of radar pulse */
+ uint32_t re_flags; /* Flags (see above) */
+};
+typedef struct dfs_event HAL_DFS_EVENT;
+
/*
* Hardware Access Layer (HAL) API.
*
@@ -928,6 +939,9 @@ struct ath_hal {
HAL_PHYERR_PARAM *pe);
void __ahdecl(*ah_getDfsThresh)(struct ath_hal *ah,
HAL_PHYERR_PARAM *pe);
+ HAL_BOOL __ahdecl(*ah_procRadarEvent)(struct ath_hal *ah,
+ struct ath_rx_status *rxs, uint64_t fulltsf,
+ const char *buf, HAL_DFS_EVENT *event);
/* Key Cache Functions */
uint32_t __ahdecl(*ah_getKeyCacheSize)(struct ath_hal*);
Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h Tue Jun 7 09:37:08 2011 (r222818)
@@ -622,5 +622,8 @@ extern HAL_BOOL ar5212IsNFCalInProgress(
extern HAL_BOOL ar5212WaitNFCalComplete(struct ath_hal *ah, int i);
extern void ar5212EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
extern void ar5212GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
+extern HAL_BOOL ar5212ProcessRadarEvent(struct ath_hal *ah,
+ struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf,
+ HAL_DFS_EVENT *event);
#endif /* _ATH_AR5212_H_ */
Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Tue Jun 7 09:37:08 2011 (r222818)
@@ -132,6 +132,7 @@ static const struct ath_hal_private ar52
/* DFS Functions */
.ah_enableDfs = ar5212EnableDfs,
.ah_getDfsThresh = ar5212GetDfsThresh,
+ .ah_procRadarEvent = ar5212ProcessRadarEvent,
/* Key Cache Functions */
.ah_getKeyCacheSize = ar5212GetKeyCacheSize,
Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Tue Jun 7 09:37:08 2011 (r222818)
@@ -1180,3 +1180,47 @@ ar5212GetDfsThresh(struct ath_hal *ah, H
pe->pe_extchannel = AH_FALSE;
}
+/*
+ * Process the radar phy error and extract the pulse duration.
+ */
+HAL_BOOL
+ar5212ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs,
+ uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
+{
+ uint8_t dur;
+ uint8_t rssi;
+
+ /* Check whether the given phy error is a radar event */
+ if ((rxs->rs_phyerr != HAL_PHYERR_RADAR) &&
+ (rxs->rs_phyerr != HAL_PHYERR_FALSE_RADAR_EXT))
+ return AH_FALSE;
+
+ /*
+ * The first byte is the pulse width - if there's
+ * no data, simply set the duration to 0
+ */
+ if (rxs->rs_datalen >= 1)
+ /* The pulse width is byte 0 of the data */
+ dur = ((uint8_t) buf[0]) & 0xff;
+ else
+ dur = 0;
+
+ /* Pulse RSSI is the normal reported RSSI */
+ rssi = (uint8_t) rxs->rs_rssi;
+
+ /* 0 duration/rssi is not a valid radar event */
+ if (dur == 0 && rssi == 0)
+ return AH_FALSE;
+
+ HALDEBUG(ah, HAL_DEBUG_DFS, "%s: rssi=%d, dur=%d\n",
+ __func__, rssi, dur);
+
+ /* Record the event */
+ event->re_full_ts = fulltsf;
+ event->re_ts = rxs->rs_tstamp;
+ event->re_rssi = rssi;
+ event->re_dur = dur;
+ event->re_flags = HAL_DFS_EVENT_PRICH;
+
+ return AH_TRUE;
+}
Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h Tue Jun 7 09:37:08 2011 (r222818)
@@ -205,6 +205,9 @@ extern HAL_BOOL ar5416SetRifsDelay(struc
const struct ieee80211_channel *chan, HAL_BOOL enable);
extern void ar5416EnableDfs(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
extern void ar5416GetDfsThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe);
+extern HAL_BOOL ar5416ProcessRadarEvent(struct ath_hal *ah,
+ struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf,
+ HAL_DFS_EVENT *event);
extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
int setChip);
Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Tue Jun 7 09:37:08 2011 (r222818)
@@ -147,6 +147,7 @@ ar5416InitState(struct ath_hal_5416 *ahp
/* DFS Functions */
ah->ah_enableDfs = ar5416EnableDfs;
ah->ah_getDfsThresh = ar5416GetDfsThresh;
+ ah->ah_procRadarEvent = ar5416ProcessRadarEvent;
/* Power Management Functions */
ah->ah_setPowerMode = ar5416SetPowerMode;
Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Tue Jun 7 09:37:08 2011 (r222818)
@@ -692,3 +692,19 @@ ar5416EnableDfs(struct ath_hal *ah, HAL_
OS_REG_WRITE(ah, AR_PHY_RADAR_1, val);
}
}
+
+/*
+ * Extract the radar event information from the given phy error.
+ *
+ * Returns AH_TRUE if the phy error was actually a phy error,
+ * AH_FALSE if the phy error wasn't a phy error.
+ */
+HAL_BOOL
+ar5416ProcessRadarEvent(struct ath_hal *ah, struct ath_rx_status *rxs,
+ uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event)
+{
+ /*
+ * For now, this isn't implemented.
+ */
+ return AH_FALSE;
+}
Modified: projects/largeSMP/sys/dev/ath/if_athvar.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/if_athvar.h Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/sys/dev/ath/if_athvar.h Tue Jun 7 09:37:08 2011 (r222818)
@@ -709,6 +709,8 @@ void ath_intr(void *);
((*(_ah)->ah_enableDfs)((_ah), (_param)))
#define ath_hal_getdfsthresh(_ah, _param) \
((*(_ah)->ah_getDfsThresh)((_ah), (_param)))
+#define ath_hal_procradarevent(_ah, _rxs, _fulltsf, _buf, _event) \
+ ((*(_ah)->ah_procRadarEvent)((_ah), (_rxs), (_fulltsf), (_buf), (_event)))
#define ath_hal_gpioCfgOutput(_ah, _gpio, _type) \
((*(_ah)->ah_gpioCfgOutput)((_ah), (_gpio), (_type)))
Modified: projects/largeSMP/usr.bin/calendar/calendars/calendar.freebsd
==============================================================================
--- projects/largeSMP/usr.bin/calendar/calendars/calendar.freebsd Tue Jun 7 09:06:15 2011 (r222817)
+++ projects/largeSMP/usr.bin/calendar/calendars/calendar.freebsd Tue Jun 7 09:37:08 2011 (r222818)
@@ -294,6 +294,7 @@
10/22 Jean-Sebastien Pedron <dumbbell at FreeBSD.org> born in Redon, Ille-et-Vilaine, France, 1980
10/23 Mario Sergio Fujikawa Ferreira <lioux at FreeBSD.org> born in Brasilia, Distrito Federal, Brazil, 1976
10/25 Eric Melville <eric at FreeBSD.org> born in Los Gatos, California, United States, 1980
+10/25 Julien Laffaye <jlaffaye at FreeBSD.org> born in Toulouse, France, 1988
10/26 Philip M. Gollucci <pgollucci at FreeBSD.org> born in Silver Spring, Maryland, United States, 1979
10/27 Takanori Watanabe <takawata at FreeBSD.org> born in Numazu, Shizuoka, Japan, 1972
11/05 M. Warner Losh <imp at FreeBSD.org> born in Kansas City, Kansas, United States, 1966
More information about the svn-src-projects
mailing list