@@ -823,96 +823,6 @@ int libipw_rx(struct libipw_device *ieee, struct sk_buff *skb,
823823 return 0 ;
824824}
825825
826- /* Filter out unrelated packets, call libipw_rx[_mgt]
827- * This function takes over the skb, it should not be used again after calling
828- * this function. */
829- void libipw_rx_any (struct libipw_device * ieee ,
830- struct sk_buff * skb , struct libipw_rx_stats * stats )
831- {
832- struct libipw_hdr_4addr * hdr ;
833- int is_packet_for_us ;
834- u16 fc ;
835-
836- if (ieee -> iw_mode == IW_MODE_MONITOR ) {
837- if (!libipw_rx (ieee , skb , stats ))
838- dev_kfree_skb_irq (skb );
839- return ;
840- }
841-
842- if (skb -> len < sizeof (struct ieee80211_hdr ))
843- goto drop_free ;
844-
845- hdr = (struct libipw_hdr_4addr * )skb -> data ;
846- fc = le16_to_cpu (hdr -> frame_ctl );
847-
848- if ((fc & IEEE80211_FCTL_VERS ) != 0 )
849- goto drop_free ;
850-
851- switch (fc & IEEE80211_FCTL_FTYPE ) {
852- case IEEE80211_FTYPE_MGMT :
853- if (skb -> len < sizeof (struct libipw_hdr_3addr ))
854- goto drop_free ;
855- libipw_rx_mgt (ieee , hdr , stats );
856- dev_kfree_skb_irq (skb );
857- return ;
858- case IEEE80211_FTYPE_DATA :
859- break ;
860- case IEEE80211_FTYPE_CTL :
861- return ;
862- default :
863- return ;
864- }
865-
866- is_packet_for_us = 0 ;
867- switch (ieee -> iw_mode ) {
868- case IW_MODE_ADHOC :
869- /* our BSS and not from/to DS */
870- if (ether_addr_equal (hdr -> addr3 , ieee -> bssid ) &&
871- ((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS )) == 0 )) {
872- /* promisc: get all */
873- if (ieee -> dev -> flags & IFF_PROMISC )
874- is_packet_for_us = 1 ;
875- /* to us */
876- else if (ether_addr_equal (hdr -> addr1 , ieee -> dev -> dev_addr ))
877- is_packet_for_us = 1 ;
878- /* mcast */
879- else if (is_multicast_ether_addr (hdr -> addr1 ))
880- is_packet_for_us = 1 ;
881- }
882- break ;
883- case IW_MODE_INFRA :
884- /* our BSS (== from our AP) and from DS */
885- if (ether_addr_equal (hdr -> addr2 , ieee -> bssid ) &&
886- ((fc & (IEEE80211_FCTL_TODS + IEEE80211_FCTL_FROMDS )) == IEEE80211_FCTL_FROMDS )) {
887- /* promisc: get all */
888- if (ieee -> dev -> flags & IFF_PROMISC )
889- is_packet_for_us = 1 ;
890- /* to us */
891- else if (ether_addr_equal (hdr -> addr1 , ieee -> dev -> dev_addr ))
892- is_packet_for_us = 1 ;
893- /* mcast */
894- else if (is_multicast_ether_addr (hdr -> addr1 )) {
895- /* not our own packet bcasted from AP */
896- if (!ether_addr_equal (hdr -> addr3 , ieee -> dev -> dev_addr ))
897- is_packet_for_us = 1 ;
898- }
899- }
900- break ;
901- default :
902- /* ? */
903- break ;
904- }
905-
906- if (is_packet_for_us )
907- if (!libipw_rx (ieee , skb , stats ))
908- dev_kfree_skb_irq (skb );
909- return ;
910-
911- drop_free :
912- dev_kfree_skb_irq (skb );
913- ieee -> dev -> stats .rx_dropped ++ ;
914- }
915-
916826#define MGMT_FRAME_FIXED_PART_LENGTH 0x24
917827
918828static u8 qos_oui [QOS_OUI_LEN ] = { 0x00 , 0x50 , 0xF2 };
@@ -1729,6 +1639,5 @@ void libipw_rx_mgt(struct libipw_device *ieee,
17291639 }
17301640}
17311641
1732- EXPORT_SYMBOL_GPL (libipw_rx_any );
17331642EXPORT_SYMBOL (libipw_rx_mgt );
17341643EXPORT_SYMBOL (libipw_rx );
0 commit comments