taxonomy: remove Capabilities and Interworking.

Experience in the real world shows that the Capabilities bitmask
isn't as useful as it seemed. Many of the bits are dynamic, so
client bitmasks change frequently and leads to a combinatorial
explosion in signatures. Also, differences we thought we saw between
clients were mostly differences in the environment, not useful as
signatures.

Similarly, what we thought were real differences in Interworking
between devices turned out to be bugs in iOS versions setting the
bitmask incorrectly. The presence or absence of the Interworking
field is a useful signal (and is already in the base signature),
the contents of the Interworking bitmask really aren't useful.

Change-Id: I2118069e5fcc32603fcf60b8ce50f3745a36d601
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 438cf81..5b8ff91 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -359,7 +359,7 @@
 		wpa_printf(MSG_ERROR, "open %s failed", tmpfile);
 		return;
 	}
-	fprintf(f, "wifi3|probe:%s|assoc:%s", sta->probe_ie_taxonomy,
+	fprintf(f, "wifi4|probe:%s|assoc:%s", sta->probe_ie_taxonomy,
 	        sta->assoc_ie_taxonomy);
 	fclose(f);
 	if (rename(tmpfile, filename)) {
diff --git a/src/ap/taxonomy.c b/src/ap/taxonomy.c
index 5e1fd2a..2ec4019 100644
--- a/src/ap/taxonomy.c
+++ b/src/ap/taxonomy.c
@@ -75,7 +75,6 @@
 }
 
 static void ie_to_string(char *fstr, size_t fstr_len,
-                         const char *capability,
                          const u8 *ie, size_t ie_len)
 {
 	size_t flen = fstr_len - 1;
@@ -85,7 +84,6 @@
 	char vhtcap[8 + 8 + 1];  // ",vhtcap:" + %08x + trailing NUL
 	char vhtrxmcs[10 + 8 + 1];  // ",vhtrxmcs:" + %08x + trailing NUL
 	char vhttxmcs[10 + 8 + 1];  // ",vhttxmcs:" + %08x + trailing NUL
-	char intwrk[8 + 2 + 1];  // ",intwrk:" + %02hx + trailing NUL
 	#define MAX_EXTCAP	254
 	char extcap[8 + (2 * MAX_EXTCAP) + 1];  // ",extcap:" + hex + trailing NUL
 	char txpow[7 + 4 + 1];  // ",txpow:" + %04hx + trailing NUL
@@ -99,7 +97,6 @@
 	memset(vhtcap, 0, sizeof(vhtcap));
 	memset(vhtrxmcs, 0, sizeof(vhtrxmcs));
 	memset(vhttxmcs, 0, sizeof(vhttxmcs));
-	memset(intwrk, 0, sizeof(intwrk));
 	memset(extcap, 0, sizeof(extcap));
 	memset(txpow, 0, sizeof(txpow));
 	memset(wps, 0, sizeof(wps));
@@ -176,10 +173,6 @@
 				snprintf(vhttxmcs, sizeof(vhttxmcs), ",vhttxmcs:%08x",
 				         le_to_host32(mcs));
 			}
-			if ((id == 107) && (elen >= 1)) {
-				/* Interworking */
-				snprintf(intwrk, sizeof(intwrk), ",intwrk:%02hx", *ie);
-			}
 			if (id == 127) {
 				/* Extended Capabilities */
 				int i;
@@ -210,10 +203,6 @@
 		ie_len -= elen;
 	}
 
-	if (capability) {
-		strncat(fstr, capability, flen);
-		flen = fstr_len - strlen(fstr) - 1;
-	}
 	if (strlen(htcap)) {
 		strncat(fstr, htcap, flen);
 		flen = fstr_len - strlen(fstr) - 1;
@@ -242,10 +231,6 @@
 		strncat(fstr, txpow, flen);
 		flen = fstr_len - strlen(fstr) - 1;
 	}
-	if (strlen(intwrk)) {
-		strncat(fstr, intwrk, flen);
-		flen = fstr_len - strlen(fstr) - 1;
-	}
 	if (strlen(extcap)) {
 		strncat(fstr, extcap, flen);
 		flen = fstr_len - strlen(fstr) - 1;
@@ -263,17 +248,15 @@
 {
 	ie_to_string(sta->probe_ie_taxonomy,
 	             sizeof(sta->probe_ie_taxonomy),
-	             NULL, ie, ie_len);
+	             ie, ie_len);
 }
 
 void hostapd_taxonomy_assoc_req(struct sta_info *sta,
 	const u8 *ie, size_t ie_len)
 {
-	char cap[5 + 4 + 1];  // ",cap:" + %04x + trailing NUL
-	snprintf(cap, sizeof(cap), ",cap:%04hx", sta->capability);
 	ie_to_string(sta->assoc_ie_taxonomy,
 	             sizeof(sta->assoc_ie_taxonomy),
-	             cap, ie, ie_len);
+	             ie, ie_len);
 }
 
 /* vim: set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab : */