This patch adds another helper method, which returns the connect_or_ctrl socket when needed. Signed-off-by: Markus Theil <markus.theil@xxxxxxxxxxxxx> --- src/drivers/driver_nl80211.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 062348285..bc19e901c 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -478,6 +478,18 @@ out: } +struct nl_sock* get_connect_or_ctrl_handle(struct i802_bss *bss) +{ + struct nl_sock *nl_connect_or_ctrl = NULL; + + if (bss->drv->capa.flags & WPA_DRIVER_FLAGS_CONTROL_PORT || + bss->use_nl_connect) + nl_connect_or_ctrl = bss->nl_connect_or_ctrl; + + return nl_connect_or_ctrl; +} + + struct family_data { const char *group; int id; -- 2.24.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap