ath10k-ct: Fix spectral scan NULL pointer
authorRobert Marko <robimarko@gmail.com>
Mon, 29 Nov 2021 11:46:54 +0000 (12:46 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 29 Nov 2021 20:48:03 +0000 (21:48 +0100)
commit040c02497c56c17d8cf04f9b8b535967d7c3b10e
tree14179d4b41207d1a801c9da013722ed4b3751efe
parent22f85d63cf47450604c0256b332942e845b1079f
ath10k-ct: Fix spectral scan NULL pointer

If spectral scan support is enabled then ath10k-ct will cause a NULL
pointer due to relay_open() being called with a const callback struct
which is only supported in kernel 5.11 and later.

So, simply check the kernel version and if 5.11 and newer use the const
callback struct, otherwise use the regular struct.

Fixes: 553a3ac ("ath10k-ct: use 5.15 version")
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/kernel/ath10k-ct/patches/300-ath10k-ct-Fix-spectral-scan-NULL-pointer.patch [new file with mode: 0644]