mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
qcacld-3.0: Check if netdev feature need to update
Currently based on the INI option we are scheduling work to dynamically disable/enable checksum offload and TSO. But in the case of roaming from latency critical connection to latency critical connection or non-latency critical connection to non-latency critical connection, we do not need to schedule work. So adding a condition to check : For non-latency critical connection: If checksum offload and TSO are not disabled then schedule work. For latency critical: If checksum offload and TSO are not enabled then schedule work. Change-Id: I75a51707774c3428971dfe5cc0b0d3cdc2a17ac8 CRs-Fixed: 3054183
This commit is contained in:
parent
df8a08780e
commit
670edc32cf
3 changed files with 36 additions and 5 deletions
|
|
@ -1530,6 +1530,8 @@ struct hdd_adapter {
|
|||
uint8_t gro_disallowed[DP_MAX_RX_THREADS];
|
||||
uint8_t gro_flushed[DP_MAX_RX_THREADS];
|
||||
bool handle_feature_update;
|
||||
/* Indicate if TSO and checksum offload features are enabled or not */
|
||||
bool tso_csum_feature_enabled;
|
||||
bool runtime_disable_rx_thread;
|
||||
ol_txrx_rx_fp rx_stack;
|
||||
|
||||
|
|
|
|||
|
|
@ -2895,6 +2895,30 @@ void hdd_clear_fils_connection_info(struct hdd_adapter *adapter)
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* hdd_netif_features_update_required() - Check if feature update
|
||||
* is required
|
||||
* @adapter: pointer to the adapter structure
|
||||
* Returns: true if the connection is legacy and TSO and Checksum offload
|
||||
* enabled or if the connection is not latency and TSO and Checksum
|
||||
* offload are not enabled, false otherwise
|
||||
*/
|
||||
static bool hdd_netif_features_update_required(struct hdd_adapter *adapter)
|
||||
{
|
||||
bool is_legacy_connection = hdd_is_legacy_connection(adapter);
|
||||
|
||||
hdd_debug("Legacy Connection: %d, TSO_CSUM Feature Enabled:%d",
|
||||
is_legacy_connection, adapter->tso_csum_feature_enabled);
|
||||
|
||||
if (adapter->tso_csum_feature_enabled && is_legacy_connection)
|
||||
return true;
|
||||
|
||||
if (!adapter->tso_csum_feature_enabled && !is_legacy_connection)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_netif_queue_enable() - Enable the network queue for a
|
||||
* particular adapter.
|
||||
|
|
@ -2912,7 +2936,8 @@ static inline void hdd_netif_queue_enable(struct hdd_adapter *adapter)
|
|||
ol_txrx_soc_handle soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
|
||||
if (cdp_cfg_get(soc, cfg_dp_disable_legacy_mode_csum_offload)) {
|
||||
if (cdp_cfg_get(soc, cfg_dp_disable_legacy_mode_csum_offload) &&
|
||||
hdd_netif_features_update_required(adapter)) {
|
||||
hdd_adapter_ops_record_event(hdd_ctx,
|
||||
WLAN_HDD_ADAPTER_OPS_WORK_POST,
|
||||
adapter->vdev_id);
|
||||
|
|
|
|||
|
|
@ -5084,13 +5084,15 @@ static netdev_features_t __hdd_fix_features(struct net_device *net_dev,
|
|||
}
|
||||
|
||||
feature_tso_csum = hdd_get_tso_csum_feature_flags();
|
||||
if (hdd_is_legacy_connection(adapter))
|
||||
if (hdd_is_legacy_connection(adapter)) {
|
||||
/* Disable checksum and TSO */
|
||||
feature_change_req &= ~feature_tso_csum;
|
||||
else
|
||||
adapter->tso_csum_feature_enabled = 0;
|
||||
} else {
|
||||
/* Enable checksum and TSO */
|
||||
feature_change_req |= feature_tso_csum;
|
||||
|
||||
adapter->tso_csum_feature_enabled = 1;
|
||||
}
|
||||
hdd_debug("vdev mode %d current features 0x%llx, requesting feature change 0x%llx",
|
||||
adapter->device_mode, net_dev->features,
|
||||
feature_change_req);
|
||||
|
|
@ -7731,9 +7733,11 @@ void hdd_set_netdev_flags(struct hdd_adapter *adapter)
|
|||
adapter->dev->features |=
|
||||
(NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM);
|
||||
|
||||
if (cdp_cfg_get(soc, cfg_dp_tso_enable) && enable_csum)
|
||||
if (cdp_cfg_get(soc, cfg_dp_tso_enable) && enable_csum) {
|
||||
adapter->dev->features |=
|
||||
(NETIF_F_TSO | NETIF_F_TSO6 | NETIF_F_SG);
|
||||
adapter->tso_csum_feature_enabled = 1;
|
||||
}
|
||||
|
||||
adapter->dev->features |= NETIF_F_RXCSUM;
|
||||
temp = (uint64_t)adapter->dev->features;
|
||||
|
|
|
|||
Loading…
Reference in a new issue