* [PATCH] ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4
@ 2016-02-26 19:05 Peter Oh
2016-02-26 19:35 ` kbuild test robot
2016-03-08 9:31 ` Valo, Kalle
0 siblings, 2 replies; 4+ messages in thread
From: Peter Oh @ 2016-02-26 19:05 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless
Check and parse Rx MAC timestamp when firmware sets its flag
to status variable.
10.4 firmware adds it in Rx beacon frame only at this moment.
Drivers and mac80211 may utilize it to detect such clockdrift
or beacon collision and use the result for beacon collision
avoidance.
Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath10k/wmi.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 1ce6742..94968d6 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -2211,6 +2211,8 @@ static int ath10k_wmi_10_4_op_pull_mgmt_rx_ev(struct ath10k *ar,
struct wmi_10_4_mgmt_rx_hdr *ev_hdr;
size_t pull_len;
u32 msdu_len;
+ struct wmi_mgmt_rx_ext_info *ext_info;
+ u32 len;
ev = (struct wmi_10_4_mgmt_rx_event *)skb->data;
ev_hdr = &ev->hdr;
@@ -2231,6 +2233,13 @@ static int ath10k_wmi_10_4_op_pull_mgmt_rx_ev(struct ath10k *ar,
if (skb->len < msdu_len)
return -EPROTO;
+ if (le32_to_cpu(arg->status) & WMI_RX_STATUS_EXT_INFO) {
+ len = ALIGN(le32_to_cpu(arg->buf_len), 4);
+ ext_info = (struct wmi_mgmt_rx_ext_info *)(skb->data + len);
+ memcpy(&arg->ext_info, ext_info,
+ sizeof(struct wmi_mgmt_rx_ext_info));
+ }
+
/* Make sure bytes added for padding are removed. */
skb_trim(skb, msdu_len);
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4
2016-02-26 19:05 [PATCH] ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4 Peter Oh
@ 2016-02-26 19:35 ` kbuild test robot
2016-03-08 9:31 ` Valo, Kalle
1 sibling, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2016-02-26 19:35 UTC (permalink / raw)
To: Peter Oh; +Cc: kbuild-all, ath10k, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 3301 bytes --]
Hi Peter,
[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on v4.5-rc5 next-20160226]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Peter-Oh/ath10k-parse-Rx-MAC-timestamp-in-mgmt-frame-for-FW-10-4/20160227-031048
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: sparc64-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
drivers/net/wireless/ath/ath10k/wmi.c: In function 'ath10k_wmi_10_4_op_pull_mgmt_rx_ev':
>> drivers/net/wireless/ath/ath10k/wmi.c:2236:33: error: 'WMI_RX_STATUS_EXT_INFO' undeclared (first use in this function)
if (le32_to_cpu(arg->status) & WMI_RX_STATUS_EXT_INFO) {
^
drivers/net/wireless/ath/ath10k/wmi.c:2236:33: note: each undeclared identifier is reported only once for each function it appears in
In file included from arch/sparc/include/asm/string.h:4:0,
from include/linux/string.h:18,
from include/linux/bitmap.h:8,
from include/linux/cpumask.h:11,
from include/linux/rcupdate.h:40,
from include/linux/rbtree.h:34,
from include/linux/mm_types.h:9,
from include/linux/kmemcheck.h:4,
from include/linux/skbuff.h:18,
from drivers/net/wireless/ath/ath10k/wmi.c:18:
>> drivers/net/wireless/ath/ath10k/wmi.c:2239:14: error: 'struct wmi_mgmt_rx_ev_arg' has no member named 'ext_info'
memcpy(&arg->ext_info, ext_info,
^
arch/sparc/include/asm/string_64.h:25:42: note: in definition of macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^
>> drivers/net/wireless/ath/ath10k/wmi.c:2240:17: error: invalid application of 'sizeof' to incomplete type 'struct wmi_mgmt_rx_ext_info'
sizeof(struct wmi_mgmt_rx_ext_info));
^
arch/sparc/include/asm/string_64.h:25:48: note: in definition of macro 'memcpy'
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
^
vim +/WMI_RX_STATUS_EXT_INFO +2236 drivers/net/wireless/ath/ath10k/wmi.c
2230 arg->rate = ev_hdr->rate;
2231
2232 msdu_len = __le32_to_cpu(arg->buf_len);
2233 if (skb->len < msdu_len)
2234 return -EPROTO;
2235
> 2236 if (le32_to_cpu(arg->status) & WMI_RX_STATUS_EXT_INFO) {
2237 len = ALIGN(le32_to_cpu(arg->buf_len), 4);
2238 ext_info = (struct wmi_mgmt_rx_ext_info *)(skb->data + len);
> 2239 memcpy(&arg->ext_info, ext_info,
> 2240 sizeof(struct wmi_mgmt_rx_ext_info));
2241 }
2242
2243 /* Make sure bytes added for padding are removed. */
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 45113 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4
2016-02-26 19:05 [PATCH] ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4 Peter Oh
2016-02-26 19:35 ` kbuild test robot
@ 2016-03-08 9:31 ` Valo, Kalle
2016-03-08 17:32 ` Oh, Peter
1 sibling, 1 reply; 4+ messages in thread
From: Valo, Kalle @ 2016-03-08 9:31 UTC (permalink / raw)
To: Oh, Peter; +Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Peter Oh <poh@qca.qualcomm.com> writes:
> Check and parse Rx MAC timestamp when firmware sets its flag
> to status variable.
> 10.4 firmware adds it in Rx beacon frame only at this moment.
> Drivers and mac80211 may utilize it to detect such clockdrift
> or beacon collision and use the result for beacon collision
> avoidance.
>
> Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Like kbuild noticed this fails to build:
drivers/net/wireless/ath/ath10k/wmi.c: In function 'ath10k_wmi_10_4_op_pull_mgmt_rx_ev':
drivers/net/wireless/ath/ath10k/wmi.c:2236:40: error: 'WMI_RX_STATUS_EXT_INFO' undeclared (first use in this function)
drivers/net/wireless/ath/ath10k/wmi.c:2236:40: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/wireless/ath/ath10k/wmi.c:2239:24: error: 'struct wmi_mgmt_rx_ev_arg' has no member named 'ext_info'
drivers/net/wireless/ath/ath10k/wmi.c:2239:53: error: invalid application of 'sizeof' to incomplete type 'struct wmi_mgmt_rx_ext_info'
Please resend.
--
Kalle Valo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4
2016-03-08 9:31 ` Valo, Kalle
@ 2016-03-08 17:32 ` Oh, Peter
0 siblings, 0 replies; 4+ messages in thread
From: Oh, Peter @ 2016-03-08 17:32 UTC (permalink / raw)
To: Valo, Kalle; +Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
On 03/08/2016 01:31 AM, Valo, Kalle wrote:
> Peter Oh <poh@qca.qualcomm.com> writes:
>
>> Check and parse Rx MAC timestamp when firmware sets its flag
>> to status variable.
>> 10.4 firmware adds it in Rx beacon frame only at this moment.
>> Drivers and mac80211 may utilize it to detect such clockdrift
>> or beacon collision and use the result for beacon collision
>> avoidance.
>>
>> Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
> Like kbuild noticed this fails to build:
>
> drivers/net/wireless/ath/ath10k/wmi.c: In function 'ath10k_wmi_10_4_op_pull_mgmt_rx_ev':
> drivers/net/wireless/ath/ath10k/wmi.c:2236:40: error: 'WMI_RX_STATUS_EXT_INFO' undeclared (first use in this function)
> drivers/net/wireless/ath/ath10k/wmi.c:2236:40: note: each undeclared identifier is reported only once for each function it appears in
> drivers/net/wireless/ath/ath10k/wmi.c:2239:24: error: 'struct wmi_mgmt_rx_ev_arg' has no member named 'ext_info'
> drivers/net/wireless/ath/ath10k/wmi.c:2239:53: error: invalid application of 'sizeof' to incomplete type 'struct wmi_mgmt_rx_ext_info'
>
> Please resend.
Because it has dependency on " ath10k: set MAC timestamp in management
Rx frame", but I didn't set its dependency.
Let me re-send this patch once after the parent commit is merged.
Thanks,
Peter
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-08 17:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26 19:05 [PATCH] ath10k: parse Rx MAC timestamp in mgmt frame for FW 10.4 Peter Oh
2016-02-26 19:35 ` kbuild test robot
2016-03-08 9:31 ` Valo, Kalle
2016-03-08 17:32 ` Oh, Peter
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).