From: Kalle Valo <kvalo@codeaurora.org>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org,
bryan.odonoghue@linaro.org
Subject: Re: [PATCH v2] wcn36xx: Channel list update before hardware scan
Date: Mon, 25 Oct 2021 21:27:12 +0300 [thread overview]
Message-ID: <87ee899czj.fsf@codeaurora.org> (raw)
In-Reply-To: <1635175328-25642-1-git-send-email-loic.poulain@linaro.org> (Loic Poulain's message of "Mon, 25 Oct 2021 17:22:08 +0200")
Loic Poulain <loic.poulain@linaro.org> writes:
> The channel scan list must be updated before triggering a hardware scan
> so that firmware takes into account the regulatory info for each single
> channel such as active/passive config, power, DFS, etc... Without this
> the firmware uses its own internal default channel configuration, which
> is not aligned with mac80211 regulatory rules, and misses several
> channels (e.g. 144).
>
> Fixes: 2f3bef4b247e ("wcn36xx: Add hardware scan offload support")
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> ---
> v2: Use u32_replace_bits() for setting channel update fields
>
> drivers/net/wireless/ath/wcn36xx/hal.h | 32 +++++++++++++
> drivers/net/wireless/ath/wcn36xx/main.c | 1 +
> drivers/net/wireless/ath/wcn36xx/smd.c | 82 +++++++++++++++++++++++++++++++++
> drivers/net/wireless/ath/wcn36xx/smd.h | 1 +
> 4 files changed, 116 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/wcn36xx/hal.h b/drivers/net/wireless/ath/wcn36xx/hal.h
> index 5f1f248..9bea2b0 100644
> --- a/drivers/net/wireless/ath/wcn36xx/hal.h
> +++ b/drivers/net/wireless/ath/wcn36xx/hal.h
> @@ -359,6 +359,8 @@ enum wcn36xx_hal_host_msg_type {
> WCN36XX_HAL_START_SCAN_OFFLOAD_RSP = 205,
> WCN36XX_HAL_STOP_SCAN_OFFLOAD_REQ = 206,
> WCN36XX_HAL_STOP_SCAN_OFFLOAD_RSP = 207,
> + WCN36XX_HAL_UPDATE_CHANNEL_LIST_REQ = 208,
> + WCN36XX_HAL_UPDATE_CHANNEL_LIST_RSP = 209,
> WCN36XX_HAL_SCAN_OFFLOAD_IND = 210,
>
> WCN36XX_HAL_AVOID_FREQ_RANGE_IND = 233,
> @@ -1353,6 +1355,36 @@ struct wcn36xx_hal_stop_scan_offload_rsp_msg {
> u32 status;
> } __packed;
>
> +#define WCN36XX_HAL_CHAN_REG1_MIN_PWR_MASK 0x000000ff
> +#define WCN36XX_HAL_CHAN_REG1_MAX_PWR_MASK 0x0000ff00
> +#define WCN36XX_HAL_CHAN_REG1_REG_PWR_MASK 0x00ff0000
> +#define WCN36XX_HAL_CHAN_REG1_CLASS_ID_MASK 0xff000000
> +#define WCN36XX_HAL_CHAN_REG2_ANT_GAIN_MASK 0x000000ff
Usually people use GENMASK() but these masks are so simple that I guess
this is fine as well.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2021-10-25 18:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-25 15:22 [PATCH v2] wcn36xx: Channel list update before hardware scan Loic Poulain
2021-10-25 18:27 ` Kalle Valo [this message]
2021-10-28 7:31 ` 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=87ee899czj.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=bryan.odonoghue@linaro.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).