diff options
author | Johannes Berg <johannes.berg@intel.com> | 2020-03-26 14:09:40 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-04-24 12:33:43 +0200 |
commit | dba25b04c61170cf8592f87df2bb086201047473 (patch) | |
tree | 2a3c653cc13a34d0a466a74a417a58232fd87d88 /net/mac80211/rc80211_minstrel_ht.c | |
parent | mac80211: Fail association when AP has no legacy rates (diff) | |
download | linux-dba25b04c61170cf8592f87df2bb086201047473.tar.xz linux-dba25b04c61170cf8592f87df2bb086201047473.zip |
mac80211: minstrel_ht_assign_best_tp_rates: remove redundant test
We know this pointer isn't NULL and in fact dereferenced it before,
remove the redundant test.
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.20200326150855.adf551928846.Iae9015573d6c350cc1b12a311d6d13d086beec6c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht.c')
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 694a31978a04..5547111d22bf 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2010-2013 Felix Fietkau <nbd@openwrt.org> + * Copyright (C) 2019-2020 Intel Corporation */ #include <linux/netdevice.h> #include <linux/types.h> @@ -490,7 +491,7 @@ minstrel_ht_assign_best_tp_rates(struct minstrel_ht_sta *mi, tmp_prob = mi->groups[tmp_group].rates[tmp_idx].prob_avg; tmp_mcs_tp = minstrel_ht_get_tp_avg(mi, tmp_group, tmp_idx, tmp_prob); - if (tmp_cck_tp_rate && tmp_cck_tp > tmp_mcs_tp) { + if (tmp_cck_tp > tmp_mcs_tp) { for(i = 0; i < MAX_THR_RATES; i++) { minstrel_ht_sort_best_tp_rates(mi, tmp_cck_tp_rate[i], tmp_mcs_tp_rate); |