root/drivers/staging/rtl8188eu/include/osdep_service.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. get_list_head
  2. rtw_netif_queue_stopped

   1 /* SPDX-License-Identifier: GPL-2.0 */
   2 /******************************************************************************
   3  *
   4  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
   5  *
   6  ******************************************************************************/
   7 #ifndef __OSDEP_SERVICE_H_
   8 #define __OSDEP_SERVICE_H_
   9 
  10 #include <basic_types.h>
  11 
  12 #define _FAIL           0
  13 #define _SUCCESS        1
  14 #define RTW_RX_HANDLED  2
  15 
  16 #include <linux/spinlock.h>
  17 #include <linux/compiler.h>
  18 #include <linux/kernel.h>
  19 #include <linux/errno.h>
  20 #include <linux/slab.h>
  21 #include <linux/module.h>
  22 #include <linux/kref.h>
  23 #include <linux/netdevice.h>
  24 #include <linux/skbuff.h>
  25 #include <linux/circ_buf.h>
  26 #include <linux/uaccess.h>
  27 #include <asm/byteorder.h>
  28 #include <linux/atomic.h>
  29 #include <linux/io.h>
  30 #include <linux/mutex.h>
  31 #include <linux/sem.h>
  32 #include <linux/sched/signal.h>
  33 #include <linux/etherdevice.h>
  34 #include <linux/wireless.h>
  35 #include <net/iw_handler.h>
  36 #include <linux/if_arp.h>
  37 #include <linux/rtnetlink.h>
  38 #include <linux/delay.h>
  39 #include <linux/interrupt.h>    /*  for struct tasklet_struct */
  40 #include <linux/ip.h>
  41 #include <linux/kthread.h>
  42 
  43 #include <linux/usb.h>
  44 #include <linux/usb/ch9.h>
  45 
  46 struct  __queue {
  47         struct  list_head       queue;
  48         spinlock_t lock;
  49 };
  50 
  51 static inline struct list_head *get_list_head(struct __queue *queue)
  52 {
  53         return &(queue->queue);
  54 }
  55 
  56 static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
  57 {
  58         return  netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 0)) &&
  59                 netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 1)) &&
  60                 netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 2)) &&
  61                 netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 3));
  62 }
  63 
  64 u8 *_rtw_malloc(u32 sz);
  65 #define rtw_malloc(sz)                  _rtw_malloc((sz))
  66 
  67 void _rtw_init_queue(struct __queue *pqueue);
  68 
  69 struct rtw_netdev_priv_indicator {
  70         void *priv;
  71 };
  72 struct net_device *rtw_alloc_etherdev_with_old_priv(void *old_priv);
  73 
  74 #define rtw_netdev_priv(netdev)                                 \
  75         (((struct rtw_netdev_priv_indicator *)netdev_priv(netdev))->priv)
  76 void rtw_free_netdev(struct net_device *netdev);
  77 
  78 #define FUNC_NDEV_FMT "%s(%s)"
  79 #define FUNC_NDEV_ARG(ndev) __func__, ndev->name
  80 #define FUNC_ADPT_FMT "%s(%s)"
  81 #define FUNC_ADPT_ARG(adapter) __func__, adapter->pnetdev->name
  82 
  83 /* Macros for handling unaligned memory accesses */
  84 
  85 #define RTW_GET_BE24(a) ((((u32)(a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
  86                          ((u32)(a)[2]))
  87 
  88 void rtw_buf_free(u8 **buf, u32 *buf_len);
  89 void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len);
  90 #endif

/* [<][>][^][v][top][bottom][index][help] */