From: Kalle Valo <kvalo@codeaurora.org>
To: Loic Poulain <loic.poulain@linaro.org>
Cc: linux-wireless@vger.kernel.org, wcn36xx@lists.infradead.org
Subject: Re: [PATCH] net: wireless: wcn36xx: Handle scan initialization error
Date: Sat, 12 Jun 2021 13:55:15 +0300 [thread overview]
Message-ID: <87a6nvz71o.fsf@codeaurora.org> (raw)
In-Reply-To: <1621958739-5557-1-git-send-email-loic.poulain@linaro.org> (Loic Poulain's message of "Tue, 25 May 2021 18:05:39 +0200")
Loic Poulain <loic.poulain@linaro.org> writes:
> In case firmware is not able to initialize scanning, return
> an error to skip scanning on the channel. Scan initialization
> can fail, if e.g. the firmware is not able to submit the null
> function packet with PS bit set.
>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
No "net: wireless:" in the title, please.
> --- a/drivers/net/wireless/ath/wcn36xx/main.c
> +++ b/drivers/net/wireless/ath/wcn36xx/main.c
> @@ -433,8 +433,11 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
> /* A scan is ongoing, do not change the operating
> * channel, but start a scan session on the channel.
> */
> - wcn36xx_smd_init_scan(wcn, HAL_SYS_MODE_SCAN,
> - wcn->sw_scan_vif);
> + if (wcn36xx_smd_init_scan(wcn, HAL_SYS_MODE_SCAN,
> + wcn->sw_scan_vif)) {
> + mutex_unlock(&wcn->conf_mutex);
> + return -EIO;
> + }
Why are you rewriting the error code from wcn36xx_smd_init_scan()?
Also I think this style is more readable (which does not rewrite the
error code either):
ret = foo();
if (ret) {
...
}
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2021-06-12 10:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 16:05 [PATCH] net: wireless: wcn36xx: Handle scan initialization error Loic Poulain
2021-06-12 10:55 ` Kalle Valo [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=87a6nvz71o.fsf@codeaurora.org \
--to=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 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.