From: samuele.yang@morsemicro.com
To: lachlan.hodges@morsemicro.com, dan.callaghan@morsemicro.com
Cc: arien.judge@morsemicro.com, linux-wireless@vger.kernel.org,
Samuele Yang <samuele.yang@morsemicro.com>
Subject: [PATCH wireless-next] wifi: mm81x: start beaconing on beacon enable not interface add
Date: Mon, 28 Sep 2026 13:21:31 +1000 [thread overview]
Message-ID: <20260928032131.55670-1-samuele.yang@morsemicro.com> (raw)
From: Samuele Yang <samuele.yang@morsemicro.com>
Currently we only initialise and start the beaconing process when the
AP interface is first added. If the BSS alone is reconfigured and
beaconing is temporarily stopped, the subsequent call to re-enable
the beacon via BSS_CHANGED_BEACON_ENABLED is ignored and beaconing will
be permanently stopped until the interface is completely re-added.
To fix, move the beaconing start/stop to mm81x_mac_ops_bss_info_changed
and react accordingly to info->enable_beacon and just keep the per-vif
work item init in the add_interface callback.
Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver")
Signed-off-by: Samuele Yang <samuele.yang@morsemicro.com>
---
drivers/net/wireless/morsemicro/mm81x/mac.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/morsemicro/mm81x/mac.c b/drivers/net/wireless/morsemicro/mm81x/mac.c
index 4485748518b4..e61978c28ae4 100644
--- a/drivers/net/wireless/morsemicro/mm81x/mac.c
+++ b/drivers/net/wireless/morsemicro/mm81x/mac.c
@@ -1356,11 +1356,10 @@ static void mm81x_mac_beacon_work(struct work_struct *work)
mm81x_mac_send_buffered_bc(mors, vif);
}
-static void mm81x_mac_beacon_init(struct mm81x_vif *mors_vif)
+static void mm81x_mac_beacon_start(struct mm81x_vif *mors_vif)
{
struct mm81x *mors = mm81x_vif_to_mors(mors_vif);
- INIT_WORK(&mors_vif->u.ap.beacon_work, mm81x_mac_beacon_work);
mm81x_mac_beacon_irq_enable(mors_vif, true);
atomic_inc(&mors->num_bcn_vifs);
}
@@ -1583,7 +1582,9 @@ static void mm81x_mac_ops_bss_info_changed(struct ieee80211_hw *hw,
mm81x_cmd_config_beacon_timer(mors, mors_vif,
info->enable_beacon);
- if (!info->enable_beacon)
+ if (info->enable_beacon)
+ mm81x_mac_beacon_start(mors_vif);
+ else
mm81x_mac_beacon_finish(mors_vif);
}
@@ -2261,7 +2262,7 @@ static int mm81x_mac_ops_add_interface(struct ieee80211_hw *hw,
rcu_assign_pointer(mors->vifs[mors_vif->id], vif);
if (vif->type == NL80211_IFTYPE_AP)
- mm81x_mac_beacon_init(mors_vif);
+ INIT_WORK(&mors_vif->u.ap.beacon_work, mm81x_mac_beacon_work);
ret = mm81x_cmd_get_capabilities(mors, mors_vif->id, &mors->fw_caps);
if (ret) {
--
2.55.0
next reply other threads:[~2026-09-28 3:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 3:21 samuele.yang [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-29 3:34 [PATCH wireless-next] wifi: mm81x: start beaconing on beacon enable not interface add samuele.yang
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=20260928032131.55670-1-samuele.yang@morsemicro.com \
--to=samuele.yang@morsemicro.com \
--cc=arien.judge@morsemicro.com \
--cc=dan.callaghan@morsemicro.com \
--cc=lachlan.hodges@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