Merge remote-tracking branch 'mfd/for-mfd-next'
[deliverable/linux.git] / drivers / staging / rtl8723au / include / osdep_service.h
CommitLineData
364e30eb
LF
1/******************************************************************************
2 *
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 ******************************************************************************/
15#ifndef __OSDEP_SERVICE_H_
16#define __OSDEP_SERVICE_H_
17
18#define _FAIL 0
19#define _SUCCESS 1
20#define RTW_RX_HANDLED 2
21
364e30eb
LF
22#include <linux/spinlock.h>
23#include <linux/compiler.h>
24#include <linux/kernel.h>
25#include <linux/errno.h>
26#include <linux/init.h>
27#include <linux/slab.h>
28#include <linux/module.h>
29#include <linux/kref.h>
30#include <linux/netdevice.h>
31#include <linux/skbuff.h>
26462869 32#include <linux/uaccess.h>
364e30eb 33#include <asm/byteorder.h>
26462869
BG
34#include <linux/atomic.h>
35#include <linux/io.h>
364e30eb
LF
36#include <linux/semaphore.h>
37#include <linux/sem.h>
38#include <linux/sched.h>
39#include <linux/etherdevice.h>
40#include <linux/wireless.h>
364e30eb
LF
41#include <linux/if_arp.h>
42#include <linux/rtnetlink.h>
43#include <linux/delay.h>
364e30eb
LF
44#include <linux/interrupt.h> /* for struct tasklet_struct */
45#include <linux/ip.h>
364e30eb 46
364e30eb
LF
47#include <net/ieee80211_radiotap.h>
48#include <net/cfg80211.h>
364e30eb 49
364e30eb
LF
50struct rtw_queue {
51 struct list_head queue;
52 spinlock_t lock;
53};
54
55static inline struct list_head *get_list_head(struct rtw_queue *queue)
56{
1a834b96 57 return &queue->queue;
364e30eb
LF
58}
59
60static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
61{
62 return (netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 0)) &&
63 netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 1)) &&
64 netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 2)) &&
1beda8d5 65 netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 3)));
364e30eb
LF
66}
67
364e30eb
LF
68static inline u32 CHKBIT(u32 x)
69{
70 WARN_ON(x >= 32);
71 if (x >= 32)
72 return 0;
73 return BIT(x);
74}
75
364e30eb 76extern unsigned char MCS_rate_2R23A[16];
364e30eb
LF
77
78extern unsigned char MCS_rate_2R23A[16];
79extern unsigned char MCS_rate_1R23A[16];
80
81void _rtw_init_queue23a(struct rtw_queue *pqueue);
364e30eb 82
364e30eb
LF
83/* Macros for handling unaligned memory accesses */
84
364e30eb
LF
85#define RTW_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
86 ((u32) (a)[2]))
364e30eb 87
364e30eb 88#endif
This page took 0.311119 seconds and 5 git commands to generate.