Преглед изворни кода

qcacld-3.0: Converge on struct tdls_send_mgmt_request

During TDLS componentization the legacy typedef tSirTdlsSendMgmtReq
was replicated, creating struct tdls_send_mgmt_request. Unfortunately
this left the driver with two different data structures which serve
the same purpose. Not only is this pointless, but due to the way in
which these structures are used there is an implicit requirement that
they be exactly identical. This approach is very fragile. To align
with the converged software architecture and to improve code
maintainability exclusively use the TDLS component struct.

Note that this struct must be promoted to be a public struct since it
is now accessed from outside the component.

Change-Id: I7d304d3d211101c7227ea621f307f91ff68a5753
CRs-Fixed: 2400767
Jeff Johnson пре 6 година
родитељ
комит
cc48896290
2 измењених фајлова са 33 додато и 33 уклоњено
  1. 1 33
      tdls/core/src/wlan_tdls_mgmt.h
  2. 32 0
      tdls/dispatcher/inc/wlan_tdls_public_structs.h

+ 1 - 33
tdls/core/src/wlan_tdls_mgmt.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -43,38 +43,6 @@ struct tdls_rx_mgmt_event {
 	struct tdls_rx_mgmt_frame *rx_mgmt;
 };
 
-/*
- * struct tdls_send_mgmt_request - tdls management request
- * @message_type: type of pe message
- * @length: length of the frame.
- * @session_id: session id
- * @transaction_id: transaction ID for cmd
- * @req_type: type of action frame
- * @dialog: dialog token used in the frame.
- * @status_code: status to be incuded in the frame.
- * @responder: tdls request type
- * @peer_capability: peer capability information
- * @bssid: bssid
- * @peer_mac: mac address of the peer
- * @add_ie: additional ie's to be included
- */
-struct tdls_send_mgmt_request {
-	uint16_t message_type;
-	uint16_t length;
-	uint8_t session_id;
-	uint16_t transaction_id;
-	uint8_t req_type;
-	uint8_t dialog;
-	uint16_t status_code;
-	uint8_t responder;
-	uint32_t peer_capability;
-	struct qdf_mac_addr bssid;
-	struct qdf_mac_addr peer_mac;
-	enum wifi_traffic_ac ac;
-	/* Variable length. Dont add any field after this. */
-	uint8_t add_ie[1];
-};
-
 /**
  * tdls_process_mgmt_req() - send a TDLS mgmt request to serialize module
  * @tdls_mgmt_req: tdls management request

+ 32 - 0
tdls/dispatcher/inc/wlan_tdls_public_structs.h

@@ -1216,4 +1216,36 @@ struct tdls_del_sta_rsp {
 	struct wlan_objmgr_psoc *psoc;
 };
 
+/*
+ * struct tdls_send_mgmt_request - tdls management request
+ * @message_type: type of pe message
+ * @length: length of the frame.
+ * @session_id: session id
+ * @transaction_id: transaction ID for cmd
+ * @req_type: type of action frame
+ * @dialog: dialog token used in the frame.
+ * @status_code: status to be incuded in the frame.
+ * @responder: tdls request type
+ * @peer_capability: peer capability information
+ * @bssid: bssid
+ * @peer_mac: mac address of the peer
+ * @add_ie: additional ie's to be included
+ */
+struct tdls_send_mgmt_request {
+	uint16_t message_type;
+	uint16_t length;
+	uint8_t session_id;
+	uint16_t transaction_id;
+	uint8_t req_type;
+	uint8_t dialog;
+	uint16_t status_code;
+	uint8_t responder;
+	uint32_t peer_capability;
+	struct qdf_mac_addr bssid;
+	struct qdf_mac_addr peer_mac;
+	enum wifi_traffic_ac ac;
+	/* Variable length. Dont add any field after this. */
+	uint8_t add_ie[1];
+};
+
 #endif