[netdevice] Remove netdev_priv() helper function

Some network device drivers use the trivial netdev_priv() helper
function while others use the netdev->priv pointer directly.

Standardise on direct use of netdev->priv, in order to free up the
function name netdev_priv() for reuse.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2023-09-13 14:30:25 +01:00
parent 0aa2e4ec96
commit eeb7cd56e5
23 changed files with 182 additions and 193 deletions
+3 -3
View File
@@ -97,7 +97,7 @@ static const char * snpnet_mac_text ( EFI_MAC_ADDRESS *mac, size_t len ) {
* @v netdev Network device
*/
static void snpnet_dump_mode ( struct net_device *netdev ) {
struct snp_nic *snp = netdev_priv ( netdev );
struct snp_nic *snp = netdev->priv;
EFI_SIMPLE_NETWORK_MODE *mode = snp->snp->Mode;
size_t mac_len = mode->HwAddressSize;
unsigned int i;
@@ -136,7 +136,7 @@ static void snpnet_dump_mode ( struct net_device *netdev ) {
* @v netdev Network device
*/
static void snpnet_check_link ( struct net_device *netdev ) {
struct snp_nic *snp = netdev_priv ( netdev );
struct snp_nic *snp = netdev->priv;
EFI_SIMPLE_NETWORK_MODE *mode = snp->snp->Mode;
/* Do nothing unless media presence detection is supported */
@@ -160,7 +160,7 @@ static void snpnet_check_link ( struct net_device *netdev ) {
*/
static int snpnet_transmit ( struct net_device *netdev,
struct io_buffer *iobuf ) {
struct snp_nic *snp = netdev_priv ( netdev );
struct snp_nic *snp = netdev->priv;
EFI_STATUS efirc;
int rc;