]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
staging: rtl8723bs: use bool for traffic_status_watchdog()
authorKhushal Chitturi <khushalchitturi@gmail.com>
Thu, 12 Feb 2026 14:21:29 +0000 (19:51 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 23 Feb 2026 15:19:20 +0000 (16:19 +0100)
This patch changes the return type of traffic_status_watchdog(),
its parameter, and its local variables from u8 to bool as they
represent boolean state.

Signed-off-by: Khushal Chitturi <khushalchitturi@gmail.com>
Link: https://patch.msgid.link/20260212142131.28131-6-khushalchitturi@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c
drivers/staging/rtl8723bs/core/rtw_mlme.c
drivers/staging/rtl8723bs/include/rtw_mlme_ext.h

index 22eb6fa475b9c752603ca62c5423c05fd8a467d2..79893da86edb6f8c6f126cf1ab8a781a7b1bc4ed 100644 (file)
@@ -1125,14 +1125,14 @@ static void collect_traffic_statistics(struct adapter *padapter)
        pdvobjpriv->traffic_stat.cur_rx_tp = (u32)(pdvobjpriv->traffic_stat.cur_rx_bytes * 8 / 2 / 1024 / 1024);
 }
 
-u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer)
+bool traffic_status_watchdog(struct adapter *padapter, bool from_timer)
 {
-       u8 should_enter_ps = false;
+       bool should_enter_ps = false;
        u16 busy_threshold_high = 25;
        u16 busy_threshold_low = 10;
        u16 busy_threshold = busy_threshold_high;
-       u8 busy_traffic = false, tx_busy_traffic = false, rx_busy_traffic = false;
-       u8 higher_busy_traffic = false, higher_busy_rx_traffic = false, higher_busy_tx_traffic = false;
+       bool busy_traffic = false, tx_busy_traffic = false, rx_busy_traffic = false;
+       bool higher_busy_traffic = false, higher_busy_rx_traffic = false, higher_busy_tx_traffic = false;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
        collect_traffic_statistics(padapter);
@@ -1239,7 +1239,7 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter)
        /* if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING|_FW_UNDER_SURVEY) ==false) */
        {
                linked_status_chk(padapter);
-               traffic_status_watchdog(padapter, 0);
+               traffic_status_watchdog(padapter, false);
        }
        rtw_hal_dm_watchdog(padapter);
 
index a3d957d126de7508ccca42f20647a306d9f1c925..e0ce71e56785639fcf32e0ee69b0618fcf89b63a 100644 (file)
@@ -1643,11 +1643,11 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
        if ((adapter_to_pwrctl(adapter)->fw_current_in_ps_mode)
                && !(hal_btcoex_IsBtControlLps(adapter))
                ) {
-               u8 should_enter_ps;
+               bool should_enter_ps;
 
                linked_status_chk(adapter);
 
-               should_enter_ps = traffic_status_watchdog(adapter, 1);
+               should_enter_ps = traffic_status_watchdog(adapter, true);
                if (should_enter_ps) {
                        /* rtw_lps_ctrl_wk_cmd(adapter, LPS_CTRL_ENTER, 1); */
                        rtw_hal_dm_watchdog_in_lps(adapter);
index afa5631a441a04c6d8ac23d16e9d1bb27a4682fe..31bb09bc3534bc0895078830416e580440be2e83 100644 (file)
@@ -615,7 +615,7 @@ extern void process_addba_req(struct adapter *padapter, u8 *paddba_req, u8 *addr
 extern void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
 extern void correct_TSF(struct adapter *padapter, struct mlme_ext_priv *pmlmeext);
 extern void adaptive_early_32k(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
-extern u8 traffic_status_watchdog(struct adapter *padapter, u8 from_timer);
+extern bool traffic_status_watchdog(struct adapter *padapter, bool from_timer);
 
 int rtw_chk_start_clnt_join(struct adapter *padapter, u8 *ch, u8 *bw, u8 *offset);