All of lore.kernel.org
 help / color / mirror / Atom feed
From: igor.mitsyanko.os@quantenna.com
To: linux-wireless@vger.kernel.org
Cc: sergey.matyukevich.os@quantenna.com, avinashp@quantenna.com,
	johannes@sipsolutions.net
Subject: [PATCH V3 9/9] qtnfmac: do not report channel changes until wiphy is registered
Date: Thu, 21 Sep 2017 14:34:37 -0700	[thread overview]
Message-ID: <20170921213437.27457-10-igor.mitsyanko.os@quantenna.com> (raw)
In-Reply-To: <20170921213437.27457-1-igor.mitsyanko.os@quantenna.com>

From: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>

Wireless device may send "channel changed" event before driver
registered this device with wireless core, which will result in
warnings.
Once device is registered, higher layer will query channel info
manually using .get_channel callback.

Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com>
---
 drivers/net/wireless/quantenna/qtnfmac/event.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/wireless/quantenna/qtnfmac/event.c b/drivers/net/wireless/quantenna/qtnfmac/event.c
index b1acc24..7481d5b 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/event.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/event.c
@@ -368,6 +368,9 @@ qtnf_event_handle_freq_change(struct qtnf_wmac *mac,
 		return -EINVAL;
 	}
 
+	if (!wiphy->registered)
+		return 0;
+
 	qlink_chandef_q2cfg(wiphy, &data->chan, &chandef);
 
 	if (!cfg80211_chandef_valid(&chandef)) {
-- 
2.9.5

      parent reply	other threads:[~2017-09-21 21:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 21:34 [PATCH V3 0/9] qtnfmac: more info on current channel from device igor.mitsyanko.os
2017-09-21 21:34 ` [PATCH V3 1/9] qtnfmac: convert channel width from bitfiled to simple enum igor.mitsyanko.os
2017-09-25  8:28   ` [V3, " Kalle Valo
2017-09-21 21:34 ` [PATCH V3 2/9] qtnfmac: make "Channel change" event report full channel info igor.mitsyanko.os
2017-09-21 21:34 ` [PATCH V3 3/9] qtnfmac: retrieve current channel info from EP igor.mitsyanko.os
2017-09-21 21:34 ` [PATCH V3 4/9] qtnfmac: do not cache channel info from "connect" command igor.mitsyanko.os
2017-09-21 21:34 ` [PATCH V3 5/9] qtnfmac: let wifi card handle channel switch request to the same chan igor.mitsyanko.os
2017-09-21 21:34 ` [PATCH V3 6/9] qtnfmac: pass VIF info to SendChannel command igor.mitsyanko.os
2017-09-21 21:34 ` [PATCH V3 7/9] qtnfmac: do not cache CSA chandef info igor.mitsyanko.os
2017-09-21 21:34 ` [PATCH V3 8/9] qtnfmac: remove unused mac::status field igor.mitsyanko.os
2017-09-21 21:34 ` igor.mitsyanko.os [this message]

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=20170921213437.27457-10-igor.mitsyanko.os@quantenna.com \
    --to=igor.mitsyanko.os@quantenna.com \
    --cc=avinashp@quantenna.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sergey.matyukevich.os@quantenna.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.