Skip to content

RTL8814AU: match TX descriptor to kernel-driver field-for-field#28

Closed
josephnef wants to merge 1 commit into
masterfrom
feat/8814au-tx-descriptor-kernel-match
Closed

RTL8814AU: match TX descriptor to kernel-driver field-for-field#28
josephnef wants to merge 1 commit into
masterfrom
feat/8814au-tx-descriptor-kernel-match

Conversation

@josephnef
Copy link
Copy Markdown
Collaborator

Summary

Usbmon capture of the working morrownr/aircrack-ng kernel driver injecting a probe-request on the 8814 (channel 6, monitor mode) was diffed against devourer's TX descriptor, both 140-byte single-fragment frames. The first 32-byte descriptor block differed in seven fields. Update devourer's send_packet so the descriptor is byte-identical to the kernel-driver's.

Field Was Now Rationale
MACID 0 1 broadcast/default CAM
RATE_ID (non-VHT) 7 8 rate-table index
GID 0 63 (0x3F) no-group default
SW_DEFINE 0 1 DriverFixedRate flag
RETRY_LIMIT_ENABLE 0 1 mgmt-frame default
DATA_RETRY_LIMIT 0 12 per upstream rtl8814au_xmit.c:267
SPE_RPT 1 0 kernel does not set
DISABLE_FB 1 0 kernel does not set

Background

The previous values came from earlier WIP comments speculating about chip behavior. Live usbmon diff against the working kernel driver shows the actual field set the chip expects.

Verification

  • Devourer's first TX bulk-OUT now reads:
    64002885 01120800 0000003f 00010000 00003200 00000000 01000000 76a90000 — byte-identical to kernel-driver's TX descriptor.
  • With chip primed by the kernel driver (insmod 8814au.ko, monitor, ch6, rmmod) and devourer started with DEVOURER_SKIP_INIT=1: 781 of 781 bulk-OUT URBs complete with status=0. With the previous descriptor, URBs also completed status=0 but on-air TX never happened (the chip silently dropped frames whose descriptor field values it didn't accept).
  • 8814 RX still works end-to-end (10+ packets in demo window).

What this does NOT fix

End-to-end 8814 TX without DEVOURER_SKIP_INIT. Devourer's HAL init still leaves the chip in a state where EP 0x02 times out URBs (a separate gate, tracked in task #21). With this PR, when the chip-init gate is fixed, the descriptor will already be correct.

Test plan

  • Build green on macOS + Arch Linux 6.18
  • RX regression: 10+ packets on 0bda:8813 ch6
  • TX descriptor byte-equality with kernel-driver verified via usbmon
  • DEVOURER_SKIP_INIT=1 path: 781/781 bulk-OUT URB completions status=0

🤖 Generated with Claude Code

Usbmon capture of the working aircrack-ng/morrownr kernel driver
injecting a probe-request on the 8814 (channel 6, monitor mode) was
diffed against devourer's TX descriptor, both 140-byte single-
fragment frames. The first 32-byte descriptor block differed in
seven fields. Update devourer's send_packet so the descriptor is
byte-identical to the kernel-driver's:

  MACID                = 1   (was 0)         broadcast/default CAM
  RATE_ID (non-VHT)    = 8   (was 7)         rate-table index
  GID                  = 63  (was 0)         no-group default
  SW_DEFINE            = 1   (was 0)         DriverFixedRate flag
  RETRY_LIMIT_ENABLE   = 1   (was 0)         mgmt-frame default
  DATA_RETRY_LIMIT     = 12  (was 0)         from rtl8814au_xmit.c:267
  SPE_RPT              = 0   (was 1)         kernel does not set
  DISABLE_FB           = 0   (was 1)         kernel does not set

The previous values came from earlier WIP comments speculating about
chip behavior. Live usbmon diff against the kernel driver shows the
actual field set.

Verified on CF-938AC (0bda:8813, channel 6):

  - Devourer's first TX bulk-OUT now reads:
      64002885 01120800 0000003f 00010000 00003200 00000000 \
      01000000 76a90000
    Byte-identical to kernel-driver's TX descriptor.

  - With chip primed by the kernel driver (insmod 8814au.ko, set
    monitor, set ch 6, rmmod) and devourer started with
    DEVOURER_SKIP_INIT=1: 781 of 781 bulk-OUT URBs complete with
    status=0 (chip ACKs every URB). With the previous descriptor,
    URBs completed status=0 too but on-air TX never happened — the
    chip silently dropped frames whose descriptor field values it
    didn't accept.

  - 8814 RX still works end-to-end (10+ packets in demo window).

Note: this does NOT make devourer's full-init TX work end-to-end.
Devourer's HAL init still leaves the chip in a state where EP 0x02
times out URBs (a separate gate). With this PR landed, when the
chip-init gate is fixed, the descriptor will already be correct;
without it, that future work would still produce silently-dropped
frames on-air.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@josephnef
Copy link
Copy Markdown
Collaborator Author

Closing per user request — value comes only when TX works end-to-end. Will bundle the descriptor change into the eventual PR that fixes the chip-init gate as well.

@josephnef josephnef closed this May 22, 2026
@josephnef josephnef deleted the feat/8814au-tx-descriptor-kernel-match branch May 22, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant