cfg80211: fix start_radar_detection issue
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Wed, 14 May 2014 11:25:04 +0000 (13:25 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 14 May 2014 14:42:22 +0000 (16:42 +0200)
After patch:
cfg80211/mac80211: refactor cfg80211_chandef_dfs_required()

start_radar_detection always fail with -EINVAL.

Acked-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/chan.c

index 84d686e2dbd04a0402a652995ec468ba6df06795..7a679a6e1d1a234bf1f2669723e72db14ec168b3 100644 (file)
@@ -340,6 +340,7 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
        case NL80211_IFTYPE_AP:
        case NL80211_IFTYPE_P2P_GO:
        case NL80211_IFTYPE_MESH_POINT:
+       case NL80211_IFTYPE_UNSPECIFIED:
                width = cfg80211_chandef_get_width(chandef);
                if (width < 0)
                        return -EINVAL;
@@ -370,7 +371,6 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
        case NL80211_IFTYPE_AP_VLAN:
        case NL80211_IFTYPE_WDS:
        case NL80211_IFTYPE_P2P_DEVICE:
-       case NL80211_IFTYPE_UNSPECIFIED:
                break;
        case NUM_NL80211_IFTYPES:
                WARN_ON(1);