From: Antonio Quartulli <antonio@open-mesh.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"brcm80211-dev-list@broadcom.com"
<brcm80211-dev-list@broadcom.com>
Subject: Re: brcm80211: make mgmt_tx in brcmfmac accept a NULL channel
Date: Wed, 19 Jun 2013 13:27:11 +0200 [thread overview]
Message-ID: <20130619112537.GA1738@open-mesh.com> (raw)
In-Reply-To: <20130619111620.GA969@elgon.mountain>
[-- Attachment #1: Type: text/plain, Size: 1570 bytes --]
Hello Dan,
On Wed, Jun 19, 2013 at 04:16:27AM -0700, Dan Carpenter wrote:
> Hello Antonio Quartulli,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch c2ff8cad6423: "brcm80211: make mgmt_tx in brcmfmac accept a
> NULL channel" from Jun 11, 2013, leads to the following Smatch
> complaint:
>
> drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c:4052 brcmf_cfg80211_mgmt_tx()
> error: we previously assumed 'chan' could be null (see line 4041)
>
> drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
> 4040 */
> 4041 if (chan)
> ^^^^
> New check reflects that "chan" can now be NULL.
>
> 4042 freq = chan->center_freq;
> 4043 else
> 4044 brcmf_fil_cmd_int_get(vif->ifp, BRCMF_C_GET_CHANNEL,
> 4045 &freq);
> 4046 chan_nr = ieee80211_frequency_to_channel(freq);
> 4047 af_params->channel = cpu_to_le32(chan_nr);
> 4048
> 4049 memcpy(action_frame->data, &buf[DOT11_MGMT_HDR_LEN],
> 4050 le16_to_cpu(action_frame->len));
> 4051
> 4052 brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, freq=%d\n",
> 4053 *cookie, le16_to_cpu(action_frame->len),
> 4054 chan->center_freq);
> ^^^^^^
> This needs to be updated as well.
>
Thank you very much for spotting this. I'm going to send a patch fixing it.
(however the line numbers were shifted..)
Regards,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2013-06-19 11:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 11:16 brcm80211: make mgmt_tx in brcmfmac accept a NULL channel Dan Carpenter
2013-06-19 11:27 ` Antonio Quartulli [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=20130619112537.GA1738@open-mesh.com \
--to=antonio@open-mesh.com \
--cc=brcm80211-dev-list@broadcom.com \
--cc=dan.carpenter@oracle.com \
--cc=linux-wireless@vger.kernel.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.