Add support for sending netlink messages

This allows sigma_dut to issue nl80211 commands directly without having
to use an external tool like iw (or go through wpa_supplicant) to do so.

An example of how to send a vendor command to the driver is provided in
atheros.c by function cmd_atheros_config_scan(), which is to enable or
disable scan functionality in the driver.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
diff --git a/sigma_dut.c b/sigma_dut.c
index 2e22354..ddf2f7d 100644
--- a/sigma_dut.c
+++ b/sigma_dut.c
@@ -1004,6 +1004,9 @@
 				"Interface should be provided for QNX/LINUX-WCN driver - check option M and S");
 	}
 
+#ifdef NL80211_SUPPORT
+	sigma_dut.nl_ctx = nl80211_init(&sigma_dut);
+#endif /* NL80211_SUPPORT */
 	sigma_dut_register_cmds();
 
 #ifdef __QNXNTO__
@@ -1075,6 +1078,9 @@
 	free(sigma_dut.rsne_override);
 	free(sigma_dut.ap_sae_groups);
 	free(sigma_dut.dpp_peer_uri);
+#ifdef NL80211_SUPPORT
+	nl80211_deinit(&sigma_dut, sigma_dut.nl_ctx);
+#endif /* NL80211_SUPPORT */
 	sigma_dut_unreg_cmds(&sigma_dut);
 #ifdef ANDROID
 	hlp_thread_cleanup(&sigma_dut);