qcacld-3.0: LFR3: Store the last roam synch delay

1) Store the last roam synch delay incurred for the most
latest roaming instance.
2) Provide an ioctl "iwpriv wlan0 hostroamdelay" to fetch
the delay

CRs-Fixed: 1012891
Change-Id: Ibbfb8d17e68dcd84ca645ec3bccf25fd84acaa18
This commit is contained in:
Varun Reddy Yeturu 2016-05-08 18:08:11 -07:00 • committed by Gerrit - the friendly Code Review server
commit 5ab4746bc5
5 changed files with 26 additions and 0 deletions

View file

@ -276,6 +276,7 @@ static const hdd_freq_chan_map_t freq_chan_map[] = {
#define WE_GET_GTX_BWMASK 54
#define WE_GET_TEMPERATURE 56
#define WE_CAP_TSF 58
#define WE_GET_ROAM_SYNCH_DELAY 59
/* Private ioctls and their sub-ioctls */
#define WLAN_PRIV_SET_INT_GET_INT (SIOCIWFIRSTPRIV + 2)
@ -6804,6 +6805,15 @@ static int __iw_setnone_getint(struct net_device *dev,
break;
}
case WE_GET_ROAM_SYNCH_DELAY:
{
hddLog(LOG1, "GET ROAM SYNCH DELAY");
*value = wma_cli_get_command(pAdapter->sessionId,
GEN_VDEV_ROAM_SYNCH_DELAY,
GEN_CMD);
break;
}
case WE_GET_BURST_ENABLE:
{
hddLog(LOG1, "GET Burst enable value");
@ -11069,6 +11079,12 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 2,
0, "setMonChan"}
,
{WE_GET_ROAM_SYNCH_DELAY,
0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"hostroamdelay"}
,
};
const struct iw_handler_def we_handler_def = {

View file

@ -912,6 +912,7 @@ struct wma_txrx_node {
uint32_t chain_mask;
uint32_t mac_id;
bool roaming_in_progress;
int32_t roam_synch_delay;
};
#if defined(QCA_WIFI_FTM)

View file

@ -67,6 +67,7 @@ typedef enum {
GEN_PARAM_MODULATED_DTIM,
GEN_PARAM_CAPTURE_TSF,
GEN_PARAM_RESET_TSF_GPIO,
GEN_VDEV_ROAM_SYNCH_DELAY,
} GEN_PARAM;
#define VDEV_CMD 1

View file

@ -387,6 +387,9 @@ int wma_cli_get_command(int vdev_id, int param_id, int vpdev)
case GEN_VDEV_PARAM_AMSDU:
ret = intr[vdev_id].config.amsdu;
break;
case GEN_VDEV_ROAM_SYNCH_DELAY:
ret = intr[vdev_id].roam_synch_delay;
break;
default:
WMA_LOGE("Invalid generic vdev command/Not"
" yet implemented 0x%x", param_id);

View file

@ -2031,6 +2031,7 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
tpSirBssDescription bss_desc_ptr = NULL;
uint16_t ie_len = 0;
int status = -EINVAL;
qdf_time_t roam_synch_received = qdf_get_system_timestamp();
WMA_LOGD("LFR3:%s", __func__);
if (!event) {
@ -2095,6 +2096,10 @@ int wma_roam_synch_event_handler(void *handle, uint8_t *event,
wma->csr_roam_synch_cb((tpAniSirGlobal)wma->mac_context,
roam_synch_ind_ptr, bss_desc_ptr, SIR_ROAM_SYNCH_PROPAGATION);
wma_process_roam_synch_complete(wma, synch_event->vdev_id);
wma->interfaces[synch_event->vdev_id].roam_synch_delay =
qdf_get_system_timestamp() - roam_synch_received;
WMA_LOGD("LFR3: roam_synch_delay:%d",
wma->interfaces[synch_event->vdev_id].roam_synch_delay);
cleanup_label:
if (roam_synch_ind_ptr->join_rsp)
qdf_mem_free(roam_synch_ind_ptr->join_rsp);