From: Antonio Quartulli <antonio@open-mesh.com>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Antonio Quartulli <ordex@autistici.org>,
Johannes Berg <johannes@sipsolutions.net>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Nicolas Cavallari <Nicolas.Cavallari@lri.fr>,
"ath6kl-devel@qca.qualcomm.com" <ath6kl-devel@qca.qualcomm.com>
Subject: Re: [PATCHv3 3/4] ath6kl: make mgmt_tx accept a NULL channel
Date: Wed, 5 Jun 2013 16:51:57 +0200 [thread overview]
Message-ID: <20130605145157.GH2349@open-mesh.com> (raw)
In-Reply-To: <87r4ggy5ow.fsf@kamboji.qca.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]
On Wed, Jun 05, 2013 at 07:48:15AM -0700, Kalle Valo wrote:
> 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;
I think you meant (freq == 0) ?
>
> Just like Arend, I want to be sure that we don't submit value 0 to the
> firmware.
Yeah ok. In ath6kl, are you aware of any "firmware command" to get the channel
from the device like I did for brcmfmac ?
I couldn't find any define matching *GET*CHAN*
Regards,
--
Antonio Quartulli
..each of us alone is worth nothing..
Ernesto "Che" Guevara
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-06-05 14:53 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
2013-06-05 14:51 ` Antonio Quartulli [this message]
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=20130605145157.GH2349@open-mesh.com \
--to=antonio@open-mesh.com \
--cc=Nicolas.Cavallari@lri.fr \
--cc=ath6kl-devel@qca.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=kvalo@qca.qualcomm.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox