Parcourir la source

qcacld-3.0: Replace typedef tSirHostOffloadReq

The Linux Coding Style enumerates a few special cases where typedefs
are useful, but stresses "NEVER EVER use a typedef unless you can
clearly match one of those rules." The tSirHostOffloadReq typedef does
not meet any of those criteria, so replace it (and the "tp" variant)
with a reference to the underlying struct.

Further note the Linux Coding Style frowns upon mixed-case names and
so-called Hungarian notation, so in conjunction rename the underlying
struct to be in compliance.

Change-Id: I21970981e7a128f71abdd601181c596b9b32320b
CRs-Fixed: 2396064
Jeff Johnson il y a 6 ans
Parent
commit
d6fda81520

+ 1 - 1
core/hdd/src/wlan_hdd_wext.c

@@ -8650,7 +8650,7 @@ static int __iw_set_host_offload(struct net_device *dev,
 {
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	struct host_offload_req *pRequest = (struct host_offload_req *) extra;
-	tSirHostOffloadReq offloadRequest;
+	struct sir_host_offload_req offloadRequest;
 	struct hdd_context *hdd_ctx;
 	int ret;
 

+ 2 - 2
core/mac/inc/sir_api.h

@@ -1991,7 +1991,7 @@ typedef struct sSirSmeProbeReqInd {
 #define SIR_OFFLOAD_DISABLE                         0
 #define SIR_OFFLOAD_ENABLE                          1
 
-typedef struct sSirHostOffloadReq {
+struct sir_host_offload_req {
 	uint8_t offloadType;
 	uint8_t enableOrDisable;
 	uint32_t num_ns_offload_count;
@@ -2000,7 +2000,7 @@ typedef struct sSirHostOffloadReq {
 		uint8_t hostIpv6Addr[SIR_MAC_IPV6_ADDR_LEN];
 	} params;
 	struct qdf_mac_addr bssid;
-} tSirHostOffloadReq, *tpSirHostOffloadReq;
+};
 
 /* Packet Types. */
 #define SIR_KEEP_ALIVE_NULL_PKT              1

+ 1 - 1
core/sme/inc/sme_api.h

@@ -662,7 +662,7 @@ QDF_STATUS sme_oem_get_capability(mac_handle_t mac_handle,
 #endif /*FEATURE_OEM_DATA_SUPPORT */
 QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId);
 QDF_STATUS sme_set_host_offload(mac_handle_t mac_handle, uint8_t sessionId,
-		tpSirHostOffloadReq pRequest);
+		struct sir_host_offload_req *pRequest);
 QDF_STATUS sme_set_keep_alive(mac_handle_t mac_handle, uint8_t sessionId,
 		tpSirKeepAliveReq pRequest);
 QDF_STATUS sme_get_operation_channel(mac_handle_t mac_handle,

+ 2 - 2
core/sme/inc/sme_power_save_api.h

@@ -46,12 +46,12 @@ void sme_set_tspec_uapsd_mask_per_session(struct mac_context *mac_ctx,
 
 QDF_STATUS sme_ps_start_uapsd(mac_handle_t mac_handle, uint32_t session_id);
 QDF_STATUS sme_set_ps_host_offload(mac_handle_t mac_handle,
-				   tpSirHostOffloadReq request,
+				   struct sir_host_offload_req *request,
 				   uint8_t session_id);
 
 #ifdef WLAN_NS_OFFLOAD
 QDF_STATUS sme_set_ps_ns_offload(mac_handle_t mac_handle,
-				 tpSirHostOffloadReq request,
+				 struct sir_host_offload_req *request,
 				 uint8_t session_id);
 
 #endif /* WLAN_NS_OFFLOAD */

+ 1 - 1
core/sme/src/common/sme_api.c

@@ -4466,7 +4466,7 @@ QDF_STATUS sme_change_mcc_beacon_interval(uint8_t sessionId)
  * Return QDF_STATUS
  */
 QDF_STATUS sme_set_host_offload(mac_handle_t mac_handle, uint8_t sessionId,
-				tpSirHostOffloadReq request)
+				struct sir_host_offload_req *request)
 {
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;

+ 6 - 6
core/sme/src/common/sme_power_save.c

@@ -614,10 +614,10 @@ QDF_STATUS sme_ps_start_uapsd(mac_handle_t mac_handle, uint32_t session_id)
  *            QDF_STATUS_SUCCESS  Request accepted.
  */
 QDF_STATUS sme_set_ps_host_offload(mac_handle_t mac_handle,
-				   tpSirHostOffloadReq request,
+				   struct sir_host_offload_req *request,
 				   uint8_t session_id)
 {
-	tpSirHostOffloadReq request_buf;
+	struct sir_host_offload_req *request_buf;
 	struct scheduler_msg msg = {0};
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
 	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
@@ -635,13 +635,13 @@ QDF_STATUS sme_set_ps_host_offload(mac_handle_t mac_handle,
 		return QDF_STATUS_E_FAILURE;
 	}
 
-	request_buf = qdf_mem_malloc(sizeof(tSirHostOffloadReq));
+	request_buf = qdf_mem_malloc(sizeof(struct sir_host_offload_req));
 	if (!request_buf)
 		return QDF_STATUS_E_NOMEM;
 
 	qdf_copy_macaddr(&request->bssid, &session->connectedProfile.bssid);
 
-	qdf_mem_copy(request_buf, request, sizeof(tSirHostOffloadReq));
+	qdf_mem_copy(request_buf, request, sizeof(struct sir_host_offload_req));
 
 	msg.type = WMA_SET_HOST_OFFLOAD;
 	msg.reserved = 0;
@@ -672,11 +672,11 @@ QDF_STATUS sme_set_ps_host_offload(mac_handle_t mac_handle,
  *		QDF_STATUS_SUCCESS  Request accepted.
  */
 QDF_STATUS sme_set_ps_ns_offload(mac_handle_t mac_handle,
-				 tpSirHostOffloadReq request,
+				 struct sir_host_offload_req *request,
 				 uint8_t session_id)
 {
 	struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
-	tpSirHostOffloadReq request_buf;
+	struct sir_host_offload_req *request_buf;
 	struct scheduler_msg msg = {0};
 	struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
 

+ 2 - 2
core/wma/inc/wma.h

@@ -875,8 +875,8 @@ struct wma_txrx_node {
 	uint8_t nss_2g;
 	uint8_t nss_5g;
 	uint8_t wep_default_key_idx;
-	tSirHostOffloadReq arp_offload_req;
-	tSirHostOffloadReq ns_offload_req;
+	struct sir_host_offload_req arp_offload_req;
+	struct sir_host_offload_req ns_offload_req;
 #ifndef QCA_SUPPORT_CP_STATS
 	struct sir_vdev_wow_stats wow_stats;
 #endif