Skip to content

Commit

Permalink
qualcommax: qca-mcs support for kernel >= 6.6.29
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Khan <[email protected]>
  • Loading branch information
qosmio committed Apr 30, 2024
1 parent d407c99 commit 4209022
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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;
Expand All @@ -120,19 +120,19 @@
+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);
}
+EXPORT_SYMBOL_GPL(br_pass_frame_up); /* QCA qca-mcs support */

/* 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;
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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 {
Expand Down

0 comments on commit 4209022

Please sign in to comment.