All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] ap: Make ap_update_beacon public
@ 2021-03-10 22:06 Andrew Zaborowski
  2021-03-10 22:06 ` [PATCH 2/6] ap: Pass frame IEs from clients to the ap_state user Andrew Zaborowski
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Andrew Zaborowski @ 2021-03-10 22:06 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]

Let users call ap_update_beacon when a value has changed which should be
reflected in the beacon IEs.
---
 src/ap.c | 5 ++++-
 src/ap.h | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/ap.c b/src/ap.c
index 5a86527f..6ab0c0fd 100644
--- a/src/ap.c
+++ b/src/ap.c
@@ -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);
 }
 
-static void ap_update_beacon(struct ap_state *ap)
+void ap_update_beacon(struct ap_state *ap)
 {
 	struct l_genl_msg *cmd;
 	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
 	};
 
+	if (L_WARN_ON(!ap->started))
+		return;
+
 	head_len = ap_build_beacon_pr_head(ap, MPDU_MANAGEMENT_SUBTYPE_BEACON,
 						bcast_addr, head, sizeof(head));
 	tail_len = ap_build_beacon_pr_tail(ap, false, tail);
diff --git a/src/ap.h b/src/ap.h
index dc57a0bb..6199bcbe 100644
--- a/src/ap.h
+++ b/src/ap.h
@@ -87,3 +87,4 @@ bool ap_station_disconnect(struct ap_state *ap, const uint8_t *mac,
 				enum mmpdu_reason_code reason);
 
 bool ap_push_button(struct ap_state *ap);
+void ap_update_beacon(struct ap_state *ap);
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-03-11 13:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-10 22:06 [PATCH 1/6] ap: Make ap_update_beacon public Andrew Zaborowski
2021-03-10 22:06 ` [PATCH 2/6] ap: Pass frame IEs from clients to the ap_state user Andrew Zaborowski
2021-03-10 22:06 ` [PATCH 3/6] ap: Write extra frame IEs from the user Andrew Zaborowski
2021-03-10 22:48   ` Denis Kenzior
2021-03-11 13:06     ` Andrew Zaborowski
2021-03-10 22:06 ` [PATCH 4/6] ap: Handle most WSC IEs using ap_write_extra_ies Andrew Zaborowski
2021-03-10 22:06 ` [PATCH 5/6] p2p: Parse P2P IEs and WFD IEs in Association Requests Andrew Zaborowski
2021-03-10 22:06 ` [PATCH 6/6] p2p: Build P2P and WFD IEs for group's management frames Andrew Zaborowski
2021-03-10 22:45 ` [PATCH 1/6] ap: Make ap_update_beacon public Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.