mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
add qca
This commit is contained in:
parent
083306174f
commit
8f8028cb7f
86 changed files with 50519 additions and 0 deletions
|
|
@ -0,0 +1,48 @@
|
|||
From c9afdcdd2642485a6476906be9da2e811090fc7a Mon Sep 17 00:00:00 2001
|
||||
From: Robert Marko <robimarko@gmail.com>
|
||||
Date: Fri, 18 Mar 2022 18:06:03 +0100
|
||||
Subject: [PATCH] switchdev: remove the transaction structure
|
||||
|
||||
Since 5.12 there is no transaction structure anymore, so drop it for
|
||||
5.12 and newer.
|
||||
|
||||
Signed-off-by: Robert Marko <robimarko@gmail.com>
|
||||
---
|
||||
nss_dp_switchdev.c | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
--- a/nss_dp_switchdev.c
|
||||
+++ b/nss_dp_switchdev.c
|
||||
@@ -279,13 +279,19 @@ void nss_dp_switchdev_setup(struct net_d
|
||||
* Sets attributes
|
||||
*/
|
||||
static int nss_dp_port_attr_set(struct net_device *dev,
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
||||
const struct switchdev_attr *attr,
|
||||
struct switchdev_trans *trans)
|
||||
+#else
|
||||
+ const struct switchdev_attr *attr)
|
||||
+#endif
|
||||
{
|
||||
struct nss_dp_dev *dp_priv = (struct nss_dp_dev *)netdev_priv(dev);
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
||||
if (switchdev_trans_ph_prepare(trans))
|
||||
return 0;
|
||||
+#endif
|
||||
|
||||
switch (attr->id) {
|
||||
case SWITCHDEV_ATTR_ID_PORT_BRIDGE_FLAGS:
|
||||
@@ -309,8 +315,12 @@ static int nss_dp_switchdev_port_attr_se
|
||||
{
|
||||
int err;
|
||||
|
||||
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
|
||||
err = nss_dp_port_attr_set(netdev, port_attr_info->attr,
|
||||
port_attr_info->trans);
|
||||
+#else
|
||||
+ err = nss_dp_port_attr_set(netdev, port_attr_info->attr);
|
||||
+#endif
|
||||
|
||||
port_attr_info->handled = true;
|
||||
return notifier_from_errno(err);
|
||||
Loading…
Add table
Add a link
Reference in a new issue