Page MenuHomeFreeBSD

iwlwifi: adjust to make d3.c compile
ClosedPublic

Authored by bz on Jan 29 2024, 2:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 5:36 PM
Unknown Object (File)
Mar 21 2024, 3:44 AM
Unknown Object (File)
Mar 5 2024, 9:03 AM
Unknown Object (File)
Mar 5 2024, 9:03 AM
Unknown Object (File)
Mar 4 2024, 3:30 PM
Unknown Object (File)
Mar 4 2024, 12:28 AM
Unknown Object (File)
Feb 14 2024, 7:29 AM
Unknown Object (File)
Feb 3 2024, 1:49 PM

Details

Summary

struct iwl_mvm_wep_key_cmd ends in a variable sized array but later
is included in another struct followed by the actual
struct iwl_mvm_wep_key in d3.c. Make the array[0] instead of []
to avoid the warning about it being a GNU-extension.
Also include string.h explicitly for memset_after().

MFC after: 3 days

iwlwifi: add the d3 (PM) bits to the Makefile (disabled)

Add the logic to conditionally enable PM for iwlwifi.
This should help suspend/resume in the future.
For now leave it disabled until other preconditional problems are
sorted.

Sponsored by: The FreeBSD Foundation (2023)
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.Jan 29 2024, 2:32 PM
cc requested changes to this revision.Jan 29 2024, 3:41 PM

I see two "MFC after" in the summary section, and the summary section seems to contain two parts that it looks you are going to split this patch into two when you MFC it. Am I understanding correctly? Are you going to manually MFC the two parts?

sys/modules/iwlwifi/Makefile
43 ↗(On Diff #133495)

typo: "CFGLAS" ==> "CFLAGS"

This revision now requires changes to proceed.Jan 29 2024, 3:41 PM
In D43647#995353, @cc wrote:

I see two "MFC after" in the summary section, and the summary section seems to contain two parts that it looks you are going to split this patch into two when you MFC it. Am I understanding correctly? Are you going to manually MFC the two parts?

It's acutally two commits. One for the driver and one for the Makefile. Sorry, should have annotated the description given arc just combines them.

sys/modules/iwlwifi/Makefile
43 ↗(On Diff #133495)

Good catch!

bz marked an inline comment as done.Jan 29 2024, 3:55 PM
This revision is now accepted and ready to land.Jan 29 2024, 4:14 PM
sys/contrib/dev/iwlwifi/fw/api/sta.h
483

Do you know if there's any appetite for this sort of change upstream? Or maybe they are fully invested in GCC extensions.

bz marked an inline comment as done.Jan 29 2024, 8:17 PM
bz added inline comments.
sys/contrib/dev/iwlwifi/fw/api/sta.h
483

I cannot remember which way round they went in the entire Linux Kernel as a semi-policy a year or two ago; there was a lot of [0] -> [] churn I think (or the other way round).

I figured after the next update cycle I should go and check how many of the local changes we can (a) ditch (#includes maybe etc), and (b) what we can (try to) push upstream again.

This revision was automatically updated to reflect the committed changes.
bz marked an inline comment as done.
sys/contrib/dev/iwlwifi/fw/api/sta.h
483

I cannot remember which way round they went in the entire Linux Kernel as a semi-policy a year or two ago; there was a lot of [0] -> [] churn I think (or the other way round).

I figured after the next update cycle I should go and check how many of the local changes we can (a) ditch (#includes maybe etc), and (b) what we can (try to) push upstream again.

If the Linux kernel follows newer C standards (C99), I am not sure if we shall upstream this. Here is a discussion about "a flexible array".
it was standardized in C99