Merge tag 'gpio-v3.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-2.6.git] / drivers / staging / gdm72xx / gdm_wimax.h
blob6ec0ab43e9cce55853f8c46c5e587fa47803d100
1 /*
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 __GDM_WIMAX_H__
15 #define __GDM_WIMAX_H__
17 #include <linux/netdevice.h>
18 #include <linux/types.h>
19 #include "wm_ioctl.h"
20 #if defined(CONFIG_WIMAX_GDM72XX_QOS)
21 #include "gdm_qos.h"
22 #endif
24 #define DRIVER_VERSION "3.2.3"
26 /*#define ETH_P_IP 0x0800 */
27 /*#define ETH_P_ARP 0x0806 */
28 /*#define ETH_P_IPV6 0x86DD */
30 #define H2L(x) __cpu_to_le16(x)
31 #define L2H(x) __le16_to_cpu(x)
32 #define DH2L(x) __cpu_to_le32(x)
33 #define DL2H(x) __le32_to_cpu(x)
35 #define H2B(x) __cpu_to_be16(x)
36 #define B2H(x) __be16_to_cpu(x)
37 #define DH2B(x) __cpu_to_be32(x)
38 #define DB2H(x) __be32_to_cpu(x)
40 struct phy_dev {
41 void *priv_dev;
42 struct net_device *netdev;
44 int (*send_func)(void *priv_dev, void *data, int len,
45 void (*cb)(void *cb_data), void *cb_data);
46 int (*rcv_func)(void *priv_dev,
47 void (*cb)(void *cb_data, void *data, int len),
48 void *cb_data);
51 struct nic {
52 struct net_device *netdev;
53 struct phy_dev *phy_dev;
55 struct net_device_stats stats;
57 struct data_s sdk_data[SIOC_DATA_MAX];
59 #if defined(CONFIG_WIMAX_GDM72XX_QOS)
60 struct qos_cb_s qos;
61 #endif
66 #if 0
67 #define dprintk(fmt, args ...) printk(KERN_DEBUG " [GDM] " fmt, ## args)
68 #else
69 #define dprintk(...)
70 #endif
72 /*#define DEBUG_SDU */
73 #if defined(DEBUG_SDU)
74 #define DUMP_SDU_ALL (1<<0)
75 #define DUMP_SDU_ARP (1<<1)
76 #define DUMP_SDU_IP (1<<2)
77 #define DUMP_SDU_IP_TCP (1<<8)
78 #define DUMP_SDU_IP_UDP (1<<9)
79 #define DUMP_SDU_IP_ICMP (1<<10)
80 #define DUMP_PACKET (DUMP_SDU_ALL)
81 #endif
83 /*#define DEBUG_HCI */
85 /*#define LOOPBACK_TEST */
87 extern int register_wimax_device(struct phy_dev *phy_dev, struct device *pdev);
88 extern int gdm_wimax_send_tx(struct sk_buff *skb, struct net_device *dev);
89 extern void unregister_wimax_device(struct phy_dev *phy_dev);
91 #endif