Skip to content
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

Fix crash unprogrammed board #80858

Merged

Conversation

krish2718
Copy link
Collaborator

@krish2718 krish2718 commented Nov 4, 2024

In case the driver UP fails, the FMAC context will be NULL, so, add a
NULL check in the DOWN.

Fixes a crash seen when working with unprogrammed OTP (no MAC) that
fails the interface UP.

Fixes #80972

@krish2718 krish2718 added this to the v4.0.0 milestone Nov 4, 2024
@zephyrbot zephyrbot added the area: Wi-Fi Wi-Fi label Nov 4, 2024
@zephyrbot zephyrbot requested a review from Kludentwo November 4, 2024 16:18
@zephyrbot
Copy link
Collaborator

zephyrbot commented Nov 4, 2024

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff
hal_nordic zephyrproject-rtos/hal_nordic@cb7600a zephyrproject-rtos/hal_nordic@2d78179 (master) zephyrproject-rtos/[email protected]

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@zephyrbot zephyrbot added manifest manifest-hal_nordic DNM This PR should not be merged (Do Not Merge) labels Nov 4, 2024
jukkar
jukkar previously approved these changes Nov 5, 2024
In case the driver UP fails, the FMAC context will be NULL, so, add a
NULL check in the DOWN.

Fixes a crash seen when working with unprogrammed OTP (no MAC) that
fails the interface UP.

Signed-off-by: Chaitanya Tata <[email protected]>
Fix the noise during boot.

Signed-off-by: Chaitanya Tata <[email protected]>
With introduction of Raw modes, nRF70 driver now advertises get_c
onfig OP, but doesn't implement all types.

This causes problems two-fold with checksum calculations:
  1. The "config" isn't uninitialized, so, every call returns differnet
     values. So, for UDP header checksum would be done and
     pkt->chksumdone would be set. But for IPv4 header checksum might be
     skipped.
  2. Even if we initialize to zero, then network stack gets all zeros
     and calculates checksum by itself rendering offload moot.

There is another problem in #1, as there is only single flag for pkt for
all checksum, nRF70 driver sees this and tells UMAC to skip checksum for
the entire packet. The design isn't coherent, and should be converted to
communicate per-type checksum status (some are filled by network stack
and some HW).

But as nRF70 support all checksum offloads, advertise all types for both
RX and TX.

Upstream PR #: 80882

Signed-off-by: Chaitanya Tata <[email protected]>
@krish2718 krish2718 force-pushed the fix_crash_unprogrammed_board branch from 39abdb4 to b07f308 Compare November 5, 2024 07:12
@zephyrbot zephyrbot removed the DNM This PR should not be merged (Do Not Merge) label Nov 5, 2024
@jukkar
Copy link
Member

jukkar commented Nov 5, 2024

You have [fromlist] tag in the commit subject, please remove it from upstream commits.

@krish2718
Copy link
Collaborator Author

You have [fromlist] tag in the commit subject, please remove it from upstream commits.

Thanks, I had by mistake push from the downstream fork, resolved it now.

@dkalowsk dkalowsk merged commit 9705fc0 into zephyrproject-rtos:main Nov 6, 2024
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wifi: nrf70: Crash when working with unprogrammed MAC addresss OTP board
5 participants