Changeset 3621
- Timestamp:
- 05/10/08 08:03:52 (8 months ago)
- Files:
-
- madwifi/trunk/ath/if_ath.c (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_input.c (modified) (4 diffs)
- madwifi/trunk/net80211/ieee80211_proto.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
madwifi/trunk/ath/if_ath.c
r3620 r3621 6796 6796 ieee80211_unref_node(&ni); 6797 6797 } else { 6798 struct ieee80211vap *vap; 6799 struct sk_buff *tskb; 6800 /* Create a new SKB copy for each VAP except the last 6801 * one, which gets the original SKB. */ 6802 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { 6803 if (vap == TAILQ_LAST(&ic->ic_vaps, 6804 ieee80211vap_headtype)) 6805 tskb = skb; 6806 else 6807 tskb = skb_copy(skb, GFP_ATOMIC); 6808 6809 if (!tskb) 6810 /* XXX: Brilliant OOM handling. */ 6811 vap->iv_devstats.tx_dropped++; 6812 else 6813 type = ieee80211_input(vap, NULL, skb, 6814 rs->rs_rssi, bf->bf_tsf); 6815 } 6816 } 6798 type = ieee80211_input_all(ic, skb, 6799 rs->rs_rssi, bf->bf_tsf); 6800 } 6801 skb = NULL; 6817 6802 6818 6803 if (sc->sc_diversity) { madwifi/trunk/net80211/ieee80211_input.c
r3595 r3621 195 195 */ 196 196 int 197 ieee80211_input(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null,197 ieee80211_input(struct ieee80211vap *vap, struct ieee80211_node *ni_or_null, 198 198 struct sk_buff *skb, int rssi, u_int64_t rtsf) 199 199 { … … 209 209 #endif 210 210 int hdrspace; 211 u_int8_t dir, type , subtype;211 u_int8_t dir, type = -1, subtype; 212 212 u_int8_t *bssid; 213 213 u_int16_t rxseq; 214 215 if ((vap->iv_dev->flags & (IFF_RUNNING | IFF_UP)) != 216 (IFF_RUNNING | IFF_UP)) 217 goto out; 214 218 215 219 /* Initialize ni as in the previous API. */ … … 223 227 KASSERT(ni != NULL, ("null node")); 224 228 ni->ni_inact = ni->ni_inact_reload; 225 type = -1; /* undefined */226 229 227 230 /* In monitor mode, send everything directly to bpf. … … 846 849 #undef HAS_SEQ 847 850 } 851 848 852 EXPORT_SYMBOL(ieee80211_input); 849 853 /* 854 * Context: softIRQ (tasklet) 855 */ 856 int 857 ieee80211_input_all(struct ieee80211com *ic, 858 struct sk_buff *skb, int rssi, u_int64_t rtsf) 859 { 860 struct ieee80211vap *vap, *next_vap; 861 struct sk_buff *tskb = NULL; 862 int type = -1; /* Used to determine when to blinks LEDs. */ 863 864 /* Create a new SKB copy for each VAP except the last 865 * one, which gets the original SKB. */ 866 vap = TAILQ_FIRST(&ic->ic_vaps); 867 while (vap) { 868 for (next_vap = TAILQ_NEXT(vap, iv_next); next_vap; 869 next_vap = TAILQ_NEXT(next_vap, iv_next)) { 870 if ((next_vap->iv_dev->flags & (IFF_RUNNING | IFF_UP)) 871 == (IFF_RUNNING | IFF_UP)) 872 break; 873 } 874 875 if (!next_vap) { 876 tskb = skb; 877 skb = NULL; 878 } else 879 tskb = skb_copy(skb, GFP_ATOMIC); 880 881 if (!tskb) 882 /* XXX: Brilliant OOM handling. */ 883 vap->iv_devstats.tx_dropped++; 884 else 885 type = ieee80211_input(vap, NULL, tskb, rssi, rtsf); 886 887 vap = next_vap; 888 }; 889 890 ieee80211_dev_kfree_skb(&skb); 891 return type; 892 } 893 EXPORT_SYMBOL(ieee80211_input_all); 850 894 851 895 /* madwifi/trunk/net80211/ieee80211_proto.h
r3501 r3621 66 66 struct ieee80211_channel *ieee80211_doth_findchan(struct ieee80211vap *, u_int8_t); 67 67 int ieee80211_input(struct ieee80211vap *, struct ieee80211_node *, struct sk_buff *, int, u_int64_t); 68 int ieee80211_input_all(struct ieee80211com *, struct sk_buff *, int, u_int64_t); 68 69 int ieee80211_setup_rates(struct ieee80211_node *, const u_int8_t *, 69 70 const u_int8_t *, int);
