diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2014-02-18 11:40:36 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-09 10:55:41 +0200 |
commit | 2beb6dab2d799ee8934cb0801845e551ad8c70f2 (patch) | |
tree | 58261561098a2bc3aaf747041382324119b00128 /net/mac80211/mesh.c | |
parent | cb2d956dd329caa11b5ece454dc52253aa038e73 (diff) | |
download | op-kernel-dev-2beb6dab2d799ee8934cb0801845e551ad8c70f2.zip op-kernel-dev-2beb6dab2d799ee8934cb0801845e551ad8c70f2.tar.gz |
cfg80211/mac80211: refactor cfg80211_chandef_dfs_required()
Some interface types don't require DFS (such as STATION, P2P_CLIENT
etc). In order to centralize these decisions, make
cfg80211_chandef_dfs_required() take the iftype into consideration.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.c')
-rw-r--r-- | net/mac80211/mesh.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 387f61c..9d29237 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c @@ -903,14 +903,15 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata, } err = cfg80211_chandef_dfs_required(sdata->local->hw.wiphy, - ¶ms.chandef); + ¶ms.chandef, + NL80211_IFTYPE_MESH_POINT); if (err < 0) return false; - if (err) { - params.radar_required = true; + if (err > 0) /* TODO: DFS not (yet) supported */ return false; - } + + params.radar_required = err; if (cfg80211_chandef_identical(¶ms.chandef, &sdata->vif.bss_conf.chandef)) { |