diff options
| author | Jiajia Liu <liujiajia@kylinos.cn> | 2026-04-07 14:32:05 +0800 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2026-04-07 15:40:25 +0200 |
| commit | c4ed2c3f4f5e34156e607f2ea92cefad638af50e (patch) | |
| tree | d1ff41c7758f7bafc971ef42ad536570f8afb771 | |
| parent | 368f5098ed0b2eb5d06dbbe692c163c85f240a4d (diff) | |
wifi: mac80211: remove unused variables in minstrel_ht_alloc_sta
Remove the unused variable max_rates and related code. Also remove the
variable mi and pass type to kzalloc_obj instead.
Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn>
Link: https://patch.msgid.link/20260407063205.68471-1-liujiajia@kylinos.cn
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| -rw-r--r-- | net/mac80211/rc80211_minstrel_ht.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 62745ca00e06..b73ef3adfcc5 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1849,20 +1849,7 @@ minstrel_ht_rate_update(void *priv, struct ieee80211_supported_band *sband, static void * minstrel_ht_alloc_sta(void *priv, struct ieee80211_sta *sta, gfp_t gfp) { - struct ieee80211_supported_band *sband; - struct minstrel_ht_sta *mi; - struct minstrel_priv *mp = priv; - struct ieee80211_hw *hw = mp->hw; - int max_rates = 0; - int i; - - for (i = 0; i < NUM_NL80211_BANDS; i++) { - sband = hw->wiphy->bands[i]; - if (sband && sband->n_bitrates > max_rates) - max_rates = sband->n_bitrates; - } - - return kzalloc_obj(*mi, gfp); + return kzalloc_obj(struct minstrel_ht_sta, gfp); } static void |
