diff options
| -rw-r--r-- | include/uapi/linux/Kbuild | 1 | ||||
| -rw-r--r-- | include/uapi/linux/net_map.h | 27 | ||||
| -rw-r--r-- | net/rmnet_data/rmnet_data_handlers.c | 1 | ||||
| -rw-r--r-- | net/rmnet_data/rmnet_data_vnd.c | 1 | ||||
| -rw-r--r-- | net/rmnet_data/rmnet_map.h | 24 | ||||
| -rw-r--r-- | net/rmnet_data/rmnet_map_command.c | 1 | ||||
| -rw-r--r-- | net/rmnet_data/rmnet_map_data.c | 1 |
7 files changed, 33 insertions, 23 deletions
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild index 48ba6cc287f4..aa78179c0d20 100644 --- a/include/uapi/linux/Kbuild +++ b/include/uapi/linux/Kbuild @@ -288,6 +288,7 @@ header-y += neighbour.h header-y += netconf.h header-y += netdevice.h header-y += net_dropmon.h +header-y += net_map.h header-y += netfilter_arp.h header-y += netfilter_bridge.h header-y += netfilter_decnet.h diff --git a/include/uapi/linux/net_map.h b/include/uapi/linux/net_map.h new file mode 100644 index 000000000000..879a854cb1da --- /dev/null +++ b/include/uapi/linux/net_map.h @@ -0,0 +1,27 @@ +#ifndef _NET_MAP_H_ +#define _NET_MAP_H_ + +struct rmnet_map_header_s { +#ifndef RMNET_USE_BIG_ENDIAN_STRUCTS + uint8_t pad_len:6; + uint8_t reserved_bit:1; + uint8_t cd_bit:1; +#else + uint8_t cd_bit:1; + uint8_t reserved_bit:1; + uint8_t pad_len:6; +#endif /* RMNET_USE_BIG_ENDIAN_STRUCTS */ + uint8_t mux_id; + uint16_t pkt_len; +} __aligned(1); + +#define RMNET_MAP_GET_MUX_ID(Y) (((struct rmnet_map_header_s *)Y->data)->mux_id) +#define RMNET_MAP_GET_CD_BIT(Y) (((struct rmnet_map_header_s *)Y->data)->cd_bit) +#define RMNET_MAP_GET_PAD(Y) (((struct rmnet_map_header_s *)Y->data)->pad_len) +#define RMNET_MAP_GET_CMD_START(Y) ((struct rmnet_map_control_command_s *) \ + (Y->data + sizeof(struct rmnet_map_header_s))) +#define RMNET_MAP_GET_LENGTH(Y) (ntohs( \ + ((struct rmnet_map_header_s *)Y->data)->pkt_len)) + + +#endif /* _NET_MAP_H_ */ diff --git a/net/rmnet_data/rmnet_data_handlers.c b/net/rmnet_data/rmnet_data_handlers.c index b21e229f4f5d..cbae7c8355dd 100644 --- a/net/rmnet_data/rmnet_data_handlers.c +++ b/net/rmnet_data/rmnet_data_handlers.c @@ -18,6 +18,7 @@ #include <linux/netdevice.h> #include <linux/module.h> #include <linux/rmnet_data.h> +#include <linux/net_map.h> #include "rmnet_data_private.h" #include "rmnet_data_config.h" #include "rmnet_data_vnd.h" diff --git a/net/rmnet_data/rmnet_data_vnd.c b/net/rmnet_data/rmnet_data_vnd.c index 36f219632272..2e4ea07cde0d 100644 --- a/net/rmnet_data/rmnet_data_vnd.c +++ b/net/rmnet_data/rmnet_data_vnd.c @@ -23,6 +23,7 @@ #include <linux/spinlock.h> #include <net/pkt_sched.h> #include <linux/atomic.h> +#include <linux/net_map.h> #include "rmnet_data_config.h" #include "rmnet_data_handlers.h" #include "rmnet_data_private.h" diff --git a/net/rmnet_data/rmnet_map.h b/net/rmnet_data/rmnet_map.h index 8f4e7403c28c..453506256b2c 100644 --- a/net/rmnet_data/rmnet_map.h +++ b/net/rmnet_data/rmnet_map.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -17,20 +17,6 @@ #ifndef _RMNET_MAP_H_ #define _RMNET_MAP_H_ -struct rmnet_map_header_s { -#ifndef RMNET_USE_BIG_ENDIAN_STRUCTS - uint8_t pad_len:6; - uint8_t reserved_bit:1; - uint8_t cd_bit:1; -#else - uint8_t cd_bit:1; - uint8_t reserved_bit:1; - uint8_t pad_len:6; -#endif /* RMNET_USE_BIG_ENDIAN_STRUCTS */ - uint8_t mux_id; - uint16_t pkt_len; -} __aligned(1); - struct rmnet_map_control_command_s { uint8_t command_name; #ifndef RMNET_USE_BIG_ENDIAN_STRUCTS @@ -117,14 +103,6 @@ uint8_t rmnet_map_demultiplex(struct sk_buff *skb); struct sk_buff *rmnet_map_deaggregate(struct sk_buff *skb, struct rmnet_phys_ep_conf_s *config); -#define RMNET_MAP_GET_MUX_ID(Y) (((struct rmnet_map_header_s *)Y->data)->mux_id) -#define RMNET_MAP_GET_CD_BIT(Y) (((struct rmnet_map_header_s *)Y->data)->cd_bit) -#define RMNET_MAP_GET_PAD(Y) (((struct rmnet_map_header_s *)Y->data)->pad_len) -#define RMNET_MAP_GET_CMD_START(Y) ((struct rmnet_map_control_command_s *) \ - (Y->data + sizeof(struct rmnet_map_header_s))) -#define RMNET_MAP_GET_LENGTH(Y) (ntohs( \ - ((struct rmnet_map_header_s *)Y->data)->pkt_len)) - struct rmnet_map_header_s *rmnet_map_add_map_header(struct sk_buff *skb, int hdrlen); rx_handler_result_t rmnet_map_command(struct sk_buff *skb, diff --git a/net/rmnet_data/rmnet_map_command.c b/net/rmnet_data/rmnet_map_command.c index 32326ea88a1b..bf66bf0edc6d 100644 --- a/net/rmnet_data/rmnet_map_command.c +++ b/net/rmnet_data/rmnet_map_command.c @@ -16,6 +16,7 @@ #include <linux/skbuff.h> #include <linux/netdevice.h> #include <linux/rmnet_data.h> +#include <linux/net_map.h> #include <net/pkt_sched.h> #include "rmnet_data_config.h" #include "rmnet_map.h" diff --git a/net/rmnet_data/rmnet_map_data.c b/net/rmnet_data/rmnet_map_data.c index 655762b0cec0..093926caeb42 100644 --- a/net/rmnet_data/rmnet_map_data.c +++ b/net/rmnet_data/rmnet_map_data.c @@ -21,6 +21,7 @@ #include <linux/rmnet_data.h> #include <linux/spinlock.h> #include <linux/workqueue.h> +#include <linux/net_map.h> #include "rmnet_data_config.h" #include "rmnet_map.h" #include "rmnet_data_private.h" |
