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

Commit 776f497b authored by Lakshit Tyagi's avatar Lakshit Tyagi Committed by Gerrit - the friendly Code Review server
Browse files

net: aquantia: Adding IPA glue layer



Add IPA offload feature for Aquantia.

Change-Id: Ibf8ae4fb708f97881fdd9e5e796fe7812241c8cc
Signed-off-by: default avatarLakshit Tyagi <ltyagi@codeaurora.org>
parent 5d3347b4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -50,3 +50,12 @@ config ATLFWD_FWD_NETLINK
          Expose forwarding engine APIs over the netlink socket.

endif

config AQFWD_QCOM_IPA
	bool "QTI IPA offload support"
	depends on IPA_ETH
	depends on AQFWD
	select ATLFWD_FWD
	help
	  Enable support for Qualcomm Technologies, Inc. IPA (Internet Protocol Accelerator).
	  If unsure, say N.
+2 −0
Original line number Diff line number Diff line
@@ -27,4 +27,6 @@ atlantic-fwd-$(CONFIG_ATLFWD_FWD_NETLINK) += atl_fwdnl.o \
					      atl_fwdnl_params.o
atlantic-fwd-$(CONFIG_MACSEC) += atl_macsec.o macsec/macsec_api.o

atlantic-fwd-$(CONFIG_AQFWD_QCOM_IPA) += atl_ipa.o

ccflags-y += -I$(src)
+1158 −0

File added.

Preview size limit exceeded, changes collapsed.

+28 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
 */

#ifndef _ATL_IPA_H_
#define _ATL_IPA_H_

#include <linux/pci.h>

#if IS_ENABLED(CONFIG_AQFWD_QCOM_IPA)

int atl_ipa_register(struct pci_driver *drv);
void atl_ipa_unregister(struct pci_driver *drv);

#else

static inline int atl_ipa_register(struct pci_driver *drv)
{
	return 0;
}

static inline void atl_ipa_unregister(struct pci_driver *drv)
{ }

#endif /* CONFIG_AQFWD_QCOM_IPA */

#endif /* _ATL_IPA_H_ */
+13 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@
#include "atl_macsec.h"
#include "atl_ptp.h"

#include "atl_ipa.h"

const char atl_driver_name[] = "atlantic-fwd";

unsigned int atl_max_queues = ATL_MAX_QUEUES;
@@ -1030,6 +1032,13 @@ static int __init atl_module_init(void)
		return -ENOMEM;
	}

	ret = atl_ipa_register(&atl_pci_ops);
	if (ret) {
		pr_err("%s: Failed to register driver with platform\n",
		       atl_driver_name);
		goto err_ipa_reg;
	}

	ret = pci_register_driver(&atl_pci_ops);
	if (ret)
		goto err_pci_reg;
@@ -1047,6 +1056,8 @@ static int __init atl_module_init(void)
#endif
	pci_unregister_driver(&atl_pci_ops);
err_pci_reg:
	atl_ipa_unregister(&atl_pci_ops);
err_ipa_reg:
	destroy_workqueue(atl_wq);
	return ret;
}
@@ -1060,6 +1071,8 @@ static void __exit atl_module_exit(void)

	pci_unregister_driver(&atl_pci_ops);

	atl_ipa_unregister(&atl_pci_ops);

	if (atl_wq) {
		destroy_workqueue(atl_wq);
		atl_wq = NULL;
+1 −1

File changed.

Contains only whitespace changes.

Loading