qcacmn: Add oem target six ghz support disable flag in wifipos
Host driver sends channel list and number of channels to lowi-server in ANI_MSG_GET_OEM_CAP_RSP. 6Ghz channels in the channel list are not useful for legacy lowi-server not supporting 6Ghz channels. For legacy oem targets, driver sets "oem_6g_support_disable". Change-Id: Ibc072ff2df3d7b246d3a48d7cebcb5feac35b715 CRs-Fixed: 2597645
This commit is contained in:

committed by
nshrivas

parent
540da9a56c
commit
d49729cd47
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -330,6 +330,16 @@ uint32_t ucfg_wifi_pos_get_ftm_cap(struct wlan_objmgr_psoc *psoc);
|
|||||||
*/
|
*/
|
||||||
void ucfg_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val);
|
void ucfg_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_wifi_pos_set_oem_6g_supported: API to set oem target 6g enabled/disabled
|
||||||
|
* @psoc: psoc object
|
||||||
|
* @val: value to set
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void ucfg_wifi_pos_set_oem_6g_supported(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool val);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wifi_pos_get_app_pid: returns oem app pid.
|
* wifi_pos_get_app_pid: returns oem app pid.
|
||||||
* @psoc: pointer to psoc object
|
* @psoc: pointer to psoc object
|
||||||
|
@@ -762,10 +762,13 @@ static void wifi_pos_pdev_iterator(struct wlan_objmgr_psoc *psoc,
|
|||||||
void *obj, void *arg)
|
void *obj, void *arg)
|
||||||
{
|
{
|
||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
uint8_t i, num_channels, size;
|
uint8_t i, num_channels, size, valid_ch = 0;
|
||||||
struct wlan_objmgr_pdev *pdev = obj;
|
struct wlan_objmgr_pdev *pdev = obj;
|
||||||
struct wifi_pos_driver_caps *caps = arg;
|
struct wifi_pos_driver_caps *caps = arg;
|
||||||
struct channel_power *ch_list;
|
struct channel_power *ch_list;
|
||||||
|
bool oem_6g_support_disable;
|
||||||
|
struct wifi_pos_psoc_priv_obj *wifi_pos_obj =
|
||||||
|
wifi_pos_get_psoc_priv_obj(psoc);
|
||||||
|
|
||||||
size = QDF_MAX(OEM_CAP_MAX_NUM_CHANNELS, NUM_CHANNELS);
|
size = QDF_MAX(OEM_CAP_MAX_NUM_CHANNELS, NUM_CHANNELS);
|
||||||
ch_list = qdf_mem_malloc(size * sizeof(*ch_list));
|
ch_list = qdf_mem_malloc(size * sizeof(*ch_list));
|
||||||
@@ -783,9 +786,17 @@ static void wifi_pos_pdev_iterator(struct wlan_objmgr_psoc *psoc,
|
|||||||
if (num_channels > OEM_CAP_MAX_NUM_CHANNELS)
|
if (num_channels > OEM_CAP_MAX_NUM_CHANNELS)
|
||||||
num_channels = OEM_CAP_MAX_NUM_CHANNELS;
|
num_channels = OEM_CAP_MAX_NUM_CHANNELS;
|
||||||
|
|
||||||
for (i = 0; i < num_channels; i++)
|
qdf_spin_lock_bh(&wifi_pos_obj->wifi_pos_lock);
|
||||||
caps->channel_list[i] = ch_list[i].chan_num;
|
oem_6g_support_disable = wifi_pos_obj->oem_6g_support_disable;
|
||||||
caps->num_channels = num_channels;
|
qdf_spin_unlock_bh(&wifi_pos_obj->wifi_pos_lock);
|
||||||
|
|
||||||
|
for (i = 0; i < num_channels; i++) {
|
||||||
|
if (oem_6g_support_disable &&
|
||||||
|
WLAN_REG_IS_6GHZ_CHAN_FREQ(ch_list[i].center_freq))
|
||||||
|
continue;
|
||||||
|
caps->channel_list[valid_ch++] = ch_list[i].chan_num;
|
||||||
|
}
|
||||||
|
caps->num_channels = valid_ch;
|
||||||
qdf_mem_free(ch_list);
|
qdf_mem_free(ch_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2017-2018, 2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -101,3 +101,17 @@ void ucfg_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val)
|
|||||||
qdf_spin_unlock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
qdf_spin_unlock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ucfg_wifi_pos_set_oem_6g_supported(struct wlan_objmgr_psoc *psoc,
|
||||||
|
bool val)
|
||||||
|
{
|
||||||
|
struct wifi_pos_psoc_priv_obj *wifi_pos_psoc =
|
||||||
|
wifi_pos_get_psoc_priv_obj(psoc);
|
||||||
|
if (!wifi_pos_psoc) {
|
||||||
|
wifi_pos_alert("unable to get wifi_pos psoc obj");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
qdf_spin_lock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||||
|
wifi_pos_psoc->oem_6g_support_disable = val;
|
||||||
|
qdf_spin_unlock_bh(&wifi_pos_psoc->wifi_pos_lock);
|
||||||
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -301,6 +301,7 @@ struct wifi_pos_dma_rings_cfg {
|
|||||||
* @dma_buf_pool: DMA buffer pools maintained at host: this will be 2-D array
|
* @dma_buf_pool: DMA buffer pools maintained at host: this will be 2-D array
|
||||||
* where with num_rows = number of rings num_elements in each row = ring depth
|
* where with num_rows = number of rings num_elements in each row = ring depth
|
||||||
* @wifi_pos_lock: lock to access wifi pos priv object
|
* @wifi_pos_lock: lock to access wifi pos priv object
|
||||||
|
* @oem_6g_support_disable: oem target 6ghz support is disabled if set
|
||||||
* @wifi_pos_req_handler: function pointer to handle TLV or non-TLV
|
* @wifi_pos_req_handler: function pointer to handle TLV or non-TLV
|
||||||
* @wifi_pos_send_rsp: function pointer to send msg to userspace APP
|
* @wifi_pos_send_rsp: function pointer to send msg to userspace APP
|
||||||
*
|
*
|
||||||
@@ -338,6 +339,7 @@ struct wifi_pos_psoc_priv_obj {
|
|||||||
struct wifi_pos_dma_buf_info **dma_buf_pool;
|
struct wifi_pos_dma_buf_info **dma_buf_pool;
|
||||||
|
|
||||||
qdf_spinlock_t wifi_pos_lock;
|
qdf_spinlock_t wifi_pos_lock;
|
||||||
|
bool oem_6g_support_disable;
|
||||||
QDF_STATUS (*wifi_pos_req_handler)(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS (*wifi_pos_req_handler)(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wifi_pos_req_msg *req);
|
struct wifi_pos_req_msg *req);
|
||||||
void (*wifi_pos_send_rsp)(uint32_t, uint32_t, uint32_t, uint8_t *);
|
void (*wifi_pos_send_rsp)(uint32_t, uint32_t, uint32_t, uint8_t *);
|
||||||
|
Reference in New Issue
Block a user