3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-26 18:59:22 +01:00

ap: Make ap_update_beacon public

Let users call ap_update_beacon when a value has changed which should be
reflected in the beacon IEs.
This commit is contained in:
Andrew Zaborowski 2021-03-10 23:06:30 +01:00 committed by Denis Kenzior
parent bc3d285c5e
commit 71ba94121d
2 changed files with 5 additions and 1 deletions

View File

@ -641,7 +641,7 @@ static void ap_set_beacon_cb(struct l_genl_msg *msg, void *user_data)
l_error("SET_BEACON failed: %s (%i)", strerror(-error), -error); l_error("SET_BEACON failed: %s (%i)", strerror(-error), -error);
} }
static void ap_update_beacon(struct ap_state *ap) void ap_update_beacon(struct ap_state *ap)
{ {
struct l_genl_msg *cmd; struct l_genl_msg *cmd;
uint8_t head[256], tail[256]; uint8_t head[256], tail[256];
@ -651,6 +651,9 @@ static void ap_update_beacon(struct ap_state *ap)
0xff, 0xff, 0xff, 0xff, 0xff, 0xff 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
}; };
if (L_WARN_ON(!ap->started))
return;
head_len = ap_build_beacon_pr_head(ap, MPDU_MANAGEMENT_SUBTYPE_BEACON, head_len = ap_build_beacon_pr_head(ap, MPDU_MANAGEMENT_SUBTYPE_BEACON,
bcast_addr, head, sizeof(head)); bcast_addr, head, sizeof(head));
tail_len = ap_build_beacon_pr_tail(ap, false, tail); tail_len = ap_build_beacon_pr_tail(ap, false, tail);

View File

@ -87,3 +87,4 @@ bool ap_station_disconnect(struct ap_state *ap, const uint8_t *mac,
enum mmpdu_reason_code reason); enum mmpdu_reason_code reason);
bool ap_push_button(struct ap_state *ap); bool ap_push_button(struct ap_state *ap);
void ap_update_beacon(struct ap_state *ap);