summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-02-21 21:06:52 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-02-21 21:06:52 -0800
commit41c40923ddbd50dbec635bf0cade7010b8d66ef4 (patch)
tree579588cfe2fadc52e3370244fe1ad6e2603c25d7
parentdf125fa3ac329a53924f7ce5c0c37a01b64843a3 (diff)
parente19146698a444675d5a23994a52ed8d560531f0c (diff)
Merge "qcacld-2.0: Refine channel free computing in ACS" into wlan-cld2.driver.lnx.1.0-dev
-rw-r--r--CORE/MAC/inc/sirApi.h4
-rw-r--r--CORE/MAC/src/pe/lim/limUtils.c2
-rw-r--r--CORE/SAP/src/sapChSelect.c8
-rw-r--r--CORE/SERVICES/WMA/wma.c9
4 files changed, 20 insertions, 3 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index cd70cd3aa840..a82d47b63d83 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -3042,6 +3042,8 @@ typedef struct sLimScanChn
* @rx_frame_count: rx frame count (cumulative)
* @bss_rx_cycle_count: BSS rx cycle count
* @rx_11b_mode_data_duration: b-mode data rx time (units are microseconds)
+ * @tx_frame_count: BSS tx cycle count
+ * @mac_clk_mhz: sample frequency
* @channel_id: channel index
* @cmd_flags: indicate which stat event is this status coming from
*/
@@ -3055,6 +3057,8 @@ struct lim_channel_status {
uint32_t rx_frame_count;
uint32_t bss_rx_cycle_count;
uint32_t rx_11b_mode_data_duration;
+ uint32_t tx_frame_count;
+ uint32_t mac_clk_mhz;
uint32_t channel_id;
uint32_t cmd_flags;
};
diff --git a/CORE/MAC/src/pe/lim/limUtils.c b/CORE/MAC/src/pe/lim/limUtils.c
index ac2caf1bc8d5..14373d90dd35 100644
--- a/CORE/MAC/src/pe/lim/limUtils.c
+++ b/CORE/MAC/src/pe/lim/limUtils.c
@@ -6029,6 +6029,8 @@ void lim_add_channel_status_info(tpAniSirGlobal p_mac,
channel_status_list[i].cycle_count;
channel_stat->rx_frame_count -=
channel_status_list[i].rx_frame_count;
+ channel_stat->tx_frame_count -=
+ channel_status_list[i].tx_frame_count;
channel_stat->bss_rx_cycle_count -=
channel_status_list[i].bss_rx_cycle_count;
}
diff --git a/CORE/SAP/src/sapChSelect.c b/CORE/SAP/src/sapChSelect.c
index 7b3c71915eb4..ea25fbfd3f12 100644
--- a/CORE/SAP/src/sapChSelect.c
+++ b/CORE/SAP/src/sapChSelect.c
@@ -943,7 +943,9 @@ uint32_t sap_weight_channel_free(ptSapContext sap_ctx,
return softap_channel_free_weight_local;
}
- rx_clear_count = channel_stat->rx_clear_count;
+ rx_clear_count = channel_stat->rx_clear_count -
+ channel_stat->tx_frame_count -
+ channel_stat->rx_frame_count;
cycle_count = channel_stat->cycle_count;
/* LSH 4, otherwise it is always 0. */
@@ -961,8 +963,10 @@ uint32_t sap_weight_channel_free(ptSapContext sap_ctx,
channel_free_weight = softap_channel_free_weight_local;
VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_INFO_HIGH,
- "In %s, rcc=%d, cc=%d, cfwc=%d, cfwl=%d, cfw=%d",
+ "In %s, rcc=%d, cc=%d, tc=%d, rc=%d, cfwc=%d, cfwl=%d, cfw=%d",
__func__, rx_clear_count, cycle_count,
+ channel_stat->tx_frame_count,
+ channel_stat->rx_frame_count,
softap_channel_free_weight_cfg,
softap_channel_free_weight_local,
channel_free_weight);
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 646229fcd4b2..a3b3efc0c0db 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -8348,7 +8348,8 @@ wma_chan_info_event_handler(void *handle, u_int8_t *event_buf,
WMA_LOGI(FL("freq=%d nf=%d rx_cnt=%u cycle_count=%u "
"tx_pwr_range=%d tx_pwr_tput=%d "
"rx_frame_count=%u my_bss_rx_cycle_count=%u "
- "rx_11b_mode_data_duration=%d cmd_flags=%d"),
+ "rx_11b_mode_data_duration=%d "
+ "tx_frame_cnt=%d mac_clk_mhz=%d cmd_flags=%d"),
event->freq,
event->noise_floor,
event->rx_clear_count,
@@ -8358,6 +8359,8 @@ wma_chan_info_event_handler(void *handle, u_int8_t *event_buf,
event->rx_frame_count,
event->my_bss_rx_cycle_count,
event->rx_11b_mode_data_duration,
+ event->tx_frame_cnt,
+ event->mac_clk_mhz,
event->cmd_flags
);
@@ -8376,6 +8379,10 @@ wma_chan_info_event_handler(void *handle, u_int8_t *event_buf,
event->my_bss_rx_cycle_count;
channel_status->rx_11b_mode_data_duration =
event->rx_11b_mode_data_duration;
+ channel_status->tx_frame_count =
+ event->tx_frame_cnt;
+ channel_status->mac_clk_mhz =
+ event->mac_clk_mhz;
channel_status->channel_id =
vos_freq_to_chan(event->freq);
channel_status->cmd_flags =