diff options
| author | Naveen Rawat <naveenrawat@codeaurora.org> | 2017-09-13 14:35:21 -0700 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2017-09-15 18:24:38 -0700 |
| commit | 80fb5d03fe6dfa0c7e2b19d6ec54102465b8a748 (patch) | |
| tree | 7d2f25d9d1ba9c97a4e89192b104e2a5624756ed | |
| parent | 9e046b742f7c801c061b1bca210d957d567123a8 (diff) | |
qcacld-3.0: Fix SAP ACS logging
Fix misleading ACS logging that indicates best channel and final
channel selected are different.
Change-Id: I00a2a15fa9d709c3e78ebf580d599ec10deefb28
CRs-Fixed: 2105204
| -rw-r--r-- | core/sap/src/sap_ch_select.c | 43 |
1 files changed, 15 insertions, 28 deletions
diff --git a/core/sap/src/sap_ch_select.c b/core/sap/src/sap_ch_select.c index 1ad60db72fb7..304f0ab13e20 100644 --- a/core/sap/src/sap_ch_select.c +++ b/core/sap/src/sap_ch_select.c @@ -594,7 +594,7 @@ uint8_t sap_select_preferred_channel_from_channel_list(uint8_t best_chnl, !(CDS_IS_DFS_CH(best_chnl) && cds_disallow_mcc(best_chnl))) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, - "Best channel is: %d", + "Best channel so far is: %d", best_chnl); return best_chnl; } @@ -2402,33 +2402,19 @@ static void sap_sort_chl_weight_all(ptSapContext pSapCtx, } -/*========================================================================== - FUNCTION sap_filter_over_lap_ch - - DESCRIPTION - return true if ch is acceptable. - This function will decide if we will filter over lap channel or not. - - DEPENDENCIES - shall called after ap start. - - PARAMETERS - - IN - pSapCtx : Pointer to ptSapContext. - chNum : Filter channel number. - - RETURN VALUE - bool : true if channel is accepted. - - SIDE EFFECTS - ============================================================================*/ -static bool sap_filter_over_lap_ch(ptSapContext pSapCtx, uint16_t chNum) +/** + * sap_is_ch_non_overlap() - returns true if non-overlapping channel + * @sap_ctx: Sap context + * @ch: channel number + * + * Returns: true if non-overlapping (1, 6, 11) channel, false otherwise + */ +static bool sap_is_ch_non_overlap(ptSapContext sap_ctx, uint16_t ch) { - if (pSapCtx->enableOverLapCh) + if (sap_ctx->enableOverLapCh) return true; - else if ((chNum == CHANNEL_1) || - (chNum == CHANNEL_6) || (chNum == CHANNEL_11)) + + if ((ch == CHANNEL_1) || (ch == CHANNEL_6) || (ch == CHANNEL_11)) return true; return false; @@ -2644,11 +2630,12 @@ uint8_t sap_select_channel(tHalHandle hal, ptSapContext sap_ctx, } /* Give preference to Non-overlap channels */ - if (false == sap_filter_over_lap_ch(sap_ctx, + if (false == sap_is_ch_non_overlap(sap_ctx, spect_info->pSpectCh[count].chNum)) { QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_INFO_HIGH, - "sap_filter_over_lap_ch is false"); + FL("ch: %d skipped as its overlapping ch"), + spect_info->pSpectCh[count].chNum); continue; } |
