ap_deauth_sta: Support disconnect,silent

Allow local disconnection only without notifying the station about
disconnection (i.e., do not transmit a Deauthentication frame while
removing a STA).

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
diff --git a/ap.c b/ap.c
index e5f0920..77886f2 100644
--- a/ap.c
+++ b/ap.c
@@ -8858,7 +8858,7 @@
 {
 	/* const char *name = get_param(cmd, "NAME"); */
 	/* const char *ifname = get_param(cmd, "INTERFACE"); */
-	const char *val;
+	const char *val, *disconnect;
 	char buf[100];
 
 	val = get_param(cmd, "MinorCode");
@@ -8872,7 +8872,11 @@
 	val = get_param(cmd, "STA_MAC_ADDRESS");
 	if (val == NULL)
 		return -1;
-	snprintf(buf, sizeof(buf), "deauth %s", val);
+	disconnect = get_param(cmd, "disconnect");
+	if (disconnect && strcasecmp(disconnect, "silent") == 0)
+		snprintf(buf, sizeof(buf), "deauth %s tx=0", val);
+	else
+		snprintf(buf, sizeof(buf), "deauth %s", val);
 	if (run_hostapd_cli(dut, buf) != 0)
 		return -2;