aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43legacy/dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43legacy/dma.c')
-rw-r--r--drivers/net/wireless/b43legacy/dma.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c
index 83161d9af813..0023de8235bf 100644
--- a/drivers/net/wireless/b43legacy/dma.c
+++ b/drivers/net/wireless/b43legacy/dma.c
@@ -1181,9 +1181,11 @@ static int dma_tx_fragment(struct b43legacy_dmaring *ring,
1181 1181
1182 header = &(ring->txhdr_cache[slot * sizeof( 1182 header = &(ring->txhdr_cache[slot * sizeof(
1183 struct b43legacy_txhdr_fw3)]); 1183 struct b43legacy_txhdr_fw3)]);
1184 b43legacy_generate_txhdr(ring->dev, header, 1184 err = b43legacy_generate_txhdr(ring->dev, header,
1185 skb->data, skb->len, ctl, 1185 skb->data, skb->len, ctl,
1186 generate_cookie(ring, slot)); 1186 generate_cookie(ring, slot));
1187 if (unlikely(err))
1188 return err;
1187 1189
1188 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header, 1190 meta_hdr->dmaaddr = map_descbuffer(ring, (unsigned char *)header,
1189 sizeof(struct b43legacy_txhdr_fw3), 1); 1191 sizeof(struct b43legacy_txhdr_fw3), 1);
@@ -1282,6 +1284,13 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev,
1282 B43legacy_BUG_ON(ring->stopped); 1284 B43legacy_BUG_ON(ring->stopped);
1283 1285
1284 err = dma_tx_fragment(ring, skb, ctl); 1286 err = dma_tx_fragment(ring, skb, ctl);
1287 if (unlikely(err == -ENOKEY)) {
1288 /* Drop this packet, as we don't have the encryption key
1289 * anymore and must not transmit it unencrypted. */
1290 dev_kfree_skb_any(skb);
1291 err = 0;
1292 goto out_unlock;
1293 }
1285 if (unlikely(err)) { 1294 if (unlikely(err)) {
1286 b43legacyerr(dev->wl, "DMA tx mapping failure\n"); 1295 b43legacyerr(dev->wl, "DMA tx mapping failure\n");
1287 goto out_unlock; 1296 goto out_unlock;