developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 1 | From 33536ba0cdb3937796ac410303f6cb9f2efd2965 Mon Sep 17 00:00:00 2001 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 2 | From: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 3 | Date: Wed, 21 Feb 2024 16:32:13 +0800 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 59/89] mtk: mac80211: send broadcast/multicast mgmt. via all |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 5 | links. |
| 6 | |
| 7 | This patch makes broadcast/multicast mgmt. be sent via all links. |
| 8 | |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 9 | Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com> |
| 10 | Change-id: Id1bd06694a73cc29b3f571a57c4c864ee3742441 |
| 11 | --- |
| 12 | net/mac80211/offchannel.c | 20 +++++++++++++++++++- |
| 13 | 1 file changed, 19 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 16 | index e014f1b..520e8bf 100644 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 17 | --- a/net/mac80211/offchannel.c |
| 18 | +++ b/net/mac80211/offchannel.c |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame^] | 19 | @@ -1019,7 +1019,25 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev, |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | if (!need_offchan) { |
| 23 | - ieee80211_tx_skb_tid(sdata, skb, 7, link_id); |
| 24 | + unsigned long links = sdata->vif.active_links; |
| 25 | + if (is_multicast_ether_addr(mgmt->da) && hweight16(links) > 1) { |
| 26 | + unsigned int link; |
| 27 | + struct sk_buff *dskb; |
| 28 | + |
| 29 | + for_each_set_bit(link, &links, IEEE80211_MLD_MAX_NUM_LINKS) { |
| 30 | + dskb = skb_clone(skb, GFP_ATOMIC); |
| 31 | + if (dskb) { |
| 32 | + ieee80211_tx_skb_tid(sdata, dskb, 7, link); |
| 33 | + } else { |
| 34 | + ret = -ENOMEM; |
| 35 | + kfree_skb(skb); |
| 36 | + goto out_unlock; |
| 37 | + } |
| 38 | + } |
| 39 | + kfree_skb(skb); |
| 40 | + } else { |
| 41 | + ieee80211_tx_skb_tid(sdata, skb, 7, link_id); |
| 42 | + } |
| 43 | ret = 0; |
| 44 | goto out_unlock; |
| 45 | } |
| 46 | -- |
developer | dad89a3 | 2024-04-29 14:17:17 +0800 | [diff] [blame] | 47 | 2.18.0 |
developer | 66e89bc | 2024-04-23 14:50:01 +0800 | [diff] [blame] | 48 | |