DKMS doesn't set KVER, it sets KERNELRELEASE which makes the build for another kernel link against the running kernel.
Set KVER conditionaly to KERNELRELEASE if this one is set, otherwise, fallback to the old behavior.
rtlwifi_new: Add a test to Makefile to determine the number of args for rtl_rate_alloc()
Commit 6cb5f3ea4654f in the mainline kernel fixed a bug in mac80211 that
was backported to all stable kernels. When this happened, it was no longer
possible to use LINUX_VERSION_CODE to determine which form of
rtl_rate_alloc() should be used.
This fix adds a few lines to Makefile that test the definition of that
routine in the include directory. If it does not contain a second argument,
a special symbol is defined and tested in rc.c. With this change, a
single set of sources should once again build on all recent kernels.
Signed-off-by: Larry Finger <email address hidden>