Browse Source

qcacld-3.0: Harmonize sys_build_message_header()

The parameter identifiers used in the implementation of
sys_build_message_header() differ from the ones used in the
prototype. Since this can be confusing for both humans and code
analysis tools, harmonize on a good set of identifiers. In addition,
consolidate the two distince documentation blocks so that it is the
interface that is fully and correctly documented, and not the
implementation.

Change-Id: Iaeee04ec918fad20a43c5804f9e50b7b208dfb94
CRs-Fixed: 2376109
Jeff Johnson 6 years ago
parent
commit
8d34a83e3d
2 changed files with 23 additions and 47 deletions
  1. 20 35
      core/mac/src/sys/common/inc/wlan_qct_sys.h
  2. 3 12
      core/mac/src/sys/common/src/wlan_qct_sys.c

+ 20 - 35
core/mac/src/sys/common/inc/wlan_qct_sys.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-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
@@ -55,43 +55,28 @@
  */
 typedef void (*sys_rsp_cb)(void *user_data);
 
-/*---------------------------------------------------------------------------
-   Preprocessor definitions and constants
-   -------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------
-   Function declarations and documenation
-   -------------------------------------------------------------------------*/
-
-/*----------------------------------------------------------------------------
-
-   \brief sys_build_message_header() - Build / initialize a SYS message header
-
-   This function will initialize the SYS message header with the message type
-   and any internal fields needed for a new SYS message.  This function sets
-   all but the message body, which is up to the caller to setup based on the
-   specific message being built.
-
-   \note There are internal / reserved items in a SYS message that must be
-   set correctly for the message to be recognized as a SYS message by
-   the SYS message handlers.  It is important for every SYS message to
-   be setup / built / initialized through this function.
-
-   \param sysMsgId - a valid message ID for a SYS message.  See the
-   SYS_MSG_ID enum for all the valid SYS message IDs.
-
-   \param pMsg - pointer to the message structure to be setup.
-
-   \return
-
-   \sa
+/**
+ * sys_build_message_header() - to build the sys message header
+ * @msg_id: message id
+ * @msg: pointer to message context
+ *
+ * This function will initialize the SYS message header with the
+ * message type and any internal fields needed for a new SYS
+ * message. This function sets all but the message body, which is up
+ * to the caller to setup based on the specific message being built.
+ *
+ * NOTE: There are internal / reserved items in a SYS message that
+ * must be set correctly for the message to be recognized as a SYS
+ * message by the SYS message handlers.  It is important for every SYS
+ * message to be setup / built / initialized through this function.
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS sys_build_message_header(SYS_MSG_ID msg_id,
+				    struct scheduler_msg *msg);
 
-   --------------------------------------------------------------------------*/
-QDF_STATUS sys_build_message_header(SYS_MSG_ID sysMsgId,
-				    struct scheduler_msg *pMsg);
 /**
  * umac_stop() - send schedule message to mc thread to stop umac (sme and mac)
- * @p_cds_context: cds context
  *
  * Return: status of operation
  */

+ 3 - 12
core/mac/src/sys/common/src/wlan_qct_sys.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-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
@@ -39,19 +39,10 @@
 #define SYS_STOP_TIMEOUT (30000)
 static qdf_event_t g_stop_evt;
 
-/**
- * sys_build_message_header() - to build the sys message header
- * @umac_stop_msgId: message id
- * @pMsg: pointer to message context
- *
- * This API is used to build the sys message header.
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS sys_build_message_header(SYS_MSG_ID umac_stop_msg_id,
+QDF_STATUS sys_build_message_header(SYS_MSG_ID msg_id,
 				    struct scheduler_msg *msg)
 {
-	msg->type = umac_stop_msg_id;
+	msg->type = msg_id;
 	msg->reserved = SYS_MSG_COOKIE;
 
 	return QDF_STATUS_SUCCESS;