Commit d39f3b4f authored by Johannes Berg's avatar Johannes Berg

nl80211: reindent some sched scan code

The sched scan code here is really deep - avoid one level
of indentation by short-circuiting the loop instead of
putting everything into the if block.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 1f17f774
...@@ -7776,7 +7776,12 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, ...@@ -7776,7 +7776,12 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev,
goto out_free; goto out_free;
ssid = tb[NL80211_SCHED_SCAN_MATCH_ATTR_SSID]; ssid = tb[NL80211_SCHED_SCAN_MATCH_ATTR_SSID];
bssid = tb[NL80211_SCHED_SCAN_MATCH_ATTR_BSSID]; bssid = tb[NL80211_SCHED_SCAN_MATCH_ATTR_BSSID];
if (ssid || bssid) {
if (!ssid && !bssid) {
i++;
continue;
}
if (WARN_ON(i >= n_match_sets)) { if (WARN_ON(i >= n_match_sets)) {
/* this indicates a programming error, /* this indicates a programming error,
* the loop above should have verified * the loop above should have verified
...@@ -7806,13 +7811,11 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev, ...@@ -7806,13 +7811,11 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev,
} }
/* special attribute - old implementation w/a */ /* special attribute - old implementation w/a */
request->match_sets[i].rssi_thold = request->match_sets[i].rssi_thold = default_match_rssi;
default_match_rssi;
rssi = tb[NL80211_SCHED_SCAN_MATCH_ATTR_RSSI]; rssi = tb[NL80211_SCHED_SCAN_MATCH_ATTR_RSSI];
if (rssi) if (rssi)
request->match_sets[i].rssi_thold = request->match_sets[i].rssi_thold =
nla_get_s32(rssi); nla_get_s32(rssi);
}
i++; i++;
} }
......
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