]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: rtl8723bs: remove function pointer c2h_handler
authorMichael Straube <straube.linux@gmail.com>
Tue, 15 Jul 2025 18:28:07 +0000 (20:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2025 07:38:44 +0000 (09:38 +0200)
Remove function pointer c2h_handler and use c2h_handler_8723b directly
to reduce code complexity.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20250715182814.212708-5-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/hal/hal_intf.c
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
drivers/staging/rtl8723bs/include/hal_intf.h

index a168852cb6c7259222b5a0e010bc39a20581b86f..beb4272a0992623f9e832002253c095a744ece5b 100644 (file)
@@ -308,11 +308,7 @@ bool rtw_hal_c2h_valid(struct adapter *adapter, u8 *buf)
 
 s32 rtw_hal_c2h_handler(struct adapter *adapter, u8 *c2h_evt)
 {
-       s32 ret = _FAIL;
-
-       if (adapter->HalFunc.c2h_handler)
-               ret = adapter->HalFunc.c2h_handler(adapter, c2h_evt);
-       return ret;
+       return c2h_handler_8723b(adapter, c2h_evt);
 }
 
 c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter)
index b746e3e05d169849d6e1d47248e5ae1d6d727a43..10224d09688655c8032239761b3c3cd3ed091b33 100644 (file)
@@ -1317,7 +1317,6 @@ void rtl8723b_set_hal_ops(struct hal_ops *pHalFunc)
 {
        pHalFunc->xmit_thread_handler = &hal_xmit_handler;
 
-       pHalFunc->c2h_handler = c2h_handler_8723b;
        pHalFunc->c2h_id_filter_ccx = c2h_id_filter_ccx_8723b;
 
        pHalFunc->fill_h2c_cmd = &FillH2CCmd8723B;
index 72ae4cdcf0dd607a7496e861698e7ccd56d682f8..64f5d7b582583aeb6fe880d2c4395f6df8e1ef7f 100644 (file)
@@ -163,7 +163,6 @@ typedef s32 (*c2h_id_filter)(u8 *c2h_evt);
 struct hal_ops {
        s32 (*xmit_thread_handler)(struct adapter *padapter);
        void (*hal_reset_security_engine)(struct adapter *adapter);
-       s32 (*c2h_handler)(struct adapter *padapter, u8 *c2h_evt);
        c2h_id_filter c2h_id_filter_ccx;
 
        s32 (*fill_h2c_cmd)(struct adapter *, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);