2 * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
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.
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.
14 #if !defined(GDM_QOS_H_20090403)
15 #define GDM_QOS_H_20090403
17 #include <linux/types.h>
18 #include <linux/usb.h>
19 #include <linux/list.h>
24 #define IPTYPEOFSERVICE 0x8000
25 #define PROTOCOL 0x4000
26 #define IPMASKEDSRCADDRESS 0x2000
27 #define IPMASKEDDSTADDRESS 0x1000
28 #define PROTOCOLSRCPORTRANGE 0x800
29 #define PROTOCOLDSTPORTRANGE 0x400
30 #define DSTMACADDR 0x200
31 #define SRCMACADDR 0x100
32 #define ETHERTYPE 0x80
33 #define IEEE802_1DUSERPRIORITY 0x40
34 #define IEEE802_1QVLANID 0x10
36 struct gdm_wimax_csr_s {
39 struct _CS_CLASSIFIER_RULE_ENABLE{
44 ProtocolSrcPortRange:1,
45 ProtocolDstPortRange:1,
49 IEEE802_1DUserPriority:1,
57 u16 ClassifierRuleEnable;
73 struct list_head list;
75 struct net_device *dev;
80 struct list_head qos_list[QOS_MAX];
83 struct gdm_wimax_csr_s csr[QOS_MAX];
88 void gdm_qos_init(void *nic_ptr);
89 void gdm_qos_release_list(void *nic_ptr);
90 int gdm_qos_send_hci_pkt(struct sk_buff *skb, struct net_device *dev);
91 void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size);