qcacld-3.0: Add support for MESH_BSTEERING_GET_DATARATE_INFO

Add support for MESH_BSTEERING_GET_DATARATE_INFO
and PDEV_GET_CAPABILITY

Change-Id: I8857c795adc71f6b28343501fe389717b5cbd4a0
CRs-Fixed: 3086477
Šī revīzija ir iekļauta:
anikkuma
2021-08-16 17:22:54 +05:30
revīziju iesūtīja Madan Koyyalamudi
vecāks d34399da7e
revīzija da23350e06
9 mainīti faili ar 467 papildinājumiem un 3 dzēšanām

Parādīt failu

@@ -397,6 +397,38 @@ int wlan_son_anqp_frame(struct wlan_objmgr_vdev *vdev, int subtype,
uint8_t *frame, uint16_t frame_len, void *action_hdr,
uint8_t *macaddr);
/**
* wlan_son_get_node_tx_power() - Gets the max transmit power for peer
* @assoc_req_ies: assoc req ies
*
* Return: Returns the max tx power
*/
uint8_t wlan_son_get_node_tx_power(struct element_info assoc_req_ies);
/**
* wlan_son_get_max_mcs() - calculate the max mcs supported by the node
* @mode: current phymode
* @supp_idx: max supported idx
* @ext_idx: max extended idx
* @ht_mcs_idx: max mcs index for HT
* @vht_mcs_map: mcs map for VHT
*
* return: max_mcs for the node
*/
uint8_t wlan_son_get_max_mcs(uint8_t mode, uint8_t supp_idx, uint8_t ext_idx,
uint8_t ht_mcs_idx, uint8_t vht_mcs_map);
/**
* wlan_son_get_peer_rrm_info() - Get RRM info for peer
* @assoc_req_ies: assoc req ies
* @rrmcaps: rrm capabilities
* @is_beacon_meas_supported: if beacon meas is supported
*
* Return: Returns QDF_STATUS_SUCCESS if succeed
*/
QDF_STATUS wlan_son_get_peer_rrm_info(struct element_info assoc_req_ies,
uint8_t *rrmcaps,
bool *is_beacon_meas_supported);
#else
static inline bool wlan_son_peer_is_kickout_allow(struct wlan_objmgr_vdev *vdev,
@@ -468,5 +500,25 @@ int wlan_son_anqp_frame(struct wlan_objmgr_vdev *vdev, int subtype,
return -EINVAL;
}
static inline
uint8_t wlan_son_get_node_tx_power(struct element_info assoc_req_ies)
{
return 0;
}
static inline
uint8_t wlan_son_get_max_mcs(uint8_t mode, uint8_t supp_idx, uint8_t ext_idx,
uint8_t ht_mcs_idx, uint8_t vht_mcs_map)
{
return 0;
}
static inline
QDF_STATUS wlan_son_get_peer_rrm_info(struct element_info assoc_req_ies,
uint8_t *rrmcaps,
bool *is_beacon_meas_supported)
{
return QDF_STATUS_E_INVAL;
}
#endif /*WLAN_FEATURE_SON*/
#endif

Parādīt failu

@@ -170,6 +170,39 @@ int ucfg_son_set_cbs_wait_time(struct wlan_objmgr_vdev *vdev,
int ucfg_son_set_cbs_dwell_split_time(struct wlan_objmgr_vdev *vdev,
uint32_t val);
/**
* ucfg_son_get_max_tx_power() - Gets the max transmit power for peer
* @assoc_req_ies: assoc req ies
*
* Return: Returns the max tx power
*/
uint8_t ucfg_son_get_tx_power(struct element_info assoc_req_ies);
/**
* ucfg_get_max_mcs() - calculate the max mcs supported by the node
* @mode: current phy mode
* @supp_idx: max supported idx
* @ext_idx: max extended idx
* @ht_mcs_idx: max mcs index for HT
* @vht_mcs_map: mcs map for VHT
*
* Return: max_mcs for the node
*/
uint8_t ucfg_son_get_max_mcs(uint8_t mode, uint8_t supp_idx, uint8_t ext_idx,
uint8_t ht_mcs_idx, uint8_t vht_mcs_map);
/**
* ucfg_son_get_peer_rrm_info() - Get RRM info for peer
* @assoc_req_ies: assoc req ies
* @rrmcaps: rrm capabiities
* @is_beacon_meas_supported: if beacon meas is supported
*
* Return: Returns QDF_STATUS_SUCCESS if succeed
*/
QDF_STATUS ucfg_son_get_peer_rrm_info(struct element_info assoc_req_ies,
uint8_t *rrmcaps,
bool *is_beacon_meas_supported);
#ifdef WLAN_FEATURE_SON
/* ucfg_son_disable_cbs() - son cbs disable
* @vdev: vdev pointer

Parādīt failu

@@ -1263,3 +1263,60 @@ int wlan_son_set_cbs_dwell_split_time(struct wlan_objmgr_vdev *vdev,
return 0;
}
uint8_t wlan_son_get_node_tx_power(struct element_info assoc_req_ies)
{
const uint8_t *power_cap_ie_data;
power_cap_ie_data = wlan_get_ie_ptr_from_eid(WLAN_ELEMID_PWRCAP,
assoc_req_ies.ptr,
assoc_req_ies.len);
if (power_cap_ie_data)
return *(power_cap_ie_data + 3);
else
return 0;
}
uint8_t wlan_son_get_max_mcs(uint8_t mode, uint8_t supp_idx, uint8_t ext_idx,
uint8_t ht_mcs_idx, uint8_t vht_mcs_map)
{
uint8_t maxidx = MAX_HE_MCS_IDX;
/* check supported rates */
if (supp_idx != 0xff && maxidx < supp_idx)
maxidx = supp_idx;
/* check extended rates */
if (ext_idx != 0xff && maxidx < ext_idx)
maxidx = ext_idx;
/* check for HT Mode */
if (mode == SIR_SME_PHY_MODE_HT)
maxidx = ht_mcs_idx;
if (mode == SIR_SME_PHY_MODE_VHT)
maxidx = (vht_mcs_map & DATA_RATE_11AC_MCS_MASK);
return maxidx;
}
QDF_STATUS wlan_son_get_peer_rrm_info(struct element_info assoc_req_ies,
uint8_t *rrmcaps,
bool *is_beacon_meas_supported)
{
const uint8_t *eid;
eid = wlan_get_ie_ptr_from_eid(WLAN_ELEMID_RRM,
assoc_req_ies.ptr,
assoc_req_ies.len);
if (eid) {
qdf_mem_copy(rrmcaps, &eid[2], eid[1]);
if ((rrmcaps[0] &
IEEE80211_RRM_CAPS_BEACON_REPORT_PASSIVE) ||
(rrmcaps[0] &
IEEE80211_RRM_CAPS_BEACON_REPORT_ACTIVE))
*is_beacon_meas_supported = true;
return QDF_STATUS_SUCCESS;
}
return QDF_STATUS_E_RESOURCES;
}

Parādīt failu

@@ -124,3 +124,23 @@ int ucfg_son_disable_cbs(struct wlan_objmgr_vdev *vdev)
{
return wlan_son_cbs_disable(vdev);
}
uint8_t ucfg_son_get_tx_power(struct element_info assoc_req_ies)
{
return wlan_son_get_node_tx_power(assoc_req_ies);
}
uint8_t ucfg_son_get_max_mcs(uint8_t mode, uint8_t supp_idx, uint8_t ext_idx,
uint8_t ht_mcs_idx, uint8_t vht_mcs_map)
{
return wlan_son_get_max_mcs(mode, supp_idx, ext_idx, ht_mcs_idx,
vht_mcs_map);
}
QDF_STATUS ucfg_son_get_peer_rrm_info(struct element_info assoc_req_ies,
uint8_t *rrmcaps,
bool *is_beacon_meas_supported)
{
return wlan_son_get_peer_rrm_info(assoc_req_ies, rrmcaps,
is_beacon_meas_supported);
}