mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
mlx5en: only enable to toggle offload caps if they are supported
(cherry picked from commit 4cc5d081d8)
This commit is contained in:
parent
2657d38625
commit
f16b81e620
1 changed files with 14 additions and 0 deletions
|
|
@ -3537,6 +3537,20 @@ mlx5e_ioctl(if_t ifp, u_long command, caddr_t data)
|
|||
drv_ioctl_data = (struct siocsifcapnv_driver_data *)data;
|
||||
PRIV_LOCK(priv);
|
||||
siocsifcap_driver:
|
||||
if (!mlx5e_is_tlstx_capable(priv->mdev)) {
|
||||
drv_ioctl_data->reqcap &= ~(IFCAP_TXTLS4 |
|
||||
IFCAP_TXTLS6);
|
||||
}
|
||||
if (!mlx5e_is_tlsrx_capable(priv->mdev)) {
|
||||
drv_ioctl_data->reqcap &= ~(
|
||||
IFCAP2_BIT(IFCAP2_RXTLS4) |
|
||||
IFCAP2_BIT(IFCAP2_RXTLS6));
|
||||
}
|
||||
if (!mlx5e_is_ratelimit_capable(priv->mdev)) {
|
||||
drv_ioctl_data->reqcap &= ~(IFCAP_TXTLS_RTLMT |
|
||||
IFCAP_TXRTLMT);
|
||||
}
|
||||
|
||||
mask = drv_ioctl_data->reqcap ^ if_getcapenable(ifp);
|
||||
|
||||
if (mask & IFCAP_TXCSUM) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue