wpa_supplicant: P2P-related fixes

- Remove unused function warning in WPS-NFC case
- P2P: Fix p2p_ctrl_invite_persistent to parse peer parameter
- hostapd: Fix CONFIG_INTERWORKING=y build without CONFIG_HS20=y
- hostapd: Fix WDS VLAN bridge handling
- hostapd: Send EAPOL frames from the VO queue if WMM is active
- P2P: Remove channel 14 from supported P2P channels
- hostapd: Clear WLAN_STA_ASSOC_REQ_OK if sending the assoc response failed
- hostapd: Add check for the wds sta flag before creating 4addr VLANs
- nl80211: Use the monitor interface if socket tx status is not supported
- wpa_supplicant: Set state to DISCONNECTED on AP creation errors
- P2P: Fix p2p_group_idle in no-group-interface P2P client case
- P2P: Fix PSK configuration for GO network
- Print control interface commands in easier format
- Add debug print for no enabled networks case
- P2P: Add more debug prints for GO start routines
- P2P: Fix pending sta scan processing for concurrent operation cases

BUG: 6940646
Change-Id: I1b1c54a08c61ec4af2bfd2274afc93501004eea2

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index a9e6139..4574938 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -2678,10 +2678,10 @@
 	}
 #else
 	/*
-	 * If poll command is supported mac80211 is new enough to
-	 * have everything we need to not need monitor interfaces.
+	 * If poll command and tx status are supported, mac80211 is new enough
+	 * to have everything we need to not need monitor interfaces.
 	 */
-	drv->use_monitor = !info.poll_command_supported;
+	drv->use_monitor = !info.poll_command_supported || !info.data_tx_status;
 #endif
 
 	if (drv->device_ap_sme && drv->use_monitor) {
@@ -6423,8 +6423,8 @@
 	pos = (u8 *) (hdr + 1);
 
 	if (qos) {
-		/* add an empty QoS header if needed */
-		pos[0] = 0;
+		/* Set highest priority in QoS header */
+		pos[0] = 7;
 		pos[1] = 0;
 		pos += 2;
 	}
@@ -7729,6 +7729,10 @@
 		}
 		return i802_set_sta_vlan(priv, addr, name, 0);
 	} else {
+		if (bridge_ifname)
+			linux_br_del_if(drv->global->ioctl_sock, bridge_ifname,
+					name);
+
 		i802_set_sta_vlan(priv, addr, bss->ifname, 0);
 		return wpa_driver_nl80211_if_remove(priv, WPA_IF_AP_VLAN,
 						    name);
@@ -8096,7 +8100,12 @@
 	if (ifindex <= 0)
 		return -1;
 
+	nl80211_remove_iface(drv, ifindex);
+
 #ifdef HOSTAPD
+	if (type != WPA_IF_AP_BSS)
+		return 0;
+
 	if (bss->added_if_into_bridge) {
 		if (linux_br_del_if(drv->global->ioctl_sock, bss->brname,
 				    bss->ifname) < 0)
@@ -8110,13 +8119,6 @@
 				   "bridge %s: %s",
 				   bss->brname, strerror(errno));
 	}
-#endif /* HOSTAPD */
-
-	nl80211_remove_iface(drv, ifindex);
-
-#ifdef HOSTAPD
-	if (type != WPA_IF_AP_BSS)
-		return 0;
 
 	if (bss != &drv->first_bss) {
 		struct i802_bss *tbss;