| .. | .. |
|---|
| 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 | #include <linux/netdevice.h> |
|---|
| .. | .. |
|---|
| 20 | 12 | struct rmnet_port *port, |
|---|
| 21 | 13 | int enable) |
|---|
| 22 | 14 | { |
|---|
| 23 | | - struct rmnet_map_control_command *cmd; |
|---|
| 24 | 15 | struct rmnet_endpoint *ep; |
|---|
| 25 | 16 | struct net_device *vnd; |
|---|
| 26 | | - u16 ip_family; |
|---|
| 27 | | - u16 fc_seq; |
|---|
| 28 | | - u32 qos_id; |
|---|
| 29 | 17 | u8 mux_id; |
|---|
| 30 | 18 | int r; |
|---|
| 31 | 19 | |
|---|
| 32 | 20 | mux_id = RMNET_MAP_GET_MUX_ID(skb); |
|---|
| 33 | | - cmd = RMNET_MAP_GET_CMD_START(skb); |
|---|
| 34 | 21 | |
|---|
| 35 | 22 | if (mux_id >= RMNET_MAX_LOGICAL_EP) { |
|---|
| 36 | 23 | kfree_skb(skb); |
|---|
| .. | .. |
|---|
| 44 | 31 | } |
|---|
| 45 | 32 | |
|---|
| 46 | 33 | vnd = ep->egress_dev; |
|---|
| 47 | | - |
|---|
| 48 | | - ip_family = cmd->flow_control.ip_family; |
|---|
| 49 | | - fc_seq = ntohs(cmd->flow_control.flow_control_seq_num); |
|---|
| 50 | | - qos_id = ntohl(cmd->flow_control.qos_id); |
|---|
| 51 | 34 | |
|---|
| 52 | 35 | /* Ignore the ip family and pass the sequence number for both v4 and v6 |
|---|
| 53 | 36 | * sequence. User space does not support creating dedicated flows for |
|---|