public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	Stefan Lippers-Hollmann <s.l-h@gmx.de>,
	Christian Hewitt <chewitt@libreelec.tv>
Subject: RE: [PATCH v5 08/11] wifi: rtlwifi: Add rtl8192du/dm.{c,h}
Date: Fri, 10 May 2024 03:51:29 +0000	[thread overview]
Message-ID: <2c2589845b754597ac7f175120678898@realtek.com> (raw)
In-Reply-To: <efcc510f-b631-4b44-8b2d-42d501d6ba4e@gmail.com>

Bitterblue Smith <rtl8821cerfe2@gmail.com> wrote:
> These contain functions related to the dynamic mechanism, which runs
> every two seconds to adjust to changes in the environment.
> 
> Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> ---
>  .../wireless/realtek/rtlwifi/rtl8192du/dm.c   | 123 ++++++++++++++++++
>  .../wireless/realtek/rtlwifi/rtl8192du/dm.h   |  10 ++
>  2 files changed, 133 insertions(+)
>  create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c
>  create mode 100644 drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.h
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c
> new file mode 100644
> index 000000000000..add909f7726f
> --- /dev/null
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192du/dm.c

[...]

> +void rtl92du_dm_watchdog(struct ieee80211_hw *hw)
> +{
> +       struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
> +       bool fw_current_inpsmode = false;
> +       bool fwps_awake = true;
> +
> +       /* 1. RF is OFF. (No need to do DM.)
> +        * 2. Fw is under power saving mode for FwLPS.
> +        *    (Prevent from SW/FW I/O racing.)
> +        * 3. IPS workitem is scheduled. (Prevent from IPS sequence
> +        *    to be swapped with DM.
> +        * 4. RFChangeInProgress is TRUE.
> +        *    (Prevent from broken by IPS/HW/SW Rf off.)
> +        */
> +
> +       if (ppsc->rfpwr_state == ERFON && !fw_current_inpsmode &&
> +           fwps_awake && !ppsc->rfchange_inprogress) {

nit: use early return

if (RF_OFF || FW_LPS || IPS_SECHEDULED || RF_CHANGING)
    return;

> +               rtl92d_dm_pwdb_monitor(hw);
> +               rtl92d_dm_false_alarm_counter_statistics(hw);
> +               rtl92d_dm_find_minimum_rssi(hw);
> +               rtl92d_dm_dig(hw);
> +               rtl92d_dm_check_txpower_tracking_thermal_meter(hw);
> +               rtl92d_dm_check_edca_turbo(hw);
> +               rtl92d_dm_1r_cca(hw);
> +       }
> +}


  reply	other threads:[~2024-05-10  3:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 10:46 [PATCH v5 00/11] wifi: rtlwifi: Add new rtl8192du driver Bitterblue Smith
2024-05-08 10:47 ` [PATCH v5 01/11] wifi: rtlwifi: Add rtl8192du/table.{c,h} Bitterblue Smith
2024-05-10  1:54   ` Ping-Ke Shih
2024-05-08 10:48 ` [PATCH v5 02/11] wifi: rtlwifi: Add new members to struct rtl_priv for RTL8192DU Bitterblue Smith
2024-05-10  2:14   ` Ping-Ke Shih
2024-05-08 10:48 ` [PATCH v5 03/11] wifi: rtlwifi: Add rtl8192du/hw.{c,h} Bitterblue Smith
2024-05-10  3:04   ` Ping-Ke Shih
2024-05-12 14:34     ` Bitterblue Smith
2024-05-13  6:29       ` Ping-Ke Shih
2024-05-08 10:49 ` [PATCH v5 04/11] wifi: rtlwifi: Add rtl8192du/phy.{c,h} Bitterblue Smith
2024-05-10  3:43   ` Ping-Ke Shih
2024-05-08 10:50 ` [PATCH v5 05/11] wifi: rtlwifi: Add rtl8192du/trx.{c,h} Bitterblue Smith
2024-05-08 10:51 ` [PATCH v5 06/11] wifi: rtlwifi: Add rtl8192du/rf.{c,h} Bitterblue Smith
2024-05-08 10:52 ` [PATCH v5 07/11] wifi: rtlwifi: Add rtl8192du/fw.{c,h} and rtl8192du/led.{c,h} Bitterblue Smith
2024-05-08 10:53 ` [PATCH v5 08/11] wifi: rtlwifi: Add rtl8192du/dm.{c,h} Bitterblue Smith
2024-05-10  3:51   ` Ping-Ke Shih [this message]
2024-05-08 10:53 ` [PATCH v5 09/11] wifi: rtlwifi: Constify rtl_hal_cfg.{ops,usb_interface_cfg} and rtl_priv.cfg Bitterblue Smith
2024-05-08 10:54 ` [PATCH v5 10/11] wifi: rtlwifi: Add rtl8192du/sw.{c,h} Bitterblue Smith
2024-05-10  5:52   ` Ping-Ke Shih
2024-05-08 10:55 ` [PATCH v5 11/11] wifi: rtlwifi: Enable the new rtl8192du driver Bitterblue Smith
2024-05-10  5:46   ` kernel test robot
2024-05-10  5:57   ` Ping-Ke Shih
2024-05-10  4:00 ` [PATCH v5 00/11] wifi: rtlwifi: Add " Stefan Lippers-Hollmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c2589845b754597ac7f175120678898@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chewitt@libreelec.tv \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@gmail.com \
    --cc=s.l-h@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox