Add a new flag 'update' which is set to true during start_ap() if (and only if) one of the following two conditions are met: - Userspace passed an empty nested attribute which indicates that the feature should be disabled and templates deleted. - Userspace passed all the parameters for the nested attribute. Existing configuration will not be changed while the flag remains false. Add similar changes for unsolicited broadcast probe response transmission.
Unified · Split
| @@ -1338,6 +1338,7 @@ struct cfg80211_acl_data { · 1337 unmodified lines | ||
| 1338 | 1338 | * struct cfg80211_fils_discovery - FILS discovery parameters from |
| 1339 | 1339 | * IEEE Std 802.11ai-2016, Annex C.3 MIB detail. |
| 1340 | 1340 | * |
| 1341 | + * @update: Set to true if the feature configuration should be updated. | |
| 1341 | 1342 | * @min_interval: Minimum packet interval in TUs (0 - 10000) |
| 1342 | 1343 | * @max_interval: Maximum packet interval in TUs (0 - 10000) |
| 1343 | 1344 | * @tmpl_len: Template length |
| @@ -1345,6 +1346,7 @@ struct cfg80211_acl_data { · 1 unmodified line | ||
| 1345 | 1346 | * frame headers. |
| 1346 | 1347 | */ |
| 1347 | 1348 | struct cfg80211_fils_discovery { |
| 1349 | + bool update; | |
| 1348 | 1350 | u32 min_interval; |
| 1349 | 1351 | u32 max_interval; |
| 1350 | 1352 | size_t tmpl_len; |
| @@ -1355,6 +1357,7 @@ struct cfg80211_fils_discovery { · 4 unmodified lines | ||
| 1355 | 1357 | * struct cfg80211_unsol_bcast_probe_resp - Unsolicited broadcast probe |
| 1356 | 1358 | * response parameters in 6GHz. |
| 1357 | 1359 | * |
| 1360 | + * @update: Set to true if the feature configuration should be updated. | |
| 1358 | 1361 | * @interval: Packet interval in TUs. Maximum allowed is 20 TU, as mentioned |
| 1359 | 1362 | * in IEEE P802.11ax/D6.0 26.17.2.3.2 - AP behavior for fast passive |
| 1360 | 1363 | * scanning |
| @@ -1362,6 +1365,7 @@ struct cfg80211_fils_discovery { · 1 unmodified line | ||
| 1362 | 1365 | * @tmpl: Template data for probe response |
| 1363 | 1366 | */ |
| 1364 | 1367 | struct cfg80211_unsol_bcast_probe_resp { |
| 1368 | + bool update; | |
| 1365 | 1369 | u32 interval; |
| 1366 | 1370 | size_t tmpl_len; |
| 1367 | 1371 | const u8 *tmpl; |
| @@ -2690,11 +2690,13 @@ enum nl80211_commands { · 2689 unmodified lines | ||
| 2690 | 2690 | * |
| 2691 | 2691 | * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS |
| 2692 | 2692 | * discovery. It is a nested attribute, see |
| 2693 | − * &enum nl80211_fils_discovery_attributes. | |
| 2693 | + * &enum nl80211_fils_discovery_attributes. Userspace should pass an empty | |
| 2694 | + * nested attribute to disable this feature and delete the templates. | |
| 2694 | 2695 | * |
| 2695 | 2696 | * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure |
| 2696 | 2697 | * unsolicited broadcast probe response. It is a nested attribute, see |
| 2697 | − * &enum nl80211_unsol_bcast_probe_resp_attributes. | |
| 2698 | + * &enum nl80211_unsol_bcast_probe_resp_attributes. Userspace should pass an empty | |
| 2699 | + * nested attribute to disable this feature and delete the templates. | |
| 2698 | 2700 | * |
| 2699 | 2701 | * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from |
| 2700 | 2702 | * association request when used with NL80211_CMD_NEW_STATION) |
| @@ -7606,7 +7608,7 @@ enum nl80211_iftype_akm_attributes { · 4905 unmodified lines | ||
| 7606 | 7608 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU). |
| 7607 | 7609 | * Allowed range: 0..10000 (TU = Time Unit) |
| 7608 | 7610 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU). |
| 7609 | − * Allowed range: 0..10000 (TU = Time Unit) | |
| 7611 | + * Allowed range: 0..10000 (TU = Time Unit). If set to 0, the feature is disabled. | |
| 7610 | 7612 | * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action |
| 7611 | 7613 | * frame including the headers. |
| 7612 | 7614 | * |
| @@ -7639,7 +7641,8 @@ enum nl80211_fils_discovery_attributes { · 26 unmodified lines | ||
| 7639 | 7641 | * |
| 7640 | 7642 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU). |
| 7641 | 7643 | * Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0 |
| 7642 | − * 26.17.2.3.2 (AP behavior for fast passive scanning). | |
| 7644 | + * 26.17.2.3.2 (AP behavior for fast passive scanning). If set to 0, the feature is | |
| 7645 | + * disabled. | |
| 7643 | 7646 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response |
| 7644 | 7647 | * frame template (binary). |
| 7645 | 7648 | * |
| @@ -5647,6 +5647,13 @@ static int nl80211_parse_fils_discovery(struct cfg80211_registered_device *rdev, · 5646 unmodified lines | ||
| 5647 | 5647 | if (ret) |
| 5648 | 5648 | return ret; |
| 5649 | 5649 | |
| 5650 | + if (!tb[NL80211_FILS_DISCOVERY_ATTR_INT_MIN] && | |
| 5651 | + !tb[NL80211_FILS_DISCOVERY_ATTR_INT_MAX] && | |
| 5652 | + !tb[NL80211_FILS_DISCOVERY_ATTR_TMPL]) { | |
| 5653 | + fd->update = true; | |
| 5654 | + return 0; | |
| 5655 | + } | |
| 5656 | + | |
| 5650 | 5657 | if (!tb[NL80211_FILS_DISCOVERY_ATTR_INT_MIN] || |
| 5651 | 5658 | !tb[NL80211_FILS_DISCOVERY_ATTR_INT_MAX] || |
| 5652 | 5659 | !tb[NL80211_FILS_DISCOVERY_ATTR_TMPL]) |
| @@ -5656,7 +5663,7 @@ static int nl80211_parse_fils_discovery(struct cfg80211_registered_device *rdev, · 3 unmodified lines | ||
| 5656 | 5663 | fd->tmpl = nla_data(tb[NL80211_FILS_DISCOVERY_ATTR_TMPL]); |
| 5657 | 5664 | fd->min_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_ATTR_INT_MIN]); |
| 5658 | 5665 | fd->max_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_ATTR_INT_MAX]); |
| 5659 | − | |
| 5666 | + fd->update = true; | |
| 5660 | 5667 | return 0; |
| 5661 | 5668 | } |
| 5662 | 5669 | |
| @@ -5679,6 +5686,12 @@ nl80211_parse_unsol_bcast_probe_resp(struct cfg80211_registered_device *rdev, · 16 unmodified lines | ||
| 5679 | 5686 | if (ret) |
| 5680 | 5687 | return ret; |
| 5681 | 5688 | |
| 5689 | + if (!tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT] && | |
| 5690 | + !tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]) { | |
| 5691 | + presp->update = true; | |
| 5692 | + return 0; | |
| 5693 | + } | |
| 5694 | + | |
| 5682 | 5695 | if (!tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT] || |
| 5683 | 5696 | !tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]) |
| 5684 | 5697 | return -EINVAL; |
| @@ -5686,6 +5699,7 @@ nl80211_parse_unsol_bcast_probe_resp(struct cfg80211_registered_device *rdev, · 1 unmodified line | ||
| 5686 | 5699 | presp->tmpl = nla_data(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]); |
| 5687 | 5700 | presp->tmpl_len = nla_len(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]); |
| 5688 | 5701 | presp->interval = nla_get_u32(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT]); |
| 5702 | + presp->update = true; | |
| 5689 | 5703 | return 0; |
| 5690 | 5704 | } |
| 5691 | 5705 | |