ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
To: linux-wireless@vger.kernel.org
Cc: kvalo@qca.qualcomm.com, Chun-Yeow Yeoh <yeohchunyeow@gmail.com>,
	ath10k@lists.infradead.org
Subject: [PATCH] ath10k: don't allow stand alone monitor mode for non-AP firmware
Date: Thu, 24 Apr 2014 16:14:10 +0800	[thread overview]
Message-ID: <1398327250-12923-1-git-send-email-yeohchunyeow@gmail.com> (raw)

Firmware 999.999.0.636 does not allow stand alone monitor
mode. This means that bridging the STA mode and put it into
promiscuous mode will also cause the firmware to crash. Avoid
this.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
---
 drivers/net/wireless/ath/ath10k/mac.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index e2c01dc..f640328 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -647,10 +647,15 @@ static int ath10k_monitor_vdev_delete(struct ath10k *ar)
 
 static int ath10k_monitor_start(struct ath10k *ar)
 {
-	int ret;
+	int ret = -1;
 
 	lockdep_assert_held(&ar->conf_mutex);
 
+	if (ar->fw_version_build == 636) {
+		ath10k_warn("stand alone monitor mode is not supported\n");
+		return ret;
+	}
+
 	if (!ath10k_monitor_is_enabled(ar)) {
 		ath10k_warn("trying to start monitor with no references\n");
 		return 0;
-- 
1.9.2


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

             reply	other threads:[~2014-04-24  8:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24  8:14 Chun-Yeow Yeoh [this message]
2014-04-24  8:22 ` [PATCH] ath10k: don't allow stand alone monitor mode for non-AP firmware Kalle Valo
2014-04-24  8:40   ` Yeoh Chun-Yeow
2014-04-24  8:45     ` Kalle Valo
2014-04-24  9:19       ` Yeoh Chun-Yeow
2014-04-24  9:46         ` Kalle Valo
2014-04-24 10:14           ` Yeoh Chun-Yeow
2014-04-24  8:44 ` Michal Kazior
2014-04-24  8:50   ` Johannes Berg
2014-04-24  9:04     ` Michal Kazior
2014-04-24  8:50   ` Yeoh Chun-Yeow
2014-04-24  8:53     ` Michal Kazior
2014-04-24  9:09       ` Yeoh Chun-Yeow

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=1398327250-12923-1-git-send-email-yeohchunyeow@gmail.com \
    --to=yeohchunyeow@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=kvalo@qca.qualcomm.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