Cumulative patch from commit 37fd0be2d3ca50c9035e67041328099356a46860

37fd0be Add CTRL-EVENT-CHANNEL-SWITCH event to indicate channel changes
1574fa1 GAS: Fix double-free on an error path
d6e93d3 GAS: Remove unused gas_query_cancel()
ae2b482 GAS: Check protected/unprotected drop after action code check
9c21b2b GAS: Report GAS-QUERY-DONE event on initial req TX failure
e6804fe OpenSSL: Update to match the modified DH_get0_key() API
fc1e2c0 D-Bus: Make the CurrentAuthMode property getter more robust
82b9ec3 D-Bus: Add DeviceFoundProperties signal for discovered peers
4976618 mesh: Mark wpa_state COMPLETED when mesh join has been performed
b94fff1 wpa_supplicant: Configurable EAP fragment size in AP mode
617593c Assign vendor specific elements for early HE testing
4874b78 PAE: Use big endian version in current_peer_id.mn to be more consistent
ce256b4 PAE: Use sci->port more consistently
2f13e54 wired: Silence sparse warning on redefinition of IFNAMSIZ
82ffcba Move extern declarations for ext_password backends into a header file
affdd33 Move extern declarations for autoscan modules into a header file
9eece21 Move extern declarations for bgscan modules into a header file
39ab6a5 Move extern declarations for driver ops into a header file
4775471 nl80211: Mark wpa_driver_nl80211_get_macaddr() static
ebae413 Fix a debug print in p2p_manager_disconnect()
f367c08 Mark internal functions static
582121b OpenSSL: Silence sparse warnings in fips186_2_prf()
451e094 dhcp_snoop: Silence a sparse warning
bbae0f0 ndisc_snoop: Include ndisc_snoop.h to check prototypes
99a716a TNCS: Mark functions static
799a7ed PAE: Mark ieee802_1x_kay_deinit_data_key() static
4e7f5a4 PAE: Use be16/be32 instead of u16/u32 for spartse
ac36b13 TNCC: Mark functions static
fad6485 radiotap: Silence sparse warnings about byte order swapping
94c4d78 FST: Make fst_action_names static
82c734c FST: Fix byte order of couple of fields on big endian hosts
0dbe22b Mark wpas_data_test_rx() static
4d8d710 Fix byte order for CONFIG_VHT_OVERRIDES parameters
3787c91 OpenSSL: Pull in header files to check function prototypes
39cdd3a FST: Mark wpa_supplicant callback functions get_peer_{first,next} static
6013bbe TDLS: Declare tdls_testing as extern in a header file
0e672b8 trace: Define externs in a header file
6527b52 Undefine __bitwise before defining it for sparse
468b7b1 Fix hostapd_sta_add() call to use NULL as the pointer instead of 0
0558bec MBO: Mark verify_channel() static
9e080bf WNM: Use NULL instead of 0 as the pointer return value

Change-Id: Ia18f0c09fafb7bf0a3a91cd72dc81c370c2644ac
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/fst/fst_defs.h b/src/fst/fst_defs.h
index 8ddcc61..5859f6f 100644
--- a/src/fst/fst_defs.h
+++ b/src/fst/fst_defs.h
@@ -34,7 +34,7 @@
 struct session_transition_ie {
 	u8 element_id;
 	u8 length;
-	u32 fsts_id;
+	le32 fsts_id;
 	u8 session_control;
 	u8 new_band_id;
 	u8 new_band_setup;
@@ -47,7 +47,7 @@
 struct fst_setup_req {
 	u8 action;
 	u8 dialog_token;
-	u32 llt;
+	le32 llt;
 	struct session_transition_ie stie;
 	/* Multi-band (optional) */
 	/* Wakeup Schedule (optional) */
@@ -70,18 +70,18 @@
 struct fst_ack_req {
 	u8 action;
 	u8 dialog_token;
-	u32 fsts_id;
+	le32 fsts_id;
 } STRUCT_PACKED;
 
 struct fst_ack_res {
 	u8 action;
 	u8 dialog_token;
-	u32 fsts_id;
+	le32 fsts_id;
 } STRUCT_PACKED;
 
 struct fst_tear_down {
 	u8 action;
-	u32 fsts_id;
+	le32 fsts_id;
 } STRUCT_PACKED;
 
 #endif /* IEEE_80211_FST_DEFS_H */
diff --git a/src/fst/fst_session.c b/src/fst/fst_session.c
index 449e304..652f46a 100644
--- a/src/fst/fst_session.c
+++ b/src/fst/fst_session.c
@@ -44,7 +44,7 @@
 #define FST_LLT_MS_DEFAULT 50
 #define FST_ACTION_MAX_SUPPORTED   FST_ACTION_ON_CHANNEL_TUNNEL
 
-const char * const fst_action_names[] = {
+static const char * const fst_action_names[] = {
 	[FST_ACTION_SETUP_REQUEST]     = "Setup Request",
 	[FST_ACTION_SETUP_RESPONSE]    = "Setup Response",
 	[FST_ACTION_TEAR_DOWN]         = "Tear Down",
@@ -994,7 +994,7 @@
 	res.stie.length = sizeof(res.stie) - 2;
 
 	if (status_code == WLAN_STATUS_SUCCESS) {
-		res.stie.fsts_id = s->data.fsts_id;
+		res.stie.fsts_id = host_to_le32(s->data.fsts_id);
 		res.stie.session_control = SESSION_CONTROL(SESSION_TYPE_BSS, 0);
 
 		fst_iface_get_channel_info(s->data.new_iface, &hw_mode,
@@ -1468,7 +1468,7 @@
 	res.stie.length = sizeof(res.stie) - 2;
 
 	if (res.status_code == WLAN_STATUS_SUCCESS) {
-		res.stie.fsts_id = fsts_id;
+		res.stie.fsts_id = host_to_le32(fsts_id);
 		res.stie.session_control = SESSION_CONTROL(SESSION_TYPE_BSS, 0);
 
 		fst_iface_get_channel_info(s.data.new_iface, &hw_mode,
@@ -1517,7 +1517,7 @@
 	os_memset(&req, 0, sizeof(req));
 	req.action = FST_ACTION_ACK_REQUEST;
 	req.dialog_token = g->dialog_token;
-	req.fsts_id = fsts_id;
+	req.fsts_id = host_to_le32(fsts_id);
 
 	return fst_session_send_action(&s, FALSE, &req, sizeof(req), NULL);
 }
@@ -1545,7 +1545,7 @@
 	os_memset(&res, 0, sizeof(res));
 	res.action = FST_ACTION_ACK_RESPONSE;
 	res.dialog_token = g->dialog_token;
-	res.fsts_id = fsts_id;
+	res.fsts_id = host_to_le32(fsts_id);
 
 	return fst_session_send_action(&s, FALSE, &res, sizeof(res), NULL);
 }
@@ -1572,7 +1572,7 @@
 
 	os_memset(&td, 0, sizeof(td));
 	td.action = FST_ACTION_TEAR_DOWN;
-	td.fsts_id = fsts_id;
+	td.fsts_id = host_to_le32(fsts_id);
 
 	return fst_session_send_action(&s, TRUE, &td, sizeof(td), NULL);
 }