From 4209022699fe4f72ac88bab61c68c75dcc08ba36 Mon Sep 17 00:00:00 2001 From: Sean Khan Date: Mon, 29 Apr 2024 21:50:56 -0400 Subject: [PATCH] qualcommax: qca-mcs support for kernel >= 6.6.29 Signed-off-by: Sean Khan --- .../0604-1-qca-add-mcs-support.patch | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/target/linux/qualcommax/patches-6.6/0604-1-qca-add-mcs-support.patch b/target/linux/qualcommax/patches-6.6/0604-1-qca-add-mcs-support.patch index edf21700c3e94c..4b87366d84966a 100644 --- a/target/linux/qualcommax/patches-6.6/0604-1-qca-add-mcs-support.patch +++ b/target/linux/qualcommax/patches-6.6/0604-1-qca-add-mcs-support.patch @@ -39,15 +39,15 @@ * added to the bridge private HW address list and all required ports --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h -@@ -906,6 +906,7 @@ void br_manage_promisc(struct net_bridge +@@ -907,6 +907,7 @@ void br_manage_promisc(struct net_bridge int nbp_backup_change(struct net_bridge_port *p, struct net_device *backup_dev); /* br_input.c */ -+int br_pass_frame_up(struct sk_buff *skb); /* QCA qca-mcs support */ ++int br_pass_frame_up(struct sk_buff *skb, bool promisc); /* QCA qca-mcs support */ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb); rx_handler_func_t *br_get_rx_handler(const struct net_device *dev); -@@ -2268,4 +2269,14 @@ struct nd_msg *br_is_nd_neigh_msg(struct +@@ -2269,4 +2270,14 @@ struct nd_msg *br_is_nd_neigh_msg(struct bool br_is_neigh_suppress_enabled(const struct net_bridge_port *p, u16 vid); #define __br_get(__hook, __default, __args ...) \ (__hook ? (__hook(__args)) : (__default)) /* QCA NSS ECM support */ @@ -109,7 +109,7 @@ return netif_receive_skb(skb); } --static int br_pass_frame_up(struct sk_buff *skb) +-static int br_pass_frame_up(struct sk_buff *skb, bool promisc) +/* QCA qca-mcs support - Start */ +/* Hook for external Multicast handler */ +br_multicast_handle_hook_t __rcu *br_multicast_handle_hook __read_mostly; @@ -120,11 +120,11 @@ +EXPORT_SYMBOL_GPL(br_get_dst_hook); +/* QCA qca-mcs support - End */ + -+int br_pass_frame_up(struct sk_buff *skb) ++int br_pass_frame_up(struct sk_buff *skb, bool promisc) { struct net_device *indev, *brdev = BR_INPUT_SKB_CB(skb)->brdev; struct net_bridge *br = netdev_priv(brdev); -@@ -69,6 +79,7 @@ static int br_pass_frame_up(struct sk_bu +@@ -71,6 +81,7 @@ static int br_pass_frame_up(struct sk_bu dev_net(indev), NULL, skb, indev, NULL, br_netif_receive_skb); } @@ -132,7 +132,7 @@ /* note: already called with rcu_read_lock */ int br_handle_frame_finish(struct net *net, struct sock *sk, struct sk_buff *skb) -@@ -82,6 +93,11 @@ int br_handle_frame_finish(struct net *n +@@ -84,6 +95,11 @@ int br_handle_frame_finish(struct net *n struct net_bridge_mcast *brmctx; struct net_bridge_vlan *vlan; struct net_bridge *br; @@ -141,10 +141,10 @@ + struct net_bridge_port *pdst = NULL; + br_get_dst_hook_t *get_dst_hook = rcu_dereference(br_get_dst_hook); + /* QCA qca-mcs support - End */ + bool promisc; u16 vid = 0; u8 state; - -@@ -175,6 +191,12 @@ int br_handle_frame_finish(struct net *n +@@ -180,6 +196,12 @@ int br_handle_frame_finish(struct net *n switch (pkt_type) { case BR_PKT_MULTICAST: @@ -157,7 +157,7 @@ mdst = br_mdb_get(brmctx, skb, vid); if ((mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) && br_multicast_querier_exists(brmctx, eth_hdr(skb), mdst)) { -@@ -190,8 +212,15 @@ int br_handle_frame_finish(struct net *n +@@ -195,8 +217,15 @@ int br_handle_frame_finish(struct net *n } break; case BR_PKT_UNICAST: @@ -175,7 +175,7 @@ default: break; } -@@ -206,6 +235,13 @@ int br_handle_frame_finish(struct net *n +@@ -211,6 +240,13 @@ int br_handle_frame_finish(struct net *n dst->used = now; br_forward(dst->dst, skb, local_rcv, false); } else {