net: rtl88xx: use null nic_hdl for _init_timer() without checking adapter 39/259539/1 accepted/tizen/unified/20210610.022618 submit/tizen/20210609.103936
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 9 Jun 2021 09:10:06 +0000 (18:10 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Wed, 9 Jun 2021 09:45:26 +0000 (18:45 +0900)
In linux case, _init_timer() does not use nic_hdl, the 2nd argument,
from drivers/net/wireless/rtl8812au/include/osdep_service_linux.h and
rlt88xx should register timer even there is null adapter, otherwise
interface-up causes mod_timer crash.

Change-Id: I30addc152c197e0243b9b58e8108799f0f94330c
Fixes: commit 52ddac0afb83 ("net: rtl88xx: fix to check null adapter")
Reported-by: Cheoleun Moon <chleun.moon@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/net/wireless/rtl8812au/os_dep/osdep_service.c

index 36d793d..bed0639 100644 (file)
@@ -1183,11 +1183,8 @@ void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc, void *ctx)
 {
        _adapter *adapter = (_adapter *)padapter;
 
-       if (!adapter)
-               return;
-
 #ifdef PLATFORM_LINUX
-       _init_timer(ptimer, adapter->pnetdev, pfunc, ctx);
+       _init_timer(ptimer, NULL, pfunc, ctx);
 #endif
 #ifdef PLATFORM_FREEBSD
        _init_timer(ptimer, adapter->pifp, pfunc, ctx);