Parcourir la source

qcacld-3.0: Rename pAutoShutdownNotificationCb

The Linux Coding Style frowns upon mixed-case names and so-called
Hungarian notation so rename pAutoShutdownNotificationCb in tSmeStruct
to be in compliance.

Change-Id: I0cc79b5f9687e039f9f0be5ff976c27194d9a138
CRs-Fixed: 2400336
Jeff Johnson il y a 6 ans
Parent
commit
eb7bbed5ad
3 fichiers modifiés avec 17 ajouts et 16 suppressions
  1. 10 1
      core/sme/inc/sme_api.h
  2. 1 1
      core/sme/inc/sme_internal.h
  3. 6 14
      core/sme/src/common/sme_api.c

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

@@ -912,8 +912,17 @@ QDF_STATUS sme_ch_avoid_update_req(mac_handle_t mac_handle)
 }
 #endif
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
+/**
+ * sme_set_auto_shutdown_cb() - Register auto shutdown evt handler
+ * @mac_handle: Handle to the global MAC context
+ * @callback_fn: callback function to be invoked when an auto shutdown
+ *               event is received
+ *
+ * Return: QDF_STATUS
+ */
 QDF_STATUS sme_set_auto_shutdown_cb(mac_handle_t mac_handle,
-				    void (*pCallbackfn)(void));
+				    void (*callback_fn)(void));
+
 QDF_STATUS sme_set_auto_shutdown_timer(mac_handle_t mac_handle,
 				       uint32_t timer_value);
 #endif

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

@@ -278,7 +278,7 @@ struct sme_context {
 					   void *callback_context);
 #endif
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
-	void (*pAutoShutdownNotificationCb)(void);
+	void (*auto_shutdown_cb)(void);
 #endif
 	/* Maximum interfaces allowed by the host */
 	uint8_t max_intf_count;

+ 6 - 14
core/sme/src/common/sme_api.c

@@ -2033,10 +2033,10 @@ QDF_STATUS sme_process_msg(struct mac_context *mac, struct scheduler_msg *pMsg)
 #endif
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
 	case eWNI_SME_AUTO_SHUTDOWN_IND:
-		if (mac->sme.pAutoShutdownNotificationCb) {
+		if (mac->sme.auto_shutdown_cb) {
 			QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
 				  FL("Auto shutdown notification"));
-			mac->sme.pAutoShutdownNotificationCb();
+			mac->sme.auto_shutdown_cb();
 		}
 		break;
 #endif
@@ -8436,18 +8436,10 @@ QDF_STATUS sme_get_reg_info(mac_handle_t mac_handle, uint8_t chanId,
 }
 
 #ifdef FEATURE_WLAN_AUTO_SHUTDOWN
-/*
- * sme_auto_shutdown_cb() -
- *   Used to plug in callback function for receiving auto shutdown evt
- *
- * mac_handle
- * pCallbackfn : callback function pointer should be plugged in
- * Return QDF_STATUS
- */
 QDF_STATUS sme_set_auto_shutdown_cb(mac_handle_t mac_handle,
-				    void (*pCallbackfn)(void))
+				    void (*callback_fn)(void))
 {
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	QDF_STATUS status;
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 
 	QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
@@ -8455,8 +8447,8 @@ QDF_STATUS sme_set_auto_shutdown_cb(mac_handle_t mac_handle,
 
 	status = sme_acquire_global_lock(&mac->sme);
 	if (QDF_STATUS_SUCCESS == status) {
-		if (NULL != pCallbackfn)
-			mac->sme.pAutoShutdownNotificationCb = pCallbackfn;
+		if (NULL != callback_fn)
+			mac->sme.auto_shutdown_cb = callback_fn;
 		sme_release_global_lock(&mac->sme);
 	}