qcacld-3.0: Set direct link when its vdev is up

When Vdev for direct link is up, set packets for this vdev to
route to firmware and only enter d0 WOW.
If the AP profile is HOST_CONCURRENT_AP_POLICY_GAMING_AUDIO,
prevent link to go to low power states to reduce latency.

Change-Id: I9fa2ab06983db8767d8b48b74e30602e07294fe2
CRs-Fixed: 3330207
这个提交包含在:
Ananya Gupta
2022-11-16 17:47:09 +05:30
提交者 Madan Koyyalamudi
父节点 bff1e3aa36
当前提交 a3e72a6e91
修改 6 个文件,包含 139 行新增1 行删除

查看文件

@@ -673,6 +673,19 @@ QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx);
* Return: None
*/
void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx);
/**
* dp_config_direct_link: Set direct link config of vdev
* @dp_intf: DP interface handle
* @config_direct_link: Flag to enable direct link path
* @enable_low_latency: Flag to enable low link latency
*
* Return: QDF Status
*/
QDF_STATUS dp_config_direct_link(struct wlan_dp_intf *dp_intf,
bool config_direct_link,
bool enable_low_latency);
#else
static inline
QDF_STATUS dp_direct_link_init(struct wlan_dp_psoc_context *dp_ctx)
@@ -684,5 +697,13 @@ static inline
void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx)
{
}
static inline
QDF_STATUS dp_config_direct_link(struct wlan_dp_intf *dp_intf,
bool config_direct_link,
bool enable_low_latency)
{
return QDF_STATUS_SUCCESS;
}
#endif
#endif

查看文件

@@ -266,6 +266,11 @@ struct link_monitoring {
uint8_t is_rx_linkspeed_good;
};
struct direct_link_info {
bool config_set;
bool low_latency;
};
/**
* struct wlan_dp_intf - DP interface object related info
* @dp_ctx: DP context reference
@@ -350,6 +355,9 @@ struct wlan_dp_intf {
enum bss_intf_state bss_state;
qdf_event_t qdf_sta_eap_frm_done_event;
struct dp_traffic_end_indication traffic_end_ind;
#ifdef FEATURE_DIRECT_LINK
struct direct_link_info direct_link_config;
#endif
};
/**

查看文件

@@ -33,7 +33,9 @@
#include "wlan_dp_nud_tracking.h"
#include "target_if_dp_comp.h"
#include "wlan_dp_txrx.h"
#include "init_deinit_lmac.h"
#include <hif.h>
#include <htc_api.h>
#ifdef FEATURE_DIRECT_LINK
#include "dp_internal.h"
#endif
@@ -1720,4 +1722,57 @@ void dp_direct_link_deinit(struct wlan_dp_psoc_context *dp_ctx)
qdf_mem_free(dp_ctx->dp_direct_link_ctx);
dp_ctx->dp_direct_link_ctx = NULL;
}
QDF_STATUS dp_config_direct_link(struct wlan_dp_intf *dp_intf,
bool config_direct_link,
bool enable_low_latency)
{
struct wlan_dp_psoc_context *dp_ctx = dp_intf->dp_ctx;
struct direct_link_info *config = &dp_intf->direct_link_config;
void *htc_handle;
bool prev_ll, update_ll;
if (!dp_ctx || !dp_ctx->psoc) {
dp_err("DP Handle is NULL");
return QDF_STATUS_E_CANCELED;
}
if (!dp_ctx->dp_direct_link_ctx) {
dp_err("Direct link not enabled");
return QDF_STATUS_E_NOSUPPORT;
}
htc_handle = lmac_get_htc_hdl(dp_ctx->psoc);
if (!htc_handle) {
dp_err("HTC handle is NULL");
return QDF_STATUS_E_EMPTY;
}
qdf_spin_lock(&dp_intf->vdev_lock);
prev_ll = config->low_latency;
update_ll = config_direct_link ? enable_low_latency : prev_ll;
config->config_set = config_direct_link;
config->low_latency = enable_low_latency;
qdf_spin_unlock(&dp_intf->vdev_lock);
if (config_direct_link) {
htc_vote_link_up(htc_handle, HTC_LINK_VOTE_SAP_USER_ID);
if (update_ll)
hif_prevent_link_low_power_states(
htc_get_hif_device(htc_handle));
else if (prev_ll)
hif_allow_link_low_power_states(
htc_get_hif_device(htc_handle));
dp_info("Direct link config set. Low link latency enabled: %d",
enable_low_latency);
} else {
htc_vote_link_down(htc_handle, HTC_LINK_VOTE_SAP_USER_ID);
if (update_ll)
hif_allow_link_low_power_states(
htc_get_hif_device(htc_handle));
dp_info("Direct link config cleared.");
}
return QDF_STATUS_SUCCESS;
}
#endif

查看文件

@@ -610,6 +610,20 @@ dp_softap_inspect_traffic_end_indication_pkt(struct wlan_dp_intf *dp_intf,
{}
#endif
#ifdef FEATURE_DIRECT_LINK
static inline void dp_intf_tx_to_fw(struct wlan_dp_intf *dp_intf,
qdf_nbuf_t nbuf)
{
if (qdf_unlikely(dp_intf->direct_link_config.config_set))
QDF_NBUF_CB_TX_PACKET_TO_FW(nbuf) = 1;
}
#else
static inline void dp_intf_tx_to_fw(struct wlan_dp_intf *dp_intf,
qdf_nbuf_t nbuf)
{
}
#endif
/**
* dp_softap_start_xmit() - Transmit a frame
* @nbuf: pointer to Network buffer
@@ -672,6 +686,8 @@ QDF_STATUS dp_softap_start_xmit(qdf_nbuf_t nbuf, struct wlan_dp_intf *dp_intf)
if (dp_softap_traffic_end_indication_enabled(dp_intf))
dp_softap_inspect_traffic_end_indication_pkt(dp_intf, nbuf);
dp_intf_tx_to_fw(dp_intf, nbuf);
dp_softap_config_tx_pkt_tracing(dp_intf, nbuf);
/* check whether need to linearize skb, like non-linear udp data */