X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=target_firmware%2Fwlan%2Fah_osdep.h;h=0b3a99f10302de920045691480feca06f5a11c4d;hb=9eb079a1801b89fec0578831c95c0fb1f1383158;hp=d62de3d52ce9ef59703ced2c184a1be98ab48813;hpb=cc00204d96a1b3b6a0dc2af28cad5894dd055484;p=open-ath9k-htc-firmware.git diff --git a/target_firmware/wlan/ah_osdep.h b/target_firmware/wlan/ah_osdep.h index d62de3d..0b3a99f 100755 --- a/target_firmware/wlan/ah_osdep.h +++ b/target_firmware/wlan/ah_osdep.h @@ -128,8 +128,6 @@ extern void __ahdecl ath_hal_delay(a_int32_t); extern void* __ahdecl ath_hal_ioremap(a_uint32_t addr, a_uint32_t len); #define OS_REMAP(_addr, _len) ath_hal_ioremap(_addr, _len) -#define OS_MEMZERO(_a, _n) ath_hal_memzero((_a), (_n)) -extern void __ahdecl ath_hal_memzero(void *, size_t); #define OS_MEMCPY(_d, _s, _n) ath_hal_memcpy(_d,_s,_n) extern void * __ahdecl ath_hal_memcpy(void *, const void *, size_t); @@ -141,51 +139,14 @@ struct ath_hal; extern a_uint32_t __ahdecl ath_hal_getuptime(struct ath_hal *); #define OS_GETUPTIME(_ah) ath_hal_getuptime(_ah) -/* - * Byte order/swapping support. - */ -#define AH_LITTLE_ENDIAN 1234 -#define AH_BIG_ENDIAN 4321 - -#if AH_BYTE_ORDER == AH_BIG_ENDIAN -/* - * This could be optimized but since we only use it for - * a few registers there's little reason to do so. - */ -#ifndef __bswap32 -static inline a_uint32_t -__bswap32(a_uint32_t _x) -{ - return ((a_uint32_t)( - (((const a_uint8_t *)(&_x))[0] ) | - (((const a_uint8_t *)(&_x))[1]<< 8) | - (((const a_uint8_t *)(&_x))[2]<<16) | - (((const a_uint8_t *)(&_x))[3]<<24)) - ); -} -#endif -#ifndef __bswap16 -#define __bswap16(_x) ( (a_uint16_t)( (((const a_uint8_t *)(&_x))[0] ) |\ - ( ( (const a_uint8_t *)( &_x ) )[1]<< 8) ) ) -#endif -#else #ifndef __bswap32 #define __bswap32(_x) (_x) #endif #ifndef __bswap16 #define __bswap16(_x) (_x) #endif -#endif - -#define OS_REG_WRITE(_ah, _reg, _val) ath_hal_reg_write_target(_ah, _reg, _val) -#define OS_REG_READ(_ah, _reg) ath_hal_reg_read_target(_ah, _reg) - -extern void __ahdecl ath_hal_reg_write_target(struct ath_hal *ah, - a_uint32_t reg, a_uint32_t val); -extern a_uint32_t __ahdecl ath_hal_reg_read_target(struct ath_hal *ah, a_uint32_t reg); #define AH_USE_EEPROM 0x00000001 -extern struct ath_hal *_ath_hal_attach_tgt( a_uint32_t,HAL_SOFTC,adf_os_device_t,HAL_BUS_HANDLE, +extern struct ath_hal *_ath_hal_attach_tgt( a_uint32_t, HAL_SOFTC, adf_os_device_t, a_uint32_t flags, void* status); -extern void ath_hal_detach(struct ath_hal *); #endif /* _ATH_AH_OSDEP_H_ */