diff options
Diffstat (limited to 'net/mac80211/offchannel.c')
| -rw-r--r-- | net/mac80211/offchannel.c | 21 | 
1 files changed, 12 insertions, 9 deletions
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 6c4080202573..221695d841fd 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -86,7 +86,7 @@ void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local)  	lockdep_assert_wiphy(local->hw.wiphy); -	if (WARN_ON(local->use_chanctx)) +	if (WARN_ON(!local->emulate_chanctx))  		return;  	/* @@ -136,7 +136,7 @@ void ieee80211_offchannel_return(struct ieee80211_local *local)  	lockdep_assert_wiphy(local->hw.wiphy); -	if (WARN_ON(local->use_chanctx)) +	if (WARN_ON(!local->emulate_chanctx))  		return;  	list_for_each_entry(sdata, &local->interfaces, list) { @@ -351,10 +351,13 @@ static void _ieee80211_start_next_roc(struct ieee80211_local *local)  		 * 20 MHz channel width) don't stop all the operations but still  		 * treat it as though the ROC operation started properly, so  		 * other ROC operations won't interfere with this one. +		 * +		 * Note: scan can't run, tmp_channel is what we use, so this +		 * must be the currently active channel.  		 */ -		roc->on_channel = roc->chan == local->_oper_chandef.chan && -				  local->_oper_chandef.width != NL80211_CHAN_WIDTH_5 && -				  local->_oper_chandef.width != NL80211_CHAN_WIDTH_10; +		roc->on_channel = roc->chan == local->hw.conf.chandef.chan && +				  local->hw.conf.chandef.width != NL80211_CHAN_WIDTH_5 && +				  local->hw.conf.chandef.width != NL80211_CHAN_WIDTH_10;  		/* start this ROC */  		ieee80211_recalc_idle(local); @@ -363,7 +366,7 @@ static void _ieee80211_start_next_roc(struct ieee80211_local *local)  			ieee80211_offchannel_stop_vifs(local);  			local->tmp_channel = roc->chan; -			ieee80211_hw_config(local, 0); +			ieee80211_hw_conf_chan(local);  		}  		wiphy_delayed_work_queue(local->hw.wiphy, &local->roc_work, @@ -426,7 +429,7 @@ static void __ieee80211_roc_work(struct ieee80211_local *local)  		return;  	if (!roc->started) { -		WARN_ON(local->use_chanctx); +		WARN_ON(!local->emulate_chanctx);  		_ieee80211_start_next_roc(local);  	} else {  		on_channel = roc->on_channel; @@ -439,7 +442,7 @@ static void __ieee80211_roc_work(struct ieee80211_local *local)  			ieee80211_flush_queues(local, NULL, false);  			local->tmp_channel = NULL; -			ieee80211_hw_config(local, 0); +			ieee80211_hw_conf_chan(local);  			ieee80211_offchannel_return(local);  		} @@ -539,7 +542,7 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,  		/* this may work, but is untested */  		return -EOPNOTSUPP; -	if (local->use_chanctx && !local->ops->remain_on_channel) +	if (!local->emulate_chanctx && !local->ops->remain_on_channel)  		return -EOPNOTSUPP;  	roc = kzalloc(sizeof(*roc), GFP_KERNEL);  |