-
Notifications
You must be signed in to change notification settings - Fork 114
Update cfg80211.c #438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: asahi
Are you sure you want to change the base?
Update cfg80211.c #438
Conversation
"If we couldn't ask the chip if OKC is supported, assume it is NOT supported and do not try to use it." This ensures that if any code later in the connection process checks if (profile->is_okc) ..., it will evaluate to false and skip OKC logic, preventing a potential second error where the driver tries to enable a feature the chip doesn't support. Signed-off-by: Murat Cyberfu <murat@cyberfu.co.uk>
|
This code is upstream and doesn't affect any of our downstream patches or Apple Silicon-specific drivers or functions. Please directly submit it upstream. |
|
|
|
Sorry about that, got confused with my branches and though that was upstream already! |
| if (err) { | ||
| bphy_err(drvr, "could not get wpa_auth (%d)\n", err); | ||
| return err; | ||
| profile->is_okc = false; // If we couldn't ask the chip if OKC is supported, assume it is NOT supported and do not try to use it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how profile->is_okc could be true at this point. It is explictly set to false just 8 llines above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return must not be removed otherwise val might be used without initialization
| &okc_enable); | ||
| if (err) { | ||
| bphy_err(drvr, "get okc_enable failed (%d)\n", err); | ||
| profile->is_okc = false; // Again, set state so it does not try OKC if not allowed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, I do not see how this could make a difference. profile->is_okc is set to false at the beginning of this function and the places there it might be set to true are the two profile->is_okc = okc_enable; after querying "okc_enable" in lin 1944 and 1956
jannau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how this change could make any difference except for using an uninitialized value. The original code looks ok to me.
"If we couldn't ask the chip if OKC is supported, assume it is NOT supported and do not try to use it."
This ensures that if any code later in the connection process checks if (profile->is_okc) ..., it will evaluate to false and skip OKC logic, preventing a potential second error where the driver tries to enable a feature the chip doesn't support.