diff options
author | Adrian Bunk <bunk@kernel.org> | 2008-04-21 04:48:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-07 15:02:14 -0400 |
commit | c12cf2109702c052688391f4171f239effb241bf (patch) | |
tree | e0b5d518543dacb2b23f3fce9e966ad7a82ed82a /net/ieee80211/ieee80211_tx.c | |
parent | 712590de5e5c977ff96efa3a16fcc03b0e976c3c (diff) |
remove ieee80211_tx_frame()
After the softmac removal ieee80211_tx_frame() was no longer used.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211/ieee80211_tx.c')
-rw-r--r-- | net/ieee80211/ieee80211_tx.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index d8b02603cbe5..d996547f7a62 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c | |||
@@ -542,90 +542,4 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev) | |||
542 | return 1; | 542 | return 1; |
543 | } | 543 | } |
544 | 544 | ||
545 | /* Incoming 802.11 strucure is converted to a TXB | ||
546 | * a block of 802.11 fragment packets (stored as skbs) */ | ||
547 | int ieee80211_tx_frame(struct ieee80211_device *ieee, | ||
548 | struct ieee80211_hdr *frame, int hdr_len, int total_len, | ||
549 | int encrypt_mpdu) | ||
550 | { | ||
551 | struct ieee80211_txb *txb = NULL; | ||
552 | unsigned long flags; | ||
553 | struct net_device_stats *stats = &ieee->stats; | ||
554 | struct sk_buff *skb_frag; | ||
555 | int priority = -1; | ||
556 | int fraglen = total_len; | ||
557 | int headroom = ieee->tx_headroom; | ||
558 | struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx]; | ||
559 | |||
560 | spin_lock_irqsave(&ieee->lock, flags); | ||
561 | |||
562 | if (encrypt_mpdu && (!ieee->sec.encrypt || !crypt)) | ||
563 | encrypt_mpdu = 0; | ||
564 | |||
565 | /* If there is no driver handler to take the TXB, dont' bother | ||
566 | * creating it... */ | ||
567 | if (!ieee->hard_start_xmit) { | ||
568 | printk(KERN_WARNING "%s: No xmit handler.\n", ieee->dev->name); | ||
569 | goto success; | ||
570 | } | ||
571 | |||
572 | if (unlikely(total_len < 24)) { | ||
573 | printk(KERN_WARNING "%s: skb too small (%d).\n", | ||
574 | ieee->dev->name, total_len); | ||
575 | goto success; | ||
576 | } | ||
577 | |||
578 | if (encrypt_mpdu) { | ||
579 | frame->frame_ctl |= cpu_to_le16(IEEE80211_FCTL_PROTECTED); | ||
580 | fraglen += crypt->ops->extra_mpdu_prefix_len + | ||
581 | crypt->ops->extra_mpdu_postfix_len; | ||
582 | headroom += crypt->ops->extra_mpdu_prefix_len; | ||
583 | } | ||
584 | |||
585 | /* When we allocate the TXB we allocate enough space for the reserve | ||
586 | * and full fragment bytes (bytes_per_frag doesn't include prefix, | ||
587 | * postfix, header, FCS, etc.) */ | ||
588 | txb = ieee80211_alloc_txb(1, fraglen, headroom, GFP_ATOMIC); | ||
589 | if (unlikely(!txb)) { | ||
590 | printk(KERN_WARNING "%s: Could not allocate TXB\n", | ||
591 | ieee->dev->name); | ||
592 | goto failed; | ||
593 | } | ||
594 | txb->encrypted = 0; | ||
595 | txb->payload_size = fraglen; | ||
596 | |||
597 | skb_frag = txb->fragments[0]; | ||
598 | |||
599 | memcpy(skb_put(skb_frag, total_len), frame, total_len); | ||
600 | |||
601 | if (ieee->config & | ||
602 | (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS)) | ||
603 | skb_put(skb_frag, 4); | ||
604 | |||
605 | /* To avoid overcomplicating things, we do the corner-case frame | ||
606 | * encryption in software. The only real situation where encryption is | ||
607 | * needed here is during software-based shared key authentication. */ | ||
608 | if (encrypt_mpdu) | ||
609 | ieee80211_encrypt_fragment(ieee, skb_frag, hdr_len); | ||
610 | |||
611 | success: | ||
612 | spin_unlock_irqrestore(&ieee->lock, flags); | ||
613 | |||
614 | if (txb) { | ||
615 | if ((*ieee->hard_start_xmit) (txb, ieee->dev, priority) == 0) { | ||
616 | stats->tx_packets++; | ||
617 | stats->tx_bytes += txb->payload_size; | ||
618 | return 0; | ||
619 | } | ||
620 | ieee80211_txb_free(txb); | ||
621 | } | ||
622 | return 0; | ||
623 | |||
624 | failed: | ||
625 | spin_unlock_irqrestore(&ieee->lock, flags); | ||
626 | stats->tx_errors++; | ||
627 | return 1; | ||
628 | } | ||
629 | |||
630 | EXPORT_SYMBOL(ieee80211_tx_frame); | ||
631 | EXPORT_SYMBOL(ieee80211_txb_free); | 545 | EXPORT_SYMBOL(ieee80211_txb_free); |