summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-07-24 19:46:41 +0300
committerDavide Garberi <dade.garberi@gmail.com>2021-10-07 20:10:09 +0200
commit56516cf5232c173edfb045c207d2fa0b076b94f4 (patch)
tree5a7cf2dc700b6e9db35d38f8b5a87925cef53ad9
parent60340ee9c88f998ea5ea1e8326197711c5b32ffd (diff)
Partially revert "kernel: Fix build errors with LLVM"
Not necessary since we used the proper upstream commits. This partially reverts commit 6dbab77b6ddda309f56027f135f1eede33b76c2c. Change-Id: I305812d2d82a603197383cb4eff6fae91352378b
-rw-r--r--net/wireless/nl80211.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 2acace31db5f..4d0282091aa0 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3924,10 +3924,8 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
if (err)
return err;
- err = validate_beacon_tx_rate(
- rdev,
- (enum nl80211_band)(params.chandef.chan->band),
- &params.beacon_rate);
+ err = validate_beacon_tx_rate(rdev, params.chandef.chan->band,
+ &params.beacon_rate);
if (err)
return err;
}
@@ -6309,10 +6307,7 @@ static int parse_bss_select(struct nlattr *nla, struct wiphy *wiphy,
bss_select->behaviour = NL80211_BSS_SELECT_ATTR_RSSI_ADJUST;
bss_select->param.adjust.band = adj_param->band;
bss_select->param.adjust.delta = adj_param->delta;
- if (!is_band_valid(
- wiphy,
- ((enum ieee80211_band)(bss_select->param.adjust.band))
- ))
+ if (!is_band_valid(wiphy, bss_select->param.adjust.band))
return -EINVAL;
}
@@ -7021,10 +7016,7 @@ nl80211_parse_sched_scan(struct wiphy *wiphy, struct wireless_dev *wdev,
attrs[NL80211_ATTR_SCHED_SCAN_RSSI_ADJUST]);
request->rssi_adjust.band = rssi_adjust->band;
request->rssi_adjust.delta = rssi_adjust->delta;
- if (!is_band_valid(
- wiphy,
- (enum ieee80211_band)(request->rssi_adjust.band)
- )) {
+ if (!is_band_valid(wiphy, request->rssi_adjust.band)) {
err = -EINVAL;
goto out_free;
}
@@ -9549,10 +9541,8 @@ static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
if (err)
return err;
- err = validate_beacon_tx_rate(
- rdev,
- (enum nl80211_band)(setup.chandef.chan->band),
- &setup.beacon_rate);
+ err = validate_beacon_tx_rate(rdev, setup.chandef.chan->band,
+ &setup.beacon_rate);
if (err)
return err;
}