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 #ifndef __GDM72XX_GDM_QOS_H__
15 #define __GDM72XX_GDM_QOS_H__
17 #include <linux/types.h>
18 #include <linux/usb.h>
19 #include <linux/list.h>
22 #define IPTYPEOFSERVICE 0x8000
23 #define PROTOCOL 0x4000
24 #define IPMASKEDSRCADDRESS 0x2000
25 #define IPMASKEDDSTADDRESS 0x1000
26 #define PROTOCOLSRCPORTRANGE 0x800
27 #define PROTOCOLDSTPORTRANGE 0x400
28 #define DSTMACADDR 0x200
29 #define SRCMACADDR 0x100
30 #define ETHERTYPE 0x80
31 #define IEEE802_1DUSERPRIORITY 0x40
32 #define IEEE802_1QVLANID 0x10
34 struct gdm_wimax_csr_s {
38 u16 classifier_rule_en;
44 u8 ipsrc_addrmask[16];
46 u8 ipdst_addrmask[16];
54 struct list_head list;
56 struct net_device *dev;
61 struct list_head qos_list[QOS_MAX];
64 struct gdm_wimax_csr_s csr[QOS_MAX];
69 void gdm_qos_init(void *nic_ptr);
70 void gdm_qos_release_list(void *nic_ptr);
71 int gdm_qos_send_hci_pkt(struct sk_buff *skb, struct net_device *dev);
72 void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size);
74 #endif /* __GDM72XX_GDM_QOS_H__ */