Browse Source

qcacld-3.0: Fix kernel checkpatch warnings in p2p_api.c

Fix kernel checkpatch warnings in p2p_api.c

Change-Id: Ibfe38ef773b0c84eb66c9c3b2198f19638368c87
CRs-Fixed: 2025503
Yeshwanth Sriram Guntuka 7 years ago
parent
commit
f5b9c0acbb
1 changed files with 26 additions and 37 deletions
  1. 26 37
      core/sme/src/p2p/p2p_api.c

+ 26 - 37
core/sme/src/p2p/p2p_api.c

@@ -34,11 +34,7 @@
 #include "cfg_api.h"
 #include "wma.h"
 
-/*------------------------------------------------------------------
- *
- * handle SME remain on channel request.
- *
- *------------------------------------------------------------------*/
+/* handle SME remain on channel request. */
 
 QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac,
 					     tSmeCmd *p2pRemainonChn)
@@ -91,11 +87,7 @@ QDF_STATUS p2p_process_remain_on_channel_cmd(tpAniSirGlobal pMac,
 	return status;
 }
 
-/*------------------------------------------------------------------
- *
- * handle LIM remain on channel rsp: Success/failure.
- *
- *------------------------------------------------------------------*/
+/* handle LIM remain on channel rsp: Success/failure. */
 
 QDF_STATUS sme_remain_on_chn_rsp(tpAniSirGlobal pMac, uint8_t *pMsg)
 {
@@ -126,18 +118,14 @@ QDF_STATUS sme_remain_on_chn_rsp(tpAniSirGlobal pMac, uint8_t *pMsg)
 
 	fFound = csr_scan_active_ll_remove_entry(pMac, pEntry,
 				     LL_ACCESS_LOCK);
-	if (fFound) {
+	if (fFound)
 		/* Now put this command back on the avilable command list */
 		csr_release_command(pMac, pCommand);
-	}
+
 	return status;
 }
 
-/*------------------------------------------------------------------
- *
- * Handle the remain on channel ready indication from PE
- *
- *------------------------------------------------------------------*/
+/* Handle the remain on channel ready indication from PE */
 
 QDF_STATUS sme_remain_on_chn_ready(tHalHandle hHal, uint8_t *pMsg)
 {
@@ -172,12 +160,13 @@ QDF_STATUS sme_p2p_open(tHalHandle hHal)
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
-	/* If static structure is too big, Need to change this function to allocate memory dynamically */
+	/* If static structure is too big, Need to change this function to
+	 * allocate memory dynamically
+	 */
 	qdf_mem_zero(&pMac->p2pContext, sizeof(tp2pContext));
 
-	if (!QDF_IS_STATUS_SUCCESS(status)) {
+	if (!QDF_IS_STATUS_SUCCESS(status))
 		sme_p2p_close(hHal);
-	}
 
 	return status;
 }
@@ -223,19 +212,18 @@ tSirRFBand get_rf_band(uint8_t channel)
 	return SIR_BAND_UNKNOWN;
 }
 
-/* ---------------------------------------------------------------------------
-
-    \fn p2p_remain_on_channel
-    \brief  API to post the remain on channel command.
-    \param  hHal - The handle returned by mac_open.
-    \param  sessinId - HDD session ID.
-    \param  channel - Channel to remain on channel.
-    \param  duration - Duration for which we should remain on channel
-    \param  callback - callback function.
-    \param  pContext - argument to the callback function
-    \return QDF_STATUS
-
-   -------------------------------------------------------------------------------*/
+/*
+ * p2p_remain_on_channel() -
+ *  API to post the remain on channel command.
+ *
+ * hHal - The handle returned by mac_open.
+ * sessinId - HDD session ID.
+ * channel - Channel to remain on channel.
+ * duration - Duration for which we should remain on channel
+ * callback - callback function.
+ * pContext - argument to the callback function
+ * Return QDF_STATUS
+ */
 QDF_STATUS p2p_remain_on_channel(tHalHandle hHal, uint8_t sessionId,
 				 uint8_t channel, uint32_t duration,
 				 remainOnChanCallback callback,
@@ -251,11 +239,10 @@ QDF_STATUS p2p_remain_on_channel(tHalHandle hHal, uint8_t sessionId,
 	if (pRemainChlCmd == NULL)
 		return QDF_STATUS_E_FAILURE;
 
-	if (SIR_BAND_5_GHZ == get_rf_band(channel)) {
+	if (SIR_BAND_5_GHZ == get_rf_band(channel))
 		phyMode = WNI_CFG_PHY_MODE_11A;
-	} else {
+	else
 		phyMode = WNI_CFG_PHY_MODE_11G;
-	}
 
 	cfg_set_int(pMac, WNI_CFG_PHY_MODE, phyMode);
 
@@ -271,7 +258,9 @@ QDF_STATUS p2p_remain_on_channel(tHalHandle hHal, uint8_t sessionId,
 		pRemainChlCmd->u.remainChlCmd.callbackCtx = pContext;
 		pRemainChlCmd->u.remainChlCmd.scan_id = scan_id;
 
-		/* Put it at the head of the Q if we just finish finding the peer and ready to send a frame */
+		/* Put it at the head of the Q if we just finish finding the
+		 * peer and ready to send a frame
+		 */
 		status = csr_queue_sme_command(pMac, pRemainChlCmd, false);
 	} while (0);