linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Kalle Valo <kvalo@kernel.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: RE: [PATCH] wifi: rtlwifi: remove unreachable code in rtl92d_dm_check_edca_turbo()
Date: Tue, 3 Oct 2023 00:22:42 +0000	[thread overview]
Message-ID: <ce2f5b6b051748db84b8d4234d758ef7@realtek.com> (raw)
In-Reply-To: <20230929091229.13129-1-dmantipov@yandex.ru>



> -----Original Message-----
> From: Dmitry Antipov <dmantipov@yandex.ru>
> Sent: Friday, September 29, 2023 5:12 PM
> To: Ping-Ke Shih <pkshih@realtek.com>
> Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; lvc-project@linuxtesting.org; Dmitry
> Antipov <dmantipov@yandex.ru>
> Subject: [PATCH] wifi: rtlwifi: remove unreachable code in rtl92d_dm_check_edca_turbo()
> 
> Since '!(0x5ea42b & 0xffff0000)' is always zero, remove unreachable

s/zero/false/ 

> block in 'rtl92d_dm_check_edca_turbo()' and convert EDCA limits to
> constant variables. Compile tested only.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
>  .../wireless/realtek/rtlwifi/rtl8192de/dm.c    | 18 ++----------------
>  1 file changed, 2 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c
> b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c
> index 6cc9c7649eda..87798d7f5407 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/dm.c
> @@ -596,28 +596,14 @@ static void rtl92d_dm_check_edca_turbo(struct ieee80211_hw *hw)
>         static u64 last_rxok_cnt;
>         u64 cur_txok_cnt;
>         u64 cur_rxok_cnt;
> -       u32 edca_be_ul = 0x5ea42b;
> -       u32 edca_be_dl = 0x5ea42b;
> +       const u32 edca_be_ul = 0x5ea42b;
> +       const u32 edca_be_dl = 0x5ea42b;

move upward to have reverse X'mas tree order. 

> 
>         if (mac->link_state != MAC80211_LINKED) {
>                 rtlpriv->dm.current_turbo_edca = false;
>                 goto exit;
>         }
> 
> -       /* Enable BEQ TxOP limit configuration in wireless G-mode. */
> -       /* To check whether we shall force turn on TXOP configuration. */
> -       if ((!rtlpriv->dm.disable_framebursting) &&
> -           (rtlpriv->sec.pairwise_enc_algorithm == WEP40_ENCRYPTION ||
> -           rtlpriv->sec.pairwise_enc_algorithm == WEP104_ENCRYPTION ||
> -           rtlpriv->sec.pairwise_enc_algorithm == TKIP_ENCRYPTION)) {
> -               /* Force TxOP limit to 0x005e for UL. */
> -               if (!(edca_be_ul & 0xffff0000))
> -                       edca_be_ul |= 0x005e0000;
> -               /* Force TxOP limit to 0x005e for DL. */
> -               if (!(edca_be_dl & 0xffff0000))
> -                       edca_be_dl |= 0x005e0000;
> -       }
> -
>         if ((!rtlpriv->dm.is_any_nonbepkts) &&
>             (!rtlpriv->dm.disable_framebursting)) {
>                 cur_txok_cnt = rtlpriv->stats.txbytesunicast - last_txok_cnt;
> --
> 2.41.0


  reply	other threads:[~2023-10-03  0:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-29  9:12 [PATCH] wifi: rtlwifi: remove unreachable code in rtl92d_dm_check_edca_turbo() Dmitry Antipov
2023-10-03  0:22 ` Ping-Ke Shih [this message]
2023-10-03  4:33   ` [PATCH] [v2] " Dmitry Antipov
2023-10-03  5:29     ` Ping-Ke Shih
2023-10-05  6:55     ` Kalle Valo

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=ce2f5b6b051748db84b8d4234d758ef7@realtek.com \
    --to=pkshih@realtek.com \
    --cc=dmantipov@yandex.ru \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    /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;
as well as URLs for NNTP newsgroup(s).