diff options
author | Arend van Spriel <arend@broadcom.com> | 2011-10-21 10:16:31 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-08 15:54:23 -0500 |
commit | 3fd172d30b59d9b73cb35ab263a1f0173dae974c (patch) | |
tree | 1d4af5d073bdb1dc62a4182544487f047bd106c2 /drivers/net/wireless/brcm80211/brcmsmac/main.c | |
parent | 81d2e2d148c2263f29a971d027f04c6e2c87e0d2 (diff) |
brcm80211: smac: use sk_buff list for handling frames in receive path
In the receive path the frames are obtained from the dma using
multiple sk_buff that were linked using the skb next pointer.
This has been changed and it now used sk_buff lists and skb_queue
functions instead.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/main.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 3f8a6c7d7a23..f193fab675dc 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -8115,21 +8115,17 @@ static bool | |||
8115 | brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound) | 8115 | brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound) |
8116 | { | 8116 | { |
8117 | struct sk_buff *p; | 8117 | struct sk_buff *p; |
8118 | struct sk_buff *head = NULL; | 8118 | struct sk_buff *next = NULL; |
8119 | struct sk_buff *tail = NULL; | 8119 | struct sk_buff_head recv_frames; |
8120 | |||
8120 | uint n = 0; | 8121 | uint n = 0; |
8121 | uint bound_limit = bound ? RXBND : -1; | 8122 | uint bound_limit = bound ? RXBND : -1; |
8122 | 8123 | ||
8123 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); | 8124 | BCMMSG(wlc_hw->wlc->wiphy, "wl%d\n", wlc_hw->unit); |
8124 | /* gather received frames */ | 8125 | skb_queue_head_init(&recv_frames); |
8125 | while ((p = dma_rx(wlc_hw->di[fifo]))) { | ||
8126 | 8126 | ||
8127 | if (!tail) | 8127 | /* gather received frames */ |
8128 | head = tail = p; | 8128 | while (dma_rx(wlc_hw->di[fifo], &recv_frames)) { |
8129 | else { | ||
8130 | tail->prev = p; | ||
8131 | tail = p; | ||
8132 | } | ||
8133 | 8129 | ||
8134 | /* !give others some time to run! */ | 8130 | /* !give others some time to run! */ |
8135 | if (++n >= bound_limit) | 8131 | if (++n >= bound_limit) |
@@ -8140,12 +8136,11 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound) | |||
8140 | dma_rxfill(wlc_hw->di[fifo]); | 8136 | dma_rxfill(wlc_hw->di[fifo]); |
8141 | 8137 | ||
8142 | /* process each frame */ | 8138 | /* process each frame */ |
8143 | while ((p = head) != NULL) { | 8139 | skb_queue_walk_safe(&recv_frames, p, next) { |
8144 | struct d11rxhdr_le *rxh_le; | 8140 | struct d11rxhdr_le *rxh_le; |
8145 | struct d11rxhdr *rxh; | 8141 | struct d11rxhdr *rxh; |
8146 | head = head->prev; | ||
8147 | p->prev = NULL; | ||
8148 | 8142 | ||
8143 | skb_unlink(p, &recv_frames); | ||
8149 | rxh_le = (struct d11rxhdr_le *)p->data; | 8144 | rxh_le = (struct d11rxhdr_le *)p->data; |
8150 | rxh = (struct d11rxhdr *)p->data; | 8145 | rxh = (struct d11rxhdr *)p->data; |
8151 | 8146 | ||