Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5626946 authored by David S. Miller's avatar David S. Miller
Browse files

sfc: Don't use enums as a bitmask.



This fixes:

drivers/net/sfc/mcdi_mac.c: In function ‘efx_mcdi_set_mac’:
drivers/net/sfc/mcdi_mac.c:36:2: warning: case value ‘3’ not in enumerated type ‘enum efx_fc_type’

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9cbc94ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -833,7 +833,7 @@ void efx_link_set_advertising(struct efx_nic *efx, u32 advertising)
	}
}

void efx_link_set_wanted_fc(struct efx_nic *efx, enum efx_fc_type wanted_fc)
void efx_link_set_wanted_fc(struct efx_nic *efx, u8 wanted_fc)
{
	efx->wanted_fc = wanted_fc;
	if (efx->link_advertising) {
+1 −1
Original line number Diff line number Diff line
@@ -142,6 +142,6 @@ static inline void efx_schedule_channel(struct efx_channel *channel)

extern void efx_link_status_changed(struct efx_nic *efx);
extern void efx_link_set_advertising(struct efx_nic *efx, u32);
extern void efx_link_set_wanted_fc(struct efx_nic *efx, enum efx_fc_type);
extern void efx_link_set_wanted_fc(struct efx_nic *efx, u8);

#endif /* EFX_EFX_H */
+1 −1
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
				      struct ethtool_pauseparam *pause)
{
	struct efx_nic *efx = netdev_priv(net_dev);
	enum efx_fc_type wanted_fc, old_fc;
	u8 wanted_fc, old_fc;
	u32 old_adv;
	bool reset;
	int rc = 0;
+1 −1
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ void efx_mdio_an_reconfigure(struct efx_nic *efx)
	efx_mdio_write(efx, MDIO_MMD_AN, MDIO_CTRL1, reg);
}

enum efx_fc_type efx_mdio_get_pause(struct efx_nic *efx)
u8 efx_mdio_get_pause(struct efx_nic *efx)
{
	BUILD_BUG_ON(EFX_FC_AUTO & (EFX_FC_RX | EFX_FC_TX));

+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ extern void efx_mdio_an_reconfigure(struct efx_nic *efx);
/* Get pause parameters from AN if available (otherwise return
 * requested pause parameters)
 */
enum efx_fc_type efx_mdio_get_pause(struct efx_nic *efx);
u8 efx_mdio_get_pause(struct efx_nic *efx);

/* Wait for specified MMDs to exit reset within a timeout */
extern int efx_mdio_wait_reset_mmds(struct efx_nic *efx,
Loading