/* return 1 if something has been received from hw  */
static int get_packets_from_hw(struct ipw_hardware *hw)
/* return 1 if something has been received from hw  */
static int get_packets_from_hw(struct ipw_hardware *hw)
{
	int received = 0;
	unsigned long flags;
	spin_lock_irqsave(&hw->lock, flags);
	while (hw->rx_ready && !hw->blocking_rx) {
		received = 1;
		hw->rx_ready--;
		spin_unlock_irqrestore(&hw->lock, flags);
		do_receive_packet(hw);
		spin_lock_irqsave(&hw->lock, flags);
	}
	spin_unlock_irqrestore(&hw->lock, flags);
	return received;
}