diff options
author | Raj Jayaraman <rjayaraman@nvidia.com> | 2012-09-16 16:08:38 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:41:46 -0700 |
commit | 67c2382bc78537257d837ea57eb2ec95675480e5 (patch) | |
tree | 189f3233f0fd4225c7f20e09bf7b264984d1e565 /include/net | |
parent | 3afca8e79fd75cd7e84ffa4cced44271e3e199a8 (diff) |
drivers: net: Modifications for RMC PegaPCI.
* As submitted by RMC for modem support *
Bug 1054808
Change-Id: Ia25f0d6aaea899cb327cb2141d6896a508238c0c
Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com>
Reviewed-on: http://git-master/r/160032
(cherry picked from commit a81627cafe577dc5f640feb11596d485200c4c0d)
Reviewed-on: http://git-master/r/162292
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: WK Tsai <wtsai@nvidia.com>
Reviewed-by: Steve Lin <stlin@nvidia.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/af_mhi.h | 38 | ||||
-rw-r--r-- | include/net/mhdp.h | 43 | ||||
-rw-r--r-- | include/net/mhi/dgram.h | 41 | ||||
-rw-r--r-- | include/net/mhi/mhdp.h | 35 | ||||
-rw-r--r-- | include/net/mhi/raw.h | 41 | ||||
-rw-r--r-- | include/net/mhi/sched.h | 35 | ||||
-rw-r--r-- | include/net/mhi/sock.h | 42 |
7 files changed, 275 insertions, 0 deletions
diff --git a/include/net/af_mhi.h b/include/net/af_mhi.h new file mode 100644 index 000000000000..be571b7c28a8 --- /dev/null +++ b/include/net/af_mhi.h @@ -0,0 +1,38 @@ +/* + * File: net/af_mhi.h + * + * MHI Protocol Family kernel definitions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef __LINUX_NET_AFMHI_H +#define __LINUX_NET_AFMHI_H + +#include <linux/types.h> +#include <linux/socket.h> + +#include <net/sock.h> + + +extern int mhi_register_protocol(int protocol); +extern int mhi_unregister_protocol(int protocol); +extern int mhi_protocol_registered(int protocol); + +extern int mhi_skb_send(struct sk_buff *skb, struct net_device *dev, u8 proto); + + +#endif /* __LINUX_NET_AFMHI_H */ diff --git a/include/net/mhdp.h b/include/net/mhdp.h new file mode 100644 index 000000000000..1b8558e74ab9 --- /dev/null +++ b/include/net/mhdp.h @@ -0,0 +1,43 @@ +/* + * File: mhdp.h + * + * Modem-Host Interface (MHI) - MHDP kernel interface + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef __NET_MHDP_H +#define __NET_MHDP_H + +struct mhdp_tunnel_parm { + char name[IFNAMSIZ]; + int pdn_id; + char master_interface[IFNAMSIZ]; +}; + +struct mhdp_tunnel { + struct mhdp_tunnel *next; + struct net_device *dev; + struct mhdp_tunnel_parm parms; + struct net_device *master_dev; + struct sk_buff *skb; +}; + +#define SIOCADDPDNID (SIOCDEVPRIVATE + 1) +#define SIOCDELPDNID (SIOCDEVPRIVATE + 2) +#define SIOCRESETMHDP (SIOCDEVPRIVATE + 3) + +#endif /* __NET_MHDP_H */ diff --git a/include/net/mhi/dgram.h b/include/net/mhi/dgram.h new file mode 100644 index 000000000000..ceb34d58f5ae --- /dev/null +++ b/include/net/mhi/dgram.h @@ -0,0 +1,41 @@ +/* + * File: mhi/dgram.h + * + * MHI DGRAM socket definitions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef MHI_DGRAM_H +#define MHI_DGRAM_H + +#include <linux/types.h> +#include <linux/socket.h> + +#include <net/sock.h> + + +extern int mhi_dgram_sock_create( + struct net *net, + struct socket *sock, + int proto, + int kern); + +extern int mhi_dgram_proto_init(void); +extern void mhi_dgram_proto_exit(void); + + +#endif /* MHI_DGRAM_H */ diff --git a/include/net/mhi/mhdp.h b/include/net/mhi/mhdp.h new file mode 100644 index 000000000000..7ec1591cb8d3 --- /dev/null +++ b/include/net/mhi/mhdp.h @@ -0,0 +1,35 @@ +/* + * File: mhdp.h + * + * Modem-Host Interface (MHI) - MHDP kernel interface + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef __NET_MHI_MHDP_H +#define __NET_MHI_MHDP_H + +struct mhdp_tunnel_parm { + char name[IFNAMSIZ]; + char master[IFNAMSIZ]; + int pdn_id; +}; + +#define SIOCADDPDNID (SIOCDEVPRIVATE + 1) +#define SIOCDELPDNID (SIOCDEVPRIVATE + 2) +#define SIOCRESETMHDP (SIOCDEVPRIVATE + 3) + +#endif /* __NET_MHI_MHDP_H */ diff --git a/include/net/mhi/raw.h b/include/net/mhi/raw.h new file mode 100644 index 000000000000..7c2edba4f111 --- /dev/null +++ b/include/net/mhi/raw.h @@ -0,0 +1,41 @@ +/* + * File: mhi/raw.h + * + * MHI RAW socket definitions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef MHI_RAW_H +#define MHI_RAW_H + +#include <linux/types.h> +#include <linux/socket.h> + +#include <net/sock.h> + + +extern int mhi_raw_sock_create( + struct net *net, + struct socket *sock, + int proto, + int kern); + +extern int mhi_raw_proto_init(void); +extern void mhi_raw_proto_exit(void); + + +#endif /* MHI_RAW_H */ diff --git a/include/net/mhi/sched.h b/include/net/mhi/sched.h new file mode 100644 index 000000000000..8ff4b420c70a --- /dev/null +++ b/include/net/mhi/sched.h @@ -0,0 +1,35 @@ +/* + * File: mhi/sock.h + * + * MHI socket definitions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef MHI_SCHED_H +#define MHI_SCHED_H + +#define MHI_NOTIFY_QUEUE_LOW 19 +#define MHI_NOTIFY_QUEUE_HIGH 20 + +extern int mhi_register_queue_notifier(struct Qdisc *sch, + struct notifier_block *nb, unsigned long cl); + +extern int mhi_unregister_queue_notifier(struct Qdisc *sch, + struct notifier_block *nb, unsigned long cl); + + +#endif /* MHI_SCHED_H */ diff --git a/include/net/mhi/sock.h b/include/net/mhi/sock.h new file mode 100644 index 000000000000..170c892ec171 --- /dev/null +++ b/include/net/mhi/sock.h @@ -0,0 +1,42 @@ +/* + * File: mhi/sock.h + * + * MHI socket definitions + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + * + */ + +#ifndef MHI_SOCK_H +#define MHI_SOCK_H + +#include <linux/types.h> +#include <linux/socket.h> + +#include <net/sock.h> + +extern const struct proto_ops mhi_socket_ops; + +extern int mhi_sock_rcv_unicast(struct sk_buff *skb, u8 l3prot, u32 l3len); +extern int mhi_sock_rcv_multicast(struct sk_buff *skb, u8 l3prot, u32 l3len); + +extern void mhi_sock_hash(struct sock *sk); +extern void mhi_sock_unhash(struct sock *sk); + +extern int mhi_sock_init(void); +extern void mhi_sock_exit(void); + + +#endif /* MHI_SOCK_H */ |