Patch files not kept when using quilt and doing "make package/.../update"

I am writing you because I'm currently trying to create a custom patch for a wireless driver (wil6210).

I already pateched other packages (like iperf), for other projects, and I never encountered this issue before.

These are the steps I'm following, using quilt and according to the OpenWrt documentation (I observed the same problem both using LEDE 17 and OpenWrt 19.07.2, and both when relying on Ubuntu 16 LTS and Ubuntu 19.10 to host the build system).

All these commands are executed from the main OpenWrt directory:

$ make package/kernel/mac80211/{clean,prepare} V=s QUILT=1
$ cd build_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/backports-4.19.98-1/drivers/net/wireless/ath/wil6210/
$ quilt push -a
$ quilt new 999-0001-example-patch.patch
$ EDITOR=subl quilt edit cfg80211.c
$ quilt refresh
$ cd ../../../../../..
$ cd ../..
$ cd ..
$ make package/kernel/mac80211/update V=s
$ make package/kernel/mac80211/{clean,compile} package/index V=s

The problem I'm observing is that, after creating/updating the patch file with quilt refresh, when I launch make package/kernel/mac80211/update V=s, I would expect the .patch file to be copied from the corresponding directory inside build_dir to the one inside package (i.e. ./package/kernel/mac80211/patches), but this is not happening, and when I use make package/kernel/mac80211/{clean,compile} package/index V=s the patch is completely lost in the clean operation, as it was available only inside build_dir.

This is instead different when I try to patch another package like iperf as everything goes fine and I can find the right .patch file inside the corresponding directory in package (./package/network/utils/iperf/patches).

As a workaround, I'm currently creating the patch file and then manually moving it from build_dir to package, after make package/.../update, but do you know why I'm observing this behavior? Is it due to something wrong I'm doing in the patch creation procedure?

Thank you very much in advance!

I have the same problem. Did you solve it?