linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Luca Coelho <luca@coelho.fi>, kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	Shaul Triebitz <shaul.triebitz@intel.com>,
	Liad Kaufman <liad.kaufman@intel.com>,
	Ido Yariv <idox.yariv@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: Re: [PATCH 12/16] iwlwifi: mvm: enable sending HE_AIR_SNIFFER command via debugfs
Date: Mon, 3 Sep 2018 09:25:47 +0200	[thread overview]
Message-ID: <5B8CE1FB.1060402@broadcom.com> (raw)
In-Reply-To: <20180831095614.14099-13-luca@coelho.fi>

On 8/31/2018 11:56 AM, Luca Coelho wrote:
> From: Shaul Triebitz <shaul.triebitz@intel.com>
>
> In order to receive TB (Trigger Based) PPDU in monitor mode,
> the Driver must send the HE_AIR_SNIFFER_CONFIG_CMD host command.
> Enable that via debugfs.
>
> Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
> Signed-off-by: Ido Yariv <idox.yariv@intel.com>
> Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> ---
>   .../wireless/intel/iwlwifi/fw/api/datapath.h  |  5 ++
>   .../net/wireless/intel/iwlwifi/fw/api/mac.h   | 14 +++++
>   .../net/wireless/intel/iwlwifi/mvm/debugfs.c  | 53 +++++++++++++++++++
>   3 files changed, 72 insertions(+)

[snip]

> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> index 202158d03d36..725b97ecb447 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> @@ -1727,6 +1727,57 @@ iwl_dbgfs_send_echo_cmd_write(struct iwl_mvm *mvm, char *buf,
>   	return ret ?: count;
>   }
>
> +static ssize_t
> +iwl_dbgfs_set_aid_read(struct file *file, char __user *user_buf,
> +		       size_t count, loff_t *ppos)
> +{
> +	return 0;
> +}
> +
> +static ssize_t
> +iwl_dbgfs_set_aid_write(struct file *file, const char __user *user_buf,
> +			size_t count, loff_t *ppos)
> +{
> +	struct iwl_mvm *mvm = file->private_data;
> +	struct iwl_he_monitor_cmd he_mon_cmd = {};
> +	u8 tmp_buf[32];
> +	u32 aid;
> +	int ret;
> +
> +	if (!iwl_mvm_firmware_running(mvm))
> +		return -EIO;
> +
> +	if (count > sizeof(tmp_buf))
> +		return -EINVAL;
> +
> +	if (copy_from_user(tmp_buf, user_buf, count))
> +		return -EIO;
> +
> +	ret = sscanf(tmp_buf, "%x %2hhx:%2hhx:%2hhx:%2hhx:%2hhx:%2hhx", &aid,
> +		     &he_mon_cmd.bssid[0], &he_mon_cmd.bssid[1],
> +		     &he_mon_cmd.bssid[2], &he_mon_cmd.bssid[3],
> +		     &he_mon_cmd.bssid[4], &he_mon_cmd.bssid[5]);
> +	if (ret != 7)
> +		return -EINVAL;
> +
> +	he_mon_cmd.aid = cpu_to_le16(aid);
> +
> +	mutex_lock(&mvm->mutex);
> +	ret = iwl_mvm_send_cmd_pdu(mvm, iwl_cmd_id(HE_AIR_SNIFFER_CONFIG_CMD,
> +						   DATA_PATH_GROUP, 0), 0,
> +				   sizeof(he_mon_cmd), &he_mon_cmd);
> +	mutex_unlock(&mvm->mutex);
> +
> +	return ret ?: count;
> +}
> +
> +static const struct file_operations iwl_dbgfs_set_aid_ops = {
> +	.read = iwl_dbgfs_set_aid_read,
> +	.write = iwl_dbgfs_set_aid_write,
> +	.open = simple_open,
> +	.llseek = default_llseek,
> +};

What's with the name 'set_aid'?

Regards,
Arend

  reply	other threads:[~2018-09-03 11:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31  9:55 [PATCH 00/16] iwlwifi: updates intended for v4.20 2018-08- Luca Coelho
2018-08-31  9:55 ` [PATCH 01/16] iwlwifi: mvm: fix a comment about the SP length Luca Coelho
2018-08-31  9:56 ` [PATCH 02/16] iwlwifi: fw: add a restart FW debug function Luca Coelho
2018-08-31  9:56 ` [PATCH 03/16] iwlwifi: fw: stop and start debugging using host command Luca Coelho
2018-08-31  9:56 ` [PATCH 04/16] iwlwifi: RX API: remove unnecessary anonymous struct Luca Coelho
2018-08-31  9:56 ` [PATCH 05/16] iwlwifi: debug flow cleanup Luca Coelho
2018-08-31  9:56 ` [PATCH 06/16] iwlwifi: iwlmvm: fix typo when checking for TX Beamforming Luca Coelho
2018-08-31  9:56 ` [PATCH 07/16] iwlwifi: mvm: report RU offset is known Luca Coelho
2018-08-31  9:56 ` [PATCH 08/16] iwlwifi: remove ucode error tracepoint Luca Coelho
2018-08-31  9:56 ` [PATCH 09/16] iwlwifi: dbg: don't crash if the firmware crashes in the middle of a debug dump Luca Coelho
2018-08-31  9:56 ` [PATCH 10/16] iwlwifi: fix non_shared_ant for 22000 devices Luca Coelho
2018-08-31  9:56 ` [PATCH 11/16] iwlwifi: mvm: cleanup dead code on resume flow for non unified image Luca Coelho
2018-08-31  9:56 ` [PATCH 12/16] iwlwifi: mvm: enable sending HE_AIR_SNIFFER command via debugfs Luca Coelho
2018-09-03  7:25   ` Arend van Spriel [this message]
2018-09-04 12:09     ` Luca Coelho
2018-09-28  5:23       ` [PATCH v2] " Luca Coelho
2018-09-28  5:31         ` Luciano Coelho
2018-08-31  9:56 ` [PATCH 13/16] iwlwifi: pcie: read correct prph address for newer devices Luca Coelho
2018-08-31  9:56 ` [PATCH 14/16] iwlwifi: mvm: Support TKIP on gen2 data path Luca Coelho
2018-08-31  9:56 ` [PATCH 15/16] iwlwifi: api: annotate compressed BA notif array sizes Luca Coelho
2018-08-31  9:56 ` [PATCH 16/16] iwlwifi: pcie: gen2: pull adding frags to helper routine Luca Coelho

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=5B8CE1FB.1060402@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=idox.yariv@intel.com \
    --cc=kvalo@codeaurora.org \
    --cc=liad.kaufman@intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luca@coelho.fi \
    --cc=luciano.coelho@intel.com \
    --cc=shaul.triebitz@intel.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).