32c32
< __FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_mcdi.c 292007 2015-12-09 06:14:47Z arybchik $");
---
> __FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_mcdi.c 292008 2015-12-09 06:24:22Z arybchik $");
438c438,439
< * specific flag (at v4.6).
---
> * mac spoofing privilege (at v4.6), which is used up to
> * introduction of change mac spoofing privilege (at v4.7)
440a442,443
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC) ||
449a453,480
> hunt_mcdi_mac_spoofing_supported(
> __in efx_nic_t *enp,
> __out boolean_t *supportedp)
> {
> efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
> uint32_t privilege_mask = encp->enc_privilege_mask;
>
> EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON);
>
> /*
> * Use privilege mask state at MCDI attach.
> * Admin privilege must be used prior to introduction of
> * mac spoofing privilege (at v4.6), which is used up to
> * introduction of mac spoofing TX privilege (at v4.7)
> */
> *supportedp =
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX) ||
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ||
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN);
>
> return (0);
> }
>
>
> __checkReturn efx_rc_t
< __FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_mcdi.c 292007 2015-12-09 06:14:47Z arybchik $");
---
> __FBSDID("$FreeBSD: head/sys/dev/sfxge/common/hunt_mcdi.c 292008 2015-12-09 06:24:22Z arybchik $");
438c438,439
< * specific flag (at v4.6).
---
> * mac spoofing privilege (at v4.6), which is used up to
> * introduction of change mac spoofing privilege (at v4.7)
440a442,443
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_CHANGE_MAC) ||
449a453,480
> hunt_mcdi_mac_spoofing_supported(
> __in efx_nic_t *enp,
> __out boolean_t *supportedp)
> {
> efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
> uint32_t privilege_mask = encp->enc_privilege_mask;
>
> EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON);
>
> /*
> * Use privilege mask state at MCDI attach.
> * Admin privilege must be used prior to introduction of
> * mac spoofing privilege (at v4.6), which is used up to
> * introduction of mac spoofing TX privilege (at v4.7)
> */
> *supportedp =
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING_TX) ||
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) ||
> ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) ==
> MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN);
>
> return (0);
> }
>
>
> __checkReturn efx_rc_t