hdr = (struct hostap_ieee80211_hdr *) skb->data; 
hdr = (struct ieee80211_hdr *) skb->data; 
struct sk_buff * hostap_tx_encrypt(struct sk_buff *skb,				   struct ieee80211_crypt_data *crypt){	struct hostap_interface *iface;	local_info_t *local;	struct hostap_ieee80211_hdr *hdr;	u16 fc;	int hdr_len, res;	iface = netdev_priv(skb->dev);	local = iface->local;	if (skb->len < IEEE80211_DATA_HDR3_LEN) {		kfree_skb(skb);		return NULL;	}	if (local->tkip_countermeasures &&	    crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {		hdr = (struct hostap_ieee80211_hdr *) skb->data;		if (net_ratelimit()) {			printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "			       "TX packet to " MACSTR "\n",			       local->dev->name, MAC2STR(hdr->addr1));		}		kfree_skb(skb);		return NULL;	}	skb = skb_unshare(skb, GFP_ATOMIC);	if (skb == NULL)		return NULL;	if ((skb_headroom(skb) < crypt->ops->extra_prefix_len ||	     skb_tailroom(skb) < crypt->ops->extra_postfix_len) &&	    pskb_expand_head(skb, crypt->ops->extra_prefix_len,			     crypt->ops->extra_postfix_len, GFP_ATOMIC)) {		kfree_skb(skb);		return NULL;	}	hdr = (struct hostap_ieee80211_hdr *) skb->data; 	fc = le16_to_cpu(hdr->frame_control);	hdr_len = hostap_80211_get_hdrlen(fc);	/* Host-based IEEE 802.11 fragmentation for TX is not yet supported, so	 * call both MSDU and MPDU encryption functions from here. */	atomic_inc(&crypt->refcnt);	res = 0;	if (crypt->ops->encrypt_msdu)		res = crypt->ops->encrypt_msdu(skb, hdr_len, crypt->priv);	if (res == 0 && crypt->ops->encrypt_mpdu)		res = crypt->ops->encrypt_mpdu(skb, hdr_len, crypt->priv);	atomic_dec(&crypt->refcnt);	if (res < 0) {		kfree_skb(skb);		return NULL;	}	return skb;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c0f72ca8e4f1b459b5582c1c8dcaf7e53151f069/hostap_80211_tx.c/buggy/drivers/net/wireless/hostap/hostap_80211_tx.c