Go to the documentation of this file.
23 #ifndef __CSR_WIFI_HIP_CONVERSIONS_H__
24 #define __CSR_WIFI_HIP_CONVERSIONS_H__
30 #define SIZEOF_UINT16 2
31 #define SIZEOF_UINT32 4
32 #define SIZEOF_UINT64 8
34 #define SIZEOF_SIGNAL_HEADER 6
35 #define SIZEOF_DATAREF 4
41 #define GET_SIGNAL_ID(_buf) CSR_GET_UINT16_FROM_LITTLE_ENDIAN((_buf))
47 #define GET_PACKED_DATAREF_SLOT(_buf, _ref) \
48 CSR_GET_UINT16_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + ((_ref) * SIZEOF_DATAREF) + 0))
50 #define GET_PACKED_DATAREF_LEN(_buf, _ref) \
51 CSR_GET_UINT16_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + ((_ref) * SIZEOF_DATAREF) + 2))
53 #define SET_PACKED_DATAREF_SLOT(_buf, _ref, _slot) \
54 CSR_COPY_UINT16_TO_LITTLE_ENDIAN((_slot), ((_buf) + SIZEOF_SIGNAL_HEADER + ((_ref) * SIZEOF_DATAREF) + 0))
56 #define SET_PACKED_DATAREF_LEN(_buf, _ref, _len) \
57 CSR_COPY_UINT16_TO_LITTLE_ENDIAN((_len), ((_buf) + SIZEOF_SIGNAL_HEADER + ((_ref) * SIZEOF_DATAREF) + 2))
59 #define GET_PACKED_MA_PACKET_REQUEST_FRAME_PRIORITY(_buf) \
60 CSR_GET_UINT16_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + UNIFI_MAX_DATA_REFERENCES * SIZEOF_DATAREF + 8))
62 #define GET_PACKED_MA_PACKET_REQUEST_HOST_TAG(_buf) \
63 CSR_GET_UINT32_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + UNIFI_MAX_DATA_REFERENCES * SIZEOF_DATAREF + 4))
65 #define GET_PACKED_MA_PACKET_CONFIRM_HOST_TAG(_buf) \
66 CSR_GET_UINT32_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + UNIFI_MAX_DATA_REFERENCES * SIZEOF_DATAREF + 8))
68 #define GET_PACKED_MA_PACKET_CONFIRM_TRANSMISSION_STATUS(_buf) \
69 CSR_GET_UINT16_FROM_LITTLE_ENDIAN(((_buf) + SIZEOF_SIGNAL_HEADER + UNIFI_MAX_DATA_REFERENCES * SIZEOF_DATAREF + 2))