diff options
author | Subash Abhinov Kasiviswanathan <subashab@codeaurora.org> | 2019-05-22 23:21:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-05-23 19:48:07 +0300 |
commit | 9395da4efbd46661f0049d24d54d1cea63241fc9 (patch) | |
tree | 1a3fbf27d7130a4bf2d587d6e413096d9171fbac /drivers/net | |
parent | 16fa1cf1ed2a652a483cf8f1ea65c703693292e8 (diff) | |
download | linux-9395da4efbd46661f0049d24d54d1cea63241fc9.tar.xz |
net: qualcomm: rmnet: Move common struct definitions to include
Create if_rmnet.h and move the rmnet MAP packet structs to this
common include file. To account for portablity, add little and
big endian bitfield definitions similar to the ip & tcp headers.
The definitions in the headers can now be re-used by the
upcoming ipa driver series as well as qmi_wwan.
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h index 884f1f52dcc2..991d7e285736 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h @@ -12,6 +12,7 @@ #ifndef _RMNET_MAP_H_ #define _RMNET_MAP_H_ +#include <linux/if_rmnet.h> struct rmnet_map_control_command { u8 command_name; @@ -39,30 +40,6 @@ enum rmnet_map_commands { RMNET_MAP_COMMAND_ENUM_LENGTH }; -struct rmnet_map_header { - u8 pad_len:6; - u8 reserved_bit:1; - u8 cd_bit:1; - u8 mux_id; - __be16 pkt_len; -} __aligned(1); - -struct rmnet_map_dl_csum_trailer { - u8 reserved1; - u8 valid:1; - u8 reserved2:7; - u16 csum_start_offset; - u16 csum_length; - __be16 csum_value; -} __aligned(1); - -struct rmnet_map_ul_csum_header { - __be16 csum_start_offset; - u16 csum_insert_offset:14; - u16 udp_ip4_ind:1; - u16 csum_enabled:1; -} __aligned(1); - #define RMNET_MAP_GET_MUX_ID(Y) (((struct rmnet_map_header *) \ (Y)->data)->mux_id) #define RMNET_MAP_GET_CD_BIT(Y) (((struct rmnet_map_header *) \ |