kaloz / mwlwifi

mac80211 driver for the Marvell 88W8864 802.11ac chip
397 stars 119 forks source link

remove uaccess and pci-dma-compat calls for Kernel 5.18 and above #415

Closed stklcode closed 12 months ago

stklcode commented 1 year ago

Remove force_uaccess_* API usage for Kernel 5.18. The entire get_fs logic was removed [1] and the underlying read/write logic refactored, s.t. there should be no need to set the address boundaries anymore.

Also replace calls from pci-dma-compat.h which have been removed in 5.18, too [2] with direct DMA calls, so that the module compiles against modern kernel versions. This should be backwards compatible until 2.6, as most of this stuff has always been convenience (unless the logic was patched in downstream projects)

Tested in OpenWRT with Kernel 5.15 and 6.1 on a Linksys WRT1900ACS router with 88W8864 chips.

[1] https://github.com/torvalds/linux/commit/967747bbc084b93b54e66f9047d342232314cd25

[2] https://github.com/torvalds/linux/commit/7968778914e53788a01c2dee2692cab157de9ac

danpawlik commented 1 year ago

@kaloz hey, could you have a look on that PR please?

stklcode commented 1 year ago

Added upstream commit references to the commit messages without changing the code.