mac80211: update to version 5.9.1
[openwrt/staging/nbd.git] / package / kernel / qca-nss-dp / patches / 0011-03-nss_dp_main-swap-dp_exit-function-call.patch
1 From ab7b1a361d51157118e1a61ce6530a59bcef4b61 Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Tue, 16 Apr 2024 16:10:09 +0200
4 Subject: [PATCH 3/6] nss_dp_main: swap dp_exit function call
5
6 First unregister nss_dp platform devices then cleanup the HAL.
7
8 This is to fix kernel panic by cleaning data that needs to be used by
9 platform driver unregister functions.
10
11 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
12 ---
13 nss_dp_main.c | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16 --- a/nss_dp_main.c
17 +++ b/nss_dp_main.c
18 @@ -1163,6 +1163,8 @@ int __init nss_dp_init(void)
19 */
20 void __exit nss_dp_exit(void)
21 {
22 + platform_driver_unregister(&nss_dp_drv);
23 +
24 /*
25 * TODO Move this to soc_ops
26 */
27 @@ -1170,8 +1172,6 @@ void __exit nss_dp_exit(void)
28 nss_dp_hal_cleanup();
29 dp_global_ctx.common_init_done = false;
30 }
31 -
32 - platform_driver_unregister(&nss_dp_drv);
33 }
34
35 module_init(nss_dp_init);