aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-07-13 14:01:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 15:01:41 -0400
commit343c17b0508586a5624ebce490c619064e51cc03 (patch)
tree0ce2ab4a43a04865b6927cf81f8f4b9da668a7db
parent946c2adde827557c10b05bacfe9cd573a191a4a1 (diff)
Staging: rtl8187se/ieee80211: remove NOT_YET ifdefs
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c190
1 files changed, 0 insertions, 190 deletions
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
index c76ffb13144..8ab921a0e07 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_rx.c
@@ -237,51 +237,6 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,
237 237
238 return 0; 238 return 0;
239 239
240 #ifdef NOT_YET
241 if (ieee->iw_mode == IW_MODE_MASTER) {
242 printk(KERN_DEBUG "%s: Master mode not yet suppported.\n",
243 ieee->dev->name);
244 return 0;
245/*
246 hostap_update_sta_ps(ieee, (struct hostap_ieee80211_hdr *)
247 skb->data);*/
248 }
249
250 if (ieee->hostapd && type == IEEE80211_TYPE_MGMT) {
251 if (stype == WLAN_FC_STYPE_BEACON &&
252 ieee->iw_mode == IW_MODE_MASTER) {
253 struct sk_buff *skb2;
254 /* Process beacon frames also in kernel driver to
255 * update STA(AP) table statistics */
256 skb2 = skb_clone(skb, GFP_ATOMIC);
257 if (skb2)
258 hostap_rx(skb2->dev, skb2, rx_stats);
259 }
260
261 /* send management frames to the user space daemon for
262 * processing */
263 ieee->apdevstats.rx_packets++;
264 ieee->apdevstats.rx_bytes += skb->len;
265 prism2_rx_80211(ieee->apdev, skb, rx_stats, PRISM2_RX_MGMT);
266 return 0;
267 }
268
269 if (ieee->iw_mode == IW_MODE_MASTER) {
270 if (type != WLAN_FC_TYPE_MGMT && type != WLAN_FC_TYPE_CTRL) {
271 printk(KERN_DEBUG "%s: unknown management frame "
272 "(type=0x%02x, stype=0x%02x) dropped\n",
273 skb->dev->name, type, stype);
274 return -1;
275 }
276
277 hostap_rx(skb->dev, skb, rx_stats);
278 return 0;
279 }
280
281 printk(KERN_DEBUG "%s: hostap_rx_frame_mgmt: management frame "
282 "received in non-Host AP mode\n", skb->dev->name);
283 return -1;
284 #endif
285} 240}
286 241
287 242
@@ -527,14 +482,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
527 unsigned int frag; 482 unsigned int frag;
528 u8 *payload; 483 u8 *payload;
529 u16 ethertype; 484 u16 ethertype;
530#ifdef NOT_YET
531 struct net_device *wds = NULL;
532 struct sk_buff *skb2 = NULL;
533 struct net_device *wds = NULL;
534 int frame_authorized = 0;
535 int from_assoc_ap = 0;
536 void *sta = NULL;
537#endif
538// u16 QOS_ctl = 0; 485// u16 QOS_ctl = 0;
539 u8 dst[ETH_ALEN]; 486 u8 dst[ETH_ALEN];
540 u8 src[ETH_ALEN]; 487 u8 src[ETH_ALEN];
@@ -578,22 +525,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
578 525
579 hdrlen = ieee80211_get_hdrlen(fc); 526 hdrlen = ieee80211_get_hdrlen(fc);
580 527
581#ifdef NOT_YET
582 /* Put this code here so that we avoid duplicating it in all
583 * Rx paths. - Jean II */
584#ifdef IW_WIRELESS_SPY /* defined in iw_handler.h */
585 /* If spy monitoring on */
586 if (iface->spy_data.spy_number > 0) {
587 struct iw_quality wstats;
588 wstats.level = rx_stats->signal;
589 wstats.noise = rx_stats->noise;
590 wstats.updated = 6; /* No qual value */
591 /* Update spy records */
592 wireless_spy_update(dev, hdr->addr2, &wstats);
593 }
594#endif /* IW_WIRELESS_SPY */
595 hostap_update_rx_stats(local->ap, hdr, rx_stats);
596#endif
597 528
598 if (ieee->iw_mode == IW_MODE_MONITOR) { 529 if (ieee->iw_mode == IW_MODE_MONITOR) {
599 ieee80211_monitor_rx(ieee, skb, rx_stats); 530 ieee80211_monitor_rx(ieee, skb, rx_stats);
@@ -607,20 +538,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
607 if (skb->len >= hdrlen + 3) 538 if (skb->len >= hdrlen + 3)
608 idx = skb->data[hdrlen + 3] >> 6; 539 idx = skb->data[hdrlen + 3] >> 6;
609 crypt = ieee->crypt[idx]; 540 crypt = ieee->crypt[idx];
610#ifdef NOT_YET
611 sta = NULL;
612
613 /* Use station specific key to override default keys if the
614 * receiver address is a unicast address ("individual RA"). If
615 * bcrx_sta_key parameter is set, station specific key is used
616 * even with broad/multicast targets (this is against IEEE
617 * 802.11, but makes it easier to use different keys with
618 * stations that do not support WEP key mapping). */
619
620 if (!(hdr->addr1[0] & 0x01) || local->bcrx_sta_key)
621 (void) hostap_handle_sta_crypto(local, hdr, &crypt,
622 &sta);
623#endif
624 541
625 /* allow NULL decrypt to indicate an station specific override 542 /* allow NULL decrypt to indicate an station specific override
626 * for default encryption */ 543 * for default encryption */
@@ -682,46 +599,9 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
682 break; 599 break;
683 } 600 }
684 601
685#ifdef NOT_YET
686 if (hostap_rx_frame_wds(ieee, hdr, fc, &wds))
687 goto rx_dropped;
688 if (wds) {
689 skb->dev = dev = wds;
690 stats = hostap_get_stats(dev);
691 }
692
693 if (ieee->iw_mode == IW_MODE_MASTER && !wds &&
694 (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS &&
695 ieee->stadev &&
696 memcmp(hdr->addr2, ieee->assoc_ap_addr, ETH_ALEN) == 0) {
697 /* Frame from BSSID of the AP for which we are a client */
698 skb->dev = dev = ieee->stadev;
699 stats = hostap_get_stats(dev);
700 from_assoc_ap = 1;
701 }
702#endif
703 602
704 dev->last_rx = jiffies; 603 dev->last_rx = jiffies;
705 604
706#ifdef NOT_YET
707 if ((ieee->iw_mode == IW_MODE_MASTER ||
708 ieee->iw_mode == IW_MODE_REPEAT) &&
709 !from_assoc_ap) {
710 switch (hostap_handle_sta_rx(ieee, dev, skb, rx_stats,
711 wds != NULL)) {
712 case AP_RX_CONTINUE_NOT_AUTHORIZED:
713 frame_authorized = 0;
714 break;
715 case AP_RX_CONTINUE:
716 frame_authorized = 1;
717 break;
718 case AP_RX_DROP:
719 goto rx_dropped;
720 case AP_RX_EXIT:
721 goto rx_exit;
722 }
723 }
724#endif
725 605
726 /* Nullfunc frames may have PS-bit set, so they must be passed to 606 /* Nullfunc frames may have PS-bit set, so they must be passed to
727 * hostap_handle_sta_rx() before being dropped here. */ 607 * hostap_handle_sta_rx() before being dropped here. */
@@ -864,31 +744,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
864 payload = skb->data + hdrlen; 744 payload = skb->data + hdrlen;
865 ethertype = (payload[6] << 8) | payload[7]; 745 ethertype = (payload[6] << 8) | payload[7];
866 746
867#ifdef NOT_YET
868 /* If IEEE 802.1X is used, check whether the port is authorized to send
869 * the received frame. */
870 if (ieee->ieee802_1x && ieee->iw_mode == IW_MODE_MASTER) {
871 if (ethertype == ETH_P_PAE) {
872 printk(KERN_DEBUG "%s: RX: IEEE 802.1X frame\n",
873 dev->name);
874 if (ieee->hostapd && ieee->apdev) {
875 /* Send IEEE 802.1X frames to the user
876 * space daemon for processing */
877 prism2_rx_80211(ieee->apdev, skb, rx_stats,
878 PRISM2_RX_MGMT);
879 ieee->apdevstats.rx_packets++;
880 ieee->apdevstats.rx_bytes += skb->len;
881 goto rx_exit;
882 }
883 } else if (!frame_authorized) {
884 printk(KERN_DEBUG "%s: dropped frame from "
885 "unauthorized port (IEEE 802.1X): "
886 "ethertype=0x%04x\n",
887 dev->name, ethertype);
888 goto rx_dropped;
889 }
890 }
891#endif
892 747
893 /* convert hdr + possible LLC headers into Ethernet header */ 748 /* convert hdr + possible LLC headers into Ethernet header */
894 if (skb->len - hdrlen >= 8 && 749 if (skb->len - hdrlen >= 8 &&
@@ -910,51 +765,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
910 memcpy(skb_push(skb, ETH_ALEN), dst, ETH_ALEN); 765 memcpy(skb_push(skb, ETH_ALEN), dst, ETH_ALEN);
911 } 766 }
912 767
913#ifdef NOT_YET
914 if (wds && ((fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) ==
915 IEEE80211_FCTL_TODS) &&
916 skb->len >= ETH_HLEN + ETH_ALEN) {
917 /* Non-standard frame: get addr4 from its bogus location after
918 * the payload */
919 memcpy(skb->data + ETH_ALEN,
920 skb->data + skb->len - ETH_ALEN, ETH_ALEN);
921 skb_trim(skb, skb->len - ETH_ALEN);
922 }
923#endif
924 768
925 stats->rx_packets++; 769 stats->rx_packets++;
926 stats->rx_bytes += skb->len; 770 stats->rx_bytes += skb->len;
927 771
928#ifdef NOT_YET
929 if (ieee->iw_mode == IW_MODE_MASTER && !wds &&
930 ieee->ap->bridge_packets) {
931 if (dst[0] & 0x01) {
932 /* copy multicast frame both to the higher layers and
933 * to the wireless media */
934 ieee->ap->bridged_multicast++;
935 skb2 = skb_clone(skb, GFP_ATOMIC);
936 if (skb2 == NULL)
937 printk(KERN_DEBUG "%s: skb_clone failed for "
938 "multicast frame\n", dev->name);
939 } else if (hostap_is_sta_assoc(ieee->ap, dst)) {
940 /* send frame directly to the associated STA using
941 * wireless media and not passing to higher layers */
942 ieee->ap->bridged_unicast++;
943 skb2 = skb;
944 skb = NULL;
945 }
946 }
947
948 if (skb2 != NULL) {
949 /* send to wireless media */
950 skb2->protocol = __constant_htons(ETH_P_802_3);
951 skb2->mac.raw = skb2->nh.raw = skb2->data;
952 /* skb2->nh.raw = skb2->data + ETH_HLEN; */
953 skb2->dev = dev;
954 dev_queue_xmit(skb2);
955 }
956
957#endif
958 if (skb) { 772 if (skb) {
959 skb->protocol = eth_type_trans(skb, dev); 773 skb->protocol = eth_type_trans(skb, dev);
960 memset(skb->cb, 0, sizeof(skb->cb)); 774 memset(skb->cb, 0, sizeof(skb->cb));
@@ -965,10 +779,6 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
965 } 779 }
966 780
967 rx_exit: 781 rx_exit:
968#ifdef NOT_YET
969 if (sta)
970 hostap_handle_sta_release(sta);
971#endif
972 return 1; 782 return 1;
973 783
974 rx_dropped: 784 rx_dropped: