]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mac80211: Remove unused basic_rates variable
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 1 Jan 2025 05:05:29 +0000 (07:05 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 13 Jan 2025 14:26:44 +0000 (15:26 +0100)
The basic_rates variable was passed to mesh_sta_info_init as an out
parameter even though the result is not used. Passing NULL instead is
safe here, so do that.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250101070249.23a86a9bad0c.If79bc2c1c98d01cfb4c7e93c18b198fe6c6ea44c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh_plink.c

index 6ea35c88dc48abe52567cdfb372374f0d3b0cf90..5a0156e11c914f2b173711ab62f1af2b034295c7 100644 (file)
@@ -432,15 +432,14 @@ static void mesh_sta_info_init(struct ieee80211_sub_if_data *sdata,
 {
        struct ieee80211_local *local = sdata->local;
        struct ieee80211_supported_band *sband;
-       u32 rates, basic_rates = 0, changed = 0;
+       u32 rates, changed = 0;
        enum ieee80211_sta_rx_bandwidth bw = sta->sta.deflink.bandwidth;
 
        sband = ieee80211_get_sband(sdata);
        if (!sband)
                return;
 
-       rates = ieee80211_sta_get_rates(sdata, elems, sband->band,
-                                       &basic_rates);
+       rates = ieee80211_sta_get_rates(sdata, elems, sband->band, NULL);
 
        spin_lock_bh(&sta->mesh->plink_lock);
        sta->deflink.rx_stats.last_rx = jiffies;