Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Oct 2008 05:15:50 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 151254 for review
Message-ID:  <200810110515.m9B5FoIn093034@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=151254

Change 151254 by sam@sam_ebb on 2008/10/11 05:15:50

	moving forward the hal will support this directly

Affected files ...

.. //depot/projects/vap/sys/dev/ath/if_athvar.h#32 edit

Differences ...

==== //depot/projects/vap/sys/dev/ath/if_athvar.h#32 (text+ko) ====

@@ -503,6 +503,8 @@
 	(ath_hal_getcapability(_ah, HAL_CAP_CIPHER, _cipher, NULL) == HAL_OK)
 #define	ath_hal_getregdomain(_ah, _prd) \
 	(ath_hal_getcapability(_ah, HAL_CAP_REG_DMN, 0, (_prd)) == HAL_OK)
+#if HAL_ABI_VERSION < 0x08090100
+/* XXX wrong for anything but amd64 and i386 */
 #if defined(__LP64__)
 #define	ath_hal_setregdomain(_ah, _rd) \
 	(*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 176) = (_rd))
@@ -510,6 +512,10 @@
 #define	ath_hal_setregdomain(_ah, _rd) \
 	(*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 128) = (_rd))
 #endif
+#else
+#define	ath_hal_setregdomain(_ah, _rd) \
+	ath_hal_setcapability(_ah, HAL_CAP_REG_DMN, 0, _rd, NULL)
+#endif
 #define	ath_hal_getcountrycode(_ah, _pcc) \
 	(*(_pcc) = (_ah)->ah_countryCode)
 #define	ath_hal_gettkipmic(_ah) \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810110515.m9B5FoIn093034>