| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. |
|---|
| 2 | | - * |
|---|
| 3 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 4 | | - * it under the terms of the GNU General Public License version 2 and |
|---|
| 5 | | - * only version 2 as published by the Free Software Foundation. |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 8 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 9 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 10 | | - * GNU General Public License for more details. |
|---|
| 11 | 3 | */ |
|---|
| 12 | 4 | |
|---|
| 13 | 5 | #ifndef _RMNET_MAP_H_ |
|---|
| 14 | 6 | #define _RMNET_MAP_H_ |
|---|
| 7 | +#include <linux/if_rmnet.h> |
|---|
| 15 | 8 | |
|---|
| 16 | 9 | struct rmnet_map_control_command { |
|---|
| 17 | 10 | u8 command_name; |
|---|
| .. | .. |
|---|
| 38 | 31 | RMNET_MAP_COMMAND_UNKNOWN, |
|---|
| 39 | 32 | RMNET_MAP_COMMAND_ENUM_LENGTH |
|---|
| 40 | 33 | }; |
|---|
| 41 | | - |
|---|
| 42 | | -struct rmnet_map_header { |
|---|
| 43 | | - u8 pad_len:6; |
|---|
| 44 | | - u8 reserved_bit:1; |
|---|
| 45 | | - u8 cd_bit:1; |
|---|
| 46 | | - u8 mux_id; |
|---|
| 47 | | - __be16 pkt_len; |
|---|
| 48 | | -} __aligned(1); |
|---|
| 49 | | - |
|---|
| 50 | | -struct rmnet_map_dl_csum_trailer { |
|---|
| 51 | | - u8 reserved1; |
|---|
| 52 | | - u8 valid:1; |
|---|
| 53 | | - u8 reserved2:7; |
|---|
| 54 | | - u16 csum_start_offset; |
|---|
| 55 | | - u16 csum_length; |
|---|
| 56 | | - __be16 csum_value; |
|---|
| 57 | | -} __aligned(1); |
|---|
| 58 | | - |
|---|
| 59 | | -struct rmnet_map_ul_csum_header { |
|---|
| 60 | | - __be16 csum_start_offset; |
|---|
| 61 | | - u16 csum_insert_offset:14; |
|---|
| 62 | | - u16 udp_ind:1; |
|---|
| 63 | | - u16 csum_enabled:1; |
|---|
| 64 | | -} __aligned(1); |
|---|
| 65 | 34 | |
|---|
| 66 | 35 | #define RMNET_MAP_GET_MUX_ID(Y) (((struct rmnet_map_header *) \ |
|---|
| 67 | 36 | (Y)->data)->mux_id) |
|---|