diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index d96a7e2a0bd59..d46d6e8122c8d 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -1604,12 +1604,12 @@ int wilc_wlan_init(struct net_device *dev) init_q_limits(wilc); - if (!wilc->tx_buffer) + if (!wilc->hif_func->hif_sk_buffs_tx && !wilc->tx_buffer) { wilc->tx_buffer = kmalloc(WILC_TX_BUFF_SIZE, GFP_KERNEL); - - if (!wilc->tx_buffer) { - ret = -ENOBUFS; - goto fail; + if (!wilc->tx_buffer) { + ret = -ENOBUFS; + goto fail; + } } if (!wilc->rx_buffer)
If a driver supports zero-copy transmit transfers, there is no need to have a transmit buffer. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> --- drivers/net/wireless/microchip/wilc1000/wlan.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)