Browse Source

qcacld-3.0: Fix -Wmissing-prototypes in sap/src

We want to enable the compiler's -Wmissing-prototypes switch, but
there is existing code that is generating warnings. Fix all warnings
in sap/src.

Change-Id: I92193d6209c5e62468197a1aae8a4187f60b0891
CRs-Fixed: 1075555
Jeff Johnson 8 years ago
parent
commit
464f7ea7b7
3 changed files with 78 additions and 87 deletions
  1. 61 72
      core/sap/src/sap_ch_select.c
  2. 16 14
      core/sap/src/sap_fsm.c
  3. 1 1
      core/sap/src/sap_module.c

+ 61 - 72
core/sap/src/sap_ch_select.c

@@ -487,6 +487,7 @@ void sap_cleanup_channel_list(void *p_cds_gctx)
  *
  * Return: uint8_t best channel
  */
+static
 uint8_t sap_select_preferred_channel_from_channel_list(uint8_t best_chnl,
 				ptSapContext sap_ctx,
 				tSapChSelSpectInfo *spectinfo_param)
@@ -541,8 +542,9 @@ uint8_t sap_select_preferred_channel_from_channel_list(uint8_t best_chnl,
 
    SIDE EFFECTS
    ============================================================================*/
-bool sap_chan_sel_init(tHalHandle halHandle,
-		       tSapChSelSpectInfo *pSpectInfoParams, ptSapContext pSapCtx)
+static bool sap_chan_sel_init(tHalHandle halHandle,
+			      tSapChSelSpectInfo *pSpectInfoParams,
+			      ptSapContext pSapCtx)
 {
 	tSapSpectChInfo *pSpectCh = NULL;
 	uint8_t *pChans = NULL;
@@ -672,7 +674,7 @@ bool sap_chan_sel_init(tHalHandle halHandle,
 
    SIDE EFFECTS
    ============================================================================*/
-uint32_t sapweight_rssi_count(int8_t rssi, uint16_t count)
+static uint32_t sapweight_rssi_count(int8_t rssi, uint16_t count)
 {
 	int32_t rssiWeight = 0;
 	int32_t countWeight = 0;
@@ -716,8 +718,8 @@ uint32_t sapweight_rssi_count(int8_t rssi, uint16_t count)
  * Return: None.
  */
 
-void sap_update_rssi_bsscount(tSapSpectChInfo *pSpectCh, int32_t offset,
-			      bool sap_24g)
+static void sap_update_rssi_bsscount(tSapSpectChInfo *pSpectCh, int32_t offset,
+				     bool sap_24g)
 {
 	tSapSpectChInfo *pExtSpectCh = NULL;
 	int32_t rssi, rsssi_effect;
@@ -790,12 +792,12 @@ void sap_update_rssi_bsscount(tSapSpectChInfo *pSpectCh, int32_t offset,
  * Return: NA.
  */
 
-void sap_upd_chan_spec_params(tSirProbeRespBeacon *pBeaconStruct,
-			      uint16_t *channelWidth,
-			      uint16_t *secondaryChannelOffset,
-			      uint16_t *vhtSupport,
-			      uint16_t *centerFreq,
-			      uint16_t *centerFreq_2)
+static void sap_upd_chan_spec_params(tSirProbeRespBeacon *pBeaconStruct,
+				     uint16_t *channelWidth,
+				     uint16_t *secondaryChannelOffset,
+				     uint16_t *vhtSupport,
+				     uint16_t *centerFreq,
+				     uint16_t *centerFreq_2)
 {
 	if (NULL == pBeaconStruct) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -830,7 +832,7 @@ void sap_upd_chan_spec_params(tSirProbeRespBeacon *pBeaconStruct,
 /**
  * sap_update_rssi_bsscount_vht_5G() - updates bss count and rssi effect.
  *
- * @pSpectCh:     Channel Information
+ * @spect_ch:     Channel Information
  * @offset:       Channel Offset
  * @num_ch:       no.of channels
  *
@@ -840,8 +842,9 @@ void sap_upd_chan_spec_params(tSirProbeRespBeacon *pBeaconStruct,
  * Return: None.
  */
 
-void sap_update_rssi_bsscount_vht_5G(tSapSpectChInfo *spect_ch, int32_t offset,
-			      uint16_t num_ch)
+static void sap_update_rssi_bsscount_vht_5G(tSapSpectChInfo *spect_ch,
+					    int32_t offset,
+					    uint16_t num_ch)
 {
 	int32_t ch_offset;
 	uint16_t i, cnt;
@@ -875,12 +878,12 @@ void sap_update_rssi_bsscount_vht_5G(tSapSpectChInfo *spect_ch, int32_t offset,
  * Return: NA.
  */
 
-void sap_interference_rssi_count_5G(tSapSpectChInfo *spect_ch,
-				 uint16_t chan_width,
-				 uint16_t sec_chan_offset,
-				 uint16_t center_freq,
-				 uint16_t center_freq_2,
-				 uint8_t channel_id)
+static void sap_interference_rssi_count_5G(tSapSpectChInfo *spect_ch,
+					   uint16_t chan_width,
+					   uint16_t sec_chan_offset,
+					   uint16_t center_freq,
+					   uint16_t center_freq_2,
+					   uint8_t channel_id)
 {
 	uint16_t num_ch;
 	int32_t offset = 0;
@@ -964,7 +967,7 @@ void sap_interference_rssi_count_5G(tSapSpectChInfo *spect_ch,
  * Return: None.
  */
 
-void sap_interference_rssi_count(tSapSpectChInfo *spect_ch)
+static void sap_interference_rssi_count(tSapSpectChInfo *spect_ch)
 {
 	if (NULL == spect_ch) {
 		QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_ERROR,
@@ -1060,21 +1063,18 @@ void sap_interference_rssi_count(tSapSpectChInfo *spect_ch)
 	}
 }
 
-/*==========================================================================
-  Function    ch_in_pcl
-
-  Description
-   Check if a channel is in the preferred channel list
-
-  Parameters
-   sap_ctx   SAP context pointer
-   channel   input channel number
-
-  Return Value
-   true:    channel is in PCL
-   false:   channel is not in PCL
- ==========================================================================*/
-bool ch_in_pcl(ptSapContext sap_ctx, uint8_t channel)
+/**
+ * ch_in_pcl() - Is channel in the Preferred Channel List (PCL)
+ * @sap_ctx: SAP context which contains the current PCL
+ * @channel: Input channel number to be checked
+ *
+ * Check if a channel is in the preferred channel list
+ *
+ * Return:
+ *   true:    channel is in PCL,
+ *   false:   channel is not in PCL
+ */
+static bool ch_in_pcl(ptSapContext sap_ctx, uint8_t channel)
 {
 	uint32_t i;
 
@@ -1086,32 +1086,21 @@ bool ch_in_pcl(ptSapContext sap_ctx, uint8_t channel)
 	return false;
 }
 
-/*==========================================================================
-   FUNCTION    sap_compute_spect_weight
-
-   DESCRIPTION
-    Main function for computing the weight of each channel in the
-    spectrum based on the RSSI value of the BSSes on the channel
-    and number of BSS
-
-   DEPENDENCIES
-    NA.
-
-   PARAMETERS
-
-    IN
-    pSpectInfoParams       : Pointer to the tSpectInfoParams structure
-    halHandle              : Pointer to HAL handle
-    pResult                : Pointer to tScanResultHandle
-
-   RETURN VALUE
-    void     : NULL
-
-   SIDE EFFECTS
-   ============================================================================*/
-void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
-			      tHalHandle halHandle, tScanResultHandle pResult,
-				ptSapContext sap_ctx)
+/**
+ * sap_compute_spect_weight() - Compute spectrum weight
+ * @pSpectInfoParams: Pointer to the tSpectInfoParams structure
+ * @halHandle: Pointer to HAL handle
+ * @pResult: Pointer to tScanResultHandle
+ * @sap_ctx: Context of the SAP
+ *
+ * Main function for computing the weight of each channel in the
+ * spectrum based on the RSSI value of the BSSes on the channel
+ * and number of BSS
+ */
+static void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
+				     tHalHandle halHandle,
+				     tScanResultHandle pResult,
+				     ptSapContext sap_ctx)
 {
 	int8_t rssi = 0;
 	uint8_t chn_num = 0;
@@ -1299,7 +1288,7 @@ void sap_compute_spect_weight(tSapChSelSpectInfo *pSpectInfoParams,
 
    SIDE EFFECTS
    ============================================================================*/
-void sap_chan_sel_exit(tSapChSelSpectInfo *pSpectInfoParams)
+static void sap_chan_sel_exit(tSapChSelSpectInfo *pSpectInfoParams)
 {
 	/* Free all the allocated memory */
 	qdf_mem_free(pSpectInfoParams->pSpectCh);
@@ -1324,7 +1313,7 @@ void sap_chan_sel_exit(tSapChSelSpectInfo *pSpectInfoParams)
 
    SIDE EFFECTS
    ============================================================================*/
-void sap_sort_chl_weight(tSapChSelSpectInfo *pSpectInfoParams)
+static void sap_sort_chl_weight(tSapChSelSpectInfo *pSpectInfoParams)
 {
 	tSapSpectChInfo temp;
 
@@ -1358,7 +1347,7 @@ void sap_sort_chl_weight(tSapChSelSpectInfo *pSpectInfoParams)
  *
  * Return: none
  */
-void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams)
+static void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams)
 {
 	uint8_t i, j, n;
 	tSapSpectChInfo *pSpectInfo;
@@ -1459,7 +1448,7 @@ void sap_sort_chl_weight_ht80(tSapChSelSpectInfo *pSpectInfoParams)
  *
  * Return: none
  */
-void sap_sort_chl_weight_vht160(tSapChSelSpectInfo *pSpectInfoParams)
+static void sap_sort_chl_weight_vht160(tSapChSelSpectInfo *pSpectInfoParams)
 {
 	uint8_t i, j, n, idx;
 	tSapSpectChInfo *pSpectInfo;
@@ -1598,7 +1587,7 @@ void sap_sort_chl_weight_vht160(tSapChSelSpectInfo *pSpectInfoParams)
  *
  * Return: none
  */
-void sap_sort_chl_weight_ht40_24_g(tSapChSelSpectInfo *pSpectInfoParams)
+static void sap_sort_chl_weight_ht40_24_g(tSapChSelSpectInfo *pSpectInfoParams)
 {
 	uint8_t i, j;
 	tSapSpectChInfo *pSpectInfo;
@@ -1708,7 +1697,7 @@ void sap_sort_chl_weight_ht40_24_g(tSapChSelSpectInfo *pSpectInfoParams)
 
    SIDE EFFECTS
    ============================================================================*/
-void sap_sort_chl_weight_ht40_5_g(tSapChSelSpectInfo *pSpectInfoParams)
+static void sap_sort_chl_weight_ht40_5_g(tSapChSelSpectInfo *pSpectInfoParams)
 {
 	uint8_t i, j;
 	tSapSpectChInfo *pSpectInfo;
@@ -1790,9 +1779,9 @@ void sap_sort_chl_weight_ht40_5_g(tSapChSelSpectInfo *pSpectInfoParams)
 
    SIDE EFFECTS
    ============================================================================*/
-void sap_sort_chl_weight_all(ptSapContext pSapCtx,
-			     tSapChSelSpectInfo *pSpectInfoParams,
-			     uint32_t operatingBand)
+static void sap_sort_chl_weight_all(ptSapContext pSapCtx,
+				    tSapChSelSpectInfo *pSpectInfoParams,
+				    uint32_t operatingBand)
 {
 	tSapSpectChInfo *pSpectCh = NULL;
 	uint32_t j = 0;
@@ -1882,7 +1871,7 @@ void sap_sort_chl_weight_all(ptSapContext pSapCtx,
 
    SIDE EFFECTS
    ============================================================================*/
-bool sap_filter_over_lap_ch(ptSapContext pSapCtx, uint16_t chNum)
+static bool sap_filter_over_lap_ch(ptSapContext pSapCtx, uint16_t chNum)
 {
 	if (pSapCtx->enableOverLapCh)
 		return eSAP_TRUE;

+ 16 - 14
core/sap/src/sap_fsm.c

@@ -889,7 +889,7 @@ static inline void sap_event_init(ptWLAN_SAPEvent sapEvent)
  *
  * Return: TRUE or FALSE
  */
-bool
+static bool
 sap_find_target_channel_in_channel_matrix(ptSapContext sapContext,
 					  enum phy_ch_width ch_width,
 					  uint8_t NOL_channel,
@@ -954,7 +954,7 @@ sap_find_target_channel_in_channel_matrix(ptSapContext sapContext,
  * Return: QDF_STATUS
  */
 
-QDF_STATUS
+static QDF_STATUS
 sap_mark_leaking_ch(ptSapContext sap_ctx,
 		enum phy_ch_width ch_width,
 		tSapDfsNolInfo *nol,
@@ -1772,7 +1772,7 @@ bool sap_acs_channel_check(ptSapContext sapContext, uint8_t channelNumber)
  *
  * Return: none
  */
-void sap_mark_dfs_channels(ptSapContext sapContext, uint8_t *channels,
+static void sap_mark_dfs_channels(ptSapContext sapContext, uint8_t *channels,
 			   uint8_t numChannels, uint64_t time)
 {
 	int i, j;
@@ -1843,9 +1843,10 @@ void sap_mark_dfs_channels(ptSapContext sapContext, uint8_t *channels,
  * This Function is to get bonding channels from primary channel.
  *
  */
-uint8_t sap_get_bonding_channels(ptSapContext sapContext, uint8_t channel,
-				 uint8_t *channels, uint8_t size,
-				 ePhyChanBondState chanBondState)
+static uint8_t sap_get_bonding_channels(ptSapContext sapContext,
+					uint8_t channel,
+					uint8_t *channels, uint8_t size,
+					ePhyChanBondState chanBondState)
 {
 	tHalHandle hHal = CDS_GET_HAL_CB(sapContext->p_cds_gctx);
 	tpAniSirGlobal pMac;
@@ -2507,8 +2508,9 @@ QDF_STATUS sap_open_session(tHalHandle hHal, ptSapContext sapContext,
 
    SIDE EFFECTS
    ============================================================================*/
-QDF_STATUS sap_goto_starting(ptSapContext sapContext, ptWLAN_SAPEvent sapEvent,
-			     eCsrRoamBssType bssType)
+static QDF_STATUS sap_goto_starting(ptSapContext sapContext,
+				    ptWLAN_SAPEvent sapEvent,
+				    eCsrRoamBssType bssType)
 {
 	/* tHalHandle */
 	tHalHandle hHal = CDS_GET_HAL_CB(sapContext->p_cds_gctx);
@@ -2568,7 +2570,7 @@ QDF_STATUS sap_goto_starting(ptSapContext sapContext, ptWLAN_SAPEvent sapEvent,
 
    SIDE EFFECTS
    ============================================================================*/
-QDF_STATUS sap_goto_disconnecting(ptSapContext sapContext)
+static QDF_STATUS sap_goto_disconnecting(ptSapContext sapContext)
 {
 	QDF_STATUS qdf_ret_status;
 	tHalHandle hHal;
@@ -2624,7 +2626,7 @@ static QDF_STATUS sap_roam_session_close_callback(void *pContext)
 
    SIDE EFFECTS
    ============================================================================*/
-QDF_STATUS sap_goto_disconnected(ptSapContext sapContext)
+static QDF_STATUS sap_goto_disconnected(ptSapContext sapContext)
 {
 	QDF_STATUS qdf_status = QDF_STATUS_E_FAILURE;
 	tWLAN_SAPEvent sapEvent;
@@ -2995,7 +2997,7 @@ QDF_STATUS sap_signal_hdd_event(ptSapContext sap_ctx,
    SIDE EFFECTS
     NA
    ============================================================================*/
-ptSapContext sap_find_valid_concurrent_session(tHalHandle hHal)
+static ptSapContext sap_find_valid_concurrent_session(tHalHandle hHal)
 {
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
 	uint8_t intf = 0;
@@ -3020,7 +3022,7 @@ ptSapContext sap_find_valid_concurrent_session(tHalHandle hHal)
  *
  * Return: Valid SAP context on success, else NULL
  */
-ptSapContext sap_find_cac_wait_session(tHalHandle handle)
+static ptSapContext sap_find_cac_wait_session(tHalHandle handle)
 {
 	tpAniSirGlobal mac = PMAC_STRUCT(handle);
 	uint8_t i = 0;
@@ -3167,7 +3169,7 @@ void sap_cac_reset_notify(tHalHandle hHal)
 
    SIDE EFFECTS
    ============================================================================*/
-QDF_STATUS sap_cac_start_notify(tHalHandle hHal)
+static QDF_STATUS sap_cac_start_notify(tHalHandle hHal)
 {
 	uint8_t intf = 0;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
@@ -3253,7 +3255,7 @@ static QDF_STATUS wlansap_update_pre_cac_end(ptSapContext sap_context,
 
    SIDE EFFECTS
    ============================================================================*/
-QDF_STATUS sap_cac_end_notify(tHalHandle hHal, tCsrRoamInfo *roamInfo)
+static QDF_STATUS sap_cac_end_notify(tHalHandle hHal, tCsrRoamInfo *roamInfo)
 {
 	uint8_t intf;
 	tpAniSirGlobal pMac = PMAC_STRUCT(hHal);

+ 1 - 1
core/sap/src/sap_module.c

@@ -626,7 +626,7 @@ uint16_t wlansap_check_cc_intf(void *Ctx)
   * Return:                                 The result code associated with
   *                                         performing the operation
   */
-QDF_STATUS
+static QDF_STATUS
 wlansap_set_scan_acs_channel_params(tsap_Config_t *pconfig,
 				ptSapContext psap_ctx,
 				void *pusr_context)