If a dedicated (off-channel) radar detection hardware (chain) is available in the hardware/driver, allow this to be used by calling the NL80211_CMD_RADAR_DETECT command with a new flag attribute requesting off-channel radar detection is used. Offchannel CAC (channel availability check) avoids the CAC downtime when switching to a radar channel or when turning on the AP. Drivers advertise support for this using the new feature flag NL80211_EXT_FEATURE_RADAR_OFFCHAN.
Showing the changes to include (2 of 8 files). Show all
Unified · Split
| @@ -4072,6 +4072,15 @@ struct mgmt_frame_regs { · 4071 unmodified lines | ||
| 4072 | 4072 | * @set_fils_aad: Set FILS AAD data to the AP driver so that the driver can use |
| 4073 | 4073 | * those to decrypt (Re)Association Request and encrypt (Re)Association |
| 4074 | 4074 | * Response frame. |
| 4075 | + * | |
| 4076 | + * @set_radar_offchan: Configure dedicated offchannel chain available for | |
| 4077 | + * radar/CAC detection on some hw. This chain can't be used to transmit | |
| 4078 | + * or receive frames and it is bounded to a running wdev. | |
| 4079 | + * Offchannel radar/CAC detection allows to avoid the CAC downtime | |
| 4080 | + * switching to a different channel during CAC detection on the selected | |
| 4081 | + * radar channel. | |
| 4082 | + * The caller is expected to set chandef pointer to NULL in order to | |
| 4083 | + * disable offchannel CAC/radar detection. | |
| 4075 | 4084 | */ |
| 4076 | 4085 | struct cfg80211_ops { |
| 4077 | 4086 | int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow); |
| @@ -4404,6 +4413,8 @@ struct cfg80211_ops { · 326 unmodified lines | ||
| 4404 | 4413 | struct cfg80211_color_change_settings *params); |
| 4405 | 4414 | int (*set_fils_aad)(struct wiphy *wiphy, struct net_device *dev, |
| 4406 | 4415 | struct cfg80211_fils_aad *fils_aad); |
| 4416 | + int (*set_radar_offchan)(struct wiphy *wiphy, | |
| 4417 | + struct cfg80211_chan_def *chandef); | |
| 4407 | 4418 | }; |
| 4408 | 4419 | |
| 4409 | 4420 | /* |
| @@ -7633,6 +7644,20 @@ void cfg80211_cac_event(struct net_device *netdev, · 3223 unmodified lines | ||
| 7633 | 7644 | const struct cfg80211_chan_def *chandef, |
| 7634 | 7645 | enum nl80211_radar_event event, gfp_t gfp); |
| 7635 | 7646 | |
| 7647 | +/** | |
| 7648 | + * cfg80211_offchan_cac_event - Channel Availability Check (CAC) offchan event | |
| 7649 | + * @wiphy: the wiphy | |
| 7650 | + * @chandef: chandef for the current channel | |
| 7651 | + * @event: type of event | |
| 7652 | + * | |
| 7653 | + * This function is called when a Channel Availability Check (CAC) is finished, | |
| 7654 | + * started or aborted by a offchannel dedicated chain. | |
| 7655 | + * | |
| 7656 | + * Note that this acquires the wiphy lock. | |
| 7657 | + */ | |
| 7658 | +void cfg80211_offchan_cac_event(struct wiphy *wiphy, | |
| 7659 | + const struct cfg80211_chan_def *chandef, | |
| 7660 | + enum nl80211_radar_event event); | |
| 7636 | 7661 | |
| 7637 | 7662 | /** |
| 7638 | 7663 | * cfg80211_gtk_rekey_notify - notify userspace about driver rekeying |
| @@ -2639,6 +2639,13 @@ enum nl80211_commands { · 2638 unmodified lines | ||
| 2639 | 2639 | * Mandatory parameter for the transmitting interface to enable MBSSID. |
| 2640 | 2640 | * Optional for the non-transmitting interfaces. |
| 2641 | 2641 | * |
| 2642 | + * @NL80211_ATTR_RADAR_OFFCHAN: Configure dedicated offchannel chain available for | |
| 2643 | + * radar/CAC detection on some hw. This chain can't be used to transmit | |
| 2644 | + * or receive frames and it is bounded to a running wdev. | |
| 2645 | + * Offchannel radar/CAC detection allows to avoid the CAC downtime | |
| 2646 | + * switching on a different channel during CAC detection on the selected | |
| 2647 | + * radar channel. | |
| 2648 | + * | |
| 2642 | 2649 | * @NUM_NL80211_ATTR: total number of nl80211_attrs available |
| 2643 | 2650 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
| 2644 | 2651 | * @__NL80211_ATTR_AFTER_LAST: internal use |
| @@ -3145,6 +3152,8 @@ enum nl80211_attrs { · 500 unmodified lines | ||
| 3145 | 3152 | NL80211_ATTR_MBSSID_CONFIG, |
| 3146 | 3153 | NL80211_ATTR_MBSSID_ELEMS, |
| 3147 | 3154 | |
| 3155 | + NL80211_ATTR_RADAR_OFFCHAN, | |
| 3156 | + | |
| 3148 | 3157 | /* add attributes here, update the policy in nl80211.c */ |
| 3149 | 3158 | |
| 3150 | 3159 | __NL80211_ATTR_AFTER_LAST, |
| @@ -6051,6 +6060,9 @@ enum nl80211_feature_flags { · 2900 unmodified lines | ||
| 6051 | 6060 | * frames. Userspace has to share FILS AAD details to the driver by using |
| 6052 | 6061 | * @NL80211_CMD_SET_FILS_AAD. |
| 6053 | 6062 | * |
| 6063 | + * @NL80211_EXT_FEATURE_RADAR_OFFCHAN: Device supports offchannel radar/CAC | |
| 6064 | + * detection. | |
| 6065 | + * | |
| 6054 | 6066 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 6055 | 6067 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 6056 | 6068 | */ |
| @@ -6117,6 +6129,7 @@ enum nl80211_ext_feature_index { · 60 unmodified lines | ||
| 6117 | 6129 | NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE, |
| 6118 | 6130 | NL80211_EXT_FEATURE_BSS_COLOR, |
| 6119 | 6131 | NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD, |
| 6132 | + NL80211_EXT_FEATURE_RADAR_OFFCHAN, | |
| 6120 | 6133 | |
| 6121 | 6134 | /* add new features before the definition below */ |
| 6122 | 6135 | NUM_NL80211_EXT_FEATURES, |