From: Kalle Valo <kvalo@codeaurora.org>
To: Ramon Fried <rfried@codeaurora.org>
Cc: k.eugene.e@gmail.com, wcn36xx@lists.infradead.org,
linux-wireless@vger.kernel.org,
Eyal Ilsar <eilsar@codeaurora.org>
Subject: Re: [PATCH] wcn36xx: Add support for FTM WLAN
Date: Sat, 10 Mar 2018 11:45:37 +0200 [thread overview]
Message-ID: <878tb0clha.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <20180228071328.5605-1-rfried@codeaurora.org> (Ramon Fried's message of "Wed, 28 Feb 2018 09:13:28 +0200")
Ramon Fried <rfried@codeaurora.org> writes:
> From: Eyal Ilsar <eilsar@codeaurora.org>
>
> Introduced infrastructure for supporting FTM WLAN in user space exposing
> the netlink channel from the kernel WLAN driver.
What's FTM WLAN? Don't assume that people know all the acronyms.
This included:
> 1) Registered wcn36xx driver to testmode callback from netlink
> 2) Added testmode callback implementation to handle incoming FTM commands
> 3) Added FTM command packet structure
> 4) Added handling for GET_BUILD_RELEASE_NUMBER (msgid=0x32A2)
> 5) Added generic handling for all PTT_MSG packets
I don't remember the english grammar terminology, but in the commit log
use the form "register", "add" instead of "registered", "added".
> +struct wcn36xx_hal_process_ptt_msg_rsp_msg {
> + struct wcn36xx_hal_msg_header header;
> +
> + /* FTM Command response status */
> + u32 ptt_msg_resp_status;
Unnecessary whitespace after u32.
> +static int wcn36xx_smd_process_ptt_msg_rsp(void *buf, size_t len,
> + void **p_ptt_rsp_msg)
> +{
> + struct wcn36xx_hal_process_ptt_msg_rsp_msg *rsp;
> + int ret = 0;
> +
> + ret = wcn36xx_smd_rsp_status_check(buf, len);
> + if (ret)
> + return ret;
> + rsp = (struct wcn36xx_hal_process_ptt_msg_rsp_msg *)buf;
> + wcn36xx_dbg(WCN36XX_DBG_HAL, "process ptt msg responded with length %d\n",
> + rsp->header.len);
> + wcn36xx_dbg_dump(WCN36XX_DBG_HAL_DUMP, "HAL_PTT_MSG_RSP:", rsp->ptt_msg,
> + rsp->header.len - sizeof(rsp->ptt_msg_resp_status));
> + if (rsp->header.len > 0) {
> + *p_ptt_rsp_msg = kmalloc(rsp->header.len, GFP_ATOMIC);
> + memcpy(*p_ptt_rsp_msg, rsp->ptt_msg, rsp->header.len);
> + }
> + return ret;
> +}
Adding few empty lines to the function would make it more readable.
> @@ -2330,6 +2399,7 @@ int wcn36xx_smd_rsp_process(struct rpmsg_device *rpdev,
> struct ieee80211_hw *hw = priv;
> struct wcn36xx *wcn = hw->priv;
> struct wcn36xx_hal_ind_msg *msg_ind;
> +
> wcn36xx_dbg_dump(WCN36XX_DBG_SMD_DUMP, "SMD <<< ", buf, len);
Unrelated change.
> +int wcn36xx_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
> + void *data, int len)
> +{
> + struct wcn36xx *wcn = hw->priv;
> + struct nlattr *tb[WCN36XX_TM_ATTR_MAX + 1];
> + int ret = 0;
> + unsigned short attr;
> +
> + wcn36xx_dbg_dump(WCN36XX_DBG_TESTMODE_DUMP, "Data:", data, len);
> + ret = nla_parse(tb, WCN36XX_TM_ATTR_MAX, data, len,
> + wcn36xx_tm_policy, NULL);
> + if (ret)
> + return ret;
> +
> + if (!tb[WCN36XX_TM_ATTR_CMD])
> + return -EINVAL;
> +
> + attr = nla_get_u16(tb[WCN36XX_TM_ATTR_CMD]);
> +
> + switch (attr) {
> + case WCN36XX_TM_CMD_START:
> + case WCN36XX_TM_CMD_STOP:
> + // N/A to this driver as it does not need to switch state
> + break;
[...]
> +enum wcn36xx_tm_cmd {
> + /* For backwards compatibility
> + */
> + WCN36XX_TM_CMD_START = 1,
> +
> + /* For backwards compatibility
> + */
> + WCN36XX_TM_CMD_STOP = 2,
This looks odd. If wcn36xx does not need START and STOP commands why add
those in the first place?
--
Kalle Valo
next prev parent reply other threads:[~2018-03-10 9:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 7:13 [PATCH] wcn36xx: Add support for FTM WLAN Ramon Fried
2018-03-10 9:45 ` Kalle Valo [this message]
2018-03-11 15:08 ` Ramon Fried
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=878tb0clha.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=eilsar@codeaurora.org \
--cc=k.eugene.e@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=rfried@codeaurora.org \
--cc=wcn36xx@lists.infradead.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.