]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_cli/hostapd_cli: Add driver_flags2 command
authorGokul Sivakumar <gokulkumar.sivakumar@infineon.com>
Wed, 26 Apr 2023 10:45:56 +0000 (16:15 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 6 Nov 2023 13:16:18 +0000 (15:16 +0200)
Leverage the already available control socket cmd "DRIVER_FLAGS2" and
dump the driver capab "flags2" bitmask on triggering the new CLI CMD
"driver_flags2", similar to the already existing CLI CMD "driver_flags".

$ hostapd_cli -i wlan0 driver_flags2
(OR)
$ wpa_cli -i wlan0 driver_flags2
0000000000000020:
BEACON_RATE_HE

Signed-off-by: Gokul Sivakumar <gokulkumar.sivakumar@infineon.com>
hostapd/hostapd_cli.c
wpa_supplicant/wpa_cli.c

index 01fe34fa04910f7ff09b1eca0603fa3fe926d3ae..45497cd018d85093b0d1165d4d2f7575471acc26 100644 (file)
@@ -1393,6 +1393,13 @@ static int hostapd_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc,
 }
 
 
+static int hostapd_cli_cmd_driver_flags2(struct wpa_ctrl *ctrl, int argc,
+                                        char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "DRIVER_FLAGS2");
+}
+
+
 #ifdef CONFIG_DPP
 
 static int hostapd_cli_cmd_dpp_qr_code(struct wpa_ctrl *ctrl, int argc,
@@ -1728,6 +1735,8 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
          " = send FTM range request"},
        { "driver_flags", hostapd_cli_cmd_driver_flags, NULL,
          " = show supported driver flags"},
+       { "driver_flags2", hostapd_cli_cmd_driver_flags2, NULL,
+         " = show supported driver flags2"},
 #ifdef CONFIG_DPP
        { "dpp_qr_code", hostapd_cli_cmd_dpp_qr_code, NULL,
          "report a scanned DPP URI from a QR Code" },
index 72e5219fa6023c7136d9f613794573eb8e7e62e7..65078edf1b6dc6e88345c442efa8ad892323378a 100644 (file)
@@ -551,6 +551,13 @@ static int wpa_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc,
 }
 
 
+static int wpa_cli_cmd_driver_flags2(struct wpa_ctrl *ctrl, int argc,
+                                    char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "DRIVER_FLAGS2");
+}
+
+
 static int wpa_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
 {
        return wpa_cli_cmd(ctrl, "GET", 1, argc, argv);
@@ -3384,6 +3391,9 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
        { "driver_flags", wpa_cli_cmd_driver_flags, NULL,
          cli_cmd_flag_none,
          "= list driver flags" },
+       { "driver_flags2", wpa_cli_cmd_driver_flags2, NULL,
+         cli_cmd_flag_none,
+         "= list driver flags2" },
        { "logon", wpa_cli_cmd_logon, NULL,
          cli_cmd_flag_none,
          "= IEEE 802.1X EAPOL state machine logon" },