1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved. 5 * 6 * Modifications for inclusion into the Linux staging tree are 7 * Copyright(c) 2010 Larry Finger. All rights reserved. 8 * 9 * Contact information: 10 * WLAN FAE <wlanfae@realtek.com> 11 * Larry Finger <Larry.Finger@lwfinger.net> 12 * 13 ******************************************************************************/ 14 #ifndef __OSDEP_SERVICE_H_ 15 #define __OSDEP_SERVICE_H_ 16 17 #define _SUCCESS 1 18 #define _FAIL 0 19 20 #include <linux/spinlock.h> 21 22 #include <linux/interrupt.h> 23 #include <linux/semaphore.h> 24 #include <linux/sched/signal.h> 25 #include <linux/sem.h> 26 #include <linux/netdevice.h> 27 #include <linux/etherdevice.h> 28 #include <net/iw_handler.h> 29 #include <linux/proc_fs.h> /* Necessary because we use the proc fs */ 30 31 #include "basic_types.h" 32 33 struct __queue { 34 struct list_head queue; 35 spinlock_t lock; 36 }; 37 38 #define _pkt struct sk_buff 39 #define _buffer unsigned char 40 41 #define _init_queue(pqueue) \ 42 do { \ 43 INIT_LIST_HEAD(&((pqueue)->queue)); \ 44 spin_lock_init(&((pqueue)->lock)); \ 45 } while (0) 46 end_of_queue_search(struct list_head * head,struct list_head * plist)47static inline u32 end_of_queue_search(struct list_head *head, 48 struct list_head *plist) 49 { 50 return (head == plist); 51 } 52 flush_signals_thread(void)53static inline void flush_signals_thread(void) 54 { 55 if (signal_pending(current)) 56 flush_signals(current); 57 } 58 59 #endif 60 61