fix: use __netmem_get_pp for kernel >= 6.17 in mt76_put_page_pool_buf#14
Open
georgettica wants to merge 1 commit into
Open
fix: use __netmem_get_pp for kernel >= 6.17 in mt76_put_page_pool_buf#14georgettica wants to merge 1 commit into
georgettica wants to merge 1 commit into
Conversation
pp_page_to_nmdesc() was introduced in kernel 6.13 as part of the netmem abstraction and removed in 6.17 in favour of __netmem_get_pp() + page_to_netmem(). The previous guard branched on >= 6.17 to use pp_page_to_nmdesc(), which is the exact version that removed the function, causing a build failure on 6.17+. Replace the two-way guard with a three-way guard: >= 6.17 : __netmem_get_pp(page_to_netmem(page)) [new API] >= 6.13 : pp_page_to_nmdesc(page)->pp [transitional API] < 6.13 : page->pp [original field] Tested: builds and loads on Ubuntu kernel 6.17.0-23-generic (MT7902 ASIC rev 79020000, firmware loaded, wlp2s0 interface up). Co-Authored-By: Ron Green <11993626+georgettica@users.noreply.github.com>
Author
|
based on OnlineLearningTutorials/mt7902_temp#23, I am posting the fix I made in OnlineLearningTutorials/mt7902_temp#36 here too |
Author
|
noticed there might be an official fix for these in the kernel. will wait for others to close / archive the repo and then remove the PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pp_page_to_nmdesc() was introduced in kernel 6.13 as part of the netmem abstraction and removed in 6.17 in favour of __netmem_get_pp() + page_to_netmem(). The previous guard branched on >= 6.17 to use pp_page_to_nmdesc(), which is the exact version that removed the function, causing a build failure on 6.17+.
Replace the two-way guard with a three-way guard:
Tested: builds and loads on Ubuntu kernel 6.17.0-23-generic (MT7902 ASIC rev 79020000, firmware loaded, wlp2s0 interface up).