@@ -258,15 +258,11 @@ static void mlxsw_sp_acl_tcam_group_del(struct mlxsw_sp *mlxsw_sp,
258
258
static int
259
259
mlxsw_sp_acl_tcam_group_bind (struct mlxsw_sp * mlxsw_sp ,
260
260
struct mlxsw_sp_acl_tcam_group * group ,
261
- struct net_device * dev , bool ingress )
261
+ struct mlxsw_sp_port * mlxsw_sp_port ,
262
+ bool ingress )
262
263
{
263
- struct mlxsw_sp_port * mlxsw_sp_port ;
264
264
char ppbt_pl [MLXSW_REG_PPBT_LEN ];
265
265
266
- if (!mlxsw_sp_port_dev_check (dev ))
267
- return - EINVAL ;
268
-
269
- mlxsw_sp_port = netdev_priv (dev );
270
266
mlxsw_reg_ppbt_pack (ppbt_pl , ingress ? MLXSW_REG_PXBT_E_IACL :
271
267
MLXSW_REG_PXBT_E_EACL ,
272
268
MLXSW_REG_PXBT_OP_BIND , mlxsw_sp_port -> local_port ,
@@ -277,15 +273,11 @@ mlxsw_sp_acl_tcam_group_bind(struct mlxsw_sp *mlxsw_sp,
277
273
static void
278
274
mlxsw_sp_acl_tcam_group_unbind (struct mlxsw_sp * mlxsw_sp ,
279
275
struct mlxsw_sp_acl_tcam_group * group ,
280
- struct net_device * dev , bool ingress )
276
+ struct mlxsw_sp_port * mlxsw_sp_port ,
277
+ bool ingress )
281
278
{
282
- struct mlxsw_sp_port * mlxsw_sp_port ;
283
279
char ppbt_pl [MLXSW_REG_PPBT_LEN ];
284
280
285
- if (WARN_ON (!mlxsw_sp_port_dev_check (dev )))
286
- return ;
287
-
288
- mlxsw_sp_port = netdev_priv (dev );
289
281
mlxsw_reg_ppbt_pack (ppbt_pl , ingress ? MLXSW_REG_PXBT_E_IACL :
290
282
MLXSW_REG_PXBT_E_EACL ,
291
283
MLXSW_REG_PXBT_OP_UNBIND , mlxsw_sp_port -> local_port ,
@@ -1054,22 +1046,25 @@ mlxsw_sp_acl_tcam_flower_ruleset_del(struct mlxsw_sp *mlxsw_sp,
1054
1046
static int
1055
1047
mlxsw_sp_acl_tcam_flower_ruleset_bind (struct mlxsw_sp * mlxsw_sp ,
1056
1048
void * ruleset_priv ,
1057
- struct net_device * dev , bool ingress )
1049
+ struct mlxsw_sp_port * mlxsw_sp_port ,
1050
+ bool ingress )
1058
1051
{
1059
1052
struct mlxsw_sp_acl_tcam_flower_ruleset * ruleset = ruleset_priv ;
1060
1053
1061
1054
return mlxsw_sp_acl_tcam_group_bind (mlxsw_sp , & ruleset -> group ,
1062
- dev , ingress );
1055
+ mlxsw_sp_port , ingress );
1063
1056
}
1064
1057
1065
1058
static void
1066
1059
mlxsw_sp_acl_tcam_flower_ruleset_unbind (struct mlxsw_sp * mlxsw_sp ,
1067
1060
void * ruleset_priv ,
1068
- struct net_device * dev , bool ingress )
1061
+ struct mlxsw_sp_port * mlxsw_sp_port ,
1062
+ bool ingress )
1069
1063
{
1070
1064
struct mlxsw_sp_acl_tcam_flower_ruleset * ruleset = ruleset_priv ;
1071
1065
1072
- mlxsw_sp_acl_tcam_group_unbind (mlxsw_sp , & ruleset -> group , dev , ingress );
1066
+ mlxsw_sp_acl_tcam_group_unbind (mlxsw_sp , & ruleset -> group ,
1067
+ mlxsw_sp_port , ingress );
1073
1068
}
1074
1069
1075
1070
static u16
0 commit comments