diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-rx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index b90adcb73b06..8e1bb53c0aa3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
@@ -250,12 +250,20 @@ void iwl_rx_allocate(struct iwl_priv *priv, gfp_t priority) | |||
250 | } | 250 | } |
251 | spin_unlock_irqrestore(&rxq->lock, flags); | 251 | spin_unlock_irqrestore(&rxq->lock, flags); |
252 | 252 | ||
253 | if (rxq->free_count > RX_LOW_WATERMARK) | ||
254 | priority |= __GFP_NOWARN; | ||
253 | /* Alloc a new receive buffer */ | 255 | /* Alloc a new receive buffer */ |
254 | skb = alloc_skb(priv->hw_params.rx_buf_size + 256, | 256 | skb = alloc_skb(priv->hw_params.rx_buf_size + 256, |
255 | priority); | 257 | priority); |
256 | 258 | ||
257 | if (!skb) { | 259 | if (!skb) { |
258 | IWL_CRIT(priv, "Can not allocate SKB buffers\n"); | 260 | if (net_ratelimit()) |
261 | IWL_DEBUG_INFO(priv, "Failed to allocate SKB buffer.\n"); | ||
262 | if ((rxq->free_count <= RX_LOW_WATERMARK) && | ||
263 | net_ratelimit()) | ||
264 | IWL_CRIT(priv, "Failed to allocate SKB buffer with %s. Only %u free buffers remaining.\n", | ||
265 | priority == GFP_ATOMIC ? "GFP_ATOMIC" : "GFP_KERNEL", | ||
266 | rxq->free_count); | ||
259 | /* We don't reschedule replenish work here -- we will | 267 | /* We don't reschedule replenish work here -- we will |
260 | * call the restock method and if it still needs | 268 | * call the restock method and if it still needs |
261 | * more buffers it will schedule replenish */ | 269 | * more buffers it will schedule replenish */ |