]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor()
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 13 Dec 2023 05:14:43 +0000 (08:14 +0300)
committerKalle Valo <kvalo@kernel.org>
Fri, 15 Dec 2023 13:40:26 +0000 (15:40 +0200)
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>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231213051449.126963-1-dmantipov@yandex.ru
drivers/net/wireless/ralink/rt2x00/rt2x00queue.c

index 98df0aef816850fe8ccb290eb7ed63ffb312b1d0..013003777fee1983f960203ced77f279dcec4867 100644 (file)
@@ -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);
        }
 
        /*