From: Kazior Michal <Michal.Kazior@xxxxxxxxx> Channel context pointer will be accessiable on both assign and unassign events. Signed-off-by: Michal Kazior <michal.kazior@xxxxxxxxx> --- net/mac80211/chan.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index dc397a8..1aa553d 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -5,6 +5,7 @@ #include <linux/nl80211.h> #include <net/cfg80211.h> #include "ieee80211_i.h" +#include "driver-ops.h" static enum ieee80211_chan_mode __ieee80211_get_channel_mode(struct ieee80211_local *local, @@ -190,6 +191,8 @@ ieee80211_new_chanctx(struct ieee80211_local *local, list_add(&ctx->list, &local->chanctx_list); + drv_add_chanctx(local, ctx); + return ctx; } @@ -200,6 +203,8 @@ ieee80211_free_chanctx(struct ieee80211_chanctx *ctx) BUG_ON(ctx->refcount != 0); + drv_remove_chanctx(ctx->local, ctx); + list_del(&ctx->list); kfree(ctx); } @@ -212,6 +217,8 @@ ieee80211_assign_vif_chanctx(struct ieee80211_sub_if_data *sdata, sdata->vif.chanctx_conf = &ctx->conf; ctx->refcount++; + + drv_assign_vif_chanctx(sdata->local, sdata, ctx); } static void @@ -220,6 +227,8 @@ ieee80211_unassign_vif_chanctx(struct ieee80211_sub_if_data *sdata, { lockdep_assert_held(&local->chanctx_mtx); + drv_unassign_vif_chanctx(sdata->local, sdata, ctx); + ctx->refcount--; sdata->vif.chanctx_conf = NULL; } -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html