linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Cc: <ath6kl-devel@qualcomm.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] ath6kl: TCMD responds through testmode events
Date: Fri, 23 Dec 2011 15:11:08 +0200	[thread overview]
Message-ID: <4EF47DEC.10703@qca.qualcomm.com> (raw)
In-Reply-To: <1324335768-8495-1-git-send-email-c_tpeder@qca.qualcomm.com>

On 12/20/2011 01:02 AM, Thomas Pedersen wrote:
> ath6kl now no longer knows what is is sending and / or receiving through
> cfg80211_testmode, and simply passes opaque buffers between userspace
> and the firmware.

Patch title could be a bit more descriptive, like: "send TCMD events
through testmode events"

> @@ -30,7 +31,6 @@ enum ath6kl_tm_attr {
>  
>  enum ath6kl_tm_cmd {
>  	ATH6KL_TM_CMD_TCMD		= 0,
> -	ATH6KL_TM_CMD_RX_REPORT		= 1,
>  };

Please leave the enum but add a comment saying that it's not used anymore.

> +	skb = cfg80211_testmode_alloc_event_skb(ar->wiphy, buf_len, GFP_ATOMIC);

Why atomic?

> +	if (!skb) {
> +		ath6kl_dbg(ATH6KL_DBG_WMI,
> +			   "failed to allocate testmode rx skb!\n");

Please use ath6kl_warn()

> +	NLA_PUT_U32(skb, ATH6KL_TM_ATTR_CMD, ATH6KL_TM_CMD_TCMD);
> +	NLA_PUT(skb, ATH6KL_TM_ATTR_DATA, buf_len, buf);
> +	cfg80211_testmode_event(skb, GFP_ATOMIC);

Why atomic?

>  nla_put_failure:
> -	ret = -ENOBUFS;
> -	goto out;
> +	kfree_skb(skb);
> +	ath6kl_dbg(ATH6KL_DBG_WMI, "nla_put failed on testmode rx skb!\n");

ath6kl_warn()

Kalle

      reply	other threads:[~2011-12-23 13:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 23:02 [PATCH] ath6kl: TCMD responds through testmode events Thomas Pedersen
2011-12-23 13:11 ` 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=4EF47DEC.10703@qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=c_tpeder@qca.qualcomm.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 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).