#define ath_hal_disablePCIE(_ah) \
(_ah)->ah_disablePCIE(_ah)
-#define ath_hal_eepromDetach(_ah) \
- AH_PRIVATE(_ah)->ah_eepromDetach(_ah)
+#define ath_hal_eepromDetach(_ah) do { \
+ if (AH_PRIVATE(_ah)->ah_eepromDetach) \
+ AH_PRIVATE(_ah)->ah_eepromDetach(_ah); \
+} while (0)
#define ath_hal_eepromGet(_ah, _param, _val) \
AH_PRIVATE(_ah)->ah_eepromGet(_ah, _param, _val)
#define ath_hal_eepromSet(_ah, _param, _val) \
* based on the current regulatory domain for the specified
* channel.
*/
-extern u_int ath_hal_getnfcheckrequired(struct ath_hal *, HAL_CHANNEL *);
+extern HAL_BOOL ath_hal_getnfcheckrequired(struct ath_hal *, HAL_CHANNEL *);
/*
* Map a public channel definition to the corresponding
#define HALASSERT(_x)
#endif /* AH_ASSERT */
+/*
+ * Return the h/w frequency for a channel. This may be
+ * different from ic_freq if this is a GSM device that
+ * takes 2.4GHz frequencies and down-converts them.
+ */
+static OS_INLINE uint16_t
+ath_hal_gethwchannel(struct ath_hal *ah, const HAL_CHANNEL *c)
+{
+ return ath_hal_checkchannel(ah, c)->channel;
+}
+
/*
* Convert between microseconds and core system clocks.
*/