How to patch kernel from package

Hello. I'm trying to build wifi driver for bpi-r2 on openwrt.

This driver contains kernel modules, so I'm trying to pack it like kernel package.
But it also needs to modify kernel source tree. I could not find good examples of package,
which modify kernel source. Is it possible with openwrt ?