]> www.infradead.org Git - users/hch/misc.git/commitdiff
wifi: mac80211: reduce the scope of rts_threshold
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 3 Sep 2025 08:39:04 +0000 (11:39 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 4 Sep 2025 09:19:03 +0000 (11:19 +0200)
This is only needed within the 'if' scope, not in the function scope.

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250903083904.1972284-3-miriam.rachel.korenblit@intel.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/util.c

index 51e3e3c913f7f9faa4a0283c0aa9509efc805391..9eb35e3b9e52fd896bab5e673c4d7dc72fdf4393 100644 (file)
@@ -1756,7 +1756,6 @@ int ieee80211_reconfig(struct ieee80211_local *local)
        bool sched_scan_stopped = false;
        bool suspended = local->suspended;
        bool in_reconfig = false;
-       u32 rts_threshold;
 
        lockdep_assert_wiphy(local->hw.wiphy);
 
@@ -1832,7 +1831,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
        /* setup RTS threshold */
        if (hw->wiphy->n_radio > 0) {
                for (i = 0; i < hw->wiphy->n_radio; i++) {
-                       rts_threshold = hw->wiphy->radio_cfg[i].rts_threshold;
+                       u32 rts_threshold =
+                               hw->wiphy->radio_cfg[i].rts_threshold;
+
                        drv_set_rts_threshold(local, i, rts_threshold);
                }
        } else {