diff options
author | Juuso Oikarinen <juuso.oikarinen@nokia.com> | 2010-10-25 05:24:29 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 13:25:17 -0500 |
commit | fb2382c75b1292aff0ebc8e209b0cb9ba70bb2cf (patch) | |
tree | fa594b03f29efe5b6e23335514fb4412162a6c3a /drivers | |
parent | ff6d76fd3d45ed5494287e57d76073739721214b (diff) |
wl1271: Fix RX path stall
The wl1271_rx function loops through packets in an aggregated buffer. Each
packet in the buffer is handled by a call to wl1271_rx_handle_data, which will
fail if skb memory allocation fails or production mode is enabled. These
failures currently prevent the rx counters to be incremented, thus causing the
rx loop to run forever.
Fix this by ignoring error codes reported wl1271_rx_handle_data function.
This essentially means that frames will be dropped in production mode, which
is the intetion, and frames will be dropped if memory allocation fails, which
is a decent way to recover from that situation.
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Tested-by: Tuomas Katila <ext-tuomas.2.katila@nokia.com>
Reviewed-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_rx.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_rx.c b/drivers/net/wireless/wl12xx/wl1271_rx.c index 35448e7c0dd5..cacfee56a0d0 100644 --- a/drivers/net/wireless/wl12xx/wl1271_rx.c +++ b/drivers/net/wireless/wl12xx/wl1271_rx.c | |||
@@ -184,10 +184,14 @@ void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_status *status) | |||
184 | while (pkt_offset < buf_size) { | 184 | while (pkt_offset < buf_size) { |
185 | pkt_length = wl1271_rx_get_buf_size(status, | 185 | pkt_length = wl1271_rx_get_buf_size(status, |
186 | drv_rx_counter); | 186 | drv_rx_counter); |
187 | if (wl1271_rx_handle_data(wl, | 187 | /* |
188 | wl->aggr_buf + pkt_offset, | 188 | * the handle data call can only fail in memory-outage |
189 | pkt_length) < 0) | 189 | * conditions, in that case the received frame will just |
190 | break; | 190 | * be dropped. |
191 | */ | ||
192 | wl1271_rx_handle_data(wl, | ||
193 | wl->aggr_buf + pkt_offset, | ||
194 | pkt_length); | ||
191 | wl->rx_counter++; | 195 | wl->rx_counter++; |
192 | drv_rx_counter++; | 196 | drv_rx_counter++; |
193 | drv_rx_counter &= NUM_RX_PKT_DESC_MOD_MASK; | 197 | drv_rx_counter &= NUM_RX_PKT_DESC_MOD_MASK; |