Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c620645 authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

net: rmnet_data: Fix compilation error due to rmnet



Fix compilation errors due to conflicts with upstream driver.

CRs-Fixed: 2156182
Change-Id: I17136295e503529265867f00d9385a0da6f14c63
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent 83654923
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, 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
@@ -124,7 +124,7 @@ static inline int _rmnet_is_physical_endpoint_associated(struct net_device *dev)

	rx_handler = rcu_dereference(dev->rx_handler);

	if (rx_handler == rmnet_rx_handler)
	if (rx_handler == rmnet_data_rx_handler)
		return 1;
	else
		return 0;
@@ -872,7 +872,7 @@ int rmnet_associate_network_device(struct net_device *dev)
	config->recycle = kfree_skb;
	hrtimer_init(&conf->hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
	conf->hrtimer.function = rmnet_map_flush_packet_queue;
	rc = netdev_rx_handler_register(dev, rmnet_rx_handler, config);
	rc = netdev_rx_handler_register(dev, rmnet_data_rx_handler, config);

	if (rc) {
		LOGM("netdev_rx_handler_register returns %d", rc);
+14 −14
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, 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
@@ -178,7 +178,7 @@ static rx_handler_result_t rmnet_bridge_handler
		     skb->dev->name);
		rmnet_kfree_skb(skb, RMNET_STATS_SKBFREE_BRDG_NO_EGRESS);
	} else {
		rmnet_egress_handler(skb, ep);
		rmnet_data_egress_handler(skb, ep);
	}

	return RX_HANDLER_CONSUMED;
@@ -425,7 +425,7 @@ static rx_handler_result_t _rmnet_map_ingress_handler
	if (RMNET_MAP_GET_CD_BIT(skb)) {
		if (config->ingress_data_format
		    & RMNET_INGRESS_FORMAT_MAP_COMMANDS)
			return rmnet_map_command(skb, config);
			return rmnet_data_map_command(skb, config);

		LOGM("MAP command packet on %s; %s", skb->dev->name,
		     "Not configured for MAP commands");
@@ -452,7 +452,7 @@ static rx_handler_result_t _rmnet_map_ingress_handler

	if ((config->ingress_data_format & RMNET_INGRESS_FORMAT_MAP_CKSUMV3) ||
	    (config->ingress_data_format & RMNET_INGRESS_FORMAT_MAP_CKSUMV4)) {
		ckresult = rmnet_map_checksum_downlink_packet(skb);
		ckresult = rmnet_map_data_checksum_downlink_packet(skb);
		trace_rmnet_map_checksum_downlink_packet(skb, ckresult);
		rmnet_stats_dl_checksum(ckresult);
		if (likely((ckresult == RMNET_MAP_CHECKSUM_OK) ||
@@ -498,9 +498,9 @@ static rx_handler_result_t rmnet_map_ingress_handler

	if (config->ingress_data_format & RMNET_INGRESS_FORMAT_DEAGGREGATION) {
		trace_rmnet_start_deaggregation(skb);
		while ((skbn = rmnet_map_deaggregate(skb, config)) != 0) {
		while ((skbn = rmnet_data_map_deaggregate(skb, config)) != 0)
			_rmnet_map_ingress_handler(skbn, config);
		}

		rmnet_kfree_skb(skb, RMNET_STATS_SKBFREE_MAPINGRESS_AGGBUF);
		rc = RX_HANDLER_CONSUMED;
	} else {
@@ -557,7 +557,7 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
	}

	if (csum_required) {
		ckresult = rmnet_map_checksum_uplink_packet
		ckresult = rmnet_map_data_checksum_uplink_packet
				(skb, orig_dev, config->egress_data_format);
		trace_rmnet_map_checksum_uplink_packet(orig_dev, ckresult);
		rmnet_stats_ul_checksum(ckresult);
@@ -569,10 +569,10 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
	if ((!(config->egress_data_format &
	    RMNET_EGRESS_FORMAT_AGGREGATION)) || csum_required ||
	    non_linear_skb)
		map_header = rmnet_map_add_map_header
		map_header = rmnet_data_map_add_map_header
		(skb, additional_header_length, RMNET_MAP_NO_PAD_BYTES);
	else
		map_header = rmnet_map_add_map_header
		map_header = rmnet_data_map_add_map_header
		(skb, additional_header_length, RMNET_MAP_ADD_PAD_BYTES);

	if (!map_header) {
@@ -684,7 +684,7 @@ rx_handler_result_t rmnet_ingress_handler(struct sk_buff *skb)
	return rc;
}

/* rmnet_rx_handler() - Rx handler callback registered with kernel
/* rmnet_data_rx_handler() - Rx handler callback registered with kernel
 * @pskb: Packet to be processed by rx handler
 *
 * Standard kernel-expected footprint for rx handlers. Calls
@@ -693,12 +693,12 @@ rx_handler_result_t rmnet_ingress_handler(struct sk_buff *skb)
 * Return:
 *      - Whatever rmnet_ingress_handler() returns
 */
rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)
rx_handler_result_t rmnet_data_rx_handler(struct sk_buff **pskb)
{
	return rmnet_ingress_handler(*pskb);
}

/* rmnet_egress_handler() - Egress handler entry point
/* rmnet_data_egress_handler() - Egress handler entry point
 * @skb:        packet to transmit
 * @ep:         logical endpoint configuration of the packet originator
 *              (e.g.. RmNet virtual network device)
@@ -707,7 +707,7 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)
 * for egress device configured in logical endpoint. Packet is then transmitted
 * on the egress device.
 */
void rmnet_egress_handler(struct sk_buff *skb,
void rmnet_data_egress_handler(struct sk_buff *skb,
			       struct rmnet_logical_ep_conf_s *ep)
{
	struct rmnet_phys_ep_config *config;
+3 −3
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@
#ifndef _RMNET_DATA_HANDLERS_H_
#define _RMNET_DATA_HANDLERS_H_

void rmnet_egress_handler(struct sk_buff *skb,
void rmnet_data_egress_handler(struct sk_buff *skb,
			       struct rmnet_logical_ep_conf_s *ep);

rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb);
rx_handler_result_t rmnet_data_rx_handler(struct sk_buff **pskb);

#endif /* _RMNET_DATA_HANDLERS_H_ */
+8 −8
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, 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
@@ -128,7 +128,7 @@ static netdev_tx_t rmnet_vnd_start_xmit(struct sk_buff *skb,
						 dev,
						 dev_conf->qos_version);
		skb_orphan(skb);
		rmnet_egress_handler(skb, &dev_conf->local_ep);
		rmnet_data_egress_handler(skb, &dev_conf->local_ep);
	} else {
		dev->stats.tx_dropped++;
		rmnet_kfree_skb(skb, RMNET_STATS_SKBFREE_VND_NO_EGRESS);
@@ -956,7 +956,7 @@ int rmnet_vnd_del_tc_flow(u32 id, u32 map_flow, u32 tc_flow)
	return rc;
}

/* rmnet_vnd_do_flow_control() - Process flow control request
/* rmnet_data_vnd_do_flow_control() - Process flow control request
 * @dev: Virtual network device node to do lookup on
 * @map_flow_id: Flow ID from MAP message
 * @v4_seq: pointer to IPv4 indication sequence number
@@ -968,7 +968,7 @@ int rmnet_vnd_del_tc_flow(u32 id, u32 map_flow, u32 tc_flow)
 *      - 1 if no mapping is found
 *      - 2 if dev is not RmNet virtual network device node
 */
int rmnet_vnd_do_flow_control(struct net_device *dev,
int rmnet_data_vnd_do_flow_control(struct net_device *dev,
				   u32 map_flow_id,
				   u16 v4_seq,
				   u16 v6_seq,
+6 −6
Original line number Diff line number Diff line
/* Copyright (c) 2013-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2018, 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,7 +17,7 @@
#ifndef _RMNET_DATA_VND_H_
#define _RMNET_DATA_VND_H_

int rmnet_vnd_do_flow_control(struct net_device *dev,
int rmnet_data_vnd_do_flow_control(struct net_device *dev,
				   u32 map_flow_id,
				   u16 v4_seq,
				   u16 v6_seq,
Loading