remove ieee80211_tx_frame()
authorAdrian Bunk <bunk@kernel.org>
Mon, 21 Apr 2008 08:48:28 +0000 (11:48 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 May 2008 19:02:14 +0000 (15:02 -0400)
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>
include/net/ieee80211.h
net/ieee80211/ieee80211_tx.c

index 529816bfbc52a3d5c54f1ef72cb7fa29a8b46f19..facd0ffedc6ebb6c058eb636958cf5d19894d9a4 100644 (file)
@@ -1262,9 +1262,6 @@ extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
 /* ieee80211_tx.c */
 extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev);
 extern void ieee80211_txb_free(struct ieee80211_txb *);
-extern int ieee80211_tx_frame(struct ieee80211_device *ieee,
-                             struct ieee80211_hdr *frame, int hdr_len,
-                             int total_len, int encrypt_mpdu);
 
 /* ieee80211_rx.c */
 extern void ieee80211_rx_any(struct ieee80211_device *ieee,
index d8b02603cbe5d9a86811b88c5510620cfec42a94..d996547f7a629564aeb4fb99164054a41165c746 100644 (file)
@@ -542,90 +542,4 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
        return 1;
 }
 
-/* Incoming 802.11 strucure is converted to a TXB
- * a block of 802.11 fragment packets (stored as skbs) */
-int ieee80211_tx_frame(struct ieee80211_device *ieee,
-                      struct ieee80211_hdr *frame, int hdr_len, int total_len,
-                      int encrypt_mpdu)
-{
-       struct ieee80211_txb *txb = NULL;
-       unsigned long flags;
-       struct net_device_stats *stats = &ieee->stats;
-       struct sk_buff *skb_frag;
-       int priority = -1;
-       int fraglen = total_len;
-       int headroom = ieee->tx_headroom;
-       struct ieee80211_crypt_data *crypt = ieee->crypt[ieee->tx_keyidx];
-
-       spin_lock_irqsave(&ieee->lock, flags);
-
-       if (encrypt_mpdu && (!ieee->sec.encrypt || !crypt))
-               encrypt_mpdu = 0;
-
-       /* If there is no driver handler to take the TXB, dont' bother
-        * creating it... */
-       if (!ieee->hard_start_xmit) {
-               printk(KERN_WARNING "%s: No xmit handler.\n", ieee->dev->name);
-               goto success;
-       }
-
-       if (unlikely(total_len < 24)) {
-               printk(KERN_WARNING "%s: skb too small (%d).\n",
-                      ieee->dev->name, total_len);
-               goto success;
-       }
-
-       if (encrypt_mpdu) {
-               frame->frame_ctl |= cpu_to_le16(IEEE80211_FCTL_PROTECTED);
-               fraglen += crypt->ops->extra_mpdu_prefix_len +
-                          crypt->ops->extra_mpdu_postfix_len;
-               headroom += crypt->ops->extra_mpdu_prefix_len;
-       }
-
-       /* When we allocate the TXB we allocate enough space for the reserve
-        * and full fragment bytes (bytes_per_frag doesn't include prefix,
-        * postfix, header, FCS, etc.) */
-       txb = ieee80211_alloc_txb(1, fraglen, headroom, GFP_ATOMIC);
-       if (unlikely(!txb)) {
-               printk(KERN_WARNING "%s: Could not allocate TXB\n",
-                      ieee->dev->name);
-               goto failed;
-       }
-       txb->encrypted = 0;
-       txb->payload_size = fraglen;
-
-       skb_frag = txb->fragments[0];
-
-       memcpy(skb_put(skb_frag, total_len), frame, total_len);
-
-       if (ieee->config &
-           (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS))
-               skb_put(skb_frag, 4);
-
-       /* To avoid overcomplicating things, we do the corner-case frame
-        * encryption in software. The only real situation where encryption is
-        * needed here is during software-based shared key authentication. */
-       if (encrypt_mpdu)
-               ieee80211_encrypt_fragment(ieee, skb_frag, hdr_len);
-
-      success:
-       spin_unlock_irqrestore(&ieee->lock, flags);
-
-       if (txb) {
-               if ((*ieee->hard_start_xmit) (txb, ieee->dev, priority) == 0) {
-                       stats->tx_packets++;
-                       stats->tx_bytes += txb->payload_size;
-                       return 0;
-               }
-               ieee80211_txb_free(txb);
-       }
-       return 0;
-
-      failed:
-       spin_unlock_irqrestore(&ieee->lock, flags);
-       stats->tx_errors++;
-       return 1;
-}
-
-EXPORT_SYMBOL(ieee80211_tx_frame);
 EXPORT_SYMBOL(ieee80211_txb_free);