mac80211: add boilerplate code for start / stop NAN
[linux-2.6-block.git] / net / mac80211 / chan.c
index d035801569eb4fd89f1e466cd8510549612528d3..e75cbf6ecc26e4ec7bde777c385e001c0e49e371 100644 (file)
@@ -647,6 +647,9 @@ static int ieee80211_assign_vif_chanctx(struct ieee80211_sub_if_data *sdata,
        struct ieee80211_chanctx *curr_ctx = NULL;
        int ret = 0;
 
+       if (WARN_ON(sdata->vif.type == NL80211_IFTYPE_NAN))
+               return -ENOTSUPP;
+
        conf = rcu_dereference_protected(sdata->vif.chanctx_conf,
                                         lockdep_is_held(&local->chanctx_mtx));