Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67ae07a1 authored by Janusz Dziedzic's avatar Janusz Dziedzic Committed by Johannes Berg
Browse files

cfg80211: fix start_radar_detection issue



After patch:
cfg80211/mac80211: refactor cfg80211_chandef_dfs_required()

start_radar_detection always fail with -EINVAL.

Acked-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 8c48b50a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -340,6 +340,7 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
	case NL80211_IFTYPE_AP:
	case NL80211_IFTYPE_AP:
	case NL80211_IFTYPE_P2P_GO:
	case NL80211_IFTYPE_P2P_GO:
	case NL80211_IFTYPE_MESH_POINT:
	case NL80211_IFTYPE_MESH_POINT:
	case NL80211_IFTYPE_UNSPECIFIED:
		width = cfg80211_chandef_get_width(chandef);
		width = cfg80211_chandef_get_width(chandef);
		if (width < 0)
		if (width < 0)
			return -EINVAL;
			return -EINVAL;
@@ -370,7 +371,6 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
	case NL80211_IFTYPE_AP_VLAN:
	case NL80211_IFTYPE_AP_VLAN:
	case NL80211_IFTYPE_WDS:
	case NL80211_IFTYPE_WDS:
	case NL80211_IFTYPE_P2P_DEVICE:
	case NL80211_IFTYPE_P2P_DEVICE:
	case NL80211_IFTYPE_UNSPECIFIED:
		break;
		break;
	case NUM_NL80211_IFTYPES:
	case NUM_NL80211_IFTYPES:
		WARN_ON(1);
		WARN_ON(1);