|
@@ -3155,7 +3155,6 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
|
|
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
|
struct wireless_dev *wdev = dev->ieee80211_ptr;
|
|
struct cfg80211_ap_settings params;
|
|
struct cfg80211_ap_settings params;
|
|
int err;
|
|
int err;
|
|
- u8 radar_detect_width = 0;
|
|
|
|
|
|
|
|
if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
|
|
if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
|
|
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
|
|
dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
|
|
@@ -3275,24 +3274,6 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
|
|
wdev->iftype))
|
|
wdev->iftype))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- err = cfg80211_chandef_dfs_required(wdev->wiphy,
|
|
|
|
- ¶ms.chandef,
|
|
|
|
- NL80211_IFTYPE_AP);
|
|
|
|
- if (err < 0)
|
|
|
|
- return err;
|
|
|
|
-
|
|
|
|
- if (err > 0) {
|
|
|
|
- params.radar_required = true;
|
|
|
|
- radar_detect_width = BIT(params.chandef.width);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
|
|
|
|
- params.chandef.chan,
|
|
|
|
- CHAN_MODE_SHARED,
|
|
|
|
- radar_detect_width);
|
|
|
|
- if (err)
|
|
|
|
- return err;
|
|
|
|
-
|
|
|
|
if (info->attrs[NL80211_ATTR_ACL_POLICY]) {
|
|
if (info->attrs[NL80211_ATTR_ACL_POLICY]) {
|
|
params.acl = parse_acl_data(&rdev->wiphy, info);
|
|
params.acl = parse_acl_data(&rdev->wiphy, info);
|
|
if (IS_ERR(params.acl))
|
|
if (IS_ERR(params.acl))
|
|
@@ -5823,12 +5804,6 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
|
|
if (!rdev->ops->start_radar_detection)
|
|
if (!rdev->ops->start_radar_detection)
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
- err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
|
|
|
|
- chandef.chan, CHAN_MODE_SHARED,
|
|
|
|
- BIT(chandef.width));
|
|
|
|
- if (err)
|
|
|
|
- return err;
|
|
|
|
-
|
|
|
|
cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef);
|
|
cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef);
|
|
if (WARN_ON(!cac_time_ms))
|
|
if (WARN_ON(!cac_time_ms))
|
|
cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
|
cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
|
|
@@ -5957,6 +5932,10 @@ skip_beacons:
|
|
params.radar_required = true;
|
|
params.radar_required = true;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* TODO: I left this here for now. With channel switch, the
|
|
|
|
+ * verification is a bit more complicated, because we only do
|
|
|
|
+ * it later when the channel switch really happens.
|
|
|
|
+ */
|
|
err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
|
|
err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
|
|
params.chandef.chan,
|
|
params.chandef.chan,
|
|
CHAN_MODE_SHARED,
|
|
CHAN_MODE_SHARED,
|