summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/rtl818x/rtl818x.c
diff options
context:
space:
mode:
authorMichael Brown2020-11-05 20:08:48 +0100
committerMichael Brown2020-11-05 20:13:52 +0100
commitbe1c87b72237f633c4f4b05bcb133acf2967d788 (patch)
treeadc9bc36da62d55f0f1f5708af7c66d1cc3af949 /src/drivers/net/rtl818x/rtl818x.c
parent[efi] Retain a long-lived reference to the EFI_PCI_IO_PROTOCOL instance (diff)
downloadipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.tar.gz
ipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.tar.xz
ipxe-be1c87b72237f633c4f4b05bcb133acf2967d788.zip
[malloc] Rename malloc_dma() to malloc_phys()
The malloc_dma() function allocates memory with specified physical alignment, and is typically (though not exclusively) used to allocate memory for DMA. Rename to malloc_phys() to more closely match the functionality, and to create name space for functions that specifically allocate and map DMA-capable buffers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/rtl818x/rtl818x.c')
-rw-r--r--src/drivers/net/rtl818x/rtl818x.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/net/rtl818x/rtl818x.c b/src/drivers/net/rtl818x/rtl818x.c
index f5082084e..599d36fad 100644
--- a/src/drivers/net/rtl818x/rtl818x.c
+++ b/src/drivers/net/rtl818x/rtl818x.c
@@ -328,8 +328,8 @@ static int rtl818x_init_rx_ring(struct net80211_device *dev)
struct rtl818x_rx_desc *entry;
int i;
- priv->rx_ring = malloc_dma(sizeof(*priv->rx_ring) * RTL818X_RX_RING_SIZE,
- RTL818X_RING_ALIGN);
+ priv->rx_ring = malloc_phys(sizeof(*priv->rx_ring) * RTL818X_RX_RING_SIZE,
+ RTL818X_RING_ALIGN);
priv->rx_ring_dma = virt_to_bus(priv->rx_ring);
if (!priv->rx_ring) {
DBG("rtl818x %s: cannot allocate RX ring\n", dev->netdev->name);
@@ -364,7 +364,7 @@ static void rtl818x_free_rx_ring(struct net80211_device *dev)
priv->rx_buf[i] = NULL;
}
- free_dma(priv->rx_ring, sizeof(*priv->rx_ring) * RTL818X_RX_RING_SIZE);
+ free_phys(priv->rx_ring, sizeof(*priv->rx_ring) * RTL818X_RX_RING_SIZE);
priv->rx_ring = NULL;
}
@@ -373,8 +373,8 @@ static int rtl818x_init_tx_ring(struct net80211_device *dev)
struct rtl818x_priv *priv = dev->priv;
int i;
- priv->tx_ring = malloc_dma(sizeof(*priv->tx_ring) * RTL818X_TX_RING_SIZE,
- RTL818X_RING_ALIGN);
+ priv->tx_ring = malloc_phys(sizeof(*priv->tx_ring) * RTL818X_TX_RING_SIZE,
+ RTL818X_RING_ALIGN);
priv->tx_ring_dma = virt_to_bus(priv->tx_ring);
if (!priv->tx_ring) {
DBG("rtl818x %s: cannot allocate TX ring\n", dev->netdev->name);
@@ -402,7 +402,7 @@ static void rtl818x_free_tx_ring(struct net80211_device *dev)
priv->tx_buf[i] = NULL;
}
- free_dma(priv->tx_ring, sizeof(*priv->tx_ring) * RTL818X_TX_RING_SIZE);
+ free_phys(priv->tx_ring, sizeof(*priv->tx_ring) * RTL818X_TX_RING_SIZE);
priv->tx_ring = NULL;
}