From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: kvalo@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org,
k.eugene.e@gmail.com
Subject: Re: [PATCH] wcn36xx: Add hardware scan offload support
Date: Fri, 8 Dec 2017 16:34:52 -0800 [thread overview]
Message-ID: <20171209003452.GA3441@builder> (raw)
In-Reply-To: <1512725730-19188-1-git-send-email-loic.poulain@linaro.org>
On Fri 08 Dec 01:35 PST 2017, Loic Poulain wrote:
> Current hw_scan implementation does not trigger offloaded
> hardware scan and seems to only put the device in a kind of
> listening mode (beacon/probe-response) for software scan.
> Since no probe request are generated by the software, current
> scanning method is similar to a passive scan.
>
> This patch introduces support for 'true' hardware offloaded scan.
> Hardware scan is configured and started via the start-scan-offload
> firmware message. Once scan has been completed a scan indicator
> message is received from firmware.
>
> Moreover, this patch includes support for directed probe-request,
> allowing connection with hidden APs. It also fixes scan issues with
> band-steering AP which are not 'visible' with passive scan (due to
> hidden ssid in beacons).
>
I'm puzzled to why I didn't see this when I dumped the control channel
that lead up to the initial hw_scan patch. But this looks good and with
a related locking issue fixed this seems to work well.
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
[..]
> +static int wcn36xx_smd_hw_scan_ind(struct wcn36xx *wcn, void *buf, size_t len)
> +{
> + struct wcn36xx_hal_scan_offload_ind *rsp = buf;
> + struct cfg80211_scan_info scan_info = {};
> +
> + if (len != sizeof(*rsp)) {
> + wcn36xx_warn("Corrupted delete scan indication\n");
> + return -EIO;
> + }
> +
> + wcn36xx_dbg(WCN36XX_DBG_HAL, "scan indication (type %x)", rsp->type);
> +
> + switch (rsp->type) {
> + case WCN36XX_HAL_SCAN_IND_FAILED:
> + scan_info.aborted = true;
> + case WCN36XX_HAL_SCAN_IND_COMPLETED:
> + mutex_lock(&wcn->scan_lock);
Grabbing this mutex with DEBUG_ATOMIC_SLEEP causes issues, but that's
because the locking in ind_smd_work() is to excessive. Will reply with a
fix for this.
> + wcn->scan_req = NULL;
> + mutex_unlock(&wcn->scan_lock);
> + ieee80211_scan_completed(wcn->hw, &scan_info);
> + break;
Regards,
Bjorn
next prev parent reply other threads:[~2017-12-09 0:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 9:35 [PATCH] wcn36xx: Add hardware scan offload support Loic Poulain
2017-12-09 0:34 ` Bjorn Andersson [this message]
2017-12-11 8:57 ` Loic Poulain
2017-12-09 0:35 ` [PATCH] wcn36xx: Reduce spinlock in indication handler Bjorn Andersson
2017-12-14 15:32 ` Kalle Valo
2017-12-14 15:29 ` wcn36xx: Add hardware scan offload support Kalle Valo
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=20171209003452.GA3441@builder \
--to=bjorn.andersson@linaro.org \
--cc=k.eugene.e@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.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).