[Feature][T106_eSDK]T106-V2.01.01.02P56U06.AP.15.11_CAP.15.11(SDK4.6)diff_17.02(SDK4.7)
Only Configure: No
Affected branch: master
Affected module: unknow
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No
Change-Id: I9dc02273b59a074828ab3eeaa84306415b153138
diff --git a/upstream/linux-5.10/drivers/net/zvnet/zvnet_dev.h b/upstream/linux-5.10/drivers/net/zvnet/zvnet_dev.h
new file mode 100755
index 0000000..d1feaa5
--- /dev/null
+++ b/upstream/linux-5.10/drivers/net/zvnet/zvnet_dev.h
@@ -0,0 +1,76 @@
+#ifndef ZV_NET_H
+#define ZV_NET_H
+
+#include <linux/interrupt.h>
+#include <linux/kthread.h>
+#include <linux/spinlock.h>
+#include <linux/semaphore.h>
+#include <linux/netdevice.h>
+#include <linux/skbuff.h>
+#include <linux/soc/zte/rpmsg.h>
+
+//#define ZVNET_DEBUG
+#ifdef ZVNET_DEBUG
+#define zv_dbg(format, arg...) printk(KERN_DEBUG "[zvnet]<%s>: " format "\n" , \
+ __func__ , ## arg)
+#define zv_info(format, arg...) printk(KERN_INFO "[zvnet]<%s>: " format "\n" , \
+ __func__ , ## arg)
+#else
+#define zv_dbg(format, arg...) do {} while (0)
+#define zv_info(format, arg...) do {} while (0)
+#endif
+
+#define zv_err(format, arg...) printk(KERN_ERR "[zvnet]<%s>: " format "\n" , \
+ __func__ , ## arg)
+
+#define zv_warn(format, arg...) printk(KERN_WARNING "[zvnet]<%s>: " format "\n" , \
+ __func__ , ## arg)
+
+//zvnetÉ豸×î´óÊý
+#define DDR_ZVNET_DEV_MAX 10
+#define ZVNET_IFNAME_PREFIX "zvnet"
+
+#define ICP_CHN_ZVNET1 20 //ICP_CHANNEL_WAN1
+#define ICP_CHN_ZVNET2 21 //ICP_CHANNEL_WAN2
+#define ICP_CHN_ZVNET3 22 //ICP_CHANNEL_WAN3
+#define ICP_CHN_ZVNET4 23 //ICP_CHANNEL_WAN4
+
+#define ICP_CHANNEL_SIZE (8 * 1024 *2)
+
+#define zvnetCreateChannel rpmsgCreateChannel
+#define zvnetWrite rpmsgWrite
+#define zvnetRead rpmsgRead
+
+struct zvnet_channel {
+ T_RpMsg_CoreID core_id;
+ T_RpMsg_ChID channel_id;
+ unsigned int channel_size;
+ struct task_struct *rcv_thread;
+};
+
+struct zvnet {
+ struct net_device *net;
+ struct sk_buff_head rxq;
+ struct tasklet_struct bh;
+ void *dev_priv;
+};
+
+struct zvnet_device {
+ struct zvnet *dev;
+ struct net_device *net;
+ //struct zvnet_channel chn_info;
+ unsigned char retran_times;
+ //int (*write)(struct sk_buff *,struct v2x_hdr *, unsigned int, struct net_device *);
+};
+
+struct zvp_header {
+ unsigned int magic_word;
+ unsigned short chnid;
+ unsigned short tlen;
+};
+
+#define ZVP_MAGIC_WORD 0x5A5A5A5A
+#define ZVP_HEAD_LEN sizeof(struct zvp_header)
+
+#endif
+