Currently the remain_on_channel operation does not support filtering incoming frames by destination MAC address. This prevents use cases such as PASN authentication in the responder side that need to receive frames addressed to a specific MAC during the off-channel period. Add an rx_addr parameter to the remain_on_channel operation callback and propagate it through the call chain from nl80211 to driver implementations. Introduce the extended feature NL80211_EXT_FEATURE_ROC_ADDR_FILTER as a capability gate so that cfg80211 rejects the request if the driver does not advertise support for address filtering. Extract the address from the NL80211_ATTR_MAC attribute when provided in the netlink message and update the tracing infrastructure to include the address in remain_on_channel trace events. The rx_addr parameter is optional and can be NULL, maintaining backward compatibility with existing drivers.
Showing the changes to include/uapi (1 of 13 files). Show all
Unified · Split
| @@ -729,7 +729,9 @@ · 728 unmodified lines | ||
| 729 | 729 | * to remain on the channel. This command is also used as an event to |
| 730 | 730 | * notify when the requested duration starts (it may take a while for the |
| 731 | 731 | * driver to schedule this time due to other concurrent needs for the |
| 732 | − * radio). | |
| 732 | + * radio). An optional attribute %NL80211_ATTR_MAC can be used to filter | |
| 733 | + * incoming frames during remain-on-channel, such that frames | |
| 734 | + * addressed to the specified destination MAC are reported. | |
| 733 | 735 | * When called, this operation returns a cookie (%NL80211_ATTR_COOKIE) |
| 734 | 736 | * that will be included with any events pertaining to this request; |
| 735 | 737 | * the cookie is also used to cancel the request. |
| @@ -7040,6 +7042,12 @@ enum nl80211_feature_flags { · 6304 unmodified lines | ||
| 7040 | 7042 | * (NL80211_CMD_AUTHENTICATE) in non-AP STA mode, as specified in |
| 7041 | 7043 | * "IEEE P802.11bi/D4.0, 12.16.5". |
| 7042 | 7044 | * |
| 7045 | + * @NL80211_EXT_FEATURE_ROC_ADDR_FILTER: Driver supports MAC address | |
| 7046 | + * filtering during remain-on-channel. When %NL80211_ATTR_MAC is | |
| 7047 | + * provided with %NL80211_CMD_REMAIN_ON_CHANNEL, the driver will | |
| 7048 | + * forward frames with a matching MAC address to userspace during | |
| 7049 | + * the off-channel period. | |
| 7050 | + * | |
| 7043 | 7051 | * @NUM_NL80211_EXT_FEATURES: number of extended features. |
| 7044 | 7052 | * @MAX_NL80211_EXT_FEATURES: highest extended feature index. |
| 7045 | 7053 | */ |
| @@ -7119,6 +7127,7 @@ enum nl80211_ext_feature_index { · 73 unmodified lines | ||
| 7119 | 7127 | NL80211_EXT_FEATURE_EPPKE, |
| 7120 | 7128 | NL80211_EXT_FEATURE_ASSOC_FRAME_ENCRYPTION, |
| 7121 | 7129 | NL80211_EXT_FEATURE_IEEE8021X_AUTH, |
| 7130 | + NL80211_EXT_FEATURE_ROC_ADDR_FILTER, | |
| 7122 | 7131 | |
| 7123 | 7132 | /* add new features before the definition below */ |
| 7124 | 7133 | NUM_NL80211_EXT_FEATURES, |