[PATCH] hostapd_cli: Introduce add_link command
Lorenzo Bianconi
lorenzo at kernel.org
Thu Apr 9 01:49:04 PDT 2026
> On Thu, Mar 12, 2026 at 06:28:45PM +0100, Lorenzo Bianconi wrote:
> > Introduce add_link command in order to re-add a previously link removed
> > via hostapd_cli remove_link comand. The add_link command relies on the
> > following syntax:
>
> It's confusing to see hostapd_cli in the commit message title since this
> is really about adding a new LINK_ADD control interface command. Why is
> the hostapd_cli command called add_link when the hostapd control
> interface command is LINK_ADD?
ack, I will fix it in v2.
>
> Why is this added within CONFIG_TESTING_OPTIONS? Is this only for
My goal is actually having a remove_link command counterpart in order to
enable a link previously removed. Since remove_link command is defined
within CONFIG_TESTING_OPTIONS I added the new command there.
> testing? If so, the commit message should say so. If not, this probably
> should not be conditional on CONFIG_TESTING_OPTIONS.
ack, I will fix it in v2.
>
> What happens if this new command is used with a link that was not
> previously remvoed using hostapd_cli remove_link?
>
> It would be good to test compilation with more warnings enabled since
> this has at least following issues:
ack, I will fix the errors in v2.
Regards,
Lorenzo`
>
> ctrl_iface.c: In function ‘hostapd_ctrl_iface_link_add’:
> ctrl_iface.c:3600:23: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
> 3600 | for (i = 0; i < interfaces->count; i++) {
> | ^
> ctrl_iface.c:3611:39: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
> 3611 | for (i = 0; i < iface->num_bss; i++) {
> | ^
> ctrl_iface.c:3642:16: error: ‘ret’ may be used uninitialized [-Werror=maybe-uninitialized]
> 3642 | return ret;
> | ^~~
> ctrl_iface.c:3570:16: note: ‘ret’ was declared here
> 3570 | int i, ret;
> | ^~~
> cc1: all warnings being treated as errors
> make: *** [../src/build.rules:90: /home/jm/Git/hostap/build/hostapd/ctrl_iface.o] Error 1
>
> --
> Jouni Malinen PGP id EFC895FA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20260409/f31f1e16/attachment.sig>
More information about the Hostap
mailing list