hdr = (struct hostap_ieee80211_hdr *) skb->data; fc = le16_to_cpu(hdr->frame_control); 
hdr = (struct ieee80211_hdr *) skb->data; fc = le16_to_cpu(hdr->frame_ctl); 
static void hostap_ap_tx_cb_auth(struct sk_buff *skb, int ok, void *data){	struct ap_data *ap = data;	struct net_device *dev = ap->local->dev;	struct hostap_ieee80211_hdr *hdr;	u16 fc, *pos, auth_alg, auth_transaction, status;	struct sta_info *sta = NULL;	char *txt = NULL;	if (ap->local->hostapd) {		dev_kfree_skb(skb);		return;	}	hdr = (struct hostap_ieee80211_hdr *) skb->data;	fc = le16_to_cpu(hdr->frame_control);	if (HOSTAP_FC_GET_TYPE(fc) != WLAN_FC_TYPE_MGMT ||	    HOSTAP_FC_GET_STYPE(fc) != WLAN_FC_STYPE_AUTH ||	    skb->len < IEEE80211_MGMT_HDR_LEN + 6) {		printk(KERN_DEBUG "%s: hostap_ap_tx_cb_auth received invalid "		       "frame\n", dev->name);		dev_kfree_skb(skb);		return;	}	pos = (u16 *) (skb->data + IEEE80211_MGMT_HDR_LEN);	auth_alg = le16_to_cpu(*pos++);	auth_transaction = le16_to_cpu(*pos++);	status = le16_to_cpu(*pos++);	if (!ok) {		txt = "frame was not ACKed";		goto done;	}	spin_lock(&ap->sta_table_lock);	sta = ap_get_sta(ap, hdr->addr1);	if (sta)		atomic_inc(&sta->users);	spin_unlock(&ap->sta_table_lock);	if (!sta) {		txt = "STA not found";		goto done;	}	if (status == WLAN_STATUS_SUCCESS &&	    ((auth_alg == WLAN_AUTH_OPEN && auth_transaction == 2) ||	     (auth_alg == WLAN_AUTH_SHARED_KEY && auth_transaction == 4))) {		txt = "STA authenticated";		sta->flags |= WLAN_STA_AUTH;		sta->last_auth = jiffies;	} else if (status != WLAN_STATUS_SUCCESS)		txt = "authentication failed"; done:	if (sta)		atomic_dec(&sta->users);	if (txt) {		PDEBUG(DEBUG_AP, "%s: " MACSTR " auth_cb - alg=%d trans#=%d "		       "status=%d - %s\n",		       dev->name, MAC2STR(hdr->addr1), auth_alg,		       auth_transaction, status, txt);	}	dev_kfree_skb(skb);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c0f72ca8e4f1b459b5582c1c8dcaf7e53151f069/hostap_ap.c/clean/drivers/net/wireless/hostap/hostap_ap.c