320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. From: Lorenzo Bianconi <[email protected]>
  2. Date: Mon, 29 Nov 2021 14:11:24 +0100
  3. Subject: [PATCH] cfg80211: rename offchannel_chain structs to background_chain
  4. to avoid confusion with ETSI standard
  5. ETSI standard defines "Offchannel CAC" as:
  6. "Off-Channel CAC is performed by a number of non-continuous checks
  7. spread over a period in time. This period, which is required to
  8. determine the presence of radar signals, is defined as the Off-Channel
  9. CAC Time..
  10. Minimum Off-Channel CAC Time 6 minutes and Maximum Off-Channel CAC Time
  11. 4 hours..".
  12. mac80211 implementation refers to a dedicated hw chain used for continuous
  13. radar monitoring. Rename offchannel_* references to background_* in
  14. order to avoid confusion with ETSI standard.
  15. Signed-off-by: Lorenzo Bianconi <[email protected]>
  16. Link: https://lore.kernel.org/r/4204cc1d648d76b44557981713231e030a3bd991.1638190762.git.lorenzo@kernel.org
  17. Signed-off-by: Johannes Berg <[email protected]>
  18. ---
  19. --- a/include/net/cfg80211.h
  20. +++ b/include/net/cfg80211.h
  21. @@ -4058,14 +4058,14 @@ struct mgmt_frame_regs {
  22. *
  23. * @color_change: Initiate a color change.
  24. *
  25. - * @set_radar_offchan: Configure dedicated offchannel chain available for
  26. + * @set_radar_background: Configure dedicated offchannel chain available for
  27. * radar/CAC detection on some hw. This chain can't be used to transmit
  28. * or receive frames and it is bounded to a running wdev.
  29. - * Offchannel radar/CAC detection allows to avoid the CAC downtime
  30. + * Background radar/CAC detection allows to avoid the CAC downtime
  31. * switching to a different channel during CAC detection on the selected
  32. * radar channel.
  33. * The caller is expected to set chandef pointer to NULL in order to
  34. - * disable offchannel CAC/radar detection.
  35. + * disable background CAC/radar detection.
  36. */
  37. struct cfg80211_ops {
  38. int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
  39. @@ -4396,8 +4396,8 @@ struct cfg80211_ops {
  40. int (*color_change)(struct wiphy *wiphy,
  41. struct net_device *dev,
  42. struct cfg80211_color_change_settings *params);
  43. - int (*set_radar_offchan)(struct wiphy *wiphy,
  44. - struct cfg80211_chan_def *chandef);
  45. + int (*set_radar_background)(struct wiphy *wiphy,
  46. + struct cfg80211_chan_def *chandef);
  47. };
  48. /*
  49. @@ -7601,9 +7601,9 @@ cfg80211_radar_event(struct wiphy *wiphy
  50. }
  51. static inline void
  52. -cfg80211_offchan_radar_event(struct wiphy *wiphy,
  53. - struct cfg80211_chan_def *chandef,
  54. - gfp_t gfp)
  55. +cfg80211_background_radar_event(struct wiphy *wiphy,
  56. + struct cfg80211_chan_def *chandef,
  57. + gfp_t gfp)
  58. {
  59. __cfg80211_radar_event(wiphy, chandef, true, gfp);
  60. }
  61. @@ -7638,13 +7638,13 @@ void cfg80211_cac_event(struct net_devic
  62. enum nl80211_radar_event event, gfp_t gfp);
  63. /**
  64. - * cfg80211_offchan_cac_abort - Channel Availability Check offchan abort event
  65. + * cfg80211_background_cac_abort - Channel Availability Check offchan abort event
  66. * @wiphy: the wiphy
  67. *
  68. * This function is called by the driver when a Channel Availability Check
  69. * (CAC) is aborted by a offchannel dedicated chain.
  70. */
  71. -void cfg80211_offchan_cac_abort(struct wiphy *wiphy);
  72. +void cfg80211_background_cac_abort(struct wiphy *wiphy);
  73. /**
  74. * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying
  75. --- a/include/net/mac80211.h
  76. +++ b/include/net/mac80211.h
  77. @@ -3937,14 +3937,14 @@ struct ieee80211_prep_tx_info {
  78. * twt structure.
  79. * @twt_teardown_request: Update the hw with TWT teardown request received
  80. * from the peer.
  81. - * @set_radar_offchan: Configure dedicated offchannel chain available for
  82. + * @set_radar_background: Configure dedicated offchannel chain available for
  83. * radar/CAC detection on some hw. This chain can't be used to transmit
  84. * or receive frames and it is bounded to a running wdev.
  85. - * Offchannel radar/CAC detection allows to avoid the CAC downtime
  86. + * Background radar/CAC detection allows to avoid the CAC downtime
  87. * switching to a different channel during CAC detection on the selected
  88. * radar channel.
  89. * The caller is expected to set chandef pointer to NULL in order to
  90. - * disable offchannel CAC/radar detection.
  91. + * disable background CAC/radar detection.
  92. * @net_fill_forward_path: Called from .ndo_fill_forward_path in order to
  93. * resolve a path for hardware flow offloading
  94. */
  95. @@ -4275,8 +4275,8 @@ struct ieee80211_ops {
  96. struct ieee80211_twt_setup *twt);
  97. void (*twt_teardown_request)(struct ieee80211_hw *hw,
  98. struct ieee80211_sta *sta, u8 flowid);
  99. - int (*set_radar_offchan)(struct ieee80211_hw *hw,
  100. - struct cfg80211_chan_def *chandef);
  101. + int (*set_radar_background)(struct ieee80211_hw *hw,
  102. + struct cfg80211_chan_def *chandef);
  103. #if LINUX_VERSION_IS_GEQ(5,10,0)
  104. int (*net_fill_forward_path)(struct ieee80211_hw *hw,
  105. struct ieee80211_vif *vif,
  106. --- a/include/uapi/linux/nl80211.h
  107. +++ b/include/uapi/linux/nl80211.h
  108. @@ -2608,10 +2608,10 @@ enum nl80211_commands {
  109. * Mandatory parameter for the transmitting interface to enable MBSSID.
  110. * Optional for the non-transmitting interfaces.
  111. *
  112. - * @NL80211_ATTR_RADAR_OFFCHAN: Configure dedicated offchannel chain available for
  113. - * radar/CAC detection on some hw. This chain can't be used to transmit
  114. - * or receive frames and it is bounded to a running wdev.
  115. - * Offchannel radar/CAC detection allows to avoid the CAC downtime
  116. + * @NL80211_ATTR_RADAR_BACKGROUND: Configure dedicated offchannel chain
  117. + * available for radar/CAC detection on some hw. This chain can't be used
  118. + * to transmit or receive frames and it is bounded to a running wdev.
  119. + * Background radar/CAC detection allows to avoid the CAC downtime
  120. * switching on a different channel during CAC detection on the selected
  121. * radar channel.
  122. *
  123. @@ -3121,7 +3121,7 @@ enum nl80211_attrs {
  124. NL80211_ATTR_MBSSID_CONFIG,
  125. NL80211_ATTR_MBSSID_ELEMS,
  126. - NL80211_ATTR_RADAR_OFFCHAN,
  127. + NL80211_ATTR_RADAR_BACKGROUND,
  128. /* add attributes here, update the policy in nl80211.c */
  129. @@ -6022,7 +6022,7 @@ enum nl80211_feature_flags {
  130. * @NL80211_EXT_FEATURE_BSS_COLOR: The driver supports BSS color collision
  131. * detection and change announcemnts.
  132. *
  133. - * @NL80211_EXT_FEATURE_RADAR_OFFCHAN: Device supports offchannel radar/CAC
  134. + * @NL80211_EXT_FEATURE_RADAR_BACKGROUND: Device supports background radar/CAC
  135. * detection.
  136. *
  137. * @NUM_NL80211_EXT_FEATURES: number of extended features.
  138. @@ -6090,7 +6090,7 @@ enum nl80211_ext_feature_index {
  139. NL80211_EXT_FEATURE_SECURE_RTT,
  140. NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE,
  141. NL80211_EXT_FEATURE_BSS_COLOR,
  142. - NL80211_EXT_FEATURE_RADAR_OFFCHAN,
  143. + NL80211_EXT_FEATURE_RADAR_BACKGROUND,
  144. /* add new features before the definition below */
  145. NUM_NL80211_EXT_FEATURES,
  146. --- a/net/mac80211/cfg.c
  147. +++ b/net/mac80211/cfg.c
  148. @@ -4345,15 +4345,15 @@ out:
  149. }
  150. static int
  151. -ieee80211_set_radar_offchan(struct wiphy *wiphy,
  152. - struct cfg80211_chan_def *chandef)
  153. +ieee80211_set_radar_background(struct wiphy *wiphy,
  154. + struct cfg80211_chan_def *chandef)
  155. {
  156. struct ieee80211_local *local = wiphy_priv(wiphy);
  157. - if (!local->ops->set_radar_offchan)
  158. + if (!local->ops->set_radar_background)
  159. return -EOPNOTSUPP;
  160. - return local->ops->set_radar_offchan(&local->hw, chandef);
  161. + return local->ops->set_radar_background(&local->hw, chandef);
  162. }
  163. const struct cfg80211_ops mac80211_config_ops = {
  164. @@ -4460,5 +4460,5 @@ const struct cfg80211_ops mac80211_confi
  165. .reset_tid_config = ieee80211_reset_tid_config,
  166. .set_sar_specs = ieee80211_set_sar_specs,
  167. .color_change = ieee80211_color_change,
  168. - .set_radar_offchan = ieee80211_set_radar_offchan,
  169. + .set_radar_background = ieee80211_set_radar_background,
  170. };
  171. --- a/net/wireless/chan.c
  172. +++ b/net/wireless/chan.c
  173. @@ -716,13 +716,13 @@ static bool
  174. cfg80211_offchan_chain_is_active(struct cfg80211_registered_device *rdev,
  175. struct ieee80211_channel *channel)
  176. {
  177. - if (!rdev->offchan_radar_wdev)
  178. + if (!rdev->background_radar_wdev)
  179. return false;
  180. - if (!cfg80211_chandef_valid(&rdev->offchan_radar_chandef))
  181. + if (!cfg80211_chandef_valid(&rdev->background_radar_chandef))
  182. return false;
  183. - return cfg80211_is_sub_chan(&rdev->offchan_radar_chandef, channel);
  184. + return cfg80211_is_sub_chan(&rdev->background_radar_chandef, channel);
  185. }
  186. bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy,
  187. --- a/net/wireless/core.c
  188. +++ b/net/wireless/core.c
  189. @@ -543,9 +543,10 @@ use_default_name:
  190. INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work);
  191. INIT_WORK(&rdev->conn_work, cfg80211_conn_work);
  192. INIT_WORK(&rdev->event_work, cfg80211_event_work);
  193. - INIT_WORK(&rdev->offchan_cac_abort_wk, cfg80211_offchan_cac_abort_wk);
  194. - INIT_DELAYED_WORK(&rdev->offchan_cac_done_wk,
  195. - cfg80211_offchan_cac_done_wk);
  196. + INIT_WORK(&rdev->background_cac_abort_wk,
  197. + cfg80211_background_cac_abort_wk);
  198. + INIT_DELAYED_WORK(&rdev->background_cac_done_wk,
  199. + cfg80211_background_cac_done_wk);
  200. init_waitqueue_head(&rdev->dev_wait);
  201. @@ -1055,13 +1056,13 @@ void wiphy_unregister(struct wiphy *wiph
  202. cancel_work_sync(&rdev->conn_work);
  203. flush_work(&rdev->event_work);
  204. cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
  205. - cancel_delayed_work_sync(&rdev->offchan_cac_done_wk);
  206. + cancel_delayed_work_sync(&rdev->background_cac_done_wk);
  207. flush_work(&rdev->destroy_work);
  208. flush_work(&rdev->sched_scan_stop_wk);
  209. flush_work(&rdev->propagate_radar_detect_wk);
  210. flush_work(&rdev->propagate_cac_done_wk);
  211. flush_work(&rdev->mgmt_registrations_update_wk);
  212. - flush_work(&rdev->offchan_cac_abort_wk);
  213. + flush_work(&rdev->background_cac_abort_wk);
  214. #ifdef CONFIG_PM
  215. if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup)
  216. @@ -1210,7 +1211,7 @@ void __cfg80211_leave(struct cfg80211_re
  217. cfg80211_pmsr_wdev_down(wdev);
  218. - cfg80211_stop_offchan_radar_detection(wdev);
  219. + cfg80211_stop_background_radar_detection(wdev);
  220. switch (wdev->iftype) {
  221. case NL80211_IFTYPE_ADHOC:
  222. --- a/net/wireless/core.h
  223. +++ b/net/wireless/core.h
  224. @@ -84,10 +84,10 @@ struct cfg80211_registered_device {
  225. struct delayed_work dfs_update_channels_wk;
  226. - struct wireless_dev *offchan_radar_wdev;
  227. - struct cfg80211_chan_def offchan_radar_chandef;
  228. - struct delayed_work offchan_cac_done_wk;
  229. - struct work_struct offchan_cac_abort_wk;
  230. + struct wireless_dev *background_radar_wdev;
  231. + struct cfg80211_chan_def background_radar_chandef;
  232. + struct delayed_work background_cac_done_wk;
  233. + struct work_struct background_cac_abort_wk;
  234. /* netlink port which started critical protocol (0 means not started) */
  235. u32 crit_proto_nlportid;
  236. @@ -497,15 +497,15 @@ cfg80211_chandef_dfs_cac_time(struct wip
  237. void cfg80211_sched_dfs_chan_update(struct cfg80211_registered_device *rdev);
  238. int
  239. -cfg80211_start_offchan_radar_detection(struct cfg80211_registered_device *rdev,
  240. - struct wireless_dev *wdev,
  241. - struct cfg80211_chan_def *chandef);
  242. +cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rdev,
  243. + struct wireless_dev *wdev,
  244. + struct cfg80211_chan_def *chandef);
  245. -void cfg80211_stop_offchan_radar_detection(struct wireless_dev *wdev);
  246. +void cfg80211_stop_background_radar_detection(struct wireless_dev *wdev);
  247. -void cfg80211_offchan_cac_done_wk(struct work_struct *work);
  248. +void cfg80211_background_cac_done_wk(struct work_struct *work);
  249. -void cfg80211_offchan_cac_abort_wk(struct work_struct *work);
  250. +void cfg80211_background_cac_abort_wk(struct work_struct *work);
  251. bool cfg80211_any_wiphy_oper_chan(struct wiphy *wiphy,
  252. struct ieee80211_channel *chan);
  253. --- a/net/wireless/mlme.c
  254. +++ b/net/wireless/mlme.c
  255. @@ -920,7 +920,7 @@ void __cfg80211_radar_event(struct wiphy
  256. cfg80211_set_dfs_state(wiphy, chandef, NL80211_DFS_UNAVAILABLE);
  257. if (offchan)
  258. - queue_work(cfg80211_wq, &rdev->offchan_cac_abort_wk);
  259. + queue_work(cfg80211_wq, &rdev->background_cac_abort_wk);
  260. cfg80211_sched_dfs_chan_update(rdev);
  261. @@ -975,10 +975,10 @@ void cfg80211_cac_event(struct net_devic
  262. EXPORT_SYMBOL(cfg80211_cac_event);
  263. static void
  264. -__cfg80211_offchan_cac_event(struct cfg80211_registered_device *rdev,
  265. - struct wireless_dev *wdev,
  266. - const struct cfg80211_chan_def *chandef,
  267. - enum nl80211_radar_event event)
  268. +__cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
  269. + struct wireless_dev *wdev,
  270. + const struct cfg80211_chan_def *chandef,
  271. + enum nl80211_radar_event event)
  272. {
  273. struct wiphy *wiphy = &rdev->wiphy;
  274. struct net_device *netdev;
  275. @@ -988,7 +988,7 @@ __cfg80211_offchan_cac_event(struct cfg8
  276. if (!cfg80211_chandef_valid(chandef))
  277. return;
  278. - if (!rdev->offchan_radar_wdev)
  279. + if (!rdev->background_radar_wdev)
  280. return;
  281. switch (event) {
  282. @@ -997,12 +997,12 @@ __cfg80211_offchan_cac_event(struct cfg8
  283. memcpy(&rdev->cac_done_chandef, chandef, sizeof(*chandef));
  284. queue_work(cfg80211_wq, &rdev->propagate_cac_done_wk);
  285. cfg80211_sched_dfs_chan_update(rdev);
  286. - wdev = rdev->offchan_radar_wdev;
  287. + wdev = rdev->background_radar_wdev;
  288. break;
  289. case NL80211_RADAR_CAC_ABORTED:
  290. - if (!cancel_delayed_work(&rdev->offchan_cac_done_wk))
  291. + if (!cancel_delayed_work(&rdev->background_cac_done_wk))
  292. return;
  293. - wdev = rdev->offchan_radar_wdev;
  294. + wdev = rdev->background_radar_wdev;
  295. break;
  296. case NL80211_RADAR_CAC_STARTED:
  297. break;
  298. @@ -1015,49 +1015,49 @@ __cfg80211_offchan_cac_event(struct cfg8
  299. }
  300. static void
  301. -cfg80211_offchan_cac_event(struct cfg80211_registered_device *rdev,
  302. - const struct cfg80211_chan_def *chandef,
  303. - enum nl80211_radar_event event)
  304. +cfg80211_background_cac_event(struct cfg80211_registered_device *rdev,
  305. + const struct cfg80211_chan_def *chandef,
  306. + enum nl80211_radar_event event)
  307. {
  308. wiphy_lock(&rdev->wiphy);
  309. - __cfg80211_offchan_cac_event(rdev, rdev->offchan_radar_wdev,
  310. - chandef, event);
  311. + __cfg80211_background_cac_event(rdev, rdev->background_radar_wdev,
  312. + chandef, event);
  313. wiphy_unlock(&rdev->wiphy);
  314. }
  315. -void cfg80211_offchan_cac_done_wk(struct work_struct *work)
  316. +void cfg80211_background_cac_done_wk(struct work_struct *work)
  317. {
  318. struct delayed_work *delayed_work = to_delayed_work(work);
  319. struct cfg80211_registered_device *rdev;
  320. rdev = container_of(delayed_work, struct cfg80211_registered_device,
  321. - offchan_cac_done_wk);
  322. - cfg80211_offchan_cac_event(rdev, &rdev->offchan_radar_chandef,
  323. - NL80211_RADAR_CAC_FINISHED);
  324. + background_cac_done_wk);
  325. + cfg80211_background_cac_event(rdev, &rdev->background_radar_chandef,
  326. + NL80211_RADAR_CAC_FINISHED);
  327. }
  328. -void cfg80211_offchan_cac_abort_wk(struct work_struct *work)
  329. +void cfg80211_background_cac_abort_wk(struct work_struct *work)
  330. {
  331. struct cfg80211_registered_device *rdev;
  332. rdev = container_of(work, struct cfg80211_registered_device,
  333. - offchan_cac_abort_wk);
  334. - cfg80211_offchan_cac_event(rdev, &rdev->offchan_radar_chandef,
  335. - NL80211_RADAR_CAC_ABORTED);
  336. + background_cac_abort_wk);
  337. + cfg80211_background_cac_event(rdev, &rdev->background_radar_chandef,
  338. + NL80211_RADAR_CAC_ABORTED);
  339. }
  340. -void cfg80211_offchan_cac_abort(struct wiphy *wiphy)
  341. +void cfg80211_background_cac_abort(struct wiphy *wiphy)
  342. {
  343. struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
  344. - queue_work(cfg80211_wq, &rdev->offchan_cac_abort_wk);
  345. + queue_work(cfg80211_wq, &rdev->background_cac_abort_wk);
  346. }
  347. -EXPORT_SYMBOL(cfg80211_offchan_cac_abort);
  348. +EXPORT_SYMBOL(cfg80211_background_cac_abort);
  349. int
  350. -cfg80211_start_offchan_radar_detection(struct cfg80211_registered_device *rdev,
  351. - struct wireless_dev *wdev,
  352. - struct cfg80211_chan_def *chandef)
  353. +cfg80211_start_background_radar_detection(struct cfg80211_registered_device *rdev,
  354. + struct wireless_dev *wdev,
  355. + struct cfg80211_chan_def *chandef)
  356. {
  357. unsigned int cac_time_ms;
  358. int err;
  359. @@ -1065,19 +1065,19 @@ cfg80211_start_offchan_radar_detection(s
  360. lockdep_assert_wiphy(&rdev->wiphy);
  361. if (!wiphy_ext_feature_isset(&rdev->wiphy,
  362. - NL80211_EXT_FEATURE_RADAR_OFFCHAN))
  363. + NL80211_EXT_FEATURE_RADAR_BACKGROUND))
  364. return -EOPNOTSUPP;
  365. /* Offchannel chain already locked by another wdev */
  366. - if (rdev->offchan_radar_wdev && rdev->offchan_radar_wdev != wdev)
  367. + if (rdev->background_radar_wdev && rdev->background_radar_wdev != wdev)
  368. return -EBUSY;
  369. /* CAC already in progress on the offchannel chain */
  370. - if (rdev->offchan_radar_wdev == wdev &&
  371. - delayed_work_pending(&rdev->offchan_cac_done_wk))
  372. + if (rdev->background_radar_wdev == wdev &&
  373. + delayed_work_pending(&rdev->background_cac_done_wk))
  374. return -EBUSY;
  375. - err = rdev_set_radar_offchan(rdev, chandef);
  376. + err = rdev_set_radar_background(rdev, chandef);
  377. if (err)
  378. return err;
  379. @@ -1085,30 +1085,31 @@ cfg80211_start_offchan_radar_detection(s
  380. if (!cac_time_ms)
  381. cac_time_ms = IEEE80211_DFS_MIN_CAC_TIME_MS;
  382. - rdev->offchan_radar_chandef = *chandef;
  383. - rdev->offchan_radar_wdev = wdev; /* Get offchain ownership */
  384. + rdev->background_radar_chandef = *chandef;
  385. + rdev->background_radar_wdev = wdev; /* Get offchain ownership */
  386. - __cfg80211_offchan_cac_event(rdev, wdev, chandef,
  387. - NL80211_RADAR_CAC_STARTED);
  388. - queue_delayed_work(cfg80211_wq, &rdev->offchan_cac_done_wk,
  389. + __cfg80211_background_cac_event(rdev, wdev, chandef,
  390. + NL80211_RADAR_CAC_STARTED);
  391. + queue_delayed_work(cfg80211_wq, &rdev->background_cac_done_wk,
  392. msecs_to_jiffies(cac_time_ms));
  393. return 0;
  394. }
  395. -void cfg80211_stop_offchan_radar_detection(struct wireless_dev *wdev)
  396. +void cfg80211_stop_background_radar_detection(struct wireless_dev *wdev)
  397. {
  398. struct wiphy *wiphy = wdev->wiphy;
  399. struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
  400. lockdep_assert_wiphy(wiphy);
  401. - if (wdev != rdev->offchan_radar_wdev)
  402. + if (wdev != rdev->background_radar_wdev)
  403. return;
  404. - rdev_set_radar_offchan(rdev, NULL);
  405. - rdev->offchan_radar_wdev = NULL; /* Release offchain ownership */
  406. + rdev_set_radar_background(rdev, NULL);
  407. + rdev->background_radar_wdev = NULL; /* Release offchain ownership */
  408. - __cfg80211_offchan_cac_event(rdev, wdev, &rdev->offchan_radar_chandef,
  409. - NL80211_RADAR_CAC_ABORTED);
  410. + __cfg80211_background_cac_event(rdev, wdev,
  411. + &rdev->background_radar_chandef,
  412. + NL80211_RADAR_CAC_ABORTED);
  413. }
  414. --- a/net/wireless/nl80211.c
  415. +++ b/net/wireless/nl80211.c
  416. @@ -796,7 +796,7 @@ static const struct nla_policy nl80211_p
  417. [NL80211_ATTR_MBSSID_CONFIG] =
  418. NLA_POLICY_NESTED(nl80211_mbssid_config_policy),
  419. [NL80211_ATTR_MBSSID_ELEMS] = { .type = NLA_NESTED },
  420. - [NL80211_ATTR_RADAR_OFFCHAN] = { .type = NLA_FLAG },
  421. + [NL80211_ATTR_RADAR_BACKGROUND] = { .type = NLA_FLAG },
  422. };
  423. /* policy for the key attributes */
  424. @@ -9291,9 +9291,9 @@ static int nl80211_start_radar_detection
  425. goto unlock;
  426. }
  427. - if (nla_get_flag(info->attrs[NL80211_ATTR_RADAR_OFFCHAN])) {
  428. - err = cfg80211_start_offchan_radar_detection(rdev, wdev,
  429. - &chandef);
  430. + if (nla_get_flag(info->attrs[NL80211_ATTR_RADAR_BACKGROUND])) {
  431. + err = cfg80211_start_background_radar_detection(rdev, wdev,
  432. + &chandef);
  433. goto unlock;
  434. }
  435. --- a/net/wireless/rdev-ops.h
  436. +++ b/net/wireless/rdev-ops.h
  437. @@ -1382,17 +1382,17 @@ static inline int rdev_color_change(stru
  438. }
  439. static inline int
  440. -rdev_set_radar_offchan(struct cfg80211_registered_device *rdev,
  441. - struct cfg80211_chan_def *chandef)
  442. +rdev_set_radar_background(struct cfg80211_registered_device *rdev,
  443. + struct cfg80211_chan_def *chandef)
  444. {
  445. struct wiphy *wiphy = &rdev->wiphy;
  446. int ret;
  447. - if (!rdev->ops->set_radar_offchan)
  448. + if (!rdev->ops->set_radar_background)
  449. return -EOPNOTSUPP;
  450. - trace_rdev_set_radar_offchan(wiphy, chandef);
  451. - ret = rdev->ops->set_radar_offchan(wiphy, chandef);
  452. + trace_rdev_set_radar_background(wiphy, chandef);
  453. + ret = rdev->ops->set_radar_background(wiphy, chandef);
  454. trace_rdev_return_int(wiphy, ret);
  455. return ret;
  456. --- a/net/wireless/trace.h
  457. +++ b/net/wireless/trace.h
  458. @@ -3646,7 +3646,7 @@ TRACE_EVENT(cfg80211_bss_color_notify,
  459. __entry->color_bitmap)
  460. );
  461. -TRACE_EVENT(rdev_set_radar_offchan,
  462. +TRACE_EVENT(rdev_set_radar_background,
  463. TP_PROTO(struct wiphy *wiphy, struct cfg80211_chan_def *chandef),
  464. TP_ARGS(wiphy, chandef),