aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2026-07-21 19:54:04 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2026-07-21 20:00:24 +0000
commit5d479b75a8944faeabb367d1234a9fc3fefa8df1 (patch)
treeb6ef259ab7befd3fe0db6848ec570293524688b1
parent9724f3f8974957d2cd15f6b796c347ca50250954 (diff)
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c2
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211_macops.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 355d0c160472..bf2054c5efd8 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -4522,11 +4522,13 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ],
hw->max_listen_interval = 7 * (ic->ic_lintval / ic->ic_bintval);
hw->conf.listen_interval = hw->max_listen_interval;
+ wiphy_lock(hw->wiphy);
/* XXX-BZ do we need to be able to update these? */
hw->wiphy->frag_threshold = vap->iv_fragthreshold;
lkpi_80211_mo_set_frag_threshold(hw, vap->iv_fragthreshold);
hw->wiphy->rts_threshold = vap->iv_rtsthreshold;
lkpi_80211_mo_set_rts_threshold(hw, vap->iv_rtsthreshold);
+ wiphy_unlock(hw->wiphy);
/* any others? */
/* Add per-VIF/VAP sysctls. */
diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
index b07a2075491b..09199862dfb7 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c
@@ -115,6 +115,9 @@ lkpi_80211_mo_set_frag_threshold(struct ieee80211_hw *hw, uint32_t frag_th)
struct lkpi_hw *lhw;
int error;
+ might_sleep();
+ lockdep_assert_wiphy(hw->wiphy);
+
lhw = HW_TO_LHW(hw);
if (lhw->ops->set_frag_threshold == NULL) {
error = EOPNOTSUPP;
@@ -135,6 +138,9 @@ lkpi_80211_mo_set_rts_threshold(struct ieee80211_hw *hw, uint32_t rts_th)
struct lkpi_hw *lhw;
int error;
+ might_sleep();
+ lockdep_assert_wiphy(hw->wiphy);
+
lhw = HW_TO_LHW(hw);
if (lhw->ops->set_rts_threshold == NULL) {
error = EOPNOTSUPP;