linux/drivers/staging/rtl8723bs/include/osdep_service.h

/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
 *
 * Copyright(c) 2007 - 2013 Realtek Corporation. All rights reserved.
 *
 ******************************************************************************/
#ifndef __OSDEP_SERVICE_H_
#define __OSDEP_SERVICE_H_


#define _FAIL
#define _SUCCESS
#define RTW_RX_HANDLED

#include <osdep_service_linux.h>

#define BIT0
#define BIT1
#define BIT2
#define BIT3
#define BIT4
#define BIT5
#define BIT6
#define BIT7
#define BIT8
#define BIT9
#define BIT10
#define BIT11
#define BIT12
#define BIT13
#define BIT14
#define BIT15
#define BIT16
#define BIT17
#define BIT18
#define BIT19
#define BIT20
#define BIT21
#define BIT22
#define BIT23
#define BIT24
#define BIT25
#define BIT26
#define BIT27
#define BIT28
#define BIT29
#define BIT30
#define BIT31
#define BIT32
#define BIT33
#define BIT34
#define BIT35
#define BIT36

extern int RTW_STATUS_CODE(int error_code);

void *_rtw_zmalloc(u32 sz);
void *_rtw_malloc(u32 sz);
void _kfree(u8 *pbuf, u32 sz);

struct sk_buff *_rtw_skb_alloc(u32 sz);
struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb);
int _rtw_netif_rx(struct net_device *ndev, struct sk_buff *skb);

#define rtw_malloc(sz)
#define rtw_zmalloc(sz)

#define rtw_skb_alloc(size)
#define rtw_skb_alloc_f(size, mstat_f)
#define rtw_skb_copy(skb)
#define rtw_skb_copy_f(skb, mstat_f)
#define rtw_netif_rx(ndev, skb)

extern void _rtw_init_queue(struct __queue	*pqueue);

static inline void thread_enter(char *name)
{}

static inline void flush_signals_thread(void)
{}

#define rtw_warn_on(condition)

static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *parg4)
{}

#define _RND(sz, r)

#ifndef MAC_ARG
#define MAC_ARG(x)
#endif

extern void rtw_free_netdev(struct net_device * netdev);

/* Macros for handling unaligned memory accesses */

void rtw_buf_free(u8 **buf, u32 *buf_len);
void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len);

struct rtw_cbuf {};

bool rtw_cbuf_full(struct rtw_cbuf *cbuf);
bool rtw_cbuf_empty(struct rtw_cbuf *cbuf);
bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf);
void *rtw_cbuf_pop(struct rtw_cbuf *cbuf);
struct rtw_cbuf *rtw_cbuf_alloc(u32 size);

/*  String handler */
/*
 * Write formatted output to sized buffer
 */
#define rtw_sprintf(buf, size, format, arg...)

#endif