blob: f04b76bc3dbcbe2af501e0c2006a31e4db011bee [file] [log] [blame]
From 835759f27977dcc24ae98172b36caef2fd934901 Mon Sep 17 00:00:00 2001
From: Evelyn Tsai <evelyn.tsai@mediatek.com>
Date: Fri, 28 Jul 2023 06:12:20 +0800
Subject: [PATCH 00/19] mac80211: backport: add gfp_t parameter to
ieeee80211_obss_color_collision_notify
---
include/net/cfg80211.h | 4 ++--
include/net/mac80211.h | 3 ++-
net/mac80211/cfg.c | 4 ++--
net/mac80211/rx.c | 3 ++-
4 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8e05f55..4277f96 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -8351,9 +8351,9 @@ int cfg80211_bss_color_notify(struct net_device *dev, gfp_t gfp,
* @color_bitmap: representations of the colors that the local BSS is aware of
*/
static inline int cfg80211_obss_color_collision_notify(struct net_device *dev,
- u64 color_bitmap)
+ u64 color_bitmap, gfp_t gfp)
{
- return cfg80211_bss_color_notify(dev, GFP_KERNEL,
+ return cfg80211_bss_color_notify(dev, gfp,
NL80211_CMD_OBSS_COLOR_COLLISION,
0, color_bitmap);
}
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 7edb0f0..04c0d09 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -6879,10 +6879,11 @@ ieee80211_get_unsol_bcast_probe_resp_tmpl(struct ieee80211_hw *hw,
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
* @color_bitmap: a 64 bit bitmap representing the colors that the local BSS is
* aware of.
+ * @gfp: allocation flags
*/
void
ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
- u64 color_bitmap);
+ u64 color_bitmap, gfp_t gfp);
/**
* ieee80211_is_tx_data - check if frame is a data frame
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 0711c75..79995f3 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -4406,14 +4406,14 @@ EXPORT_SYMBOL_GPL(ieee80211_color_change_finish);
void
ieeee80211_obss_color_collision_notify(struct ieee80211_vif *vif,
- u64 color_bitmap)
+ u64 color_bitmap, gfp_t gfp)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
if (sdata->vif.color_change_active || sdata->vif.csa_active)
return;
- cfg80211_obss_color_collision_notify(sdata->dev, color_bitmap);
+ cfg80211_obss_color_collision_notify(sdata->dev, color_bitmap, gfp);
}
EXPORT_SYMBOL_GPL(ieeee80211_obss_color_collision_notify);
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b991151..ac5afea 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3221,7 +3221,8 @@ ieee80211_rx_check_bss_color_collision(struct ieee80211_rx_data *rx)
IEEE80211_HE_OPERATION_BSS_COLOR_MASK);
if (color == bss_conf->he_bss_color.color)
ieeee80211_obss_color_collision_notify(&rx->sdata->vif,
- BIT_ULL(color));
+ BIT_ULL(color),
+ GFP_ATOMIC);
}
}
--
2.18.0