Commit cd5861bd authored by Kirtika Ruchandani's avatar Kirtika Ruchandani Committed by Johannes Berg

mac80211: Remove unused 'len' variable

Commit 633e2713 (mac80211: split sched scan IEs) introduced the
len variable to keep track of the return value of
ieee80211_build_preq_ies() but did not use it. Compiling with W=1
gives the following warning, fix it.

net/mac80211/scan.c: In function ‘__ieee80211_request_sched_scan_start’:
net/mac80211/scan.c:1123:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]

This is a harmless warning and is only being fixed to reduce the noise
with W=1 in the kernel.

Fixes: 633e2713 ("mac80211: split sched scan IEs")
Cc: David Spinadel <david.spinadel@intel.com>
Cc: Alexander Bondar <alexander.bondar@intel.com>
Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarKirtika Ruchandani <kirtika@chromium.org>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent b7f2405c
...@@ -1120,7 +1120,6 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, ...@@ -1120,7 +1120,6 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
u32 rate_masks[NUM_NL80211_BANDS] = {}; u32 rate_masks[NUM_NL80211_BANDS] = {};
u8 bands_used = 0; u8 bands_used = 0;
u8 *ie; u8 *ie;
size_t len;
iebufsz = local->scan_ies_len + req->ie_len; iebufsz = local->scan_ies_len + req->ie_len;
...@@ -1145,10 +1144,9 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata, ...@@ -1145,10 +1144,9 @@ int __ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
ieee80211_prepare_scan_chandef(&chandef, req->scan_width); ieee80211_prepare_scan_chandef(&chandef, req->scan_width);
len = ieee80211_build_preq_ies(local, ie, num_bands * iebufsz, ieee80211_build_preq_ies(local, ie, num_bands * iebufsz,
&sched_scan_ies, req->ie, &sched_scan_ies, req->ie,
req->ie_len, bands_used, req->ie_len, bands_used, rate_masks, &chandef);
rate_masks, &chandef);
ret = drv_sched_scan_start(local, sdata, req, &sched_scan_ies); ret = drv_sched_scan_start(local, sdata, req, &sched_scan_ies);
if (ret == 0) { if (ret == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment