Attention is currently required from: Cliff Huang, Lance Zhao, Nico Huber, Paul Menzel, Subrata Banik, Subrata Banik, Tim Wawrzynczak.
6 comments:
Patchset:
Hi, I have a very general question: why is this information put into the firmware? […]
The information is put into firmware so that it's available immediately after power-on, as it handles functionality that is related to regulatory concerns. It's specific to MediaTek chipsets that support operation on 6GHz bands and OEMs that want to leverage this functionality.
File src/drivers/wifi/generic/acpi.c:
Why the weak function? Wouldn't it be an error to select USE_MTCL without […]
I was following what was previously implemented for a similar feature. get_wifi_sar_limits above defines a weak function, so I naively assumed that following the same pattern would make sense.
That said, I agree that enabling the feature without an implementation should probably fail, so I've removed it.
Patch Set #6, Line 591: CONFIG(USE_MTCL)
Putting this first would allow the compiler/linker to eliminate the other […]
Done.
Patch Set #6, Line 592: uint8_t mtcl_package[sizeof(struct wifi_mtcl)];
Why not declare a `struct wifi_mtcl`?
The ACPI function realistically needs to handle a byte array. I only added the struct to help make the format clearer, and to validate that it contains what is expected if the file is read (validation is handled in mtcl.c).
I think it's easier and more straightforward to leave the struct as an implementation detail in mtcl.c, as mentioned in the other comment related to this topic. I don't see a compelling reason to use the struct in this case.
File src/vendorcode/google/chromeos/mtcl.c:
What is chromeos specific about this?
The functionality is being added specifically for Chromebooks and ChromeOS. It is similar in many ways to the functionality in sar.c and wrdd.c in the same directory, so this seemed to be a natural place for it. Let me know if there's a better place for it.
Patch Set #6, Line 59: if (mtcl_bin_len != sizeof(struct wifi_mtcl)) {
If this function knows `struct wifi_mtcl` why isn't it used in the signature?
Because that would require callers to use this implementation, and also require all implementations to use that struct.
My goal is to keep this function easy and straightforward to call, and abstract implementation details into the function, rather than require callers to know about them.
To view, visit change 80170. To unsubscribe, or for help writing mail filters, visit settings.