nvethernet: address review comments

- Remove debug code under TEST macro
- Remove macsec CLK/RST hard code WAR's
- Update macsec OSI macro's as per latest OSI_ prefix

Bug 3264523

Change-Id: I8674e953e0faf49125e2326bdeb4b5bdc323a26c
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2548474
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Mahesh Patil
2021-06-15 13:56:28 -07:00
committed by Revanth Kumar Uppala
parent f972af3192
commit b02ba38d38
4 changed files with 408 additions and 432 deletions

View File

@@ -28,8 +28,6 @@
#include <net/genetlink.h>
#include <linux/crypto.h>
//#define TEST 1
/**
* @brief Size of Macsec IRQ name.
*/
@@ -86,7 +84,7 @@ static const struct nla_policy nv_macsec_sa_genl_policy[NUM_NV_MACSEC_SA_ATTR] =
[NV_MACSEC_SA_ATTR_AN] = { .type = NLA_U8 },
[NV_MACSEC_SA_ATTR_PN] = { .type = NLA_U32 },
[NV_MACSEC_SA_ATTR_KEY] = { .type = NLA_BINARY,
.len = KEY_LEN_128,},
.len = OSI_KEY_LEN_128,},
};
static const struct nla_policy nv_macsec_tz_genl_policy[NUM_NV_MACSEC_TZ_ATTR] = {
@@ -95,7 +93,7 @@ static const struct nla_policy nv_macsec_tz_genl_policy[NUM_NV_MACSEC_TZ_ATTR] =
[NV_MACSEC_TZ_ATTR_RW] = { .type = NLA_U8 },
[NV_MACSEC_TZ_ATTR_INDEX] = { .type = NLA_U8 },
[NV_MACSEC_TZ_ATTR_KEY] = { .type = NLA_BINARY,
.len = KEY_LEN_256 },
.len = OSI_KEY_LEN_256 },
[NV_MACSEC_TZ_ATTR_FLAG] = { .type = NLA_U32 },
};
@@ -136,6 +134,8 @@ struct macsec_supplicant_data {
unsigned int protect_frames;
/** MACsec enabled flags for Tx/Rx controller status */
unsigned int enabled;
/** MACsec cipher suite */
unsigned int cipher;
};
/**
@@ -166,10 +166,12 @@ struct macsec_priv_data {
unsigned int protect_frames;
/** MACsec enabled flags for Tx/Rx controller status */
unsigned int enabled;
/** MACsec Rx PN Window */
unsigned int pn_window;
/** MACsec controller init reference count */
atomic_t ref_count;
/** supplicant instance specific data */
struct macsec_supplicant_data supplicant[MAX_NUM_SC];
struct macsec_supplicant_data supplicant[OSI_MAX_NUM_SC];
/** next supplicant instance index */
unsigned short next_supp_idx;
/** macsec mutex lock */
@@ -184,11 +186,6 @@ int macsec_open(struct macsec_priv_data *macsec_pdata,
void *const genl_info);
int macsec_close(struct macsec_priv_data *macsec_pdata);
#ifdef TEST
int macsec_genl_register(void);
void macsec_genl_unregister(void);
#endif /* TEST */
#ifdef MACSEC_DEBUG
#define PRINT_ENTRY() (pr_info("-->%s()\n", __func__))
#define PRINT_EXIT() (pr_info("<--%s()\n", __func__))