efx.c (daea5b4dc16c3edc90392a512492dae504f1a37a) | efx.c (a2ba4b971a69b1d96b41953ac7fa17bdcd823baa) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/**************************************************************************** 3 * Driver for Solarflare network controllers and boards 4 * Copyright 2005-2006 Fen Systems Ltd. 5 * Copyright 2005-2013 Solarflare Communications Inc. 6 */ 7 8#include <linux/module.h> --- 120 unchanged lines hidden (view full) --- 129 } while (0) 130 131/************************************************************************** 132 * 133 * Port handling 134 * 135 **************************************************************************/ 136 | 1// SPDX-License-Identifier: GPL-2.0-only 2/**************************************************************************** 3 * Driver for Solarflare network controllers and boards 4 * Copyright 2005-2006 Fen Systems Ltd. 5 * Copyright 2005-2013 Solarflare Communications Inc. 6 */ 7 8#include <linux/module.h> --- 120 unchanged lines hidden (view full) --- 129 } while (0) 130 131/************************************************************************** 132 * 133 * Port handling 134 * 135 **************************************************************************/ 136 |
137void efx_link_set_advertising(struct efx_nic *efx, 138 const unsigned long *advertising) 139{ 140 memcpy(efx->link_advertising, advertising, 141 sizeof(__ETHTOOL_DECLARE_LINK_MODE_MASK())); 142 143 efx->link_advertising[0] |= ADVERTISED_Autoneg; 144 if (advertising[0] & ADVERTISED_Pause) 145 efx->wanted_fc |= (EFX_FC_TX | EFX_FC_RX); 146 else 147 efx->wanted_fc &= ~(EFX_FC_TX | EFX_FC_RX); 148 if (advertising[0] & ADVERTISED_Asym_Pause) 149 efx->wanted_fc ^= EFX_FC_TX; 150} 151 | |
152/* Equivalent to efx_link_set_advertising with all-zeroes, except does not 153 * force the Autoneg bit on. 154 */ 155void efx_link_clear_advertising(struct efx_nic *efx) 156{ 157 bitmap_zero(efx->link_advertising, __ETHTOOL_LINK_MODE_MASK_NBITS); 158 efx->wanted_fc &= ~(EFX_FC_TX | EFX_FC_RX); 159} --- 1897 unchanged lines hidden --- | 137/* Equivalent to efx_link_set_advertising with all-zeroes, except does not 138 * force the Autoneg bit on. 139 */ 140void efx_link_clear_advertising(struct efx_nic *efx) 141{ 142 bitmap_zero(efx->link_advertising, __ETHTOOL_LINK_MODE_MASK_NBITS); 143 efx->wanted_fc &= ~(EFX_FC_TX | EFX_FC_RX); 144} --- 1897 unchanged lines hidden --- |