Merge tag 'for-v3.7' of git://git.infradead.org/battery-2.6
[deliverable/linux.git] / drivers / staging / gdm72xx / gdm_qos.h
CommitLineData
247e9cff
SA
1/*
2 * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
3 *
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 */
13
14#if !defined(GDM_QOS_H_20090403)
15#define GDM_QOS_H_20090403
16
17#include <linux/types.h>
18#include <linux/usb.h>
19#include <linux/list.h>
20
21#define BOOLEAN u8
22
13b2663c
ML
23#define QOS_MAX 16
24#define IPTYPEOFSERVICE 0x8000
25#define PROTOCOL 0x4000
26#define IPMASKEDSRCADDRESS 0x2000
27#define IPMASKEDDSTADDRESS 0x1000
247e9cff
SA
28#define PROTOCOLSRCPORTRANGE 0x800
29#define PROTOCOLDSTPORTRANGE 0x400
13b2663c
ML
30#define DSTMACADDR 0x200
31#define SRCMACADDR 0x100
32#define ETHERTYPE 0x80
247e9cff 33#define IEEE802_1DUSERPRIORITY 0x40
13b2663c 34#define IEEE802_1QVLANID 0x10
247e9cff
SA
35
36struct gdm_wimax_csr_s {
37 /* union{
38 U16 all;
39 struct _CS_CLASSIFIER_RULE_ENABLE{
40 IPTypeOfService:1,
41 Protocol:1,
42 IPMaskedSrcAddress:1,
43 IPMaskedDstAddress:1,
44 ProtocolSrcPortRange:1,
45 ProtocolDstPortRange:1,
46 DstMacAddr:1,
47 SrcMacAddr:1,
48 Ethertype:1,
49 IEEE802_1DUserPriority:1,
50 IEEE802_1QVLANID:1,
51 Reserved:5;
52 } fields;
53 } */
13b2663c
ML
54 BOOLEAN enabled;
55 u32 SFID;
56 u8 qos_buf_count;
57 u16 classifier_rule_en;
58 u8 ip2s_lo;
59 u8 ip2s_hi;
60 u8 ip2s_mask;
61 u8 protocol;
62 u8 ipsrc_addr[16];
63 u8 ipsrc_addrmask[16];
64 u8 ipdst_addr[16];
65 u8 ipdst_addrmask[16];
66 u16 srcport_lo;
67 u16 srcport_hi;
68 u16 dstport_lo;
69 u16 dstport_hi;
247e9cff
SA
70};
71
72struct qos_entry_s {
13b2663c
ML
73 struct list_head list;
74 struct sk_buff *skb;
75 struct net_device *dev;
247e9cff
SA
76
77};
78
79struct qos_cb_s {
80 struct list_head qos_list[QOS_MAX];
81 u32 qos_list_cnt;
82 u32 qos_null_idx;
83 struct gdm_wimax_csr_s csr[QOS_MAX];
13b2663c 84 spinlock_t qos_lock;
247e9cff
SA
85 u32 qos_limit_size;
86};
87
88void gdm_qos_init(void *nic_ptr);
89void gdm_qos_release_list(void *nic_ptr);
90int gdm_qos_send_hci_pkt(struct sk_buff *skb, struct net_device *dev);
91void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size);
92
93#endif
This page took 0.074135 seconds and 5 git commands to generate.