struct ieee80211_hdr *hdr; 
struct ieee80211_hdr_4addr *hdr; 
static void prism2_send_mgmt(struct net_device *dev,			     u16 type_subtype, char *body,			     int body_len, u8 *addr, u16 tx_cb_idx){	struct hostap_interface *iface;	local_info_t *local;	struct ieee80211_hdr *hdr;	u16 fc;	struct sk_buff *skb;	struct hostap_skb_tx_data *meta;	int hdrlen;	iface = netdev_priv(dev);	local = iface->local;	dev = local->dev; /* always use master radio device */	iface = netdev_priv(dev);	if (!(dev->flags & IFF_UP)) {		PDEBUG(DEBUG_AP, "%s: prism2_send_mgmt - device is not UP - "		       "cannot send frame\n", dev->name);		return;	}	skb = dev_alloc_skb(sizeof(*hdr) + body_len);	if (skb == NULL) {		PDEBUG(DEBUG_AP, "%s: prism2_send_mgmt failed to allocate "		       "skb\n", dev->name);		return;	}	fc = type_subtype;	hdrlen = hostap_80211_get_hdrlen(fc);	hdr = (struct ieee80211_hdr *) skb_put(skb, hdrlen);	if (body)		memcpy(skb_put(skb, body_len), body, body_len);	memset(hdr, 0, hdrlen);	/* FIX: ctrl::ack sending used special HFA384X_TX_CTRL_802_11	 * tx_control instead of using local->tx_control */	memcpy(hdr->addr1, addr, ETH_ALEN); /* DA / RA */	if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA) {		fc |= IEEE80211_FCTL_FROMDS;		memcpy(hdr->addr2, dev->dev_addr, ETH_ALEN); /* BSSID */		memcpy(hdr->addr3, dev->dev_addr, ETH_ALEN); /* SA */	} else if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_CTL) {		/* control:ACK does not have addr2 or addr3 */		memset(hdr->addr2, 0, ETH_ALEN);		memset(hdr->addr3, 0, ETH_ALEN);	} else {		memcpy(hdr->addr2, dev->dev_addr, ETH_ALEN); /* SA */		memcpy(hdr->addr3, dev->dev_addr, ETH_ALEN); /* BSSID */	}	hdr->frame_ctl = cpu_to_le16(fc);	meta = (struct hostap_skb_tx_data *) skb->cb;	memset(meta, 0, sizeof(*meta));	meta->magic = HOSTAP_SKB_TX_DATA_MAGIC;	meta->iface = iface;	meta->tx_cb_idx = tx_cb_idx;	skb->dev = dev;	skb->mac.raw = skb->nh.raw = skb->data;	dev_queue_xmit(skb);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d041674d62e1ad565f2fb6d53ae80b31d6656033/hostap_ap.c/clean/drivers/net/wireless/hostap/hostap_ap.c