hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr *hdr, 
hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr_4addr *hdr, 
hostap_rx_frame_wds(local_info_t *local, struct ieee80211_hdr *hdr,		    u16 fc, struct net_device **wds){	/* FIX: is this really supposed to accept WDS frames only in Master	 * mode? What about Repeater or Managed with WDS frames? */	if ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) !=	    (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS) &&	    (local->iw_mode != IW_MODE_MASTER || !(fc & IEEE80211_FCTL_TODS)))		return 0; /* not a WDS frame */	/* Possible WDS frame: either IEEE 802.11 compliant (if FromDS)	 * or own non-standard frame with 4th address after payload */	if (memcmp(hdr->addr1, local->dev->dev_addr, ETH_ALEN) != 0 &&	    (hdr->addr1[0] != 0xff || hdr->addr1[1] != 0xff ||	     hdr->addr1[2] != 0xff || hdr->addr1[3] != 0xff ||	     hdr->addr1[4] != 0xff || hdr->addr1[5] != 0xff)) {		/* RA (or BSSID) is not ours - drop */		PDEBUG(DEBUG_EXTRA, "%s: received WDS frame with "		       "not own or broadcast %s=" MACSTR "\n",		       local->dev->name,		       fc & IEEE80211_FCTL_FROMDS ? "RA" : "BSSID",		       MAC2STR(hdr->addr1));		return -1;	}	/* check if the frame came from a registered WDS connection */	*wds = prism2_rx_get_wds(local, hdr->addr2);	if (*wds == NULL && fc & IEEE80211_FCTL_FROMDS &&	    (local->iw_mode != IW_MODE_INFRA ||	     !(local->wds_type & HOSTAP_WDS_AP_CLIENT) ||	     memcmp(hdr->addr2, local->bssid, ETH_ALEN) != 0)) {		/* require that WDS link has been registered with TA or the		 * frame is from current AP when using 'AP client mode' */		PDEBUG(DEBUG_EXTRA, "%s: received WDS[4 addr] frame "		       "from unknown TA=" MACSTR "\n",		       local->dev->name, MAC2STR(hdr->addr2));		if (local->ap && local->ap->autom_ap_wds)			hostap_wds_link_oper(local, hdr->addr2, WDS_ADD);		return -1;	}	if (*wds && !(fc & IEEE80211_FCTL_FROMDS) && local->ap &&	    hostap_is_sta_assoc(local->ap, hdr->addr2)) {		/* STA is actually associated with us even though it has a		 * registered WDS link. Assume it is in 'AP client' mode.		 * Since this is a 3-addr frame, assume it is not (bogus) WDS		 * frame and process it like any normal ToDS frame from		 * associated STA. */		*wds = NULL;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/d041674d62e1ad565f2fb6d53ae80b31d6656033/hostap_80211_rx.c/buggy/drivers/net/wireless/hostap/hostap_80211_rx.c