staging: rtl8192u: remove checks for CONFIG_IEEE80211_CRYPT_TKIP
[cascardo/linux.git] / drivers / staging / rtl8192u / ieee80211 / ieee80211_tx.c
index 6779bdd..7f9e655 100644 (file)
@@ -188,23 +188,23 @@ int ieee80211_encrypt_fragment(
 
        if (!(crypt && crypt->ops))
        {
-               printk("=========>%s(), crypt is null\n", __FUNCTION__);
+               printk("=========>%s(), crypt is null\n", __func__);
                return -1;
        }
-#ifdef CONFIG_IEEE80211_CRYPT_TKIP
-       struct ieee80211_hdr *header;
 
        if (ieee->tkip_countermeasures &&
            crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
-               header = (struct ieee80211_hdr *) frag->data;
                if (net_ratelimit()) {
+                       struct ieee80211_hdr_3addrqos *header;
+
+                       header = (struct ieee80211_hdr_3addrqos *)frag->data;
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
                               "TX packet to %pM\n",
                               ieee->dev->name, header->addr1);
                }
                return -1;
        }
-#endif
+
        /* To encrypt, frame format is:
         * IV (4 bytes), clear payload (including SNAP), ICV (4 bytes) */
 
@@ -236,6 +236,7 @@ void ieee80211_txb_free(struct ieee80211_txb *txb) {
                return;
        kfree(txb);
 }
+EXPORT_SYMBOL(ieee80211_txb_free);
 
 static struct ieee80211_txb *ieee80211_alloc_txb(int nr_frags, int txb_size,
                                                 gfp_t gfp_mask)
@@ -913,5 +914,3 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
        return 1;
 
 }
-
-EXPORT_SYMBOL(ieee80211_txb_free);