From: Oleksiy Protas <elfy.ua@gmail.com>
To: elfy.ua@gmail.com
Cc: linux-wireless@vger.kernel.org, Oleksiy Protas <elfy@ecognize.me>
Subject: [PATCH] ath9k: keep ANI in monitor mode
Date: Wed, 14 May 2025 21:04:13 +0300 [thread overview]
Message-ID: <20250514180413.373876-2-elfy@ecognize.me> (raw)
In-Reply-To: <20250514180413.373876-1-elfy@ecognize.me>
Earlier changes that made is_monitoring a separate flag as opposed to setting the opmode caused AMI to never start when monitoring
---
drivers/net/wireless/ath/ath9k/link.c | 2 +-
drivers/net/wireless/ath/ath9k/main.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/link.c b/drivers/net/wireless/ath/ath9k/link.c
index 9d84003db800..cd2ead7b2883 100644
--- a/drivers/net/wireless/ath/ath9k/link.c
+++ b/drivers/net/wireless/ath/ath9k/link.c
@@ -468,7 +468,7 @@ void ath_check_ani(struct ath_softc *sc)
if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))
goto stop_ani;
}
- } else if (ah->opmode == NL80211_IFTYPE_STATION) {
+ } else if (ah->opmode == NL80211_IFTYPE_STATION && !ah->is_monitoring) {
if (!test_bit(ATH_OP_PRIM_STA_VIF, &common->op_flags))
goto stop_ani;
}
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index aa271b82875e..2685aeecffad 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1530,6 +1530,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
if (conf->flags & IEEE80211_CONF_MONITOR) {
ath_dbg(common, CONFIG, "Monitor mode is enabled\n");
sc->sc_ah->is_monitoring = true;
+ ath_check_ani(sc);
} else {
ath_dbg(common, CONFIG, "Monitor mode is disabled\n");
sc->sc_ah->is_monitoring = false;
--
2.41.0
next prev parent reply other threads:[~2025-05-14 18:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 16:19 MikroTik R11e 5HnD monitor mode Oleksiy Protas
2025-05-14 18:04 ` [PATCH] " Oleksiy Protas
2025-05-14 18:04 ` Oleksiy Protas [this message]
2025-08-11 12:18 ` [PATCH] ath9k: keep ANI in " Toke Høiland-Jørgensen
2025-05-14 19:11 ` MikroTik R11e 5HnD " Oleksiy Protas
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=20250514180413.373876-2-elfy@ecognize.me \
--to=elfy.ua@gmail.com \
--cc=elfy@ecognize.me \
--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;
as well as URLs for NNTP newsgroup(s).