diff options
author | Eliad Peller <eliad@wizery.com> | 2012-11-19 17:05:09 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-19 16:20:37 +0100 |
commit | 49884568628db47a1f8c1f596c6ab3b8db81b73c (patch) | |
tree | c5fb7a7c9c5a4ea3c91b201f5f0bb692eaa8afe1 /net | |
parent | 3475b0946bd2057497628790d4b4fce4bfdcc304 (diff) |
mac80211: make remain_on_channel() op pass vif param
Drivers (e.g. wl12xx) might need to know the vif
to roc on (mainly in order to configure the
rx filters correctly).
Add the vif to the op params, and update the current
users (iwlwifi) to use the new api.
Signed-off-by: Eliad Peller <eliad@wizery.com>
[fix hwsim]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/cfg.c | 6 | ||||
-rw-r--r-- | net/mac80211/driver-ops.h | 7 | ||||
-rw-r--r-- | net/mac80211/offchannel.c | 2 | ||||
-rw-r--r-- | net/mac80211/trace.h | 13 |
4 files changed, 18 insertions, 10 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 80e0618b25b..18926aea480 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2287,7 +2287,8 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, if (!duration) duration = 10; - ret = drv_remain_on_channel(local, channel, channel_type, duration); + ret = drv_remain_on_channel(local, sdata, channel, channel_type, + duration); if (ret) { kfree(roc); return ret; @@ -2298,7 +2299,8 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local, out_check_combine: list_for_each_entry(tmp, &local->roc_list, list) { - if (tmp->chan != channel || tmp->chan_type != channel_type) + if (tmp->chan != channel || tmp->chan_type != channel_type || + tmp->sdata != sdata) continue; /* diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 4dc2577886f..284dd02385e 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h @@ -704,6 +704,7 @@ static inline int drv_get_antenna(struct ieee80211_local *local, } static inline int drv_remain_on_channel(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, struct ieee80211_channel *chan, enum nl80211_channel_type chantype, unsigned int duration) @@ -712,9 +713,9 @@ static inline int drv_remain_on_channel(struct ieee80211_local *local, might_sleep(); - trace_drv_remain_on_channel(local, chan, chantype, duration); - ret = local->ops->remain_on_channel(&local->hw, chan, chantype, - duration); + trace_drv_remain_on_channel(local, sdata, chan, chantype, duration); + ret = local->ops->remain_on_channel(&local->hw, &sdata->vif, + chan, chantype, duration); trace_drv_return_int(local, ret); return ret; diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 0cd42d52880..7f8a3651081 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -283,7 +283,7 @@ void ieee80211_start_next_roc(struct ieee80211_local *local) if (!duration) duration = 10; - ret = drv_remain_on_channel(local, roc->chan, + ret = drv_remain_on_channel(local, roc->sdata, roc->chan, roc->chan_type, duration); diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h index 758836c85a8..e9579b7a2cd 100644 --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h @@ -1019,13 +1019,16 @@ TRACE_EVENT(drv_get_antenna, ); TRACE_EVENT(drv_remain_on_channel, - TP_PROTO(struct ieee80211_local *local, struct ieee80211_channel *chan, + TP_PROTO(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct ieee80211_channel *chan, enum nl80211_channel_type chantype, unsigned int duration), - TP_ARGS(local, chan, chantype, duration), + TP_ARGS(local, sdata, chan, chantype, duration), TP_STRUCT__entry( LOCAL_ENTRY + VIF_ENTRY __field(int, center_freq) __field(int, channel_type) __field(unsigned int, duration) @@ -1033,14 +1036,16 @@ TRACE_EVENT(drv_remain_on_channel, TP_fast_assign( LOCAL_ASSIGN; + VIF_ASSIGN; __entry->center_freq = chan->center_freq; __entry->channel_type = chantype; __entry->duration = duration; ), TP_printk( - LOCAL_PR_FMT " freq:%dMHz duration:%dms", - LOCAL_PR_ARG, __entry->center_freq, __entry->duration + LOCAL_PR_FMT VIF_PR_FMT " freq:%dMHz duration:%dms", + LOCAL_PR_ARG, VIF_PR_ARG, + __entry->center_freq, __entry->duration ) ); |