From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Kalle Valo <kvalo@kernel.org>,
lvc-project@linuxtesting.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH] [v2] wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor()
Date: Wed, 13 Dec 2023 21:06:16 +0100 [thread overview]
Message-ID: <20231213200616.GA63361@wp.pl> (raw)
In-Reply-To: <20231213051449.126963-1-dmantipov@yandex.ru>
On Wed, Dec 13, 2023 at 08:14:43AM +0300, Dmitry Antipov wrote:
> In 'rt2x00queue_create_tx_descriptor()', there is no need to call
> 'ieee80211_get_rts_cts_rate()' while checking for RTS/CTS frame
> since this function returns NULL or pointer to internal bitrate
> table entry, and the return value is not actually used. Compile
> tested only.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> ---
> v2: avoid scoped locals (Kalle Valo)
> ---
> drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
> index 98df0aef8168..013003777fee 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c
> @@ -416,9 +416,6 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
> __set_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags);
> else
> __set_bit(ENTRY_TXD_CTS_FRAME, &txdesc->flags);
> - if (tx_info->control.rts_cts_rate_idx >= 0)
> - rate =
> - ieee80211_get_rts_cts_rate(rt2x00dev->hw, tx_info);
> }
So we do not choose rate for RTS/CTS. Maybe we should actually,
but the patch does not change the logic that exist here for
more than 12 years, since
commit 55b585e29095ce64900b6192aadf399fa007161e
Author: Helmut Schaa <helmut.schaa@googlemail.com>
Date: Thu Mar 3 19:43:49 2011 +0100
rt2x00: Don't call ieee80211_get_tx_rate for MCS rates
I'm ok with the patch.
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Thanks
Stanislaw
next prev parent reply other threads:[~2023-12-13 20:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 17:34 [PATCH] wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor() Dmitry Antipov
2023-12-12 18:04 ` Kalle Valo
2023-12-13 5:14 ` [PATCH] [v2] " Dmitry Antipov
2023-12-13 20:06 ` Stanislaw Gruszka [this message]
2023-12-15 13:40 ` 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=20231213200616.GA63361@wp.pl \
--to=stf_xl@wp.pl \
--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