aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch
blob: c3a4c0db25fa904c6f32842aaad94ccd8af8469e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
From: Lorenzo Bianconi <lorenzo@kernel.org>
Date: Mon, 29 Nov 2021 14:11:24 +0100
Subject: [PATCH] cfg80211: rename offchannel_chain structs to background_chain
 to avoid confusion with ETSI standard

ETSI standard defines "Offchannel CAC" as:
"Off-Channel CAC is performed by a number of non-continuous checks
spread over a period in time. This period, which is required to
determine the presence of radar signals, is defined as the Off-Channel
CAC Time..
Minimum Off-Channel CAC Time 6 minutes and Maximum Off-Channel CAC Time
4 hours..".
mac80211 implementation refers to a dedicated hw chain used for continuous
radar monitoring. Rename offchannel_* references to background_* in
order to avoid confusion with ETSI standard.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/4204cc1d648d76b44557981713231e030a3bd991.1638190762.git.lorenzo@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---

--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -4058,14 +4058,14 @@ struct mgmt_frame_regs {
  *
  * @color_change: Initiate a color change.
  *
- * @set_radar_offchan: Configure dedicated offchannel chain available for
+ * @set_radar_background: Configure dedicated offchannel chain available for
  *	radar/CAC detection on some hw. This chain can't be used to transmit
  *	or receive frames and it is bounded to a running wdev.
- *	Offchannel radar/CAC detection allows to avoid the CAC downtime
+ *	Background radar/CAC detection allows to avoid the CAC downtime
  *	switching to a different channel during CAC detection on the selected
  *	radar channel.
  *	The caller is expected to set chandef pointer to NULL in order to
- *	disable offchannel CAC/radar detection.
+ *	disable background CAC/radar detection.
  */
 struct cfg80211_ops {
 	int	(*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -4396,8 +4396,8 @@ struct cfg80211_ops {
 	int	(*color_change)(struct wiphy *wiphy,
 				struct net_device *dev,
 				struct cfg80211_color_change_settings *params);
-	int	(*set_radar_offchan)(struct wiphy *wiphy,
-				     struct cfg80211_chan_def *chandef);
+	int	(*set_radar_background)(struct wiphy *wiphy,
+					struct cfg80211_chan_def *chandef);
 };
 
 /*
@@ -7601,9 +7601,9 @@ cfg80211_radar_event(struct wiphy *wiphy
 }
 
 static inline void
-cfg80211_offchan_radar_event(struct wiphy *wiphy,
-			     struct cfg80211_chan_def *chandef,
-			     gfp_t gfp)
+cfg80211_background_radar_event(struct wiphy *wiphy,
+				struct cfg80211_chan_def *chandef,
+				gfp_t gfp)
 {
 	__cfg80211_radar_event(wiphy, chandef, true, gfp);
 }
@@ -7638,13 +7638,13 @@ void cfg80211_cac_event(struct net_devic
 			enum nl80211_radar_event event, gfp_t gfp);
 
 /**
- * cfg80211_offchan_cac_abort - Channel Availability Check offchan abort event
+ * cfg80211_background_cac_abort - Channel Availability Check offchan abort event
  * @wiphy: the wiphy
  *
  * This function is called by the driver when a Channel Availability Check
  * (CAC) is aborted by a offchannel dedicated chain.
  */
-void cfg80211_offchan_cac_abort(struct wiphy *wiphy);
+void cfg80211_background_cac_abort(struct wiphy *wiphy);
 
 /**
  * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3937,14 +3937,14 @@ struct ieee80211_prep_tx_info {
  *	twt structure.
  * @twt_teardown_request: Update the hw with TWT teardown request received
  *	from the peer.
- * @set_radar_offchan: Configure dedicated offchannel chain available for
+ * @set_radar_background: Configure dedicated offchannel chain available for
  *	radar/CAC detection on some hw. This chain can't be used to transmit
  *	or receive frames and it is bounded to a running wdev.
- *	Offchannel radar/CAC detection allows to avoid the CAC downtime
+ *	Background radar/CAC detection allows to avoid the CAC downtime
  *	switching to a different channel during CAC detection on the selected
  *	radar channel.
  *	The caller is expected to set chandef pointer to NULL in order to
- *	disable offchannel CAC/radar detection.
+ *	disable background CAC/radar detection.
  * @net_fill_forward_path: Called from .ndo_fill_forward_path in order to
  *	resolve a path for hardware flow offloading
  */
@@ -4275,8 +4275,8 @@ struct ieee80211_ops {
 			      struct ieee80211_twt_setup *twt);
 	void (*twt_teardown_request)(struct ieee80211_hw *hw,
 				     struct ieee80211_sta *sta, u8 flowid);
-	int (*set_radar_offchan)(struct ieee80211_hw *hw,
-				 struct cfg80211_chan_def *chandef);
+	int (*set_radar_background)(struct ieee80211_hw *hw,
+				    struct cfg80211_chan_def *chandef);
 #if LINUX_VERSION_IS_GEQ(5,10,0)
 	int (*net_fill_forward_path)(struct ieee80211_hw *hw,
 				     struct ieee80211_vif *vif,
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -2608,10 +2608,10 @@ enum nl80211_commands {
  *	Mandatory parameter for the transmitting interface to enable MBSSID.
  *	Optional for the non-transmitting interfaces.
  *
- * @NL80211_ATTR_RADAR_OFFCHAN: Configure dedicated offchannel chain available for
- *	radar/CAC detection on some hw. This chain can't be used to transmit
- *	or receive frames and it is bounded to a running wdev.
- *	Offchannel radar/CAC detection allows to avoid the CAC downtime
+ * @NL80211_ATTR_RADAR_BACKGROUND: Configure dedicated offchannel chain
+ *	available for radar/CAC detection on some hw. This chain can't be used
+ *	to transmit or receive frames and it is bounded to a running wdev.
+ *	Background radar/CAC detection allows to avoid the CAC downtime
  *	switching on a different channel during CAC detection on the selected
  *	radar channel.
  *
@@ -3121,7 +3121,7 @@ enum nl80211_attrs {
 	NL80211_ATTR_MBSSID_CONFIG,
 	NL80211_ATTR_MBSSID_ELEMS,
 
-	NL80211_ATTR_RADAR_OFFCHAN,
+	NL80211_ATTR_RADAR_BACKGROUND,
 
 	/* add attributes here, update the policy in nl80211.c */
 
@@ -6022,7 +6022,7 @@ enum nl80211_feature_flags {
  * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision
  *	detection and change announcemnts.
  *
- * @NL80211_EXT_FEATURE_RADAR_OFFCHAN: Device supports offchannel radar/CAC
+ * @NL80211_EXT_FEATURE_RADAR_BACKGROUND: Device supports background radar/CAC
  *	detection.
  *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
@@ -6090,7 +6090,7 @@ enum nl80211_ext_feature_index {
 	NL80211_EXT_FEATURE_SECURE_RTT,
 	NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
 	NL80211_EXT_FEATURE_BSS_COLOR,
-	NL80211_EXT_FEATURE_RADAR_OFFCHAN,
+	NL80211_EXT_FEATURE_RADAR_BACKGROUND,
 
 	/* add new features before the definition below */
 	NUM_NL80211_EXT_FEATURES,
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -4345,15 +4345,15 @@ out:
 }
 
 static int
-ieee80211_set_radar_offchan(struct wiphy *wiphy,
-			    struct cfg80211_chan_def *chandef)
+ieee80211_set_radar_background(struct wiphy *wiphy,
+			       struct cfg80211_chan_def *chandef)
 {
 	struct ieee80211_local *local = wiphy_priv(wiphy);
 
-	if (!local->ops->set_radar_offchan)
+	if (!local->ops->set_radar_background)
 		return -EOPNOTSUPP;
 
-	return local->ops->set_radar_offchan(&local->hw, chandef);
+	return local->ops->set_radar_background(&local->hw, chandef);
 }
 
 const struct cfg80211_ops mac80211_config_ops = {
@@ -4460,5 +4460,5 @@ const struct cfg80211_ops mac80211_confi
 	.reset_tid_config = ieee80211_reset_tid_config,
 	.set_sar_specs = ieee80211_set_sar_specs,
 	.color_change = ieee80211_color_change,
-	.set_radar_offchan = ieee80211_set_radar_offchan,
+	.set_radar_background = ieee80211_set_radar_background,
 };
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -716,13 +716,13 @@ static bool
 cfg80211_offchan_chain_is_active(struct cfg80211_registered_device *rdev,
 				 struct ieee80211_channel *channel)
 {
-	if (!rdev->offchan_radar_wdev)
+	if (!rdev->background_radar_wdev)
 		return false;
 
-	if (!cfg80211_chandef_valid(&rdev->offchan_radar_chandef))
+	if (!cfg80211_chandef_valid(&rdev->background_radar_chandef))
 		return false;
 
-	return cfg80211_is_sub_chan(&rdev->offchan_radar_chandef, channel);
+	return cfg80211_is_sub_chan(&rdev->background_radar_chandef, channel);
 }
 
 bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy,
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -543,9 +543,10 @@ use_default_name:
 	INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
 	INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
 	INIT_WORK(&rdev->event_work, cfg80211_event_work);
-	INIT_WORK(&rdev->offchan_cac_abort_wk, cfg80211_offchan_cac_abort_wk);
-	INIT_DELAYED_WORK(&rdev->offchan_cac_done_wk,
-			  cfg80211_offchan_cac_done_wk);
+	INIT_WORK(&rdev->background_cac_abort_wk,
+		  cfg80211_background_cac_abort_wk);
+	INIT_DELAYED_WORK(&rdev->background_cac_done_wk,
+			  cfg80211_background_cac_done_wk);
 
 	init_waitqueue_head(&rdev->dev_wait);
 
@@ -1055,13 +1056,13 @@ void wiphy_unregister(struct wiphy *wiph
 	cancel_work_sync(&rdev->conn_work);
 	flush_work(&rdev->event_work);
 	cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
-	cancel_delayed_work_sync(&rdev->offchan_cac_done_wk);
+	cancel_delayed_work_sync(&rdev->background_cac_done_wk);
 	flush_work(&rdev->destroy_work);
 	flush_work(&rdev->sched_scan_stop_wk);
 	flush_work(&rdev->propagate_radar_detect_wk);
 	flush_work(&rdev->propagate_cac_done_wk);
 	flush_work(&rdev->mgmt_registrations_update_wk);
-	flush_work(&rdev->offchan_cac_abort_wk);
+	flush_work(&rdev->background_cac_abort_wk);
 
 #ifdef CONFIG_PM
 	if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup)
@@ -1210,7 +1211,7 @@ void __cfg80211_leave(struct cfg80211_re
 
 	cfg80211_pmsr_wdev_down(wdev);
 
-	cfg80211_stop_offchan_radar_detection(wdev);
+	cfg80211_stop_background_radar_detection(wdev);
 
 	switch (wdev->iftype) {
 	case NL80211_IFTYPE_ADHOC:
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -84,10 +84,10 @@ struct cfg80211_registered_device {
 
 	struct delayed_work dfs_update_channels_wk;
 
-	struct wireless_dev *offchan_radar_wdev;
-	struct cfg80211_chan_def offchan_radar_chandef;
-	struct delayed_work offchan_cac_done_wk;
-	struct work_struct offchan_cac_abort_wk;
+	struct wireless_dev *background_radar_wdev;
+	struct cfg80211_chan_def background_radar_chandef;
+	struct delayed_work background_cac_done_wk;
+	struct work_struct background_cac_abort_wk;
 
 	/* netlink port which started critical protocol (0 means not started) */
 	u32 crit_proto_nlportid;
@@ -497,15 +497,15 @@ cfg80211_chandef_dfs_cac_time(struct wip
 void cfg80211_sched_dfs_chan_update(struct cfg80211_registered_device *rdev);
 
 int
-cfg80211_start_offchan_radar_detection(struct cfg80211_registered_device *rdev,
-				       struct wireless_dev *wdev,
-				       struct cfg80211_chan_def *chandef);
+cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rdev,
+					  struct wireless_dev *wdev,
+					  struct cfg80211_chan_def *chandef);
 
-void cfg80211_stop_offchan_radar_detection(struct wireless_dev *wdev);
+void cfg80211_stop_background_radar_detection(struct wireless_dev *wdev);
 
-void cfg80211_offchan_cac_done_wk(struct work_struct *work);
+void cfg80211_background_cac_done_wk(struct work_struct *work);
 
-void cfg80211_offchan_cac_abort_wk(struct work_struct *work);
+void cfg80211_background_cac_abort_wk(struct work_struct *work);
 
 bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy,
 				  struct ieee80211_channel *chan);
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -920,7 +920,7 @@ void __cfg80211_radar_event(struct wiphy
 	cfg80211_set_dfs_state(wiphy, chandef, NL80211_DFS_UNAVAILABLE);
 
 	if (offchan)
-		queue_work(cfg80211_wq, &rdev->offchan_cac_abort_wk);
+		queue_work(cfg80211_wq, &rdev->background_cac_abort_wk);
 
 	cfg80211_sched_dfs_chan_update(rdev);
 
@@ -975,10 +975,10 @@ void cfg80211_cac_event(struct net_devic
 EXPORT_SYMBOL(cfg80211_cac_event);
 
 static void
-__cfg80211_offchan_cac_event(struct cfg80211_registered_device *rdev,
-			     struct wireless_dev *wdev,
-			     const struct cfg80211_chan_def *chandef,
-			     enum nl80211_radar_event event)
+__cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
+				struct wireless_dev *wdev,
+				const struct cfg80211_chan_def *chandef,
+				enum nl80211_radar_event event)
 {
 	struct wiphy *wiphy = &rdev->wiphy;
 	struct net_device *netdev;
@@ -988,7 +988,7 @@ __cfg80211_offchan_cac_event(struct cfg8
 	if (!cfg80211_chandef_valid(chandef))
 		return;
 
-	if (!rdev->offchan_radar_wdev)
+	if (!rdev->background_radar_wdev)
 		return;
 
 	switch (event) {
@@ -997,12 +997,12 @@ __cfg80211_offchan_cac_event(struct cfg8
 		memcpy(&rdev->cac_done_chandef, chandef, sizeof(*chandef));
 		queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk);
 		cfg80211_sched_dfs_chan_update(rdev);
-		wdev = rdev->offchan_radar_wdev;
+		wdev = rdev->background_radar_wdev;
 		break;
 	case NL80211_RADAR_CAC_ABORTED:
-		if (!cancel_delayed_work(&rdev->offchan_cac_done_wk))
+		if (!cancel_delayed_work(&rdev->background_cac_done_wk))
 			return;
-		wdev = rdev->offchan_radar_wdev;
+		wdev = rdev->background_radar_wdev;
 		break;
 	case NL80211_RADAR_CAC_STARTED:
 		break;
@@ -1015,49 +1015,49 @@ __cfg80211_offchan_cac_event(struct cfg8
 }
 
 static void
-cfg80211_offchan_cac_event(struct cfg80211_registered_device *rdev,
-			   const struct cfg80211_chan_def *chandef,
-			   enum nl80211_radar_event event)
+cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
+			      const struct cfg80211_chan_def *chandef,
+			      enum nl80211_radar_event event)
 {
 	wiphy_lock(&rdev->wiphy);
-	__cfg80211_offchan_cac_event(rdev, rdev->offchan_radar_wdev,
-				     chandef, event);
+	__cfg80211_background_cac_event(rdev, rdev->background_radar_wdev,
+					chandef, event);
 	wiphy_unlock(&rdev->wiphy);
 }
 
-void cfg80211_offchan_cac_done_wk(struct work_struct *work)
+void cfg80211_background_cac_done_wk(struct work_struct *work)
 {
 	struct delayed_work *delayed_work = to_delayed_work(work);
 	struct cfg80211_registered_device *rdev;
 
 	rdev = container_of(delayed_work, struct cfg80211_registered_device,
-			    offchan_cac_done_wk);
-	cfg80211_offchan_cac_event(rdev, &rdev->offchan_radar_chandef,
-				   NL80211_RADAR_CAC_FINISHED);
+			    background_cac_done_wk);
+	cfg80211_background_cac_event(rdev, &rdev->background_radar_chandef,
+				      NL80211_RADAR_CAC_FINISHED);
 }
 
-void cfg80211_offchan_cac_abort_wk(struct work_struct *work)
+void cfg80211_background_cac_abort_wk(struct work_struct *work)
 {
 	struct cfg80211_registered_device *rdev;
 
 	rdev = container_of(work, struct cfg80211_registered_device,
-			    offchan_cac_abort_wk);
-	cfg80211_offchan_cac_event(rdev, &rdev->offchan_radar_chandef,
-				   NL80211_RADAR_CAC_ABORTED);
+			    background_cac_abort_wk);
+	cfg80211_background_cac_event(rdev, &rdev->background_radar_chandef,
+				      NL80211_RADAR_CAC_ABORTED);
 }
 
-void cfg80211_offchan_cac_abort(struct wiphy *wiphy)
+void cfg80211_background_cac_abort(struct wiphy *wiphy)
 {
 	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
 
-	queue_work(cfg80211_wq, &rdev->offchan_cac_abort_wk);
+	queue_work(cfg80211_wq, &rdev->background_cac_abort_wk);
 }
-EXPORT_SYMBOL(cfg80211_offchan_cac_abort);
+EXPORT_SYMBOL(cfg80211_background_cac_abort);
 
 int
-cfg80211_start_offchan_radar_detection(struct cfg80211_registered_device *rdev,
-				       struct wireless_dev *wdev,
-				       struct cfg80211_chan_def *chandef)
+cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rdev,
+					  struct wireless_dev *wdev,
+					  struct cfg80211_chan_def *chandef)
 {
 	unsigned int cac_time_ms;
 	int err;
@@ -1065,19 +1065,19 @@ cfg80211_start_offchan_radar_detection(s
 	lockdep_assert_wiphy(&rdev->wiphy);
 
 	if (!wiphy_ext_feature_isset(&rdev->wiphy,
-				     NL80211_EXT_FEATURE_RADAR_OFFCHAN))
+				     NL80211_EXT_FEATURE_RADAR_BACKGROUND))
 		return -EOPNOTSUPP;
 
 	/* Offchannel chain already locked by another wdev */
-	if (rdev->offchan_radar_wdev && rdev->offchan_radar_wdev != wdev)
+	if (rdev->background_radar_wdev && rdev->background_radar_wdev != wdev)
 		return -EBUSY;
 
 	/* CAC already in progress on the offchannel chain */
-	if (rdev->offchan_radar_wdev == wdev &&
-	    delayed_work_pending(&rdev->offchan_cac_done_wk))
+	if (rdev->background_radar_wdev == wdev &&
+	    delayed_work_pending(&rdev->background_cac_done_wk))
 		return -EBUSY;
 
-	err = rdev_set_radar_offchan(rdev, chandef);
+	err = rdev_set_radar_background(rdev, chandef);
 	if (err)
 		return err;
 
@@ -1085,30 +1085,31 @@ cfg80211_start_offchan_radar_detection(s
 	if (!cac_time_ms)
 		cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
 
-	rdev->offchan_radar_chandef = *chandef;
-	rdev->offchan_radar_wdev = wdev; /* Get offchain ownership */
+	rdev->background_radar_chandef = *chandef;
+	rdev->background_radar_wdev = wdev; /* Get offchain ownership */
 
-	__cfg80211_offchan_cac_event(rdev, wdev, chandef,
-				     NL80211_RADAR_CAC_STARTED);
-	queue_delayed_work(cfg80211_wq, &rdev->offchan_cac_done_wk,
+	__cfg80211_background_cac_event(rdev, wdev, chandef,
+					NL80211_RADAR_CAC_STARTED);
+	queue_delayed_work(cfg80211_wq, &rdev->background_cac_done_wk,
 			   msecs_to_jiffies(cac_time_ms));
 
 	return 0;
 }
 
-void cfg80211_stop_offchan_radar_detection(struct wireless_dev *wdev)
+void cfg80211_stop_background_radar_detection(struct wireless_dev *wdev)
 {
 	struct wiphy *wiphy = wdev->wiphy;
 	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
 
 	lockdep_assert_wiphy(wiphy);
 
-	if (wdev != rdev->offchan_radar_wdev)
+	if (wdev != rdev->background_radar_wdev)
 		return;
 
-	rdev_set_radar_offchan(rdev, NULL);
-	rdev->offchan_radar_wdev = NULL; /* Release offchain ownership */
+	rdev_set_radar_background(rdev, NULL);
+	rdev->background_radar_wdev = NULL; /* Release offchain ownership */
 
-	__cfg80211_offchan_cac_event(rdev, wdev, &rdev->offchan_radar_chandef,
-				     NL80211_RADAR_CAC_ABORTED);
+	__cfg80211_background_cac_event(rdev, wdev,
+					&rdev->background_radar_chandef,
+					NL80211_RADAR_CAC_ABORTED);
 }
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -796,7 +796,7 @@ static const struct nla_policy nl80211_p
 	[NL80211_ATTR_MBSSID_CONFIG] =
 			NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
 	[NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
-	[NL80211_ATTR_RADAR_OFFCHAN] = { .type = NLA_FLAG },
+	[NL80211_ATTR_RADAR_BACKGROUND] = { .type = NLA_FLAG },
 };
 
 /* policy for the key attributes */
@@ -9291,9 +9291,9 @@ static int nl80211_start_radar_detection
 		goto unlock;
 	}
 
-	if (nla_get_flag(info->attrs[NL80211_ATTR_RADAR_OFFCHAN])) {
-		err = cfg80211_start_offchan_radar_detection(rdev, wdev,
-							     &chandef);
+	if (nla_get_flag(info->attrs[NL80211_ATTR_RADAR_BACKGROUND])) {
+		err = cfg80211_start_background_radar_detection(rdev, wdev,
+								&chandef);
 		goto unlock;
 	}
 
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -1382,17 +1382,17 @@ static inline int rdev_color_change(stru
 }
 
 static inline int
-rdev_set_radar_offchan(struct cfg80211_registered_device *rdev,
-		       struct cfg80211_chan_def *chandef)
+rdev_set_radar_background(struct cfg80211_registered_device *rdev,
+			  struct cfg80211_chan_def *chandef)
 {
 	struct wiphy *wiphy = &rdev->wiphy;
 	int ret;
 
-	if (!rdev->ops->set_radar_offchan)
+	if (!rdev->ops->set_radar_background)
 		return -EOPNOTSUPP;
 
-	trace_rdev_set_radar_offchan(wiphy, chandef);
-	ret = rdev->ops->set_radar_offchan(wiphy, chandef);
+	trace_rdev_set_radar_background(wiphy, chandef);
+	ret = rdev->ops->set_radar_background(wiphy, chandef);
 	trace_rdev_return_int(wiphy, ret);
 
 	return ret;
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -3646,7 +3646,7 @@ TRACE_EVENT(cfg80211_bss_color_notify,
 		  __entry->color_bitmap)
 );
 
-TRACE_EVENT(rdev_set_radar_offchan,
+TRACE_EVENT(rdev_set_radar_background,
 	TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
 
 	TP_ARGS(wiphy, chandef),