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

drivers: nrfwifi: Fix CSUM support #80882

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

krish2718
Copy link
Collaborator

@krish2718 krish2718 commented Nov 4, 2024

With introduction of Raw modes, nRF70 driver now advertises get_config OP, but doesn't implement all types.

This causes problems two-fold with checksum calculations:

  1. The "config" isn't initialized, so, every call returns different 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.

Fixes #80973

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 initialized, so, every call returns different
     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.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
@krish2718 krish2718 added this to the v4.0.0 milestone Nov 7, 2024
@DREXX-lab DREXX-lab mentioned this pull request Nov 7, 2024
@mmahadevan108 mmahadevan108 merged commit 33def30 into zephyrproject-rtos:main Nov 7, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wifi: nrf70: Unable to get DHCP when enabled raw modes
5 participants