Skip to content

ipq40xx: map-ac2200 11-ath10k-caldata symlink fix - #13604

Closed
protectivedad wants to merge 3 commits into
openwrt:mainfrom
protectivedad:fixsymlink
Closed

protectivedad wants to merge 3 commits into
openwrt:mainfrom
protectivedad:fixsymlink

Conversation

@protectivedad

Copy link
Copy Markdown
Contributor

Fix to issue #13603. Creates a symlink to the pre-cal-data just created.

@Ansuel

Ansuel commented Oct 4, 2023

Copy link
Copy Markdown
Member

are we sure this is correct? first time I see a same BDF for precal and board...

@protectivedad

protectivedad commented Oct 4, 2023 •

Copy link
Copy Markdown
Contributor Author

I am not sure. The pci ath10k-calibration-variant (ASUS-MAP-AC2200) mentioned in the DTS doesn't show up in the board-2.bin for the QCA9888. Is it supposed to?

The device works with a dangling symlink, no symlink or a symlink to the pci pre cal data. The messages are always the same:

[   11.964540] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
[   11.965281] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   12.745107] ath10k_pci 0000:01:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[   12.745176] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   12.757962] ath10k_pci 0000:01:00.0: firmware ver 10.4-3.9.0.2-00157 api 5 features no-p2p,mfp,peer-flow-ctrl,allows-mesh-bcast,no-ps,iram-recovery crc32 812c4602
[   13.079701] ath10k_pci 0000:01:00.0: board_file api 2 bmi_id 0:17 crc32 ae4cbea5
[   14.987608] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1
[   34.259916] ath10k_pci 0000:01:00.0: Unknown eventid: 36933

Maybe the symlink is no longer necessary.

EDIT:
I have three of these devices running on a mesh using 23.05.

@protectivedad

Copy link
Copy Markdown
Contributor Author

Oh I just remembered because of the mesh I don't use the CT firmware and drivers. Not sure how that changes things.

@github-actions github-actions Bot added the target/ipq40xx pull request/issue for ipq40xx target label Oct 4, 2023
Changed sysmlink source.

Signed-off-by: Anthony Sepa <[email protected]>
@robimarko

Copy link
Copy Markdown
Contributor

Honestly, this nor the existing thing look correct to me as pre-cal or caldata are not the BDF.

@protectivedad

protectivedad commented Oct 6, 2023 •

Copy link
Copy Markdown
Contributor Author

Can I assume the dangling symlink has NO effect on the board_file being loaded by the driver?

I pulled the original boardData_2_0_QCA9888_5G_Y9484.bin that is used by the factory firmware. I moved it to /lib/firmware/ath10k/QCA9888/hw2.0/board.bin and removed the board-2.bin. The driver then uses api 1:

[   12.614301] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id 0:17 crc32 3eaf50d3

Should the symlink just be removed? Should the boardData_2_0_QCA9888_5G_Y9484.bin be submitted and added to the board-2.bin file as variant=MAP-ASUS-AC2200 and the driver uses api 1? Or should it just continue as is with it using the default in the board-2.bin and the driver the uses api 2?

[   13.079701] ath10k_pci 0000:01:00.0: board_file api 2 bmi_id 0:17 crc32 ae4cbea5

And if it is to be left using the "default" in the board-2.bin file should the variant=MAP-ASUS-AC2200 be removed from the PCI section of the DTS file. Since it is not really using the variant just the default for board-id=17 and it is confusing to have the DTS say it is?

If I've misunderstood how the pre-cal, board, firmware and driver work I apologize.

@robimarko

Copy link
Copy Markdown
Contributor

Yes, that symlink should disappear unless somebody can explain why it exists as pre-cal data is not BDF.

The proper solution would be to first check if there is a need for a custom BDF by comparing the hash from the stock FW BDF against all of the ones in upstream board-2.bin.
Then if there is no match package the BDF from stock FW with the current variant and ship that.

@protectivedad

protectivedad commented Oct 6, 2023 •

Copy link
Copy Markdown
Contributor Author

Yes, that symlink should disappear unless somebody can explain why it exists as pre-cal data is not BDF.

The proper solution would be to first check if there is a need for a custom BDF by comparing the hash from the stock FW BDF against all of the ones in upstream board-2.bin. Then if there is no match package the BDF from stock FW with the current variant and ship that.

So I have the stock BDF that the original firmware uses. What can I do to help this process along?

EDIT:
I looked in the linux kernel firmware git and there are no variants for the board-id=17. Since the crc and api's are different (as shown in the log) doesn't that mean that the custom BDF is "different" from what is in the board-2.bin?

@robimarko

Copy link
Copy Markdown
Contributor

BMI ID 17 is the common 5GHz IPQ4019 ID, I have not seen it used outside of IPQ4019 BDF-s.
To me it looks like you will need to package that stock BDF with the variant so it can be included and this symlink needs to get dropped.

@Ansuel Any insights?

@Ansuel

Ansuel commented Oct 7, 2023

Copy link
Copy Markdown
Member

@robimarko what it's not clear is where is the precal... that should always be there right? for board a generic one can be used (but it would be better to use a more specific one) but precal...

@protectivedad

protectivedad commented Oct 7, 2023 •

Copy link
Copy Markdown
Contributor Author

@robimarko what it's not clear is where is the precal... that should always be there right? for board a generic one can be used (but it would be better to use a more specific one) but precal...

Sorry, I submitted this before I was ready. The precal is there created by the script pulled from the mtd.

@protectivedad protectivedad reopened this Oct 7, 2023
@protectivedad
protectivedad deleted the fixsymlink branch October 7, 2023 20:40
@protectivedad

Copy link
Copy Markdown
Contributor Author

I was trying to change the pr to remove the symlink and bring it back up to the current main. Which messed this up nicely. Is there a way to point the pr to the new branch? Or do I have to open a new pr?

@Ansuel

Ansuel commented Oct 7, 2023

Copy link
Copy Markdown
Member

The precal is there created by the script pulled from the mtd.

ok then the board file should be extracted from the original firmware and packaged...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

target/ipq40xx pull request/issue for ipq40xx target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants