All of lore.kernel.org
 help / color / mirror / Atom feed
* wifi: ath11k: ipq6018 monitor mode is not working properly
@ 2022-12-05 17:04 Legale Legage
  2022-12-07 12:58 ` Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Legale Legage @ 2022-12-05 17:04 UTC (permalink / raw)
  To: ath11k

[-- Attachment #1: Type: text/plain, Size: 3223 bytes --]

Hello.
I'm trying to use wifi monitor mode on ipq6018. Captured frames are
malformed. Tested with 2 diff kernels (4.4.60, 5.14) and two diff wifi
fw (2.6, 2.7) with the same result.

This is the same frame captured with ipq6018 device and other device
where monitor mode is good.
a.pcap - good frame
b.pcap - ipq6018 bad frame

capture log:

uname -a
Linux AP_44D1FABC0E5D 4.4.60 #0 SMP PREEMPT Sun Oct 30 18:03:10 2022
armv7l GNU/Linux

root@AP_44D1FABC0E5D:~# lspci -mnn
EMPTY

root@AP_44D1FABC0E5D:~# find /lib/firmware/ath11k/ -type f | xargs md5sum
4da75061213f0feebfffb08012a5c042  /lib/firmware/ath11k/IPQ6018/hw1.0/board-2.bin
105e71aab77b4329f7f238b6107d0981  /lib/firmware/ath11k/IPQ6018/hw1.0/board.bin
d7d615b13a2f6290588823061c111b7c
/lib/firmware/ath11k/IPQ6018/hw1.0/qdss_trace_config.bin
e5fd4f90ddbaec15464d405b2b397ef6  /lib/firmware/ath11k/IPQ6018/hw1.0/caldata.bin


root@AP_44D1FABC0E5D:~# dmesg | grep ath11k
[   13.355395] ath11k c000000.wifi: Not multipd architecture
[   13.355726] ath11k c000000.wifi: ipq6018 hw1.0
[   14.324779] ath11k c000000.wifi: chip_id 0x0 chip_family 0x4
board_id 0xff soc_id 0xffffffff
[   14.324806] ath11k c000000.wifi: fw_version 0x270206d0
fw_build_timestamp 2022-08-04 13:11 fw_build_id
QC_IMAGE_VERSION_STRING=WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
[   14.355336] ath11k c000000.wifi: qmi caldata downloaded: type: 2
[   17.564797] ath11k c000000.wifi: chip_id 0x0 chip_family 0x4
board_id 0xff soc_id 0xffffffff
[   17.564831] ath11k c000000.wifi: fw_version 0x270206d0
fw_build_timestamp 2022-08-04 13:11 fw_build_id
QC_IMAGE_VERSION_STRING=WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
[   17.578868] ath11k c000000.wifi: qmi caldata downloaded: type: 2
[   17.705747] applying ath11k-macs


root@AP_44D1FABC0E5D:~# iw phy phy1 interface add mon1 type monitor
root@AP_44D1FABC0E5D:~# ip link set mon1 up
root@AP_44D1FABC0E5D:~#
root@AP_44D1FABC0E5D:~# tcpdump -i mon1 -s 100 -c 20 -w /tmp/dump.cap
tcpdump: listening on mon1, link-type IEEE802_11_RADIO (802.11 plus
radiotap header), capture size 100 bytes
20 packets captured
92 packets received by filter
0 packets dropped by kernel
root@AP_44D1FABC0E5D:~# hexdump -C /tmp/dump.cap
00000000  d4 c3 b2 a1 02 00 04 00  00 00 00 00 00 00 00 00  |................|
00000010  64 00 00 00 7f 00 00 00  3a 50 8c 63 18 2b 03 00  |d.......:P.c.+..|
00000020  64 00 00 00 36 01 00 00  00 00 24 00 2f 48 10 00  |d...6.....$./H..|
00000030  96 2d fd 30 0e 00 00 00  40 16 6c 09 a0 00 a4 00  |.-.0....@.l.....|
00000040  00 00 00 00 b5 a7 00 00  00 00 00 00 ac 11 02 00  |................|
00000050  00 00 b5 a7 80 00 00 00  ff ff ff ff ff ff f4 b7  |................|
00000060  8d 35 42 78 f4 b7 8d 35  42 78 40 7c 9f 31 ca a5  |.5Bx...5Bx@|.1..|
00000070  00 00 00 00 64 00 31 14  00 17 45 6e 67 69 4e 65  |....d.1...EngiNe|
00000080  74 2e 2e 2e 42 69 72 4c  69 6e 6b 2e 3a 50 8c 63  |t...BirLink.:P.c|
00000090  38 2c 03 00 64 00 00 00  ff 00 00 00 00 00 24 00  |8,..d.........$.|
000000a0  2f 48 10 00 96 5b fd 30  0e 00 00 00 00 16 6c 09  |/H...[.0......l.|
000000b0  a0 00 b7 00 00 00 00 00  c1 a7 00 00 00 00 00 00  |................|
000000c0  ac 11 02 00 00 00 c1 a7  80 00 00 00 ff ff ff ff  |................|

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 122070 bytes --]

[-- Attachment #3: a.pcap --]
[-- Type: application/octet-stream, Size: 297 bytes --]

[-- Attachment #4: b.pcap --]
[-- Type: application/octet-stream, Size: 259 bytes --]

[-- Attachment #5: Type: text/plain, Size: 102 bytes --]

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wifi: ath11k: ipq6018 monitor mode is not working properly
  2022-12-05 17:04 wifi: ath11k: ipq6018 monitor mode is not working properly Legale Legage
@ 2022-12-07 12:58 ` Kalle Valo
  2022-12-07 13:06   ` Robert Marko
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2022-12-07 12:58 UTC (permalink / raw)
  To: Legale Legage; +Cc: ath11k

Legale Legage <legale.legale@gmail.com> writes:

> I'm trying to use wifi monitor mode on ipq6018. Captured frames are
> malformed. Tested with 2 diff kernels (4.4.60, 5.14) and two diff wifi
> fw (2.6, 2.7) with the same result.

v4.4 was released back in 2016 and doesn't even have ath11k. v5.14 was
released over a year ago so is considered old from ath11k point of view.
Please try a more recent kernel, preferably v6.0.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wifi: ath11k: ipq6018 monitor mode is not working properly
  2022-12-07 12:58 ` Kalle Valo
@ 2022-12-07 13:06   ` Robert Marko
  2022-12-07 13:13     ` Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Marko @ 2022-12-07 13:06 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Legale Legage, ath11k

On Wed, Dec 7, 2022 at 1:58 PM Kalle Valo <kvalo@kernel.org> wrote:
>
> Legale Legage <legale.legale@gmail.com> writes:
>
> > I'm trying to use wifi monitor mode on ipq6018. Captured frames are
> > malformed. Tested with 2 diff kernels (4.4.60, 5.14) and two diff wifi
> > fw (2.6, 2.7) with the same result.
>
> v4.4 was released back in 2016 and doesn't even have ath11k. v5.14 was
> released over a year ago so is considered old from ath11k point of view.
> Please try a more recent kernel, preferably v6.0.

I am gonna guess that 4.4.60 is QCA downstream kernel.
The issue with mainline kernels is that there is no remoteproc support
for IPQ8074 nor
IPQ6018, I have been working towards getting the IPQ8074 and its working with
remoteproc patches added but the situation is not ideal as for example
coldboot calibration
does not work which could be a bug in the remoteproc patches I am using.

Regards,
Robert
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>
> --
> ath11k mailing list
> ath11k@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath11k



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wifi: ath11k: ipq6018 monitor mode is not working properly
  2022-12-07 13:06   ` Robert Marko
@ 2022-12-07 13:13     ` Kalle Valo
  2022-12-07 13:27       ` Robert Marko
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2022-12-07 13:13 UTC (permalink / raw)
  To: Robert Marko; +Cc: Legale Legage, ath11k

Robert Marko <robert.marko@sartura.hr> writes:

> On Wed, Dec 7, 2022 at 1:58 PM Kalle Valo <kvalo@kernel.org> wrote:
>>
>> Legale Legage <legale.legale@gmail.com> writes:
>>
>> > I'm trying to use wifi monitor mode on ipq6018. Captured frames are
>> > malformed. Tested with 2 diff kernels (4.4.60, 5.14) and two diff wifi
>> > fw (2.6, 2.7) with the same result.
>>
>> v4.4 was released back in 2016 and doesn't even have ath11k. v5.14 was
>> released over a year ago so is considered old from ath11k point of view.
>> Please try a more recent kernel, preferably v6.0.
>
> I am gonna guess that 4.4.60 is QCA downstream kernel.

Ah, for any QSDK issues I'll raise my hands up and not going to touch
them. This list is only for kernel.org releases, any distro kernel bugs
need to be reported directly to distros. I do not know what out-of-tree
patches distros have.

> The issue with mainline kernels is that there is no remoteproc support
> for IPQ8074 nor IPQ6018, I have been working towards getting the
> IPQ8074 and its working with remoteproc patches added but the
> situation is not ideal as for example coldboot calibration does not
> work which could be a bug in the remoteproc patches I am using.

Nice, do you have the patches available somewhere? What distro are you
using?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wifi: ath11k: ipq6018 monitor mode is not working properly
  2022-12-07 13:13     ` Kalle Valo
@ 2022-12-07 13:27       ` Robert Marko
  2022-12-08 18:36         ` Kalle Valo
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Marko @ 2022-12-07 13:27 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Legale Legage, ath11k

On Wed, Dec 7, 2022 at 2:13 PM Kalle Valo <kvalo@kernel.org> wrote:
>
> Robert Marko <robert.marko@sartura.hr> writes:
>
> > On Wed, Dec 7, 2022 at 1:58 PM Kalle Valo <kvalo@kernel.org> wrote:
> >>
> >> Legale Legage <legale.legale@gmail.com> writes:
> >>
> >> > I'm trying to use wifi monitor mode on ipq6018. Captured frames are
> >> > malformed. Tested with 2 diff kernels (4.4.60, 5.14) and two diff wifi
> >> > fw (2.6, 2.7) with the same result.
> >>
> >> v4.4 was released back in 2016 and doesn't even have ath11k. v5.14 was
> >> released over a year ago so is considered old from ath11k point of view.
> >> Please try a more recent kernel, preferably v6.0.
> >
> > I am gonna guess that 4.4.60 is QCA downstream kernel.
>
> Ah, for any QSDK issues I'll raise my hands up and not going to touch
> them. This list is only for kernel.org releases, any distro kernel bugs
> need to be reported directly to distros. I do not know what out-of-tree
> patches distros have.
>
> > The issue with mainline kernels is that there is no remoteproc support
> > for IPQ8074 nor IPQ6018, I have been working towards getting the
> > IPQ8074 and its working with remoteproc patches added but the
> > situation is not ideal as for example coldboot calibration does not
> > work which could be a bug in the remoteproc patches I am using.
>
> Nice, do you have the patches available somewhere? What distro are you
> using?

Yes, they are available on my GitHub kernel repo under the
ipq807x-next branches:
https://github.com/robimarko/linux.git

I am testing the next based branches with Buildroot as its quick and
easy as I regularly
update on newer next as I am upstreaming and stuff is getting merged.
A lot of stuff got merged so the SoC is in a way, way better shape
than a year or two ago
but we are still missing upstream remoteproc support as well as CPR
support and there is
no offloading obviously.

I am also maintaining an OpenWrt ipq807x target that is based on 5.15
and 6.1 backports
for which I plan to make a PR to get it officially included once 6.1
backports are merged.
This is what a lot of users are currently using as it's gotten into
quite a good state.
The one thing that has been bothering is move to FW 2.7 which is not
working on a number
of routers as their BDF-s were generated for way older BDF as well as
outdated regulatory
information.

Regards,
Robert
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wifi: ath11k: ipq6018 monitor mode is not working properly
  2022-12-07 13:27       ` Robert Marko
@ 2022-12-08 18:36         ` Kalle Valo
  2022-12-09 11:35           ` Robert Marko
  0 siblings, 1 reply; 7+ messages in thread
From: Kalle Valo @ 2022-12-08 18:36 UTC (permalink / raw)
  To: Robert Marko; +Cc: Legale Legage, ath11k

Robert Marko <robert.marko@sartura.hr> writes:

> On Wed, Dec 7, 2022 at 2:13 PM Kalle Valo <kvalo@kernel.org> wrote:
>> Robert Marko <robert.marko@sartura.hr> writes:
>>
>> > The issue with mainline kernels is that there is no remoteproc support
>> > for IPQ8074 nor IPQ6018, I have been working towards getting the
>> > IPQ8074 and its working with remoteproc patches added but the
>> > situation is not ideal as for example coldboot calibration does not
>> > work which could be a bug in the remoteproc patches I am using.
>>
>> Nice, do you have the patches available somewhere? What distro are you
>> using?
>
> Yes, they are available on my GitHub kernel repo under the
> ipq807x-next branches:
> https://github.com/robimarko/linux.git

Thanks, I will take a look.

> I am testing the next based branches with Buildroot as its quick and
> easy as I regularly update on newer next as I am upstreaming and stuff
> is getting merged. A lot of stuff got merged so the SoC is in a way,
> way better shape than a year or two ago but we are still missing
> upstream remoteproc support as well as CPR support and there is no
> offloading obviously.

Great that you brought this up. I have been thinking how could I do easy
and quickly do some smoke testing on IPQ8074 using latest ath11k from my
ath.git master branch and latest firmware from ath11k-firmware.git.
Currently I'm only testing PCI devices, so quite limited testing.

What you are using sounds like just what I would need as well :) Would
you happen to have any notes, pointers etc how to get started with that?
Unfortunately I can't use much time for this, so the simpler the
instructions are the better. I haven't used Buildroot for years.

> I am also maintaining an OpenWrt ipq807x target that is based on 5.15
> and 6.1 backports for which I plan to make a PR to get it officially
> included once 6.1 backports are merged. This is what a lot of users
> are currently using as it's gotten into quite a good state.

Excellent, looking forward to that.

> The one thing that has been bothering is move to FW 2.7 which is not
> working on a number of routers as their BDF-s were generated for way
> older BDF as well as outdated regulatory information.

The board files are always a major problem. But can you tell more about
this? Are you saying that firmware branches 2.5.0.1 [1] and 2.7.0.1 [2]
are using different board file formats?

[1] https://github.com/kvalo/ath11k-firmware/tree/master/IPQ8074/hw2.0/2.5.0.1

[2] https://github.com/kvalo/ath11k-firmware/tree/master/IPQ8074/hw2.0/2.7.0.1

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: wifi: ath11k: ipq6018 monitor mode is not working properly
  2022-12-08 18:36         ` Kalle Valo
@ 2022-12-09 11:35           ` Robert Marko
  0 siblings, 0 replies; 7+ messages in thread
From: Robert Marko @ 2022-12-09 11:35 UTC (permalink / raw)
  To: Kalle Valo; +Cc: Legale Legage, ath11k

On Thu, Dec 8, 2022 at 7:36 PM Kalle Valo <kvalo@kernel.org> wrote:
>
> Robert Marko <robert.marko@sartura.hr> writes:
>
> > On Wed, Dec 7, 2022 at 2:13 PM Kalle Valo <kvalo@kernel.org> wrote:
> >> Robert Marko <robert.marko@sartura.hr> writes:
> >>
> >> > The issue with mainline kernels is that there is no remoteproc support
> >> > for IPQ8074 nor IPQ6018, I have been working towards getting the
> >> > IPQ8074 and its working with remoteproc patches added but the
> >> > situation is not ideal as for example coldboot calibration does not
> >> > work which could be a bug in the remoteproc patches I am using.
> >>
> >> Nice, do you have the patches available somewhere? What distro are you
> >> using?
> >
> > Yes, they are available on my GitHub kernel repo under the
> > ipq807x-next branches:
> > https://github.com/robimarko/linux.git
>
> Thanks, I will take a look.
>
> > I am testing the next based branches with Buildroot as its quick and
> > easy as I regularly update on newer next as I am upstreaming and stuff
> > is getting merged. A lot of stuff got merged so the SoC is in a way,
> > way better shape than a year or two ago but we are still missing
> > upstream remoteproc support as well as CPR support and there is no
> > offloading obviously.
>
> Great that you brought this up. I have been thinking how could I do easy
> and quickly do some smoke testing on IPQ8074 using latest ath11k from my
> ath.git master branch and latest firmware from ath11k-firmware.git.
> Currently I'm only testing PCI devices, so quite limited testing.
>
> What you are using sounds like just what I would need as well :) Would
> you happen to have any notes, pointers etc how to get started with that?
> Unfortunately I can't use much time for this, so the simpler the
> instructions are the better. I haven't used Buildroot for years.

I made a BSP "layer" for IPQ8074 under Buildroot:
https://github.com/robimarko/buildroot-external-ipq807x.git

It allowed me to easily update through Buildroot versions and provide the
development packages I need.

So, you can easily use the defconfig like.
make BR2_EXTERNAL=../buildroot-external-ipq807x/ ipq807x_defconfig

And then modify the BSP layer for any board and include new packages with
menuconfig.

Do note that you need to add the DTS for new boards obviously.

BTW, I currently have to revert SCM/MDT loader changes cause I found out that
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?h=next-20221208&id=3a99f121fe0bfa4b65ff74d9e980018caf54c2d4
broke remoteproc on IPQ8074 as now it fails on qcom_scm_pas_auth_and_reset()
and I have not found out why exactly.

>
> > I am also maintaining an OpenWrt ipq807x target that is based on 5.15
> > and 6.1 backports for which I plan to make a PR to get it officially
> > included once 6.1 backports are merged. This is what a lot of users
> > are currently using as it's gotten into quite a good state.
>
> Excellent, looking forward to that.
>
> > The one thing that has been bothering is move to FW 2.7 which is not
> > working on a number of routers as their BDF-s were generated for way
> > older BDF as well as outdated regulatory information.
>
> The board files are always a major problem. But can you tell more about
> this? Are you saying that firmware branches 2.5.0.1 [1] and 2.7.0.1 [2]
> are using different board file formats?

No, they are using the same format, but it looks like some defaults
for BDF fields
that did not exist when the vendor was generating the BDF break certain boards
or the vendor did not include regulatory DB in the BDF and currently,
QCA does not
have the regdb.bin for IPQ8074 publicly available at all so on those
devices you are
stuck with the firmware fallback of WORLD regulatory.

2.7 FW is breaking most of the boards, only the ones where
vendor-generated the BDF
against newer SPF releases it kind of works but regulatory info is
still way outdated,
however Xiaomi AX6 is completely broken, remoteproc will just crash,
so far we narrowed
it is down to it being the only device using QFP4550 FEM and BDF has
some config specific for
it.

QCA removed the firmware regulatory fallback so now if your BDF
doesn't have regulatory embedded
or it just doesn't have the regDB version field set remoteproc will
crash without an external regdb.bin
which is not public.
So, we currently cannot use 2.7 FW at all which has a lot of issues
that 2.5 FW has fixed.

I am happy to share more details, we have quite a lively community
using these devices currently.

Regards,
Robert
>
> [1] https://github.com/kvalo/ath11k-firmware/tree/master/IPQ8074/hw2.0/2.5.0.1
>
> [2] https://github.com/kvalo/ath11k-firmware/tree/master/IPQ8074/hw2.0/2.7.0.1
>
> --
> https://patchwork.kernel.org/project/linux-wireless/list/
>
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



-- 
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@sartura.hr
Web: www.sartura.hr

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-12-09 11:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 17:04 wifi: ath11k: ipq6018 monitor mode is not working properly Legale Legage
2022-12-07 12:58 ` Kalle Valo
2022-12-07 13:06   ` Robert Marko
2022-12-07 13:13     ` Kalle Valo
2022-12-07 13:27       ` Robert Marko
2022-12-08 18:36         ` Kalle Valo
2022-12-09 11:35           ` Robert Marko

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.