Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd09ff95 authored by Larry Finger's avatar Larry Finger Committed by John W. Linville
Browse files

rtlwifi: Remove extra workqueue for enter/leave power state



When the rtlwifi family of drivers was converted to use a workqueue when
entering or leaving power save mode (commits a269913c, a5ffbe0a,
41affd52, b9116b9a, and 6539306b), the code began scheduling work from
the callback routine of a different workqueue with a resulting increase in
overhead.

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 560e334d
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -1401,12 +1401,9 @@ void rtl_watchdog_wq_callback(void *data)
		if (((rtlpriv->link_info.num_rx_inperiod +
		if (((rtlpriv->link_info.num_rx_inperiod +
		      rtlpriv->link_info.num_tx_inperiod) > 8) ||
		      rtlpriv->link_info.num_tx_inperiod) > 8) ||
		    (rtlpriv->link_info.num_rx_inperiod > 2))
		    (rtlpriv->link_info.num_rx_inperiod > 2))
			rtlpriv->enter_ps = true;
			rtl_lps_enter(hw);
		else
		else
			rtlpriv->enter_ps = false;
			rtl_lps_leave(hw);

		/* LeisurePS only work in infra mode. */
		schedule_work(&rtlpriv->works.lps_change_work);
	}
	}


	rtlpriv->link_info.num_rx_inperiod = 0;
	rtlpriv->link_info.num_rx_inperiod = 0;