hdr = (struct ieee80211_hdr *) skb->data; 
hdr = (struct ieee80211_hdr_4addr *) skb->data; 
static void hostap_ap_tx_cb_assoc(struct sk_buff *skb, int ok, void *data){	struct ap_data *ap = data;	struct net_device *dev = ap->local->dev;	struct ieee80211_hdr *hdr;	u16 fc, *pos, status;	struct sta_info *sta = NULL;	char *txt = NULL;	if (ap->local->hostapd) {		dev_kfree_skb(skb);		return;	}	hdr = (struct ieee80211_hdr *) skb->data;	fc = le16_to_cpu(hdr->frame_ctl);	if (WLAN_FC_GET_TYPE(fc) != IEEE80211_FTYPE_MGMT ||	    (WLAN_FC_GET_STYPE(fc) != IEEE80211_STYPE_ASSOC_RESP &&	     WLAN_FC_GET_STYPE(fc) != IEEE80211_STYPE_REASSOC_RESP) ||	    skb->len < IEEE80211_MGMT_HDR_LEN + 4) {		printk(KERN_DEBUG "%s: hostap_ap_tx_cb_assoc received invalid "		       "frame\n", dev->name);		dev_kfree_skb(skb);		return;	}	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;	}	pos = (u16 *) (skb->data + IEEE80211_MGMT_HDR_LEN);	pos++;	status = le16_to_cpu(*pos++);	if (status == WLAN_STATUS_SUCCESS) {		if (!(sta->flags & WLAN_STA_ASSOC))			hostap_event_new_sta(dev, sta);		txt = "STA associated";		sta->flags |= WLAN_STA_ASSOC;		sta->last_assoc = jiffies;	} else		txt = "association failed"; done:	if (sta)		atomic_dec(&sta->users);	if (txt) {		PDEBUG(DEBUG_AP, "%s: " MACSTR " assoc_cb - %s\n",		       dev->name, MAC2STR(hdr->addr1), txt);	}	dev_kfree_skb(skb);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d041674d62e1ad565f2fb6d53ae80b31d6656033/hostap_ap.c/clean/drivers/net/wireless/hostap/hostap_ap.c