Skip to content

fix: replace pp_page_to_nmdesc with __netmem_get_pp for kernel >= 6.17#36

Open
georgettica wants to merge 3 commits into
OnlineLearningTutorials:mainfrom
georgettica:fix/ubuntu-kernel-617-pp-page-pool-api
Open

fix: replace pp_page_to_nmdesc with __netmem_get_pp for kernel >= 6.17#36
georgettica wants to merge 3 commits into
OnlineLearningTutorials:mainfrom
georgettica:fix/ubuntu-kernel-617-pp-page-pool-api

Conversation

@georgettica
Copy link
Copy Markdown

pp_page_to_nmdesc() was removed from the kernel page_pool API in 6.17. The equivalent call in 6.17+ is:

__netmem_get_pp(page_to_netmem(page))

Tested on Ubuntu 24.04 with kernel 6.17.0-23-generic and MT7902 PCIe (PCI ID 14c3:7902). The driver builds cleanly and the chip initialises fully (firmware loads, wlp2s0 appears, SSIDs visible).

Fixes build error:
mt76.h: error: implicit declaration of function 'pp_page_to_nmdesc'

pp_page_to_nmdesc() was removed from the kernel page_pool API in 6.17.
The equivalent call in 6.17+ is:

  __netmem_get_pp(page_to_netmem(page))

Tested on Ubuntu 24.04 with kernel 6.17.0-23-generic and MT7902 PCIe
(PCI ID 14c3:7902). The driver builds cleanly and the chip initialises
fully (firmware loads, wlp2s0 appears, SSIDs visible).

Fixes build error:
  mt76.h: error: implicit declaration of function 'pp_page_to_nmdesc'
- tests/check_api_compat.sh: verifies pp_page_to_nmdesc is absent,
  __netmem_get_pp/page_to_netmem are present, MT7902 PCI ID (0x7902)
  and firmware filenames are defined, and Makefile has module_compile.
- .github/workflows/ci.yml: two jobs — static-checks (no headers
  needed) and build (installs linux-headers-generic-hwe-24.04, builds
  out-of-tree modules, verifies all 5 .ko files and MT7902 PCI ID in
  mt7921e.ko).

Co-Authored-By: Ron Green <11993626+georgettica@users.noreply.github.com>
@georgettica
Copy link
Copy Markdown
Author

once official fix is in and the repo is archived, this PR should be closed

@OnlineLearningTutorials
Copy link
Copy Markdown
Owner

@georgettica linux-7.1 kernel have official support for mt7902 in mt7921 driver. If you are able to successfully run mt7902 driver than we can update code in https://github.com/OnlineLearningTutorials/mt7902_temp/tree/main/linux-6.17/drivers/net/wireless/mediatek/mt76/mt7921 , latest is temporary folder i will remove it soon (merging to https://github.com/OnlineLearningTutorials/mt7902_temp/tree/main/linux-6.19/drivers/net/wireless/mediatek/mt76/mt7921), which working very well with 6.19 kernel I have checked, i don't know if it works with other linux kernel.

@OnlineLearningTutorials
Copy link
Copy Markdown
Owner

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.

2 participants