From: David Sterba Date: Mon, 28 Jul 2008 14:53:27 +0000 (+0200) Subject: ipwireless: Put packets to pool start X-Git-Tag: v2.6.27-rc1~39 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f38c47a545d36da4038fec0708e6e3fbdb160b1;p=linux-2.6 ipwireless: Put packets to pool start ipwireless: Put packets to pool start Put packets to pool start, try to reuse cached memory. Signed-off-by: David Sterba Signed-off-by: Jiri Kosina Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/pcmcia/ipwireless/hardware.c b/drivers/char/pcmcia/ipwireless/hardware.c index 814ea3228c..d1e69de191 100644 --- a/drivers/char/pcmcia/ipwireless/hardware.c +++ b/drivers/char/pcmcia/ipwireless/hardware.c @@ -563,9 +563,9 @@ static struct ipw_rx_packet *pool_allocate(struct ipw_hardware *hw, if (!list_empty(&hw->rx_pool)) { packet = list_first_entry(&hw->rx_pool, struct ipw_rx_packet, queue); - list_del(&packet->queue); hw->rx_pool_size--; spin_unlock_irqrestore(&hw->lock, flags); + list_del(&packet->queue); } else { static int min_capacity = 256; int new_capacity; @@ -610,7 +610,7 @@ static void pool_free(struct ipw_hardware *hw, struct ipw_rx_packet *packet) kfree(packet); else { hw->rx_pool_size++; - list_add_tail(&packet->queue, &hw->rx_pool); + list_add(&packet->queue, &hw->rx_pool); } }