From fa17ef70279f8d3ba2a4ba448d0863cf474e0cd1 Mon Sep 17 00:00:00 2001 From: Lachlan Hodges Date: Thu, 27 Aug 2026 15:49:13 +1000 Subject: [PATCH] wifi: mm81x: implement .tx_frames_pending() mac op Implement .tx_frames_pending() to assist mac80211 when deciding whether we should enter powersave such that we don't enter when there are pending tx frames. Link: https://patch.msgid.link/20260827054917.255584-5-lachlan.hodges@morsemicro.com Signed-off-by: Lachlan Hodges --- drivers/net/wireless/morsemicro/mm81x/mac.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/morsemicro/mm81x/mac.c b/drivers/net/wireless/morsemicro/mm81x/mac.c index 0bbedcdd0b3d..5bae7c6251df 100644 --- a/drivers/net/wireless/morsemicro/mm81x/mac.c +++ b/drivers/net/wireless/morsemicro/mm81x/mac.c @@ -2035,6 +2035,13 @@ static void mm81x_mac_ops_flush(struct ieee80211_hw *hw, mm81x_mac_wait_queues(mors); } +static bool mm81x_mac_ops_tx_frames_pending(struct ieee80211_hw *hw) +{ + struct mm81x *mors = hw->priv; + + return mm81x_mac_has_tx_pending(mors); +} + static int mm81x_mac_ops_set_rts_threshold(struct ieee80211_hw *hw, int radio_idx, u32 value) { @@ -2260,6 +2267,7 @@ static const struct ieee80211_ops mm81x_ops = { .configure_filter = mm81x_mac_ops_configure_filter, .sta_state = mm81x_mac_ops_sta_state, .flush = mm81x_mac_ops_flush, + .tx_frames_pending = mm81x_mac_ops_tx_frames_pending, .set_frag_threshold = mm81x_mac_set_frag_threshold, .set_rts_threshold = mm81x_mac_ops_set_rts_threshold, .sta_statistics = mm81x_mac_ops_sta_statistics,