From: Arend van Spriel <arend@broadcom.com>
To: "Rafał Miłecki" <zajec5@gmail.com>
Cc: Brett Rudley <brudley@broadcom.com>,
"Franky (Zhenhui) Lin" <frankyl@broadcom.com>,
Hante Meuleman <meuleman@broadcom.com>,
<brcm80211-dev-list@broadcom.com>,
<linux-wireless@vger.kernel.org>
Subject: Re: [BUG REPORT] brcmfmac: wrong logic in finding control/primary channel relative location
Date: Sun, 21 Dec 2014 14:03:33 +0100 [thread overview]
Message-ID: <5496C525.7000000@broadcom.com> (raw)
In-Reply-To: <1419099904-13303-1-git-send-email-zajec5@gmail.com>
On 12/20/14 19:25, Rafał Miłecki wrote:
> ---
> Hi guys,
>
> Let me report something I think is a bug in this unusual-patch way ;)
> ---
> drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> index 39b45c0..2c9e88b 100644
> --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> @@ -313,11 +313,13 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf,
> case NL80211_CHAN_WIDTH_80:
> ch_inf.bw = BRCMU_CHAN_BW_80;
> if (primary_offset< 0) {
> + /* FIXME: We compare frequencies offset with a value -2. Looks like a wrong logic. */
> if (primary_offset< -CH_10MHZ_APART)
You are right. The primary_offset is in MHz, but the logical expression
is for channel spacing (1 channel == 5MHz). So here it should be -10
instead. Thanks for reporting this.
Regards,
Arend
> ch_inf.sb = BRCMU_CHAN_SB_UU;
> else
> ch_inf.sb = BRCMU_CHAN_SB_UL;
> } else {
> + /* FIXME: We compare frequencies offset with a value 2. Looks like a wrong logic. */
> if (primary_offset> CH_10MHZ_APART)
> ch_inf.sb = BRCMU_CHAN_SB_LL;
> else
next prev parent reply other threads:[~2014-12-21 13:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-20 18:25 [BUG REPORT] brcmfmac: wrong logic in finding control/primary channel relative location Rafał Miłecki
2014-12-21 13:03 ` Arend van Spriel [this message]
2015-05-31 8:18 ` Rafał Miłecki
2015-06-01 11:55 ` Arend van Spriel
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=5496C525.7000000@broadcom.com \
--to=arend@broadcom.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=brudley@broadcom.com \
--cc=frankyl@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=meuleman@broadcom.com \
--cc=zajec5@gmail.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 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).