mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
Merge 528e81a13b on remote branch
Change-Id: Ie138ab4d5ab09471db5ca183b7092741f7a28d6f
This commit is contained in:
commit
5e57ef090c
33 changed files with 764 additions and 138 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1217,4 +1218,86 @@ cdp_dump_rx_flow_tag_stats(ol_txrx_soc_handle soc, uint8_t pdev_id,
|
|||
flow_info);
|
||||
}
|
||||
#endif /* WLAN_SUPPORT_RX_FLOW_TAG */
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
/**
|
||||
* cdp_set_delta_tsf() - wrapper function to set delta_tsf
|
||||
* @soc: SOC TXRX handle
|
||||
* @vdev_id: vdev id
|
||||
* @delta_tsf: difference between TSF clock and qtimer
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline void cdp_set_delta_tsf(ol_txrx_soc_handle soc, uint8_t vdev_id,
|
||||
uint32_t delta_tsf)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
dp_cdp_err("Invalid instance");
|
||||
QDF_BUG(0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_set_delta_tsf)
|
||||
return;
|
||||
|
||||
soc->ops->ctrl_ops->txrx_set_delta_tsf(soc, vdev_id, delta_tsf);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_set_tsf_ul_delay_report() - Enable or disable reporting uplink delay
|
||||
* @soc: SOC TXRX handle
|
||||
* @vdev_id: vdev id
|
||||
* @enable: true to enable and false to disable
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline QDF_STATUS cdp_set_tsf_ul_delay_report(ol_txrx_soc_handle soc,
|
||||
uint8_t vdev_id,
|
||||
bool enable)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
dp_cdp_err("Invalid SOC instance");
|
||||
QDF_BUG(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_set_tsf_ul_delay_report)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->ctrl_ops->txrx_set_tsf_ul_delay_report(soc, vdev_id,
|
||||
enable);
|
||||
}
|
||||
|
||||
/**
|
||||
* cdp_get_uplink_delay() - Get uplink delay value
|
||||
* @soc: SOC TXRX handle
|
||||
* @vdev_id: vdev id
|
||||
* @val: pointer to save uplink delay value
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
static inline QDF_STATUS cdp_get_uplink_delay(ol_txrx_soc_handle soc,
|
||||
uint32_t vdev_id, uint32_t *val)
|
||||
{
|
||||
if (!soc || !soc->ops) {
|
||||
dp_cdp_err("Invalid SOC instance");
|
||||
QDF_BUG(0);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!val) {
|
||||
dp_cdp_err("Invalid params val");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!soc->ops->ctrl_ops ||
|
||||
!soc->ops->ctrl_ops->txrx_get_uplink_delay)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
|
||||
return soc->ops->ctrl_ops->txrx_get_uplink_delay(soc, vdev_id, val);
|
||||
}
|
||||
#endif /* WLAN_FEATURE_TSF_UPLINK_DELAY */
|
||||
|
||||
#endif /* _CDP_TXRX_CTRL_H_ */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -794,6 +794,17 @@ struct cdp_ctrl_ops {
|
|||
int8_t vdev_id);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
void (*txrx_set_delta_tsf)(struct cdp_soc_t *soc, uint8_t vdev_id,
|
||||
uint32_t delta_tsf);
|
||||
QDF_STATUS (*txrx_set_tsf_ul_delay_report)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id,
|
||||
bool enable);
|
||||
QDF_STATUS (*txrx_get_uplink_delay)(struct cdp_soc_t *soc,
|
||||
uint8_t vdev_id,
|
||||
uint32_t *val);
|
||||
#endif
|
||||
};
|
||||
|
||||
struct cdp_me_ops {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -4584,7 +4585,7 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
|
|||
(u_int8_t *) (msg_word+1),
|
||||
&mac_addr_deswizzle_buf[0]);
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX,
|
||||
QDF_TRACE_LEVEL_INFO,
|
||||
QDF_TRACE_LEVEL_DEBUG,
|
||||
"HTT_T2H_MSG_TYPE_PEER_MAP msg for peer id %d vdev id %d n",
|
||||
peer_id, vdev_id);
|
||||
|
||||
|
|
@ -4792,7 +4793,7 @@ static void dp_htt_t2h_msg_handler(void *context, HTC_PACKET *pkt)
|
|||
HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_GET(*(msg_word + 5));
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_TXRX,
|
||||
QDF_TRACE_LEVEL_INFO,
|
||||
QDF_TRACE_LEVEL_DEBUG,
|
||||
"HTT_T2H_MSG_TYPE_PEER_MAP msg for peer id %d vdev id %d n",
|
||||
peer_id, vdev_id);
|
||||
|
||||
|
|
|
|||
|
|
@ -11475,6 +11475,11 @@ static struct cdp_ctrl_ops dp_ops_ctrl = {
|
|||
.txrx_update_peer_pkt_capture_params =
|
||||
dp_peer_update_pkt_capture_params,
|
||||
#endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
.txrx_set_delta_tsf = dp_set_delta_tsf,
|
||||
.txrx_set_tsf_ul_delay_report = dp_set_tsf_ul_delay_report,
|
||||
.txrx_get_uplink_delay = dp_get_uplink_delay,
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct cdp_me_ops dp_ops_me = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -4399,6 +4400,138 @@ void dp_tx_update_connectivity_stats(struct dp_soc *soc,
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
void dp_set_delta_tsf(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
uint32_t delta_tsf)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id,
|
||||
DP_MOD_ID_CDP);
|
||||
|
||||
if (!vdev) {
|
||||
dp_err_rl("vdev %d does not exist", vdev_id);
|
||||
return;
|
||||
}
|
||||
|
||||
vdev->delta_tsf = delta_tsf;
|
||||
dp_debug("vdev id %u delta_tsf %u", vdev_id, delta_tsf);
|
||||
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_CDP);
|
||||
}
|
||||
|
||||
QDF_STATUS dp_set_tsf_ul_delay_report(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t vdev_id, bool enable)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
struct dp_vdev *vdev = dp_vdev_get_ref_by_id(soc, vdev_id,
|
||||
DP_MOD_ID_CDP);
|
||||
|
||||
if (!vdev) {
|
||||
dp_err_rl("vdev %d does not exist", vdev_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
qdf_atomic_set(&vdev->ul_delay_report, enable);
|
||||
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_CDP);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS dp_get_uplink_delay(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
uint32_t *val)
|
||||
{
|
||||
struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl);
|
||||
struct dp_vdev *vdev;
|
||||
uint32_t delay_accum;
|
||||
uint32_t pkts_accum;
|
||||
|
||||
vdev = dp_vdev_get_ref_by_id(soc, vdev_id, DP_MOD_ID_CDP);
|
||||
if (!vdev) {
|
||||
dp_err_rl("vdev %d does not exist", vdev_id);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
if (!qdf_atomic_read(&vdev->ul_delay_report)) {
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_CDP);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
/* Average uplink delay based on current accumulated values */
|
||||
delay_accum = qdf_atomic_read(&vdev->ul_delay_accum);
|
||||
pkts_accum = qdf_atomic_read(&vdev->ul_pkts_accum);
|
||||
|
||||
*val = delay_accum / pkts_accum;
|
||||
dp_debug("uplink_delay %u delay_accum %u pkts_accum %u", *val,
|
||||
delay_accum, pkts_accum);
|
||||
|
||||
/* Reset accumulated values to 0 */
|
||||
qdf_atomic_set(&vdev->ul_delay_accum, 0);
|
||||
qdf_atomic_set(&vdev->ul_pkts_accum, 0);
|
||||
|
||||
dp_vdev_unref_delete(soc, vdev, DP_MOD_ID_CDP);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void dp_tx_update_uplink_delay(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
struct hal_tx_completion_status *ts)
|
||||
{
|
||||
uint32_t buffer_ts;
|
||||
uint32_t delta_tsf;
|
||||
uint32_t ul_delay;
|
||||
|
||||
/* Tx_rate_stats_info_valid is 0 and tsf is invalid then */
|
||||
if (!ts->valid)
|
||||
return;
|
||||
|
||||
if (qdf_unlikely(!vdev)) {
|
||||
dp_info_rl("vdev is null or delete in progrss");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!qdf_atomic_read(&vdev->ul_delay_report))
|
||||
return;
|
||||
|
||||
delta_tsf = vdev->delta_tsf;
|
||||
|
||||
/* buffer_timestamp is in units of 1024 us and is [31:13] of
|
||||
* WBM_RELEASE_RING_4. After left shift 10 bits, it's
|
||||
* valid up to 29 bits.
|
||||
*/
|
||||
buffer_ts = ts->buffer_timestamp << 10;
|
||||
|
||||
ul_delay = ts->tsf - buffer_ts - delta_tsf;
|
||||
ul_delay &= 0x1FFFFFFF; /* mask 29 BITS */
|
||||
if (ul_delay > 0x1000000) {
|
||||
dp_info_rl("----------------------\n"
|
||||
"Tx completion status:\n"
|
||||
"----------------------\n"
|
||||
"release_src = %d\n"
|
||||
"ppdu_id = 0x%x\n"
|
||||
"release_reason = %d\n"
|
||||
"tsf = %u (0x%x)\n"
|
||||
"buffer_timestamp = %u (0x%x)\n"
|
||||
"delta_tsf = %u (0x%x)\n",
|
||||
ts->release_src, ts->ppdu_id, ts->status,
|
||||
ts->tsf, ts->tsf, ts->buffer_timestamp,
|
||||
ts->buffer_timestamp, delta_tsf, delta_tsf);
|
||||
return;
|
||||
}
|
||||
|
||||
ul_delay /= 1000; /* in unit of ms */
|
||||
|
||||
qdf_atomic_add(ul_delay, &vdev->ul_delay_accum);
|
||||
qdf_atomic_inc(&vdev->ul_pkts_accum);
|
||||
}
|
||||
#else /* !WLAN_FEATURE_TSF_UPLINK_DELAY */
|
||||
static inline
|
||||
void dp_tx_update_uplink_delay(struct dp_soc *soc, struct dp_vdev *vdev,
|
||||
struct hal_tx_completion_status *ts)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_FEATURE_TSF_UPLINK_DELAY */
|
||||
|
||||
/**
|
||||
* dp_tx_comp_process_tx_status() - Parse and Dump Tx completion status info
|
||||
* @soc: DP soc handle
|
||||
|
|
@ -4479,6 +4612,7 @@ void dp_tx_comp_process_tx_status(struct dp_soc *soc,
|
|||
vdev = peer->vdev;
|
||||
|
||||
dp_tx_update_connectivity_stats(soc, vdev, tx_desc, ts->status);
|
||||
dp_tx_update_uplink_delay(soc, vdev, ts);
|
||||
|
||||
/* Update per-packet stats for mesh mode */
|
||||
if (qdf_unlikely(vdev->mesh_vdev) &&
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -542,4 +543,40 @@ dp_send_completion_to_pkt_capture(struct dp_soc *soc,
|
|||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
/**
|
||||
* dp_set_delta_tsf() - Set delta_tsf to dp_soc structure
|
||||
* @soc_hdl: cdp soc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @delta_tsf: difference between TSF clock and qtimer
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void dp_set_delta_tsf(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
uint32_t delta_tsf);
|
||||
|
||||
/**
|
||||
* dp_set_tsf_report_ul_delay() - Enable or disable reporting uplink delay
|
||||
* @soc_hdl: cdp soc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @enable: true to enable and false to disable
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS dp_set_tsf_ul_delay_report(struct cdp_soc_t *soc_hdl,
|
||||
uint8_t vdev_id, bool enable);
|
||||
|
||||
/**
|
||||
* dp_get_uplink_delay() - Get uplink delay value
|
||||
* @soc_hdl: cdp soc pointer
|
||||
* @vdev_id: vdev id
|
||||
* @val: pointer to save uplink delay value
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS dp_get_uplink_delay(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
|
||||
uint32_t *val);
|
||||
#endif /* WLAN_FEATURE_TSF_UPLINK_TSF */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ dp_tx_initialize_threshold(struct dp_tx_desc_pool_s *pool,
|
|||
pool->stop_th[DP_TH_HI] = (pool->stop_th[DP_TH_BE_BK]
|
||||
* FL_TH_HI_PERCENTAGE) / 100;
|
||||
|
||||
dp_info("tx flow control threshold is set, pool size is %d",
|
||||
flow_pool_size);
|
||||
dp_debug("tx flow control threshold is set, pool size is %d",
|
||||
flow_pool_size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -568,9 +568,9 @@ void dp_tx_flow_pool_unmap_handler(struct dp_pdev *pdev, uint8_t flow_id,
|
|||
struct dp_tx_desc_pool_s *pool;
|
||||
enum htt_flow_type type = flow_type;
|
||||
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_INFO,
|
||||
"%s: flow_id %d flow_type %d flow_pool_id %d",
|
||||
__func__, flow_id, flow_type, flow_pool_id);
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
|
||||
"%s: flow_id %d flow_type %d flow_pool_id %d",
|
||||
__func__, flow_id, flow_type, flow_pool_id);
|
||||
|
||||
if (qdf_unlikely(!pdev)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -2786,8 +2787,18 @@ struct dp_vdev {
|
|||
qdf_atomic_t ref_cnt;
|
||||
qdf_atomic_t mod_refs[DP_MOD_ID_MAX];
|
||||
uint8_t num_latency_critical_conn;
|
||||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
/* Indicate if uplink delay report is enabled or not */
|
||||
qdf_atomic_t ul_delay_report;
|
||||
/* Delta between TQM clock and TSF clock */
|
||||
uint32_t delta_tsf;
|
||||
/* accumulative delay for every TX completion */
|
||||
qdf_atomic_t ul_delay_accum;
|
||||
/* accumulative number of packets delay has accumulated */
|
||||
qdf_atomic_t ul_pkts_accum;
|
||||
#endif /* WLAN_FEATURE_TSF_UPLINK_DELAY */
|
||||
};
|
||||
|
||||
enum {
|
||||
dp_sec_mcast = 0,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,22 @@
|
|||
|
||||
#include <hal_rx.h>
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
static inline void
|
||||
hal_tx_comp_get_buffer_timestamp(void *desc,
|
||||
struct hal_tx_completion_status *ts)
|
||||
{
|
||||
ts->buffer_timestamp = HAL_TX_DESC_GET(desc, WBM_RELEASE_RING_4,
|
||||
BUFFER_TIMESTAMP);
|
||||
}
|
||||
#else /* !WLAN_FEATURE_TSF_UPLINK_DELAY */
|
||||
static inline void
|
||||
hal_tx_comp_get_buffer_timestamp(void *desc,
|
||||
struct hal_tx_completion_status *ts)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_FEATURE_TSF_UPLINK_DELAY */
|
||||
|
||||
/**
|
||||
* hal_tx_comp_get_status() - TQM Release reason
|
||||
* @hal_desc: completion ring Tx status
|
||||
|
|
@ -88,6 +104,8 @@ void hal_tx_comp_get_status_generic(void *desc,
|
|||
|
||||
ts->tsf = HAL_TX_DESC_GET(desc, UNIFIED_WBM_RELEASE_RING_6,
|
||||
TX_RATE_STATS_INFO_TX_RATE_STATS);
|
||||
|
||||
hal_tx_comp_get_buffer_timestamp(desc, ts);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -165,6 +166,8 @@ enum hal_tx_ret_buf_manager {
|
|||
* @transmit_cnt: Number of times this frame has been transmitted
|
||||
* @tid: TID of the flow or MPDU queue
|
||||
* @peer_id: Peer ID of the flow or MPDU queue
|
||||
* @buffer_timestamp: Frame system entrance timestamp in units of 1024
|
||||
* microseconds
|
||||
*/
|
||||
struct hal_tx_completion_status {
|
||||
uint8_t status;
|
||||
|
|
@ -187,6 +190,9 @@ struct hal_tx_completion_status {
|
|||
uint8_t transmit_cnt;
|
||||
uint8_t tid;
|
||||
uint16_t peer_id;
|
||||
#ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
|
||||
uint32_t buffer_timestamp:19;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ void hif_latency_detect_timer_start(struct hif_opaque_softc *hif_ctx)
|
|||
if (QDF_GLOBAL_MISSION_MODE != hif_get_conparam(scn))
|
||||
return;
|
||||
|
||||
hif_info_rl("start timer");
|
||||
hif_debug_rl("start timer");
|
||||
if (scn->latency_detect.is_timer_started) {
|
||||
hif_info("timer has been started");
|
||||
return;
|
||||
|
|
@ -819,7 +819,7 @@ void hif_latency_detect_timer_stop(struct hif_opaque_softc *hif_ctx)
|
|||
if (QDF_GLOBAL_MISSION_MODE != hif_get_conparam(scn))
|
||||
return;
|
||||
|
||||
hif_info_rl("stop timer");
|
||||
hif_debug_rl("stop timer");
|
||||
|
||||
qdf_timer_sync_cancel(&scn->latency_detect.detect_latency_timer);
|
||||
scn->latency_detect.is_timer_started = false;
|
||||
|
|
|
|||
|
|
@ -2249,6 +2249,8 @@ enum qca_wlan_vendor_attr_ll_stats_results_type {
|
|||
* @QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_RX_TIME: Unsigned int 32bit
|
||||
* value representing total number of msecs the radio is receiving all
|
||||
* 802.11 frames intended for this device on this channel.
|
||||
* @QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_LOAD_PERCENTAGE: u8 value
|
||||
* representing the channel load percentage. Possible values are 0-100.
|
||||
* @QCA_WLAN_VENDOR_ATTR_LL_STATS_AFTER_LAST: After last
|
||||
* @QCA_WLAN_VENDOR_ATTR_FEATURE_SET_MAX: Max value
|
||||
*/
|
||||
|
|
@ -2356,6 +2358,7 @@ enum qca_wlan_vendor_attr_ll_stats_results {
|
|||
|
||||
QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_TX_TIME = 84,
|
||||
QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_RX_TIME = 85,
|
||||
QCA_WLAN_VENDOR_ATTR_LL_STATS_CHANNEL_LOAD_PERCENTAGE = 86,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_LL_STATS_AFTER_LAST,
|
||||
|
|
@ -5555,11 +5558,22 @@ enum qca_vendor_attr_tsf_cmd {
|
|||
* @QCA_TSF_CAPTURE: Initiate TSF Capture
|
||||
* @QCA_TSF_GET: Get TSF capture value
|
||||
* @QCA_TSF_SYNC_GET: Initiate TSF capture and return with captured value
|
||||
* @QCA_TSF_AUTO_REPORT_ENABLE: Used in STA mode only. Once set, the target
|
||||
* will automatically send TSF report to the host. To query
|
||||
* QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY, this operation needs to be
|
||||
* initiated first.
|
||||
* @QCA_TSF_AUTO_REPORT_DISABLE: Used in STA mode only. Once set, the target
|
||||
* will not automatically send TSF report to the host. If
|
||||
* QCA_TSF_AUTO_REPORT_ENABLE is initiated and
|
||||
* QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY is not queried anymore, this
|
||||
* operation needs to be initiated.
|
||||
*/
|
||||
enum qca_tsf_cmd {
|
||||
QCA_TSF_CAPTURE,
|
||||
QCA_TSF_GET,
|
||||
QCA_TSF_SYNC_GET,
|
||||
QCA_TSF_AUTO_REPORT_ENABLE,
|
||||
QCA_TSF_AUTO_REPORT_DISABLE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -10468,6 +10482,11 @@ enum qca_vendor_wlan_sta_guard_interval {
|
|||
* failed roam invoke. Different roam invoke failure reason codes
|
||||
* are specified in enum qca_vendor_roam_invoke_fail_reasons. This can be
|
||||
* queried either in connected state or disconnected state.
|
||||
*
|
||||
* @QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY: u32, used in STA mode only.
|
||||
* This represents the average congestion duration of uplink frames in MAC
|
||||
* queue in unit of ms. This can be queried either in connected state or
|
||||
* disconnected state.
|
||||
*/
|
||||
enum qca_wlan_vendor_attr_get_sta_info {
|
||||
QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_INVALID = 0,
|
||||
|
|
@ -10517,6 +10536,7 @@ enum qca_wlan_vendor_attr_get_sta_info {
|
|||
QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_TRIGGER_REASON = 47,
|
||||
QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_FAIL_REASON = 48,
|
||||
QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_ROAM_INVOKE_FAIL_REASON = 49,
|
||||
QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_UPLINK_DELAY = 50,
|
||||
|
||||
/* keep last */
|
||||
QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_AFTER_LAST,
|
||||
|
|
|
|||
|
|
@ -529,36 +529,42 @@ int wlan_cfg80211_sched_scan_start(struct wlan_objmgr_vdev *vdev,
|
|||
|
||||
/* Filling per profile params */
|
||||
for (i = 0; i < req->networks_cnt; i++) {
|
||||
req->networks_list[i].ssid.length =
|
||||
request->match_sets[i].ssid.ssid_len;
|
||||
struct cfg80211_match_set *user_req = &request->match_sets[i];
|
||||
struct pno_nw_type *tgt_req = &req->networks_list[i];
|
||||
|
||||
if ((!req->networks_list[i].ssid.length) ||
|
||||
(req->networks_list[i].ssid.length > WLAN_SSID_MAX_LEN)) {
|
||||
tgt_req->ssid.length = user_req->ssid.ssid_len;
|
||||
|
||||
if (!tgt_req->ssid.length ||
|
||||
tgt_req->ssid.length > WLAN_SSID_MAX_LEN) {
|
||||
osif_err(" SSID Len %d is not correct for network %d",
|
||||
req->networks_list[i].ssid.length, i);
|
||||
tgt_req->ssid.length, i);
|
||||
ret = -EINVAL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
qdf_mem_copy(req->networks_list[i].ssid.ssid,
|
||||
request->match_sets[i].ssid.ssid,
|
||||
req->networks_list[i].ssid.length);
|
||||
req->networks_list[i].authentication = 0; /*eAUTH_TYPE_ANY */
|
||||
req->networks_list[i].encryption = 0; /*eED_ANY */
|
||||
req->networks_list[i].bc_new_type = 0; /*eBCAST_UNKNOWN */
|
||||
qdf_mem_copy(tgt_req->ssid.ssid, user_req->ssid.ssid,
|
||||
tgt_req->ssid.length);
|
||||
tgt_req->authentication = 0; /*eAUTH_TYPE_ANY */
|
||||
tgt_req->encryption = 0; /*eED_ANY */
|
||||
tgt_req->bc_new_type = 0; /*eBCAST_UNKNOWN */
|
||||
|
||||
|
||||
/*Copying list of valid channel into request */
|
||||
for (j = 0; j < num_chan; j++)
|
||||
req->networks_list[i].pno_chan_list.chan[j].freq =
|
||||
valid_ch[j];
|
||||
req->networks_list[i].pno_chan_list.num_chan = num_chan;
|
||||
tgt_req->pno_chan_list.chan[j].freq = valid_ch[j];
|
||||
tgt_req->pno_chan_list.num_chan = num_chan;
|
||||
|
||||
if (ucfg_is_6ghz_pno_scan_optimization_supported(psoc))
|
||||
ucfg_scan_pno_add_all_valid_6g_channels(vdev, req,
|
||||
&num_chan);
|
||||
if (ucfg_is_6ghz_pno_scan_optimization_supported(psoc)) {
|
||||
uint32_t short_ssid =
|
||||
wlan_construct_shortssid(tgt_req->ssid.ssid,
|
||||
tgt_req->ssid.length);
|
||||
|
||||
req->networks_list[i].rssi_thresh =
|
||||
request->match_sets[i].rssi_thold;
|
||||
ucfg_scan_add_flags_to_pno_chan_list(vdev, req,
|
||||
&num_chan,
|
||||
short_ssid, i);
|
||||
}
|
||||
|
||||
tgt_req->rssi_thresh = user_req->rssi_thold;
|
||||
}
|
||||
|
||||
/* set scan to passive if no SSIDs are specified in the request */
|
||||
|
|
@ -1529,8 +1535,7 @@ int wlan_cfg80211_scan(struct wlan_objmgr_vdev *vdev,
|
|||
if (req->scan_req.scan_policy_high_accuracy)
|
||||
req->scan_req.adaptive_dwell_time_mode =
|
||||
SCAN_DWELL_MODE_STATIC;
|
||||
if (req->scan_req.scan_policy_low_power ||
|
||||
req->scan_req.scan_policy_low_span)
|
||||
if (req->scan_req.scan_policy_low_power)
|
||||
req->scan_req.adaptive_dwell_time_mode =
|
||||
SCAN_DWELL_MODE_AGGRESSIVE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2019-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -294,7 +294,7 @@ wlan_cfr_peer_obj_create_handler(struct wlan_objmgr_peer *peer, void *arg)
|
|||
}
|
||||
|
||||
if (wlan_cfr_is_feature_disabled(pdev)) {
|
||||
cfr_info("cfr is disabled");
|
||||
cfr_debug("cfr is disabled");
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -52,6 +53,16 @@ struct wlan_op_mode_peer_count {
|
|||
uint16_t peer_count;
|
||||
};
|
||||
|
||||
/**
|
||||
* wlan_construct_shortssid() - construct the short ssid with the help of
|
||||
* shortssid table
|
||||
* @ssid: pointer to ssid
|
||||
* @ssid_len: ssid length
|
||||
*
|
||||
* return: short ssid length
|
||||
*/
|
||||
uint32_t wlan_construct_shortssid(uint8_t *ssid, uint8_t ssid_len);
|
||||
|
||||
/**
|
||||
* wlan_chan_to_freq() - converts channel to frequency
|
||||
* @chan: channel number
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -27,6 +28,67 @@
|
|||
#include <wlan_vdev_mlme_api.h>
|
||||
#include "cfg_ucfg_api.h"
|
||||
|
||||
/* CRC polynomial 0xedb88320 */
|
||||
static unsigned long const wlan_shortssid_table[] = {
|
||||
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
|
||||
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
|
||||
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
|
||||
0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
|
||||
0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
|
||||
0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
|
||||
0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c,
|
||||
0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
|
||||
0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423,
|
||||
0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
|
||||
0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x01db7106,
|
||||
0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
|
||||
0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d,
|
||||
0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
|
||||
0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
|
||||
0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
|
||||
0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7,
|
||||
0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
|
||||
0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa,
|
||||
0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
|
||||
0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81,
|
||||
0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
|
||||
0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683, 0xe3630b12, 0x94643b84,
|
||||
0x0d6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
|
||||
0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
|
||||
0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
|
||||
0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e,
|
||||
0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
|
||||
0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55,
|
||||
0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
|
||||
0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28,
|
||||
0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
|
||||
0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a, 0x9c0906a9, 0xeb0e363f,
|
||||
0x72076785, 0x05005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
|
||||
0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
|
||||
0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
|
||||
0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69,
|
||||
0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
|
||||
0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc,
|
||||
0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
|
||||
0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693,
|
||||
0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
|
||||
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
|
||||
};
|
||||
|
||||
uint32_t wlan_construct_shortssid(uint8_t *ssid, uint8_t ssid_len)
|
||||
{
|
||||
uint32_t shortssid = 0xffffffff;
|
||||
uint8_t i;
|
||||
|
||||
if (!ssid || ssid_len > WLAN_SSID_MAX_LEN)
|
||||
return shortssid;
|
||||
|
||||
for (i = 0; i < ssid_len; i++)
|
||||
shortssid = wlan_shortssid_table[(shortssid ^ ssid[i]) & 0xff] ^
|
||||
(shortssid >> 8);
|
||||
return (shortssid ^ 0xffffffff);
|
||||
}
|
||||
|
||||
uint32_t wlan_chan_to_freq(uint8_t chan)
|
||||
{
|
||||
if (chan == 0 )
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
|
|
@ -126,7 +127,7 @@ QDF_STATUS wlan_dcs_cmd_send(struct wlan_objmgr_psoc *psoc,
|
|||
dcs_tx_ops = target_if_dcs_get_tx_ops(psoc);
|
||||
|
||||
if (dcs_tx_ops->dcs_cmd_send) {
|
||||
dcs_info("dcs_enable: %u, pdev_id: %u", dcs_enable, pdev_id);
|
||||
dcs_debug("dcs_enable: %u, pdev_id: %u", dcs_enable, pdev_id);
|
||||
return dcs_tx_ops->dcs_cmd_send(psoc,
|
||||
pdev_id,
|
||||
is_host_pdev_id,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1302,7 +1302,7 @@ void utils_dfs_init_nol(struct wlan_objmgr_pdev *pdev)
|
|||
dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "nol channels in pld");
|
||||
DFS_PRINT_NOL_LOCKED(dfs);
|
||||
} else {
|
||||
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "no nol in pld");
|
||||
dfs_debug(dfs, WLAN_DEBUG_DFS_ALWAYS, "no nol in pld");
|
||||
}
|
||||
qdf_mem_free(dfs_nolinfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -414,7 +415,7 @@ QDF_STATUS wlan_green_ap_del_sta(struct wlan_objmgr_pdev *pdev)
|
|||
qdf_spin_lock_bh(&green_ap_ctx->lock);
|
||||
if (wlan_is_egap_enabled(green_ap_ctx)) {
|
||||
qdf_spin_unlock_bh(&green_ap_ctx->lock);
|
||||
green_ap_info("enhanced green ap support is enabled");
|
||||
green_ap_debug("enhanced green ap support is enabled");
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
qdf_spin_unlock_bh(&green_ap_ctx->lock);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -1687,7 +1688,7 @@ uint8_t reg_freq_to_chan(struct wlan_objmgr_pdev *pdev,
|
|||
struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
||||
|
||||
if (freq == 0) {
|
||||
reg_err_rl("Invalid freq %d", freq);
|
||||
reg_debug_rl("Invalid freq %d", freq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -36,6 +37,7 @@
|
|||
#include <qdf_platform.h>
|
||||
#include "reg_services_common.h"
|
||||
#include "reg_build_chan_list.h"
|
||||
#include "wlan_cm_bss_score_param.h"
|
||||
|
||||
#define DEFAULT_WORLD_REGDMN 0x60
|
||||
|
||||
|
|
@ -323,9 +325,11 @@ QDF_STATUS reg_get_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr,
|
|||
|
||||
#ifdef CONFIG_REG_CLIENT
|
||||
QDF_STATUS
|
||||
reg_get_6g_power_type_for_ctry(uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match)
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
*pwr_type_6g = REG_INDOOR_AP;
|
||||
|
||||
|
|
@ -334,15 +338,32 @@ reg_get_6g_power_type_for_ctry(uint8_t *ap_ctry, uint8_t *sta_ctry,
|
|||
ap_ctry[1], sta_ctry[0], sta_ctry[1]);
|
||||
*ctry_code_match = false;
|
||||
|
||||
if (wlan_reg_is_us(sta_ctry)) {
|
||||
/**
|
||||
* Do not return if Wi-Fi safe mode or RF test mode is
|
||||
* enabled, rather STA should operate in LPI mode.
|
||||
* wlan_cm_get_check_6ghz_security API returns true if
|
||||
* neither Safe mode nor RF test mode are enabled.
|
||||
*/
|
||||
if (wlan_reg_is_us(sta_ctry) &&
|
||||
wlan_cm_get_check_6ghz_security(psoc)) {
|
||||
reg_err("US VLP not in place yet, connection not allowed");
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
if (wlan_reg_is_etsi(sta_ctry)) {
|
||||
reg_debug("STA ctry:%c%c, doesn't match with AP ctry, switch to VLP",
|
||||
sta_ctry[0], sta_ctry[1]);
|
||||
*pwr_type_6g = REG_VERY_LOW_POWER_AP;
|
||||
if (wlan_reg_is_etsi(sta_ctry) &&
|
||||
ap_pwr_type != REG_MAX_AP_TYPE) {
|
||||
if (!(wlan_reg_is_us(ap_ctry) &&
|
||||
ap_pwr_type == REG_INDOOR_AP)) {
|
||||
reg_debug("STA ctry:%c%c, doesn't match with AP ctry, switch to VLP",
|
||||
sta_ctry[0], sta_ctry[1]);
|
||||
*pwr_type_6g = REG_VERY_LOW_POWER_AP;
|
||||
}
|
||||
}
|
||||
|
||||
if (wlan_reg_is_us(ap_ctry) && ap_pwr_type == REG_INDOOR_AP) {
|
||||
reg_debug("AP ctry:%c%c, AP power type:%d, allow STA IN LPI",
|
||||
ap_ctry[0], ap_ctry[1], ap_pwr_type);
|
||||
*pwr_type_6g = REG_INDOOR_AP;
|
||||
}
|
||||
} else {
|
||||
*ctry_code_match = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
|
|
@ -316,13 +317,15 @@ QDF_STATUS reg_get_domain_from_country_code(v_REGDOMAIN_t *reg_domain_ptr,
|
|||
* @sta_ctry: ptr to sta programmed country
|
||||
* @pwr_type_6g: ptr to 6G power type
|
||||
* @ctry_code_match: Check for country IE and sta country code match
|
||||
*
|
||||
* @ap_pwr_type: AP's power type as advertised in HE ops IE
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
reg_get_6g_power_type_for_ctry(uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match);
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -546,13 +547,15 @@ QDF_STATUS wlan_reg_read_current_country(struct wlan_objmgr_psoc *psoc,
|
|||
* @sta_ctry: ptr to sta programmed country
|
||||
* @pwr_type_6g: ptr to 6G power type
|
||||
* @ctry_code_match: Check for country IE and sta country code match
|
||||
*
|
||||
* @ap_pwr_type: AP's power type for 6G as advertised in HE ops IE
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_reg_get_6g_power_type_for_ctry(uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
wlan_reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match);
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CHAN_NUM_API
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
|
|
@ -86,12 +87,15 @@ QDF_STATUS wlan_reg_get_max_5g_bw_from_regdomain(uint16_t regdmn,
|
|||
|
||||
#ifdef CONFIG_REG_CLIENT
|
||||
QDF_STATUS
|
||||
wlan_reg_get_6g_power_type_for_ctry(uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
wlan_reg_get_6g_power_type_for_ctry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *ap_ctry, uint8_t *sta_ctry,
|
||||
enum reg_6g_ap_type *pwr_type_6g,
|
||||
bool *ctry_code_match)
|
||||
bool *ctry_code_match,
|
||||
enum reg_6g_ap_type ap_pwr_type)
|
||||
{
|
||||
return reg_get_6g_power_type_for_ctry(ap_ctry, sta_ctry, pwr_type_6g,
|
||||
ctry_code_match);
|
||||
return reg_get_6g_power_type_for_ctry(psoc, ap_ctry, sta_ctry,
|
||||
pwr_type_6g, ctry_code_match,
|
||||
ap_pwr_type);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -156,6 +156,8 @@ static void scm_add_rnr_channel_db(struct wlan_objmgr_psoc *psoc,
|
|||
QDF_MAC_ADDR_SIZE);
|
||||
if (rnr_bss->short_ssid)
|
||||
rnr_node->entry.short_ssid = rnr_bss->short_ssid;
|
||||
if (rnr_bss->bss_params)
|
||||
rnr_node->entry.bss_params = rnr_bss->bss_params;
|
||||
scm_debug("Add freq %d: "QDF_MAC_ADDR_FMT" short ssid %x", chan_freq,
|
||||
QDF_MAC_ADDR_REF(rnr_bss->bssid.bytes),
|
||||
rnr_bss->short_ssid);
|
||||
|
|
@ -163,6 +165,59 @@ static void scm_add_rnr_channel_db(struct wlan_objmgr_psoc *psoc,
|
|||
&rnr_node->node);
|
||||
}
|
||||
}
|
||||
|
||||
void scm_filter_rnr_flag_pno(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t short_ssid,
|
||||
struct chan_list *pno_chan_list)
|
||||
{
|
||||
uint8_t i;
|
||||
uint32_t freq;
|
||||
struct meta_rnr_channel *chan;
|
||||
struct scan_rnr_node *rnr_node;
|
||||
enum scan_mode_6ghz scan_mode;
|
||||
struct wlan_scan_obj *scan_obj;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
if (!psoc)
|
||||
return;
|
||||
|
||||
scan_obj = wlan_vdev_get_scan_obj(vdev);
|
||||
if (!scan_obj) {
|
||||
scm_err("scan_obj is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
scan_mode = scan_obj->scan_def.scan_mode_6g;
|
||||
/* No Filteration required for below scan modes since
|
||||
* no RNR flag marked
|
||||
*/
|
||||
if (scan_mode == SCAN_MODE_6G_NO_CHANNEL ||
|
||||
scan_mode == SCAN_MODE_6G_ALL_CHANNEL ||
|
||||
scan_mode == SCAN_MODE_6G_ALL_DUTY_CYCLE)
|
||||
return;
|
||||
|
||||
for (i = 0; i < pno_chan_list->num_chan; i++) {
|
||||
freq = pno_chan_list->chan[i].freq;
|
||||
|
||||
chan = scm_get_chan_meta(psoc, freq);
|
||||
if (!chan || qdf_list_empty(&chan->rnr_list))
|
||||
continue;
|
||||
|
||||
qdf_list_for_each(&chan->rnr_list, rnr_node, node) {
|
||||
if (rnr_node->entry.short_ssid) {
|
||||
if (rnr_node->entry.short_ssid == short_ssid) {
|
||||
/* If short ssid entry present in RNR db cache, remove
|
||||
* FLAG_SCAN_ONLY_IF_RNR_FOUND flag from the channel.
|
||||
*/
|
||||
pno_chan_list->chan[i].flags &=
|
||||
~FLAG_SCAN_ONLY_IF_RNR_FOUND;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
@ -1106,10 +1161,17 @@ QDF_STATUS __scm_handle_bcn_probe(struct scan_bcn_probe_event *bcn)
|
|||
if (scan_obj->cb.update_beacon)
|
||||
scan_obj->cb.update_beacon(pdev, scan_entry);
|
||||
|
||||
if (!scm_is_bss_allowed_for_country(psoc, scan_entry)) {
|
||||
scm_info("Drop frame from "QDF_MAC_ADDR_FMT
|
||||
": AP in VLP mode not supported for US",
|
||||
QDF_MAC_ADDR_REF(scan_entry->bssid.bytes));
|
||||
/**
|
||||
* Do not drop the frame if Wi-Fi safe mode or RF test mode is
|
||||
* enabled. wlan_cm_get_check_6ghz_security API returns true if
|
||||
* neither Safe mode nor RF test mode are enabled.
|
||||
*/
|
||||
if (!scm_is_bss_allowed_for_country(psoc, scan_entry) &&
|
||||
wlan_cm_get_check_6ghz_security(psoc)) {
|
||||
scm_info_rl(
|
||||
"Drop frame from "QDF_MAC_ADDR_FMT
|
||||
": AP in VLP mode not supported for US",
|
||||
QDF_MAC_ADDR_REF(scan_entry->bssid.bytes));
|
||||
util_scan_free_cache_entry(scan_entry);
|
||||
qdf_mem_free(scan_node);
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -248,6 +249,24 @@ QDF_STATUS scm_rnr_db_flush(struct wlan_objmgr_psoc *psoc);
|
|||
*/
|
||||
void scm_update_rnr_from_scan_cache(struct wlan_objmgr_pdev *pdev);
|
||||
|
||||
/**
|
||||
* scm_filter_rnr_flag_pno() - Remove FLAG_SCAN_ONLY_IF_RNR_FOUND flag
|
||||
* in channel if ssid is different for colocated AP,
|
||||
* during pno scan request
|
||||
* @vdev: vdev
|
||||
* @short_ssid: short ssid
|
||||
* @pno_chan_list: channel list
|
||||
*
|
||||
* Remove FLAG_SCAN_ONLY_IF_RNR_FOUND flag in channel if ssid is different for
|
||||
* colocated AP, in pno scan request
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
scm_filter_rnr_flag_pno(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t short_ssid,
|
||||
struct chan_list *chan_list);
|
||||
|
||||
#else
|
||||
static inline QDF_STATUS scm_channel_list_db_init(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
|
|
@ -259,6 +278,13 @@ QDF_STATUS scm_channel_list_db_deinit(struct wlan_objmgr_psoc *psoc)
|
|||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline void
|
||||
scm_filter_rnr_flag_pno(struct wlan_objmgr_vdev *vdev,
|
||||
uint32_t short_ssid,
|
||||
struct chan_list *chan_list)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -945,6 +946,38 @@ scm_update_channel_list(struct scan_start_request *req,
|
|||
scm_scan_chlist_concurrency_modify(req->vdev, req);
|
||||
}
|
||||
|
||||
/**
|
||||
* scm_req_update_dwell_time_as_per_scan_mode() - update scan req params
|
||||
* dwell time as per scan mode.
|
||||
* @req: scan request
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static void
|
||||
scm_req_update_dwell_time_as_per_scan_mode(
|
||||
struct wlan_objmgr_vdev *vdev,
|
||||
struct scan_start_request *req)
|
||||
{
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
|
||||
psoc = wlan_vdev_get_psoc(vdev);
|
||||
|
||||
if (req->scan_req.scan_policy_low_span &&
|
||||
wlan_scan_cfg_honour_nl_scan_policy_flags(psoc)) {
|
||||
req->scan_req.adaptive_dwell_time_mode =
|
||||
SCAN_DWELL_MODE_STATIC;
|
||||
req->scan_req.dwell_time_active =
|
||||
QDF_MIN(req->scan_req.dwell_time_active,
|
||||
LOW_SPAN_ACTIVE_DWELL_TIME);
|
||||
req->scan_req.dwell_time_active_2g =
|
||||
QDF_MIN(req->scan_req.dwell_time_active_2g,
|
||||
LOW_SPAN_ACTIVE_DWELL_TIME);
|
||||
req->scan_req.dwell_time_passive =
|
||||
QDF_MIN(req->scan_req.dwell_time_passive,
|
||||
LOW_SPAN_PASSIVE_DWELL_TIME);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* scm_scan_req_update_params() - update scan req params depending on modes
|
||||
* and scan type.
|
||||
|
|
@ -1051,6 +1084,9 @@ scm_scan_req_update_params(struct wlan_objmgr_vdev *vdev,
|
|||
|
||||
if (req->scan_req.scan_type == SCAN_TYPE_RRM)
|
||||
req->scan_req.scan_ctrl_flags_ext |= SCAN_FLAG_EXT_RRM_SCAN_IND;
|
||||
|
||||
scm_req_update_dwell_time_as_per_scan_mode(vdev, req);
|
||||
|
||||
/*
|
||||
* Set wide band flag if enabled. This will cause
|
||||
* phymode TLV being sent to FW.
|
||||
|
|
|
|||
|
|
@ -332,18 +332,6 @@ void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
|
|||
qdf_mem_free(cur_chan_list);
|
||||
}
|
||||
|
||||
static void scm_scan_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
|
||||
struct scan_start_request *req,
|
||||
uint8_t *num_scan_ch)
|
||||
{
|
||||
bool is_colocated_6ghz_scan_enabled =
|
||||
req->scan_req.scan_policy_colocated_6ghz;
|
||||
|
||||
scm_add_all_valid_6g_channels(pdev, &req->scan_req.chan_list,
|
||||
num_scan_ch,
|
||||
is_colocated_6ghz_scan_enabled);
|
||||
}
|
||||
|
||||
static void
|
||||
scm_copy_valid_channels(struct wlan_objmgr_psoc *psoc,
|
||||
enum scan_mode_6ghz scan_mode,
|
||||
|
|
@ -445,6 +433,76 @@ scm_is_6ghz_scan_optimization_supported(struct wlan_objmgr_psoc *psoc)
|
|||
WLAN_SOC_CEXT_SCAN_PER_CH_CONFIG);
|
||||
}
|
||||
|
||||
void scm_add_channel_flags(struct wlan_objmgr_vdev *vdev,
|
||||
struct chan_list *chan_list,
|
||||
uint8_t *num_chan,
|
||||
bool is_colocated_6ghz_scan_enabled,
|
||||
bool is_pno_scan)
|
||||
{
|
||||
struct wlan_scan_obj *scan_obj;
|
||||
enum scan_mode_6ghz scan_mode;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
uint8_t num_scan_chan = *num_chan;
|
||||
|
||||
pdev = wlan_vdev_get_pdev(vdev);
|
||||
if (!pdev)
|
||||
return;
|
||||
scan_obj = wlan_vdev_get_scan_obj(vdev);
|
||||
if (!scan_obj) {
|
||||
scm_err("scan_obj is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
scan_mode = scan_obj->scan_def.scan_mode_6g;
|
||||
|
||||
switch (scan_mode) {
|
||||
case SCAN_MODE_6G_RNR_ONLY:
|
||||
/*
|
||||
* When the ini is set to SCAN_MODE_6G_RNR_ONLY,
|
||||
* always set RNR flag for all(PSC and non-PSC) channels.
|
||||
*/
|
||||
scm_set_rnr_flag_all_6g_ch(&chan_list->chan[0], num_scan_chan);
|
||||
break;
|
||||
case SCAN_MODE_6G_PSC_CHANNEL:
|
||||
/*
|
||||
* When the ini is set to SCAN_MODE_6G_PSC_CHANNEL,
|
||||
* always set RNR flag for non-PSC channels.
|
||||
*/
|
||||
scm_set_rnr_flag_non_psc_6g_ch(&chan_list->chan[0],
|
||||
num_scan_chan);
|
||||
break;
|
||||
case SCAN_MODE_6G_PSC_DUTY_CYCLE:
|
||||
case SCAN_MODE_6G_ALL_DUTY_CYCLE:
|
||||
if (!is_pno_scan && !scm_is_duty_cycle_scan(scan_obj))
|
||||
scm_set_rnr_flag_all_6g_ch(&chan_list->chan[0],
|
||||
num_scan_chan);
|
||||
else if (scan_mode == SCAN_MODE_6G_PSC_DUTY_CYCLE) {
|
||||
if (is_pno_scan)
|
||||
scm_debug("Duty cycle scan not supported in pno");
|
||||
scm_set_rnr_flag_non_psc_6g_ch(&chan_list->chan[0],
|
||||
num_scan_chan);
|
||||
}
|
||||
break;
|
||||
case SCAN_MODE_6G_ALL_CHANNEL:
|
||||
/*
|
||||
* When the ini is set to SCAN_MODE_6G_ALL_CHANNEL,
|
||||
* Host fills all remaining (other than channel(s) present in
|
||||
* host scan req) valid 6 GHz channel(s) to scan requests and
|
||||
* set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining
|
||||
* channels.
|
||||
*/
|
||||
scm_add_all_valid_6g_channels(pdev, chan_list, num_chan,
|
||||
is_colocated_6ghz_scan_enabled);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* Don't set the RNR flag for SCAN_MODE_6G_NO_CHANNEL/
|
||||
* SCAN_MODE_6G_RNR_ONLY
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
scm_update_6ghz_channel_list(struct scan_start_request *req,
|
||||
struct wlan_scan_obj *scan_obj)
|
||||
|
|
@ -493,48 +551,8 @@ scm_update_6ghz_channel_list(struct scan_start_request *req,
|
|||
scm_is_scan_type_exempted_from_optimization(req))
|
||||
goto end;
|
||||
|
||||
switch (scan_mode) {
|
||||
case SCAN_MODE_6G_RNR_ONLY:
|
||||
/*
|
||||
* When the ini is set to SCAN_MODE_6G_RNR_ONLY,
|
||||
* always set RNR flag for all(PSC and non-PSC) channels.
|
||||
*/
|
||||
scm_set_rnr_flag_all_6g_ch(&chan_list->chan[0], num_scan_ch);
|
||||
break;
|
||||
case SCAN_MODE_6G_PSC_CHANNEL:
|
||||
/*
|
||||
* When the ini is set to SCAN_MODE_6G_PSC_CHANNEL,
|
||||
* always set RNR flag for non-PSC channels.
|
||||
*/
|
||||
scm_set_rnr_flag_non_psc_6g_ch(&chan_list->chan[0],
|
||||
num_scan_ch);
|
||||
break;
|
||||
case SCAN_MODE_6G_PSC_DUTY_CYCLE:
|
||||
case SCAN_MODE_6G_ALL_DUTY_CYCLE:
|
||||
if (!scm_is_duty_cycle_scan(scan_obj))
|
||||
scm_set_rnr_flag_all_6g_ch(&chan_list->chan[0],
|
||||
num_scan_ch);
|
||||
else if (scan_mode == SCAN_MODE_6G_PSC_DUTY_CYCLE)
|
||||
scm_set_rnr_flag_non_psc_6g_ch(&chan_list->chan[0],
|
||||
num_scan_ch);
|
||||
break;
|
||||
case SCAN_MODE_6G_ALL_CHANNEL:
|
||||
/*
|
||||
* When the ini is set to SCAN_MODE_6G_ALL_CHANNEL,
|
||||
* Host fills all remaining (other than channel(s) present in
|
||||
* host scan req) valid 6 GHz channel(s) to scan requests and
|
||||
* set the flag FLAG_SCAN_ONLY_IF_RNR_FOUND for each remaining
|
||||
* channels.
|
||||
*/
|
||||
scm_scan_add_all_valid_6g_channels(pdev, req, &num_scan_ch);
|
||||
break;
|
||||
default:
|
||||
/*
|
||||
* Don't set the RNR flag for SCAN_MODE_6G_NO_CHANNEL/
|
||||
* SCAN_MODE_6G_RNR_ONLY
|
||||
*/
|
||||
break;
|
||||
}
|
||||
scm_add_channel_flags(vdev, chan_list, &num_scan_ch,
|
||||
req->scan_req.scan_policy_colocated_6ghz, false);
|
||||
|
||||
end:
|
||||
chan_list->num_chan = num_scan_ch;
|
||||
|
|
|
|||
|
|
@ -47,6 +47,25 @@
|
|||
#define SET_RNR_FLAG_TO_NON_PSC_CHANNEL 0x2
|
||||
#define SET_RNR_FLAG_TO_ALL_6G_CHANNELS 0x3
|
||||
|
||||
/**
|
||||
* scm_add_channel_flags() - Update 6ghz channel flags in the active/pno scan req
|
||||
* @vdev: vdev
|
||||
* @pno_chan_list: channel list
|
||||
* @num_chan: number channels
|
||||
* @is_colocated_6ghz_scan_enabled: Colacated 6ghz flag
|
||||
* @is_pno_scan: is pno scan
|
||||
*
|
||||
* Add channel flags for 6ghz channels from active/pno scan request based on ini
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
scm_add_channel_flags(struct wlan_objmgr_vdev *vdev,
|
||||
struct chan_list *chan_list,
|
||||
uint8_t *num_chan,
|
||||
bool is_colocated_6ghz_scan_enabled,
|
||||
bool is_pno_scan);
|
||||
|
||||
/**
|
||||
* scm_update_6ghz_channel_list() - Update 6ghz channel list in the scan req
|
||||
* @req: scan start request
|
||||
|
|
@ -93,6 +112,15 @@ void scm_add_all_valid_6g_channels(struct wlan_objmgr_pdev *pdev,
|
|||
bool is_colocated_6ghz);
|
||||
|
||||
#else
|
||||
static inline void
|
||||
scm_add_channel_flags(struct wlan_objmgr_vdev *vdev,
|
||||
struct chan_list *pno_chan_list,
|
||||
uint8_t *num_chan,
|
||||
bool is_colocated_6ghz,
|
||||
bool is_pno_scan)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
scm_update_6ghz_channel_list(struct scan_start_request *req,
|
||||
struct wlan_scan_obj *scan_obj)
|
||||
|
|
|
|||
|
|
@ -61,6 +61,15 @@ typedef uint32_t wlan_scan_id;
|
|||
|
||||
#define TBTT_INFO_COUNT 16
|
||||
|
||||
/* Active dwell time in low span scan mode(NL80211_SCAN_FLAG_LOW_SPAN)
|
||||
* in msec
|
||||
*/
|
||||
#define LOW_SPAN_ACTIVE_DWELL_TIME 40
|
||||
/* passive dwell time in low span scan mode (NL80211_SCAN_FLAG_LOW_SPAN)
|
||||
* in msec
|
||||
*/
|
||||
#define LOW_SPAN_PASSIVE_DWELL_TIME 110
|
||||
|
||||
/* forward declaration */
|
||||
struct wlan_objmgr_vdev;
|
||||
struct wlan_objmgr_pdev;
|
||||
|
|
@ -1449,11 +1458,13 @@ enum ext_cap_bit_field {
|
|||
* @timestamp: time stamp of beacon/probe
|
||||
* @short_ssid: Short SSID
|
||||
* @bssid: BSSID
|
||||
* @bss_params: bss params present in RNR IE
|
||||
*/
|
||||
struct scan_rnr_info {
|
||||
qdf_time_t timestamp;
|
||||
uint32_t short_ssid;
|
||||
struct qdf_mac_addr bssid;
|
||||
uint8_t bss_params;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -102,17 +102,21 @@ QDF_STATUS ucfg_scan_pno_start(struct wlan_objmgr_vdev *vdev,
|
|||
struct pno_scan_req_params *req);
|
||||
|
||||
/**
|
||||
* ucfg_scan_pno_add_all_valid_6g_channels() - This API to update all valid 6g
|
||||
* channels to pno scan request
|
||||
* ucfg_scan_add_flags_to_pno_chan_list() - This API to update flags for all 6g
|
||||
* channels in pno scan request
|
||||
* @vdev: vdev pointer
|
||||
* @req: pno req params
|
||||
* @num_scan_ch: total number of channels present in pno scan request
|
||||
* @num_chan: number of channels
|
||||
* @short_ssid: short ssid
|
||||
* @list_idx: index of network_list in pno request
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_scan_pno_add_all_valid_6g_channels(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
uint8_t *num_scan_ch);
|
||||
void ucfg_scan_add_flags_to_pno_chan_list(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
uint8_t *num_chan,
|
||||
uint32_t short_ssid,
|
||||
int list_idx);
|
||||
|
||||
/**
|
||||
* ucfg_is_6ghz_pno_scan_optimization_supported() - Public API to check
|
||||
|
|
|
|||
|
|
@ -185,20 +185,23 @@ QDF_STATUS ucfg_scan_pno_start(struct wlan_objmgr_vdev *vdev,
|
|||
return status;
|
||||
}
|
||||
|
||||
void ucfg_scan_pno_add_all_valid_6g_channels(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
uint8_t *num_scan_ch)
|
||||
void ucfg_scan_add_flags_to_pno_chan_list(struct wlan_objmgr_vdev *vdev,
|
||||
struct pno_scan_req_params *req,
|
||||
uint8_t *num_chan,
|
||||
uint32_t short_ssid,
|
||||
int list_idx)
|
||||
{
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct chan_list *pno_chan_list = &req->networks_list[0].pno_chan_list;
|
||||
bool is_colocated_6ghz = req->scan_policy_colocated_6ghz;
|
||||
struct chan_list *pno_chan_list =
|
||||
&req->networks_list[list_idx].pno_chan_list;
|
||||
|
||||
pdev = wlan_vdev_get_pdev(vdev);
|
||||
if (!pdev)
|
||||
return;
|
||||
|
||||
scm_add_all_valid_6g_channels(pdev, pno_chan_list, num_scan_ch,
|
||||
is_colocated_6ghz);
|
||||
/* Add RNR flags to channels based on scan_mode_6g ini */
|
||||
scm_add_channel_flags(vdev, pno_chan_list, num_chan,
|
||||
req->scan_policy_colocated_6ghz, true);
|
||||
/* Filter RNR flags in pno channel list based on short ssid entry in
|
||||
* RNR db cache.
|
||||
*/
|
||||
scm_filter_rnr_flag_pno(vdev, short_ssid,
|
||||
&req->networks_list[0].pno_chan_list);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_scan_pno_stop(struct wlan_objmgr_vdev *vdev)
|
||||
|
|
|
|||
|
|
@ -1871,10 +1871,10 @@ static QDF_STATUS send_wow_enable_cmd_tlv(wmi_unified_t wmi_handle,
|
|||
cmd->pause_iface_config = WOW_IFACE_PAUSE_DISABLED;
|
||||
cmd->flags = param->flags;
|
||||
|
||||
wmi_info("suspend type: %s flag is 0x%x",
|
||||
cmd->pause_iface_config == WOW_IFACE_PAUSE_ENABLED ?
|
||||
"WOW_IFACE_PAUSE_ENABLED" : "WOW_IFACE_PAUSE_DISABLED",
|
||||
cmd->flags);
|
||||
wmi_debug("suspend type: %s flag is 0x%x",
|
||||
cmd->pause_iface_config == WOW_IFACE_PAUSE_ENABLED ?
|
||||
"WOW_IFACE_PAUSE_ENABLED" : "WOW_IFACE_PAUSE_DISABLED",
|
||||
cmd->flags);
|
||||
|
||||
wmi_mtrace(WMI_WOW_ENABLE_CMDID, NO_SESSION, 0);
|
||||
ret = wmi_unified_cmd_send(wmi_handle, buf, len,
|
||||
|
|
|
|||
Loading…
Reference in a new issue