From: Gokul Sivakumar Date: Fri, 10 Sep 2021 14:16:16 +0000 (+0530) Subject: iw: link: mention the need for MAC addr arg in link get_sta cmd usage menu X-Git-Tag: v5.16~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25bb9c39f91e79df6f056ab3343243750ad3f67f;p=thirdparty%2Fiw.git iw: link: mention the need for MAC addr arg in link get_sta cmd usage menu The usage menu shown when running the hidden "link get_sta" command is not mentioning the need for the MAC address argument. Without this, the cmd is always failing with the output shown below. $ ./iw dev wlan0 link get_sta Usage: ./iw [options] dev link get_sta ... To avoid this, let the user know about the mandatory "MAC address" argument like below. $ ./iw dev wlan0 link get_sta Usage: ./iw [options] dev link get_sta ... Signed-off-by: Gokul Sivakumar Link: https://lore.kernel.org/r/20210910141618.1594617-2-gokulkumar792@gmail.com Signed-off-by: Johannes Berg --- diff --git a/link.c b/link.c index 1ed7f63..2074488 100644 --- a/link.c +++ b/link.c @@ -273,7 +273,7 @@ static int handle_link(struct nl80211_state *state, } TOPLEVEL(link, NULL, 0, 0, CIB_NETDEV, handle_link, "Print information about the current link, if any."); -HIDDEN(link, get_sta, "", NL80211_CMD_GET_STATION, 0, +HIDDEN(link, get_sta, "", NL80211_CMD_GET_STATION, 0, CIB_NETDEV, handle_link_sta); HIDDEN(link, get_bss, NULL, NL80211_CMD_GET_SCAN, NLM_F_DUMP, CIB_NETDEV, handle_scan_for_link);