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

Commit d6a2023c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "atlantic forwarding driver v1.1.23"

parents 53d55f6a 2993024f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
#include <linux/netdevice.h>
#include <linux/moduleparam.h>

#define ATL_VERSION "1.1.22"
#define ATL_VERSION "1.1.23"

struct atl_nic;

+10 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* Atlantic Network Driver
 *
 * Copyright (C) 2021 Marvell International Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#include <stdio.h>
#include <stddef.h>
#include <sys/types.h>
+10 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/* Atlantic Network Driver
 *
 * Copyright (C) 2021 Marvell International Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __ATL_DUMP_PARSER
#define __ATL_DUMP_PARSER

+14 −0
Original line number Diff line number Diff line
@@ -1181,8 +1181,15 @@ static int atl_set_priv_flags(struct net_device *ndev, uint32_t flags)
	return 0;
}

#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
static int atl_get_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec,
			    struct kernel_ethtool_coalesce *kec,
			    struct netlink_ext_ack *extack)
#else
static int atl_get_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec)
#endif
{
	struct atl_nic *nic = netdev_priv(ndev);

@@ -1193,8 +1200,15 @@ static int atl_get_coalesce(struct net_device *ndev,
	return 0;
}

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0)
static int atl_set_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec,
			    struct kernel_ethtool_coalesce *kec,
			    struct netlink_ext_ack *extack)
#else
static int atl_set_coalesce(struct net_device *ndev,
			    struct ethtool_coalesce *ec)
#endif
{
	struct atl_nic *nic = netdev_priv(ndev);

+8 −0
Original line number Diff line number Diff line
@@ -1397,7 +1397,11 @@ static void atl_calc_affinities(struct atl_nic *nic)
	int i;
	unsigned int cpu;

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
	cpus_read_lock();
#else
	get_online_cpus();
#endif
	cpu = cpumask_first(cpu_online_mask);

	for (i = 0; i < nic->nvecs; i++) {
@@ -1414,7 +1418,11 @@ static void atl_calc_affinities(struct atl_nic *nic)
		cpumask_set_cpu(cpu, cpumask);
		cpu = cpumask_next(cpu, cpu_online_mask);
	}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
	cpus_read_unlock();
#else
	put_online_cpus();
#endif
}

void atl_init_qvec(struct atl_nic *nic, struct atl_queue_vec *qvec, int idx)
Loading