[RFC v3 5/7] mac80211: use channel context notifications
From: Michal Kazior <hidden>
Date: 2012-06-26 12:37:29
Subsystem:
mac80211, the rest · Maintainers:
Johannes Berg, Linus Torvalds
From: Michal Kazior <hidden>
Date: 2012-06-26 12:37:29
Subsystem:
mac80211, the rest · Maintainers:
Johannes Berg, Linus Torvalds
From: Kazior Michal <redacted> Channel context pointer will be accessiable on both assign and unassign events. Signed-off-by: Michal Kazior <redacted> --- 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