qcacld-3.0: Implementation to change BmissFinalBcnt dynamically
Implementation to change BmissFinalBcnt dynamically. User can set totalBcnt using the new command QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BMISS_CNT. BmissFirstBcnt will retain its default value or from ini. BmissFinalBcnt will be configured as (totalBcnt - BmissFirstBcnt). Change-Id: Ie3c3895d48248d349400e755f07edc807e335b44 CRs-Fixed: 2081906
This commit is contained in:
@@ -5438,6 +5438,7 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX + 1] = {
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_CHAIN] = {.type = NLA_U32 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SELFTEST] = {.type = NLA_U32 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SELFTEST_INTVL] = {.type = NLA_U32 },
|
||||
[QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT] = {.type = NLA_U8},
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -5765,6 +5766,7 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
|
||||
uint32_t ant_div_usrcfg;
|
||||
uint32_t antdiv_enable, antdiv_chain;
|
||||
uint32_t antdiv_selftest, antdiv_selftest_intvl;
|
||||
uint8_t bmiss_bcnt;
|
||||
|
||||
ENTER_DEV(dev);
|
||||
|
||||
@@ -6231,6 +6233,38 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
|
||||
}
|
||||
}
|
||||
|
||||
if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT]) {
|
||||
bmiss_bcnt = nla_get_u8(
|
||||
tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT]);
|
||||
if (hdd_ctx->config->nRoamBmissFirstBcnt < bmiss_bcnt) {
|
||||
hdd_ctx->config->nRoamBmissFinalBcnt = bmiss_bcnt
|
||||
- hdd_ctx->config->nRoamBmissFirstBcnt;
|
||||
hdd_debug("Bmiss first cnt(%d), Bmiss final cnt(%d)",
|
||||
hdd_ctx->config->nRoamBmissFirstBcnt,
|
||||
hdd_ctx->config->nRoamBmissFinalBcnt);
|
||||
ret_val = sme_set_roam_bmiss_final_bcnt(hdd_ctx->hHal,
|
||||
0, hdd_ctx->config->nRoamBmissFinalBcnt);
|
||||
|
||||
if (ret_val) {
|
||||
hdd_err("Failed to set bmiss final Bcnt");
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
ret_val = sme_set_bmiss_bcnt(adapter->sessionId,
|
||||
hdd_ctx->config->nRoamBmissFirstBcnt,
|
||||
hdd_ctx->config->nRoamBmissFinalBcnt);
|
||||
if (ret_val) {
|
||||
hdd_err("Failed to set bmiss Bcnt");
|
||||
return ret_val;
|
||||
}
|
||||
} else {
|
||||
hdd_err("Bcnt(%d) needs to exceed BmissFirstBcnt(%d)",
|
||||
bmiss_bcnt,
|
||||
hdd_ctx->config->nRoamBmissFirstBcnt);
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
|
@@ -1745,4 +1745,16 @@ void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id);
|
||||
*/
|
||||
QDF_STATUS sme_process_msg_callback(tHalHandle hal,
|
||||
struct scheduler_msg *msg);
|
||||
|
||||
/**
|
||||
* sme_set_bmiss_bcnt() - set bmiss config parameters
|
||||
* @vdev_id: virtual device for the command
|
||||
* @first_cnt: bmiss first value
|
||||
* @final_cnt: bmiss final value
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or non-zero on failure
|
||||
*/
|
||||
QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt,
|
||||
uint32_t final_cnt);
|
||||
|
||||
#endif /* #if !defined( __SME_API_H ) */
|
||||
|
@@ -16055,3 +16055,17 @@ void sme_display_disconnect_stats(tHalHandle hal, uint8_t session_id)
|
||||
sme_debug("No. of Disconnections due to Peer Kickout: %d",
|
||||
session->disconnect_stats.peer_kickout);
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_set_bmiss_bcnt() - set bmiss config parameters
|
||||
* @vdev_id: virtual device for the command
|
||||
* @first_cnt: bmiss first value
|
||||
* @final_cnt: bmiss final value
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or non-zero on failure
|
||||
*/
|
||||
QDF_STATUS sme_set_bmiss_bcnt(uint32_t vdev_id, uint32_t first_cnt,
|
||||
uint32_t final_cnt)
|
||||
{
|
||||
return wma_config_bmiss_bcnt_params(vdev_id, first_cnt, final_cnt);
|
||||
}
|
||||
|
@@ -2636,4 +2636,15 @@ int wma_chip_power_save_failure_detected_handler(void *handle,
|
||||
QDF_STATUS wma_get_chain_rssi(tp_wma_handle wma_handle,
|
||||
struct get_chain_rssi_req_params *req_params);
|
||||
|
||||
/**
|
||||
* wma_config_bmiss_bcnt_params() - set bmiss config parameters
|
||||
* @vdev_id: virtual device for the command
|
||||
* @first_cnt: bmiss first value
|
||||
* @final_cnt: bmiss final value
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or non-zero on failure
|
||||
*/
|
||||
QDF_STATUS wma_config_bmiss_bcnt_params(uint32_t vdev_id, uint32_t first_cnt,
|
||||
uint32_t final_cnt);
|
||||
|
||||
#endif
|
||||
|
@@ -8156,3 +8156,32 @@ void wma_ipa_uc_stat_request(wma_cli_set_cmd_t *privcmd)
|
||||
if (wma_set_priv_cfg(wma, privcmd))
|
||||
WMA_LOGE("Failed to set wma priv congiuration");
|
||||
}
|
||||
|
||||
/**
|
||||
* wma_config_bmiss_bcnt_params() - set bmiss config parameters
|
||||
* @vdev_id: virtual device for the command
|
||||
* @first_cnt: bmiss first value
|
||||
* @final_cnt: bmiss final value
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS or non-zero on failure
|
||||
*/
|
||||
QDF_STATUS wma_config_bmiss_bcnt_params(uint32_t vdev_id, uint32_t first_cnt,
|
||||
uint32_t final_cnt)
|
||||
{
|
||||
tp_wma_handle wma_handle = cds_get_context(QDF_MODULE_ID_WMA);
|
||||
int status = QDF_STATUS_E_INVAL;
|
||||
|
||||
if (!wma_handle) {
|
||||
WMA_LOGE("%s: Failed to get wma", __func__);
|
||||
return status;
|
||||
}
|
||||
|
||||
status = wma_roam_scan_bmiss_cnt(wma_handle, first_cnt, final_cnt,
|
||||
vdev_id);
|
||||
|
||||
if (status)
|
||||
WMA_LOGE("Failed to set Bmiss Param");
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
مرجع در شماره جدید
Block a user