/* Returns: pointer of srtuct rtw_cbuf, NULL for allocation failure  */
struct rtw_cbuf* rtw_cbuf_alloc(u32 size)
/* Returns: pointer of srtuct rtw_cbuf, NULL for allocation failure  */
struct rtw_cbuf* rtw_cbuf_alloc(u32 size)
{
	struct rtw_cbuf *cbuf;
	cbuf = (struct rtw_cbuf *)rtw_malloc(sizeof(*cbuf) + sizeof(void*)*size);
	if (cbuf) {
		cbuf->write = cbuf->read = 0;
		cbuf->size = size;
	}
	return cbuf;
}