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

Commit fef893c6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: rmnet_data: Unset logical end points in bridge mode"

parents c15f0fbb 19f98150
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1123,6 +1123,7 @@ static void rmnet_force_unassociate_device(struct net_device *dev)
{
	int i, j;
	struct net_device *vndev;
	struct rmnet_phys_ep_conf_s *config;
	struct rmnet_logical_ep_conf_s *cfg;
	struct rmnet_free_vnd_work *vnd_work;
	ASSERT_RTNL();
@@ -1178,6 +1179,16 @@ static void rmnet_force_unassociate_device(struct net_device *dev)
		kfree(vnd_work);
	}

	config = _rmnet_get_phys_ep_config(dev);

	if (config) {
		cfg = &config->local_ep;

		if (cfg && cfg->refcount)
			rmnet_unset_logical_endpoint_config
			(cfg->egress_dev, RMNET_LOCAL_LOGICAL_ENDPOINT);
	}

	/* Clear the mappings on the phys ep */
	trace_rmnet_unregister_cb_clear_lepcs(dev);
	rmnet_unset_logical_endpoint_config(dev, RMNET_LOCAL_LOGICAL_ENDPOINT);
+4 −7
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2017, 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
@@ -501,13 +501,10 @@ static int rmnet_map_egress_handler(struct sk_buff *skb,
	LOGD("headroom of %d bytes", required_headroom);

	if (skb_headroom(skb) < required_headroom) {
		if (pskb_expand_head(skb, required_headroom, 0, GFP_KERNEL)) {
			LOGD("Failed to add headroom of %d bytes",
			     required_headroom);
		LOGE("Not enough headroom for %d bytes", required_headroom);
		kfree_skb(skb);
		return 1;
	}
	}

	if ((config->egress_data_format & RMNET_EGRESS_FORMAT_MAP_CKSUMV3) ||
	    (config->egress_data_format & RMNET_EGRESS_FORMAT_MAP_CKSUMV4)) {