From: Ramon Fried <rfried@codeaurora.org>
To: Kalle Valo <kvalo@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: Sun, 11 Mar 2018 17:08:28 +0200 [thread overview]
Message-ID: <092a49fc-81dc-8349-eacf-91bdeb158952@codeaurora.org> (raw)
In-Reply-To: <878tb0clha.fsf@kamboji.qca.qualcomm.com>
On 3/10/2018 11:45 AM, Kalle Valo wrote:
> 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.
FTM is factory test mode if I recall correctly, but you're right. I elaborate more in the commit message.
>
> 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".
OK. Will fix.
>> +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.
Thanks.
>> +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.
Ok, I will add.
>> @@ -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.
Nice catch. thanks.
>> +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?
AFAIK the user-space app sends these commands, but I will check again. in WCN36xx unlike ATH10k it's not needed to do any transition or replace the firmware
to go in test mode, but I assume that if this command arrives we should return success.
>
prev parent reply other threads:[~2018-03-11 15:08 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
2018-03-11 15:08 ` Ramon Fried [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=092a49fc-81dc-8349-eacf-91bdeb158952@codeaurora.org \
--to=rfried@codeaurora.org \
--cc=eilsar@codeaurora.org \
--cc=k.eugene.e@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.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 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).