The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ba796102fefa24a1f97286bfeb0d762c16decdf4
commit ba796102fefa24a1f97286bfeb0d762c16decdf4 Author: Bjoern A. Zeeb <[email protected]> AuthorDate: 2026-04-26 17:08:03 +0000 Commit: Bjoern A. Zeeb <[email protected]> CommitDate: 2026-06-05 12:09:21 +0000 LinuxKPI: 802.11: add three more driver downcalls Add (*link_sta_rc_update), (*set_bitrate_mask), and (*sta_set_decap_offload) mac80211 driver downcalls in preparation for further work. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.h | 7 +++ .../linuxkpi/common/src/linux_80211_macops.c | 57 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 89416edfae73..f33075b354d2 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -500,9 +500,16 @@ void lkpi_80211_mo_wake_tx_queue(struct ieee80211_hw *, struct ieee80211_txq *, void lkpi_80211_mo_sync_rx_queues(struct ieee80211_hw *); void lkpi_80211_mo_sta_pre_rcu_remove(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *); +void lkpi_80211_mo_link_sta_rc_update(struct ieee80211_hw *, + struct ieee80211_vif *, struct ieee80211_link_sta *, + enum ieee80211_rate_control_changed_flags); +int lkpi_80211_mo_set_bitrate_mask(struct ieee80211_hw *, + struct ieee80211_vif *, const struct cfg80211_bitrate_mask *); int lkpi_80211_mo_set_key(struct ieee80211_hw *, enum set_key_cmd, struct ieee80211_vif *, struct ieee80211_sta *, struct ieee80211_key_conf *); +void lkpi_80211_mo_sta_set_decap_offload(struct ieee80211_hw *, + struct ieee80211_vif *, struct ieee80211_sta *, bool); int lkpi_80211_mo_ampdu_action(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_ampdu_params *); int lkpi_80211_mo_sta_statistics(struct ieee80211_hw *, struct ieee80211_vif *, diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index aa6b158b70a7..caee1e0db563 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -745,6 +745,46 @@ lkpi_80211_mo_sta_pre_rcu_remove(struct ieee80211_hw *hw, lhw->ops->sta_pre_rcu_remove(hw, vif, sta); } +void +lkpi_80211_mo_link_sta_rc_update(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, struct ieee80211_link_sta *link_sta, + enum ieee80211_rate_control_changed_flags rc_changed) +{ + struct lkpi_hw *lhw; + + lhw = HW_TO_LHW(hw); + if (lhw->ops->link_sta_rc_update == NULL) + return; + + LKPI_80211_TRACE_MO("hw %p vif %p link_sta %p rc_changed %#010x", + hw, vif, link_sta, rc_changed); + lhw->ops->link_sta_rc_update(hw, vif, link_sta, rc_changed); +} + +int +lkpi_80211_mo_set_bitrate_mask(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, const struct cfg80211_bitrate_mask *br_mask) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->set_bitrate_mask == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p vif %p br_mask %p", + hw, vif, br_mask); + error = lhw->ops->set_bitrate_mask(hw, vif, br_mask); + +out: + return (error); +} + int lkpi_80211_mo_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, struct ieee80211_vif *vif, struct ieee80211_sta *sta, @@ -768,6 +808,23 @@ out: return (error); } +void +lkpi_80211_mo_sta_set_decap_offload(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, struct ieee80211_sta *sta, + bool enable) +{ + struct lkpi_hw *lhw; + + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->sta_set_decap_offload == NULL) + return; + + LKPI_80211_TRACE_MO("hw %p vif %p sta %p enable %d", hw, vif, sta, enable); + lhw->ops->sta_set_decap_offload(hw, vif, sta, enable); +} + int lkpi_80211_mo_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_ampdu_params *params)
