mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
mac80211: airtime: avoid variable shadowing
This isn't very dangerous, since the outer 'rate' variable isn't even a pointer, but it's still confusing, so use a different variable inside. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20220202104617.8e9b2bfaa0f5.I41c53f754eef28206d04dafc7263ccb99b63d490@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
6ad1dce5eb
commit
ae962e5f63
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
// SPDX-License-Identifier: ISC
|
// SPDX-License-Identifier: ISC
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2019 Felix Fietkau <nbd@nbd.name>
|
* Copyright (C) 2019 Felix Fietkau <nbd@nbd.name>
|
||||||
|
* Copyright (C) 2021 Intel Corporation
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <net/mac80211.h>
|
#include <net/mac80211.h>
|
||||||
|
@ -650,12 +651,12 @@ u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
|
||||||
struct sta_info *sta = container_of(pubsta, struct sta_info,
|
struct sta_info *sta = container_of(pubsta, struct sta_info,
|
||||||
sta);
|
sta);
|
||||||
struct ieee80211_rx_status stat;
|
struct ieee80211_rx_status stat;
|
||||||
struct ieee80211_tx_rate *rate = &sta->tx_stats.last_rate;
|
struct ieee80211_tx_rate *tx_rate = &sta->tx_stats.last_rate;
|
||||||
struct rate_info *ri = &sta->tx_stats.last_rate_info;
|
struct rate_info *ri = &sta->tx_stats.last_rate_info;
|
||||||
u32 duration, overhead;
|
u32 duration, overhead;
|
||||||
u8 agg_shift;
|
u8 agg_shift;
|
||||||
|
|
||||||
if (ieee80211_fill_rx_status(&stat, hw, rate, ri, band, len))
|
if (ieee80211_fill_rx_status(&stat, hw, tx_rate, ri, band, len))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (stat.encoding == RX_ENC_LEGACY || !ampdu)
|
if (stat.encoding == RX_ENC_LEGACY || !ampdu)
|
||||||
|
|
Loading…
Reference in a new issue