nvethernet: Fix err for macro MACSEC_KEY_PROGRAM

- Fix compiler err when macro MACSEC_KEY_PROGRAM enabled
- Add support key programming through sysfs for all macsec instances

Bug 3389496

Change-Id: Ia91fefb72182f62516104dcafa4d75dbf724b8e3
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2601541
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Mahesh Patil
2021-09-27 17:40:10 -07:00
committed by Revanth Kumar Uppala
parent dc3d0a02f7
commit 4b71306a35
3 changed files with 18 additions and 4 deletions

View File

@@ -1298,7 +1298,7 @@ static void dump_kt(char **buf_p, unsigned short ctlr_sel,
kt_config.table_config.ctlr_sel = ctlr_sel;
kt_config.table_config.rw = OSI_LUT_READ;
kt_config.table_config.index = i;
if (osi_macsec_kt_config(osi_core, &kt_config, OSI_NULL) < 0) {
if (osi_macsec_kt_config(osi_core, &kt_config) < 0) {
pr_err("%s: Failed to read KT\n", __func__);
*buf_p = buf;
return;
@@ -1486,7 +1486,7 @@ static ssize_t macsec_kt_store(struct device *dev,
kt_config.flags |= OSI_LUT_FLAGS_ENTRY_VALID;
}
ret = osi_macsec_kt_config(osi_core, &kt_config, OSI_NULL);
ret = osi_macsec_kt_config(osi_core, &kt_config);
if (ret < 0) {
pr_err("%s: Failed to set SAK", __func__);
goto exit;