Skip to content

gk710x: enable WPA crypto in kernel configs - #2258

Merged
widgetii merged 2 commits into
OpenIPC:masterfrom
shipa-2:pr/gk710x-wpa-crypto
Aug 29, 2026
Merged

gk710x: enable WPA crypto in kernel configs#2258
widgetii merged 2 commits into
OpenIPC:masterfrom
shipa-2:pr/gk710x-wpa-crypto

Conversation

@shipa-2

@shipa-2 shipa-2 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Enable CONFIG_CRYPTO_CCM, CONFIG_CRYPTO_CTR, CONFIG_CRYPTO_SEQIV, and CONFIG_CRYPTO_SHA256 in gk710x / gk710xs generic kernel configs for WPA2.

Test plan

  • Rebuild gk7102_lite / gk7102s_lite kernel; confirm crypto options are set
  • WPA2 association works with an appropriate Wi-Fi driver

Part of splitting #2256.

Made with Cursor

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

gk710x/gk710xs: enable kernel crypto options required for WPA2

⚙️ Configuration changes ✨ Enhancement 🕐 Less than 10 minutes

Grey Divider

AI Description

• Enable CCM/CTR/SEQIV/SHA256 crypto primitives in GK710x defconfigs for WPA2.
• Apply the same WPA-related crypto settings to both gk710x and gk710xs configs.
Diagram

graph TD
  A["Build system"] --> B["gk710x defconfig"] --> D("Kernel build") --> E["Kernel crypto"] --> F["WPA2 Wi-Fi"]
  A --> C["gk710xs defconfig"] --> D
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Factor crypto settings into a shared config fragment
  • ➕ Avoids duplicating identical WPA crypto options across gk710x and gk710xs configs
  • ➕ Reduces future drift when adding/removing required crypto primitives
  • ➖ May require build-system support for merging fragments (or a small refactor)
  • ➖ Slightly less direct to read compared to a single monolithic defconfig
2. Build crypto options as modules (m) instead of built-in (y)
  • ➕ Potentially reduces base kernel image size if modules can be omitted/loaded on demand
  • ➕ Allows field updates to crypto modules without full kernel replacement (platform permitting)
  • ➖ WPA2 association may fail if modules aren’t available/auto-loaded early enough
  • ➖ Embedded deployments often ship without module loader or with immutable rootfs

Recommendation: The PR’s approach (setting the required crypto options to built-in in both defconfigs) is appropriate for ensuring WPA2 works reliably on minimal embedded images. If these two defconfigs are expected to stay in lockstep, consider a follow-up to centralize the shared WPA crypto options into a common fragment to prevent future divergence.

Files changed (2) +8 / -8

Other (2) +8 / -8
gk710x.generic.configEnable CCM/CTR/SEQIV/SHA256 crypto for WPA2 +4/-4

Enable CCM/CTR/SEQIV/SHA256 crypto for WPA2

• Turns on CONFIG_CRYPTO_CCM, CONFIG_CRYPTO_CTR, CONFIG_CRYPTO_SEQIV, and CONFIG_CRYPTO_SHA256. These kernel crypto primitives are commonly required for WPA2 (CCMP/AES-CCM and related helpers).

br-ext-chip-goke/board/gk710x/gk710x.generic.config

gk710xs.generic.configMatch gk710x WPA2 crypto enables in gk710xs config +4/-4

Match gk710x WPA2 crypto enables in gk710xs config

• Mirrors the same crypto option enables as gk710x: CCM, CTR, SEQIV, and SHA256. Keeps GK7102S generic kernel configuration aligned for WPA2 capability.

br-ext-chip-goke/board/gk710x/gk710xs.generic.config

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@flyrouter flyrouter left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No major objections if it’s really necessary.
However, as with other Goke cores, it might be worth setting these some options via =m

Turn on CCM, CTR, SEQIV and SHA256 needed for WPA2 on GK7102/GK7102S.

Co-authored-by: Cursor <cursoragent@cursor.com>
@widgetii
widgetii force-pushed the pr/gk710x-wpa-crypto branch from d2282ca to 236b7db Compare August 28, 2026 18:55
Per @flyrouter's review. Every other Goke core in the tree ships these as
modules and only SHA256 built in:

  gk7201v200 gk7202v300 gk7205v200 gk7205v300 gk7205v500 gk7605v100
    CONFIG_CRYPTO_CCM=m  CONFIG_CRYPTO_SEQIV=m  CONFIG_CRYPTO_CTR=m
    CONFIG_CRYPTO_SHA256=y

gk710x/gk710xs were the only Goke configs setting all four =y, which puts
three crypto implementations into the kernel image on the most flash
constrained parts of the family. The kernel crypto API loads these on
demand, which is why =m works everywhere else.

CCM, SEQIV and CTR -> =m; SHA256 stays =y. The four symbols now match the
other six cores exactly.
@widgetii

Copy link
Copy Markdown
Member

@flyrouter's suggestion was right, and it turns out to be unanimous rather than a
preference — pushed as 5291924.

Every other Goke core in the tree ships these as modules, with only SHA256 built in:

core CCM SEQIV CTR SHA256
gk7201v200 =m =m =m =y
gk7202v300 =m =m =m =y
gk7205v200 =m =m =m =y
gk7205v300 =m =m =m =y
gk7205v500 =m =m =m =y
gk7605v100 =m =m =m =y

Six out of six. gk710x/gk710xs as submitted were the only Goke configs setting all
four =y, which puts three crypto implementations into the kernel image — on the
oldest and most flash-constrained parts of the family, where it is least
affordable. The kernel crypto API loads these on demand, which is why =m works
on the other six.

CCM, SEQIV and CTR are now =m; SHA256 stays =y. The four symbols match the
other cores exactly.

@shipa-2 — I pushed this to your branch rather than waiting, since the PR had been
idle since the review and the change is mechanical. Two other things for the
record:

  • I rebased the branch onto master earlier (it was 40-odd commits behind and its
    queued CI predated the matrix-narrowing selector, so it was showing 98 red
    builds that were really cancellations). It now builds gk7102_lite and
    gk7102s_lite — the two boards this can actually affect.
  • Your test plan is still unchecked: neither "confirm crypto options are set" nor
    "WPA2 association works" was ticked. CI proves the kernel builds with these
    symbols, which is not the same as proving WPA2 associates. If you have a gk710x
    board with Wi-Fi, that result would be worth having on the record here — merging
    on the strength of convention plus a green build, not on a hardware test.

@widgetii
widgetii merged commit 24deb83 into OpenIPC:master Aug 29, 2026
17 checks passed
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.

3 participants