(fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS) && skb->len >= 30) { 
(fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS) && skb->len >= 30) { 
static int prism2_tx_80211(struct sk_buff *skb, struct net_device *dev){	struct hostap_interface *iface;	local_info_t *local;	struct hfa384x_tx_frame txdesc;	struct hostap_skb_tx_data *meta;	int hdr_len, data_len, idx, res, ret = -1;	u16 tx_control, fc;	iface = netdev_priv(dev);	local = iface->local;	meta = (struct hostap_skb_tx_data *) skb->cb;	prism2_callback(local, PRISM2_CALLBACK_TX_START);	if ((local->func->card_present && !local->func->card_present(local)) ||	    !local->hw_ready || local->hw_downloading || local->pri_only) {		if (net_ratelimit()) {			printk(KERN_DEBUG "%s: prism2_tx_80211: hw not ready -"			       " skipping\n", dev->name);		}		goto fail;	}	memset(&txdesc, 0, sizeof(txdesc));	/* skb->data starts with txdesc->frame_control */	hdr_len = 24;	memcpy(&txdesc.frame_control, skb->data, hdr_len); 	fc = le16_to_cpu(txdesc.frame_control);	if (WLAN_FC_GET_TYPE(fc) == IEEE80211_FTYPE_DATA &&	    (fc & WLAN_FC_FROMDS) && (fc & WLAN_FC_TODS) && skb->len >= 30) {		/* Addr4 */		memcpy(txdesc.addr4, skb->data + hdr_len, ETH_ALEN);		hdr_len += ETH_ALEN;	}	tx_control = local->tx_control;	if (meta->tx_cb_idx) {		tx_control |= HFA384X_TX_CTRL_TX_OK;		txdesc.sw_support = cpu_to_le16(meta->tx_cb_idx);	}	txdesc.tx_control = cpu_to_le16(tx_control);	txdesc.tx_rate = meta->rate;	data_len = skb->len - hdr_len;	txdesc.data_len = cpu_to_le16(data_len);	txdesc.len = cpu_to_be16(data_len);	idx = prism2_get_txfid_idx(local);	if (idx < 0)		goto fail;	if (local->frame_dump & PRISM2_DUMP_TX_HDR)		hostap_dump_tx_header(dev->name, &txdesc);	spin_lock(&local->baplock);	res = hfa384x_setup_bap(dev, BAP0, local->txfid[idx], 0);	if (!res)		res = hfa384x_to_bap(dev, BAP0, &txdesc, sizeof(txdesc));	if (!res)		res = hfa384x_to_bap(dev, BAP0, skb->data + hdr_len,				     skb->len - hdr_len);	spin_unlock(&local->baplock);	if (!res)		res = prism2_transmit(dev, idx);	if (res) {		printk(KERN_DEBUG "%s: prism2_tx_80211 - to BAP0 failed\n",		       dev->name);		local->intransmitfid[idx] = PRISM2_TXFID_EMPTY;		schedule_work(&local->reset_queue);		goto fail;	}	ret = 0;fail:	prism2_callback(local, PRISM2_CALLBACK_TX_END);	return ret;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b2f4a2e3b1620667da9654f9e220c92ea52bdbe4/hostap_hw.c/clean/drivers/net/wireless/hostap/hostap_hw.c