net: wireless: rockchip_wlan: add rtl8188eu support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8188eu / include / osdep_service.h
old mode 100755 (executable)
new mode 100644 (file)
index b262938..4423eea
@@ -118,7 +118,8 @@ enum mstat_f {
        MSTAT_FUNC_RX_IO = 0x03<<8,
        MSTAT_FUNC_TX = 0x04<<8,
        MSTAT_FUNC_RX = 0x05<<8,
-       MSTAT_FUNC_MAX = 0x06<<8,
+       MSTAT_FUNC_CFG_VENDOR = 0x06<<8,
+       MSTAT_FUNC_MAX = 0x07<<8,
 };
 
 #define mstat_tf_idx(flags) ((flags)&0xff)
@@ -252,11 +253,12 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a
 #endif /* CONFIG_USB_HCI */
 #endif /* DBG_MEM_ALLOC */
 
-extern void*   rtw_malloc2d(int h, int w, int size);
+extern void*   rtw_malloc2d(int h, int w, size_t size);
 extern void    rtw_mfree2d(void *pbuf, int h, int w, int size);
 
-extern void    _rtw_memcpy(void* dec, void* sour, u32 sz);
-extern int     _rtw_memcmp(void *dst, void *src, u32 sz);
+extern void    _rtw_memcpy(void *dec, const void *sour, u32 sz);
+extern void _rtw_memmove(void *dst, const void *src, u32 sz);
+extern int     _rtw_memcmp(void *dst, const void *src, u32 sz);
 extern void    _rtw_memset(void *pbuf, int c, u32 sz);
 
 extern void    _rtw_init_listhead(_list *list);
@@ -282,7 +284,8 @@ extern void _rtw_spinunlock(_lock   *plock);
 extern void    _rtw_spinlock_ex(_lock  *plock);
 extern void    _rtw_spinunlock_ex(_lock        *plock);
 
-extern void    _rtw_init_queue(_queue  *pqueue);
+extern void    _rtw_init_queue(_queue *pqueue);
+extern void _rtw_deinit_queue(_queue *pqueue);
 extern u32     _rtw_queue_empty(_queue *pqueue);
 extern u32     rtw_end_of_queue_search(_list *queue, _list *pelement);
 
@@ -475,6 +478,8 @@ __inline static u32 bitshift(u32 bitmask)
 }
 
 #define rtw_min(a, b) ((a>b)?b:a)
+#define rtw_is_range_a_in_b(hi_a, lo_a, hi_b, lo_b) (((hi_a) <= (hi_b)) && ((lo_a) >= (lo_b)))
+#define rtw_is_range_overlap(hi_a, lo_a, hi_b, lo_b) (((hi_a) > (lo_b)) && ((lo_a) < (hi_b)))
 
 #ifndef MAC_FMT
 #define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
@@ -513,7 +518,7 @@ extern int ATOMIC_DEC_RETURN(ATOMIC_T *v);
 
 //File operation APIs, just for linux now
 extern int rtw_is_file_readable(char *path);
-extern int rtw_retrive_from_file(char *path, u8* buf, u32 sz);
+extern int rtw_retrieve_from_file(char *path, u8 *buf, u32 sz);
 extern int rtw_store_to_file(char *path, u8* buf, u32 sz);
 
 
@@ -610,6 +615,11 @@ struct rtw_cbuf *rtw_cbuf_alloc(u32 size);
 void rtw_cbuf_free(struct rtw_cbuf *cbuf);
 
 // String handler
+
+BOOLEAN IsHexDigit(char chTmp);
+BOOLEAN is_alpha(char chTmp);
+char alpha_to_upper(char c);
+
 /*
  * Write formatted output to sized buffer
  */