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
This commit is contained in:
Bjoern A. Zeeb
2026-04-26 17:08:03 +00:00
parent d798491238
commit ba796102fe
2 changed files with 64 additions and 0 deletions
@@ -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 *,
@@ -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 @@ lkpi_80211_mo_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
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)