From: Lachlan Hodges <lachlan.hodges@morsemicro.com>
To: lachlan.hodges@morsemicro.com, dan.callaghan@morsemicro.com
Cc: linux-wireless@vger.kernel.org, arien.judge@morsemicro.com
Subject: [PATCH wireless-next 2/8] wifi: mm81x: release buffered broadcast frames after DTIM
Date: Thu, 27 Aug 2026 15:49:11 +1000 [thread overview]
Message-ID: <20260827054917.255584-3-lachlan.hodges@morsemicro.com> (raw)
In-Reply-To: <20260827054917.255584-1-lachlan.hodges@morsemicro.com>
Since we set the HOST_BROADCAST_PS_BUFFERING, mac80211 handles the
buffering of broadcast frames. Make sure after each beacon we call
ieee80211_get_buffered_bc() to release buffered broadcast frames
after each DTIM beacon.
Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
---
drivers/net/wireless/morsemicro/mm81x/mac.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/net/wireless/morsemicro/mm81x/mac.c b/drivers/net/wireless/morsemicro/mm81x/mac.c
index 4d0131246710..0bbedcdd0b3d 100644
--- a/drivers/net/wireless/morsemicro/mm81x/mac.c
+++ b/drivers/net/wireless/morsemicro/mm81x/mac.c
@@ -66,6 +66,9 @@
/* HW restart delay time before terminating hardware IF work items */
#define MM81X_HW_RESTART_DELAY_MS 20
+/* Maximum number of multicast frames to release after a DTIM beacon */
+#define MM81X_MAX_MC_FRAMES_AFTER_DTIM 4
+
/* clang-format off */
/* mm81x chips do not support 16MHz */
@@ -1287,6 +1290,20 @@ static void mm81x_mac_ops_tx(struct ieee80211_hw *hw,
MM81X_SKB_CHAN_DATA);
}
+static void mm81x_mac_send_buffered_bc(struct mm81x *mors,
+ struct ieee80211_vif *vif)
+{
+ int count = MM81X_MAX_MC_FRAMES_AFTER_DTIM;
+ struct ieee80211_tx_control control = { 0 };
+ struct sk_buff *bc_frame;
+
+ while (count-- &&
+ (bc_frame = ieee80211_get_buffered_bc(mors->hw, vif))) {
+ IEEE80211_SKB_CB(bc_frame)->control.vif = vif;
+ mm81x_mac_ops_tx(mors->hw, &control, bc_frame);
+ }
+}
+
static void mm81x_mac_beacon_work(struct work_struct *work)
{
struct mm81x_vif *mors_vif =
@@ -1318,6 +1335,9 @@ static void mm81x_mac_beacon_work(struct work_struct *work)
mm81x_beacon_h_fill_tx_info(mors, &tx_info, mors_vif,
cfg80211_chandef_s1g_pri_width(&mors->chandef));
mm81x_skbq_skb_tx(mq, &beacon, &tx_info, MM81X_SKB_CHAN_BEACON);
+
+ if (!test_bit(MM81X_STATE_DATA_QS_STOPPED, &mors->state_flags))
+ mm81x_mac_send_buffered_bc(mors, vif);
}
static void mm81x_mac_beacon_init(struct mm81x_vif *mors_vif)
--
2.43.0
next prev parent reply other threads:[~2026-08-27 5:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 5:49 [PATCH wireless-next 0/8] wifi: mm81x: mcast and tx bw improvements Lachlan Hodges
2026-08-27 5:49 ` [PATCH wireless-next 1/8] wifi: mm81x: move beacon work and init below the tx op Lachlan Hodges
2026-08-27 5:49 ` Lachlan Hodges [this message]
2026-08-27 5:49 ` [PATCH wireless-next 3/8] wifi: mm81x: do not drop PS filtered frames in AP mode Lachlan Hodges
2026-08-27 5:49 ` [PATCH wireless-next 4/8] wifi: mm81x: implement .tx_frames_pending() mac op Lachlan Hodges
2026-08-27 5:49 ` [PATCH wireless-next 5/8] wifi: mm81x: factor out tx width selection Lachlan Hodges
2026-08-27 5:49 ` [PATCH wireless-next 6/8] wifi: mm81x: tx EAPOLs at primary width Lachlan Hodges
2026-08-27 5:49 ` [PATCH wireless-next 7/8] wifi: mm81x: clamp tx width to stas max supported width Lachlan Hodges
2026-08-27 5:49 ` [PATCH wireless-next 8/8] wifi: mm81x: tx multicast frames from AP at primary width Lachlan Hodges
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260827054917.255584-3-lachlan.hodges@morsemicro.com \
--to=lachlan.hodges@morsemicro.com \
--cc=arien.judge@morsemicro.com \
--cc=dan.callaghan@morsemicro.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox