From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Antonio Quartulli <ordex@autistici.org>
Cc: Johannes Berg <johannes@sipsolutions.net>,
<linux-wireless@vger.kernel.org>,
Antonio Quartulli <antonio@open-mesh.com>,
Nicolas Cavallari <Nicolas.Cavallari@lri.fr>,
<ath6kl-devel@qca.qualcomm.com>
Subject: Re: [PATCHv3 3/4] ath6kl: make mgmt_tx accept a NULL channel
Date: Wed, 5 Jun 2013 17:48:15 +0300 [thread overview]
Message-ID: <87r4ggy5ow.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1370442893-1687-3-git-send-email-ordex@autistici.org> (Antonio Quartulli's message of "Wed, 5 Jun 2013 16:34:52 +0200")
Antonio Quartulli <ordex@autistici.org> writes:
> From: Antonio Quartulli <antonio@open-mesh.com>
>
> cfg80211 passes a NULL channel to mgmt_tx if the frame has
> to be sent on the one currently in use by the device.
> Make the implementation of mgmt_tx correctly handle this
> case
>
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Cc: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com>
[...]
> @@ -3175,10 +3175,17 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
> {
> struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
> struct ath6kl *ar = ath6kl_priv(vif->ndev);
> - u32 id;
> + u32 id, freq;
> const struct ieee80211_mgmt *mgmt;
> bool more_data, queued;
>
> + /* default to the current channel, but use the one specified as argument
> + * if any
> + */
> + freq = vif->ch_hint;
> + if (chan)
> + freq = chan->center_freq;
Can you please add a check here:
if (WARN_ON(chan == 0))
return -EINVAL;
Just like Arend, I want to be sure that we don't submit value 0 to the
firmware.
--
Kalle Valo
next prev parent reply other threads:[~2013-06-05 14:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 14:34 [PATCHv3 1/4] mac80211: make mgmt_tx accept a NULL channel Antonio Quartulli
2013-06-05 14:34 ` [PATCHv3 2/4] brcm80211: make mgmt_tx in brcmfmac " Antonio Quartulli
2013-06-05 14:34 ` [PATCHv3 3/4] ath6kl: make mgmt_tx " Antonio Quartulli
2013-06-05 14:48 ` Kalle Valo [this message]
2013-06-05 14:51 ` Antonio Quartulli
2013-06-05 15:07 ` Kalle Valo
2013-06-05 14:34 ` [PATCHv3 4/4] nl80211: allow sending CMD_FRAME without specifying any frequency Antonio Quartulli
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=87r4ggy5ow.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=Nicolas.Cavallari@lri.fr \
--cc=antonio@open-mesh.com \
--cc=ath6kl-devel@qca.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=ordex@autistici.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.