mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvethernet: macsec: Add module param for macsec.
Add module parameter to enable/disable macsec.
By default macsec will be enabled and it can be disabled
with help of module parameter "macsec_enable"
Bug 4640382
Change-Id: I3b6ffde52a73760cd65f02abe472c3133996b698
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3156387
(cherry picked from commit f870a5f9fc)
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3138588
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6f80c397ed
commit
19e5f2fafa
@@ -7385,7 +7385,7 @@ static int ether_probe(struct platform_device *pdev)
|
||||
goto err_macsec;
|
||||
} else if (ret == 1) {
|
||||
/* Nothing to do, macsec is not supported */
|
||||
dev_info(&pdev->dev, "Macsec not supported/Not enabled in DT\n");
|
||||
dev_info(&pdev->dev, "Macsec not supported/Not enabled\n");
|
||||
} else {
|
||||
dev_info(&pdev->dev, "Macsec not enabled\n");
|
||||
/* Macsec is supported, reduce MTU */
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
#ifdef HSI_SUPPORT
|
||||
#include <linux/tegra-epl.h>
|
||||
#endif
|
||||
|
||||
static bool macsec_enable = true;
|
||||
module_param(macsec_enable, bool, 0644);
|
||||
MODULE_PARM_DESC(macsec_enable, "Enable Macsec for nvethernet module");
|
||||
|
||||
static int macsec_get_tx_next_pn(struct sk_buff *skb, struct genl_info *info);
|
||||
|
||||
#ifndef MACSEC_KEY_PROGRAM
|
||||
@@ -1379,9 +1384,10 @@ int macsec_probe(struct ether_priv_data *pdata)
|
||||
/* Read if macsec is enabled in DT */
|
||||
ret = of_property_read_u32(np, "nvidia,macsec-enable",
|
||||
&macsec_pdata->is_macsec_enabled_in_dt);
|
||||
if ((ret != 0) || (macsec_pdata->is_macsec_enabled_in_dt == 0U)) {
|
||||
if (ret != 0 || !macsec_enable ||
|
||||
macsec_pdata->is_macsec_enabled_in_dt == 0U) {
|
||||
dev_info(dev,
|
||||
"macsec param in DT is missing or disabled\n");
|
||||
"macsec parameter is missing or disabled\n");
|
||||
ret = 1;
|
||||
goto init_err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user