cfg80211/nl80211: add CAC_STARTED event

CAC_STARTED event is needed for DFS offload feature and
should be generated by driver/HW if DFS_OFFLOAD is enabled.

Signed-off-by: Dmitry Lebed <dlebed@quantenna.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Dmitry Lebed 2018-03-01 12:39:16 +03:00 committed by Johannes Berg
parent 1ad22fb5bb
commit 2cb021f5de
2 changed files with 8 additions and 2 deletions

View File

@ -5204,6 +5204,8 @@ enum nl80211_smps_mode {
* non-operating channel is expired and no longer valid. New CAC must * non-operating channel is expired and no longer valid. New CAC must
* be done on this channel before starting the operation. This is not * be done on this channel before starting the operation. This is not
* applicable for ETSI dfs domain where pre-CAC is valid for ever. * applicable for ETSI dfs domain where pre-CAC is valid for ever.
* @NL80211_RADAR_CAC_STARTED: Channel Availability Check has been started,
* should be generated by HW if NL80211_EXT_FEATURE_DFS_OFFLOAD is enabled.
*/ */
enum nl80211_radar_event { enum nl80211_radar_event {
NL80211_RADAR_DETECTED, NL80211_RADAR_DETECTED,
@ -5211,6 +5213,7 @@ enum nl80211_radar_event {
NL80211_RADAR_CAC_ABORTED, NL80211_RADAR_CAC_ABORTED,
NL80211_RADAR_NOP_FINISHED, NL80211_RADAR_NOP_FINISHED,
NL80211_RADAR_PRE_CAC_EXPIRED, NL80211_RADAR_PRE_CAC_EXPIRED,
NL80211_RADAR_CAC_STARTED,
}; };
/** /**

View File

@ -888,14 +888,17 @@ void cfg80211_cac_event(struct net_device *netdev,
sizeof(struct cfg80211_chan_def)); sizeof(struct cfg80211_chan_def));
queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk); queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk);
cfg80211_sched_dfs_chan_update(rdev); cfg80211_sched_dfs_chan_update(rdev);
break; /* fall through */
case NL80211_RADAR_CAC_ABORTED: case NL80211_RADAR_CAC_ABORTED:
wdev->cac_started = false;
break;
case NL80211_RADAR_CAC_STARTED:
wdev->cac_started = true;
break; break;
default: default:
WARN_ON(1); WARN_ON(1);
return; return;
} }
wdev->cac_started = false;
nl80211_radar_notify(rdev, chandef, event, netdev, gfp); nl80211_radar_notify(rdev, chandef, event, netdev, gfp);
} }