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 | * struct cfg80211_fils_discovery - FILS discovery parameters from | 1338 | * struct cfg80211_fils_discovery - FILS discovery parameters from |
| 1339 | * IEEE Std 802.11ai-2016, Annex C.3 MIB detail. | 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 | * @min_interval: Minimum packet interval in TUs (0 - 10000) | 1342 | * @min_interval: Minimum packet interval in TUs (0 - 10000) |
| 1342 | * @max_interval: Maximum packet interval in TUs (0 - 10000) | 1343 | * @max_interval: Maximum packet interval in TUs (0 - 10000) |
| 1343 | * @tmpl_len: Template length | 1344 | * @tmpl_len: Template length |
| @@ -1345,6 +1346,7 @@ struct cfg80211_acl_data { · 1 unmodified line | |||
| 1345 | * frame headers. | 1346 | * frame headers. |
| 1346 | */ | 1347 | */ |
| 1347 | struct cfg80211_fils_discovery { | 1348 | struct cfg80211_fils_discovery { |
| 1349 | bool update; | ||
| 1348 | u32 min_interval; | 1350 | u32 min_interval; |
| 1349 | u32 max_interval; | 1351 | u32 max_interval; |
| 1350 | size_t tmpl_len; | 1352 | size_t tmpl_len; |
| @@ -1355,6 +1357,7 @@ struct cfg80211_fils_discovery { · 4 unmodified lines | |||
| 1355 | * struct cfg80211_unsol_bcast_probe_resp - Unsolicited broadcast probe | 1357 | * struct cfg80211_unsol_bcast_probe_resp - Unsolicited broadcast probe |
| 1356 | * response parameters in 6GHz. | 1358 | * response parameters in 6GHz. |
| 1357 | * | 1359 | * |
| 1360 | * @update: Set to true if the feature configuration should be updated. | ||
| 1358 | * @interval: Packet interval in TUs. Maximum allowed is 20 TU, as mentioned | 1361 | * @interval: Packet interval in TUs. Maximum allowed is 20 TU, as mentioned |
| 1359 | * in IEEE P802.11ax/D6.0 26.17.2.3.2 - AP behavior for fast passive | 1362 | * in IEEE P802.11ax/D6.0 26.17.2.3.2 - AP behavior for fast passive |
| 1360 | * scanning | 1363 | * scanning |
| @@ -1362,6 +1365,7 @@ struct cfg80211_fils_discovery { · 1 unmodified line | |||
| 1362 | * @tmpl: Template data for probe response | 1365 | * @tmpl: Template data for probe response |
| 1363 | */ | 1366 | */ |
| 1364 | struct cfg80211_unsol_bcast_probe_resp { | 1367 | struct cfg80211_unsol_bcast_probe_resp { |
| 1368 | bool update; | ||
| 1365 | u32 interval; | 1369 | u32 interval; |
| 1366 | size_t tmpl_len; | 1370 | size_t tmpl_len; |
| 1367 | const u8 *tmpl; | 1371 | const u8 *tmpl; |
| @@ -2690,11 +2690,13 @@ enum nl80211_commands { · 2689 unmodified lines | |||
| 2690 | * | 2690 | * |
| 2691 | * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS | 2691 | * @NL80211_ATTR_FILS_DISCOVERY: Optional parameter to configure FILS |
| 2692 | * discovery. It is a nested attribute, see | 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 | * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure | 2696 | * @NL80211_ATTR_UNSOL_BCAST_PROBE_RESP: Optional parameter to configure |
| 2696 | * unsolicited broadcast probe response. It is a nested attribute, see | 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 | * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from | 2701 | * @NL80211_ATTR_S1G_CAPABILITY: S1G Capability information element (from |
| 2700 | * association request when used with NL80211_CMD_NEW_STATION) | 2702 | * association request when used with NL80211_CMD_NEW_STATION) |
| @@ -7606,7 +7608,7 @@ enum nl80211_iftype_akm_attributes { · 4905 unmodified lines | |||
| 7606 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU). | 7608 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MIN: Minimum packet interval (u32, TU). |
| 7607 | * Allowed range: 0..10000 (TU = Time Unit) | 7609 | * Allowed range: 0..10000 (TU = Time Unit) |
| 7608 | * @NL80211_FILS_DISCOVERY_ATTR_INT_MAX: Maximum packet interval (u32, TU). | 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 | * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action | 7612 | * @NL80211_FILS_DISCOVERY_ATTR_TMPL: Template data for FILS discovery action |
| 7611 | * frame including the headers. | 7613 | * frame including the headers. |
| 7612 | * | 7614 | * |
| @@ -7639,7 +7641,8 @@ enum nl80211_fils_discovery_attributes { · 26 unmodified lines | |||
| 7639 | * | 7641 | * |
| 7640 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU). | 7642 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT: Maximum packet interval (u32, TU). |
| 7641 | * Allowed range: 0..20 (TU = Time Unit). IEEE P802.11ax/D6.0 | 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 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response | 7646 | * @NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL: Unsolicited broadcast probe response |
| 7644 | * frame template (binary). | 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 | if (ret) | 5647 | if (ret) |
| 5648 | return ret; | 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 | if (!tb[NL80211_FILS_DISCOVERY_ATTR_INT_MIN] || | 5657 | if (!tb[NL80211_FILS_DISCOVERY_ATTR_INT_MIN] || |
| 5651 | !tb[NL80211_FILS_DISCOVERY_ATTR_INT_MAX] || | 5658 | !tb[NL80211_FILS_DISCOVERY_ATTR_INT_MAX] || |
| 5652 | !tb[NL80211_FILS_DISCOVERY_ATTR_TMPL]) | 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 | fd->tmpl = nla_data(tb[NL80211_FILS_DISCOVERY_ATTR_TMPL]); | 5663 | fd->tmpl = nla_data(tb[NL80211_FILS_DISCOVERY_ATTR_TMPL]); |
| 5657 | fd->min_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_ATTR_INT_MIN]); | 5664 | fd->min_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_ATTR_INT_MIN]); |
| 5658 | fd->max_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_ATTR_INT_MAX]); | 5665 | fd->max_interval = nla_get_u32(tb[NL80211_FILS_DISCOVERY_ATTR_INT_MAX]); |
| 5659 | 5666 | fd->update = true; | |
| 5660 | return 0; | 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 | if (ret) | 5686 | if (ret) |
| 5680 | return ret; | 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 | if (!tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT] || | 5695 | if (!tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT] || |
| 5683 | !tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]) | 5696 | !tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]) |
| 5684 | return -EINVAL; | 5697 | return -EINVAL; |
| @@ -5686,6 +5699,7 @@ nl80211_parse_unsol_bcast_probe_resp(struct cfg80211_registered_device *rdev, · 1 unmodified line | |||
| 5686 | presp->tmpl = nla_data(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]); | 5699 | presp->tmpl = nla_data(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]); |
| 5687 | presp->tmpl_len = nla_len(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]); | 5700 | presp->tmpl_len = nla_len(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_TMPL]); |
| 5688 | presp->interval = nla_get_u32(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT]); | 5701 | presp->interval = nla_get_u32(tb[NL80211_UNSOL_BCAST_PROBE_RESP_ATTR_INT]); |
| 5702 | presp->update = true; | ||
| 5689 | return 0; | 5703 | return 0; |
| 5690 | } | 5704 | } |
| 5691 | 5705 | ||