From: Johannes Berg Date: Tue, 4 Feb 2014 20:01:25 +0000 (+0100) Subject: nl80211: use ie_len in scheduled scan X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9900e4843c6c95cc951a642e337478831429be88;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git nl80211: use ie_len in scheduled scan We've already checked the IE length and assigned request->ie based on that, so continue using it to make the code a bit clearer. Signed-off-by: Johannes Berg --- diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index ebea1a197afb..179786494308 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -5709,8 +5709,8 @@ static int nl80211_start_sched_scan(struct sk_buff *skb, request->min_rssi_thold = NL80211_SCAN_RSSI_THOLD_OFF; } - if (info->attrs[NL80211_ATTR_IE]) { - request->ie_len = nla_len(info->attrs[NL80211_ATTR_IE]); + if (ie_len) { + request->ie_len = ie_len; memcpy((void *)request->ie, nla_data(info->attrs[NL80211_ATTR_IE]), request->ie_len);