From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: kvalo@codeaurora.org, loic.poulain@linaro.org
Cc: wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org,
bryan.odonoghue@linaro.org
Subject: [PATCH] wcn36xx: Set sw-scan chan to 0 when not associated
Date: Fri, 31 Jul 2020 03:01:57 +0100 [thread overview]
Message-ID: <20200731020157.744145-1-bryan.odonoghue@linaro.org> (raw)
A patch in ath/pending rewrites the software scan for the wcn36xx to
accommodate multiplexing with data, link monitoring and so on.
However if a device disassociates from an AP then the last operating
channel will not be re-scanned.
After some discussion and testing on this topic
https://www.spinics.net/lists/linux-wireless/msg201242.html
https://www.spinics.net/lists/linux-wireless/msg201254.html
this patch implements a relatively simple fix. It sets the initial software
scan channel to 0 if we are not associated with an AP or to the current
operating channel if we are assciated with an AP.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index fb8978a3c11e..87fdc073c957 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -697,10 +697,14 @@ static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw,
const u8 *mac_addr)
{
struct wcn36xx *wcn = hw->priv;
+ struct wcn36xx_vif *vif_priv = wcn36xx_vif_to_priv(vif);
wcn->sw_scan = true;
wcn->sw_scan_vif = vif;
- wcn->sw_scan_opchannel = WCN36XX_HW_CHANNEL(wcn);
+ if (vif_priv->sta_assoc)
+ wcn->sw_scan_opchannel = WCN36XX_HW_CHANNEL(wcn);
+ else
+ wcn->sw_scan_opchannel = 0;
}
static void wcn36xx_sw_scan_complete(struct ieee80211_hw *hw,
--
2.27.0
next reply other threads:[~2020-07-31 2:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-31 2:01 Bryan O'Donoghue [this message]
2020-07-31 14:11 ` [PATCH] wcn36xx: Set sw-scan chan to 0 when not associated Loic Poulain
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=20200731020157.744145-1-bryan.odonoghue@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=wcn36xx@lists.infradead.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).