blob: f04b76bc3dbcbe2af501e0c2006a31e4db011bee [file] [log] [blame]
developerf42b88a2023-07-28 07:04:28 +08001From 835759f27977dcc24ae98172b36caef2fd934901 Mon Sep 17 00:00:00 2001
2From: Evelyn Tsai <evelyn.tsai@mediatek.com>
3Date: Fri, 28 Jul 2023 06:12:20 +0800
4Subject: [PATCH 00/19] mac80211: backport: add gfp_t parameter to
5 ieeee80211_obss_color_collision_notify
6
7---
8 include/net/cfg80211.h | 4 ++--
9 include/net/mac80211.h | 3 ++-
10 net/mac80211/cfg.c | 4 ++--
11 net/mac80211/rx.c | 3 ++-
12 4 files changed, 8 insertions(+), 6 deletions(-)
13
14diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
15index 8e05f55..4277f96 100644
16--- a/include/net/cfg80211.h
17+++ b/include/net/cfg80211.h
18@@ -8351,9 +8351,9 @@ int cfg80211_bss_color_notify(struct net_device *dev, gfp_t gfp,
19 * @color_bitmap: representations of the colors that the local BSS is aware of
20 */
21 static inline int cfg80211_obss_color_collision_notify(struct net_device *dev,
22- u64 color_bitmap)
23+ u64 color_bitmap, gfp_t gfp)
24 {
25- return cfg80211_bss_color_notify(dev, GFP_KERNEL,
26+ return cfg80211_bss_color_notify(dev, gfp,
27 NL80211_CMD_OBSS_COLOR_COLLISION,
28 0, color_bitmap);
29 }
30diff --git a/include/net/mac80211.h b/include/net/mac80211.h
31index 7edb0f0..04c0d09 100644
32--- a/include/net/mac80211.h
33+++ b/include/net/mac80211.h
34@@ -6879,10 +6879,11 @@ ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw,
35 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
36 * @color_bitmap: a 64 bit bitmap representing the colors that the local BSS is
37 * aware of.
38+ * @gfp: allocation flags
39 */
40 void
41 ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
42- u64 color_bitmap);
43+ u64 color_bitmap, gfp_t gfp);
44
45 /**
46 * ieee80211_is_tx_data - check if frame is a data frame
47diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
48index 0711c75..79995f3 100644
49--- a/net/mac80211/cfg.c
50+++ b/net/mac80211/cfg.c
51@@ -4406,14 +4406,14 @@ EXPORT_SYMBOL_GPL(ieee80211_color_change_finish);
52
53 void
54 ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
55- u64 color_bitmap)
56+ u64 color_bitmap, gfp_t gfp)
57 {
58 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
59
60 if (sdata->vif.color_change_active || sdata->vif.csa_active)
61 return;
62
63- cfg80211_obss_color_collision_notify(sdata->dev, color_bitmap);
64+ cfg80211_obss_color_collision_notify(sdata->dev, color_bitmap, gfp);
65 }
66 EXPORT_SYMBOL_GPL(ieeee80211_obss_color_collision_notify);
67
68diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
69index b991151..ac5afea 100644
70--- a/net/mac80211/rx.c
71+++ b/net/mac80211/rx.c
72@@ -3221,7 +3221,8 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
73 IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
74 if (color == bss_conf->he_bss_color.color)
75 ieeee80211_obss_color_collision_notify(&rx->sdata->vif,
76- BIT_ULL(color));
77+ BIT_ULL(color),
78+ GFP_ATOMIC);
79 }
80 }
81
82--
832.18.0
84