+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -915,6 +915,12 @@ static int ieee80211_start_ap(struct wip
+ if (err)
+ return err;
+
++ list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) {
++ err = ieee80211_vif_copy_channel(vlan, sdata);
++ if (err)
++ return err;
++ }
++
+ /*
+ * Apply control port protocol, this allows us to
+ * not encrypt dynamic WEP control frames.
+@@ -998,8 +1004,11 @@ static int ieee80211_stop_ap(struct wiph
+ old_probe_resp = rtnl_dereference(sdata->u.ap.probe_resp);
+
+ /* turn off carrier for this interface and dependent VLANs */
+- list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list)
++ list_for_each_entry(vlan, &sdata->u.ap.vlans, u.vlan.list) {
++ sta_info_flush(local, vlan);
+ netif_carrier_off(vlan->dev);
++ ieee80211_vif_release_channel(vlan);
++ }
+ netif_carrier_off(dev);
+
+ /* remove beacon and probe response */
+--- a/net/mac80211/chan.c
++++ b/net/mac80211/chan.c
+@@ -119,14 +119,17 @@ static int ieee80211_assign_vif_chanctx(
+
+ lockdep_assert_held(&local->chanctx_mtx);
+
+- ret = drv_assign_vif_chanctx(local, sdata, ctx);
+- if (ret)
+- return ret;
++ if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN) {
++ ret = drv_assign_vif_chanctx(local, sdata, ctx);
++ if (ret)
++ return ret;
++ }
+
+ rcu_assign_pointer(sdata->vif.chanctx_conf, &ctx->conf);
+ ctx->refcount++;
+
+- ieee80211_recalc_txpower(sdata);
++ if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
++ ieee80211_recalc_txpower(sdata);
+
+ return 0;
+ }
+@@ -174,7 +177,8 @@ static void ieee80211_unassign_vif_chanc
+ ctx->refcount--;
+ rcu_assign_pointer(sdata->vif.chanctx_conf, NULL);
+
+- drv_unassign_vif_chanctx(local, sdata, ctx);
++ if (sdata->vif.type != NL80211_IFTYPE_AP_VLAN)
++ drv_unassign_vif_chanctx(local, sdata, ctx);
+
+ if (ctx->refcount > 0) {
+ ieee80211_recalc_chanctx_chantype(sdata->local, ctx);
+@@ -285,6 +289,30 @@ void ieee80211_recalc_smps_chanctx(struc
+ drv_change_chanctx(local, chanctx, IEEE80211_CHANCTX_CHANGE_RX_CHAINS);
+ }
+
++int ieee80211_vif_copy_channel(struct ieee80211_sub_if_data *sdata,
++ struct ieee80211_sub_if_data *parent)
++{
++ struct ieee80211_local *local = sdata->local;
++ struct ieee80211_chanctx_conf *conf;
++ struct ieee80211_chanctx *ctx;
++
++ int ret;
++
++ mutex_lock(&local->chanctx_mtx);
++ conf = rcu_dereference_protected(parent->vif.chanctx_conf,
++ lockdep_is_held(&local->chanctx_mtx));
++ if (!conf) {
++ ret = -ENOENT;
++ goto out;
++ }
++
++ ctx = container_of(conf, struct ieee80211_chanctx, conf);
++ ret = ieee80211_assign_vif_chanctx(sdata, ctx);
++out:
++ mutex_unlock(&local->chanctx_mtx);
++ return ret;
++}
++
+ int ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata,
+ const struct cfg80211_chan_def *chandef,
+ enum ieee80211_chanctx_mode mode)
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1633,6 +1633,8 @@ ieee80211_vif_use_channel(struct ieee802
+ const struct cfg80211_chan_def *chandef,
+ enum ieee80211_chanctx_mode mode);
+ void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata);
++int ieee80211_vif_copy_channel(struct ieee80211_sub_if_data *sdata,
++ struct ieee80211_sub_if_data *parent);
+
+ void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local,
+ struct ieee80211_chanctx *chanctx);