diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c index c406b46b6905..d8a521ae45da 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | |||
@@ -1119,6 +1119,16 @@ static uint brcmf_sdbrcm_glom_len(struct brcmf_bus *bus) | |||
1119 | return total; | 1119 | return total; |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | static void brcmf_sdbrcm_free_glom(struct brcmf_bus *bus) | ||
1123 | { | ||
1124 | struct sk_buff *cur, *next; | ||
1125 | |||
1126 | skb_queue_walk_safe(&bus->glom, cur, next) { | ||
1127 | skb_unlink(cur, &bus->glom); | ||
1128 | brcmu_pkt_buf_free_skb(cur); | ||
1129 | } | ||
1130 | } | ||
1131 | |||
1122 | static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) | 1132 | static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) |
1123 | { | 1133 | { |
1124 | u16 dlen, totlen; | 1134 | u16 dlen, totlen; |
@@ -1203,11 +1213,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) | |||
1203 | } | 1213 | } |
1204 | pfirst = pnext = NULL; | 1214 | pfirst = pnext = NULL; |
1205 | } else { | 1215 | } else { |
1206 | if (!skb_queue_empty(&bus->glom)) | 1216 | brcmf_sdbrcm_free_glom(bus); |
1207 | skb_queue_walk_safe(&bus->glom, pfirst, pnext) { | ||
1208 | skb_unlink(pfirst, &bus->glom); | ||
1209 | brcmu_pkt_buf_free_skb(pfirst); | ||
1210 | } | ||
1211 | num = 0; | 1217 | num = 0; |
1212 | } | 1218 | } |
1213 | 1219 | ||
@@ -1274,10 +1280,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) | |||
1274 | bus->glomerr = 0; | 1280 | bus->glomerr = 0; |
1275 | brcmf_sdbrcm_rxfail(bus, true, false); | 1281 | brcmf_sdbrcm_rxfail(bus, true, false); |
1276 | bus->rxglomfail++; | 1282 | bus->rxglomfail++; |
1277 | skb_queue_walk_safe(&bus->glom, pfirst, pnext) { | 1283 | brcmf_sdbrcm_free_glom(bus); |
1278 | skb_unlink(pfirst, &bus->glom); | ||
1279 | brcmu_pkt_buf_free_skb(pfirst); | ||
1280 | } | ||
1281 | } | 1284 | } |
1282 | return 0; | 1285 | return 0; |
1283 | } | 1286 | } |
@@ -1399,10 +1402,7 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) | |||
1399 | bus->glomerr = 0; | 1402 | bus->glomerr = 0; |
1400 | brcmf_sdbrcm_rxfail(bus, true, false); | 1403 | brcmf_sdbrcm_rxfail(bus, true, false); |
1401 | bus->rxglomfail++; | 1404 | bus->rxglomfail++; |
1402 | skb_queue_walk_safe(&bus->glom, pfirst, pnext) { | 1405 | brcmf_sdbrcm_free_glom(bus); |
1403 | skb_unlink(pfirst, &bus->glom); | ||
1404 | brcmu_pkt_buf_free_skb(pfirst); | ||
1405 | } | ||
1406 | } | 1406 | } |
1407 | bus->nextlen = 0; | 1407 | bus->nextlen = 0; |
1408 | return 0; | 1408 | return 0; |
@@ -3369,8 +3369,6 @@ void brcmf_sdbrcm_bus_stop(struct brcmf_bus *bus) | |||
3369 | u8 saveclk; | 3369 | u8 saveclk; |
3370 | uint retries; | 3370 | uint retries; |
3371 | int err; | 3371 | int err; |
3372 | struct sk_buff *cur; | ||
3373 | struct sk_buff *next; | ||
3374 | 3372 | ||
3375 | brcmf_dbg(TRACE, "Enter\n"); | 3373 | brcmf_dbg(TRACE, "Enter\n"); |
3376 | 3374 | ||
@@ -3430,11 +3428,7 @@ void brcmf_sdbrcm_bus_stop(struct brcmf_bus *bus) | |||
3430 | /* Clear any held glomming stuff */ | 3428 | /* Clear any held glomming stuff */ |
3431 | if (bus->glomd) | 3429 | if (bus->glomd) |
3432 | brcmu_pkt_buf_free_skb(bus->glomd); | 3430 | brcmu_pkt_buf_free_skb(bus->glomd); |
3433 | if (!skb_queue_empty(&bus->glom)) | 3431 | brcmf_sdbrcm_free_glom(bus); |
3434 | skb_queue_walk_safe(&bus->glom, cur, next) { | ||
3435 | skb_unlink(cur, &bus->glom); | ||
3436 | brcmu_pkt_buf_free_skb(cur); | ||
3437 | } | ||
3438 | 3432 | ||
3439 | /* Clear rx control and wake any waiters */ | 3433 | /* Clear rx control and wake any waiters */ |
3440 | bus->rxlen = 0; | 3434 | bus->rxlen = 0; |