Changeset 3595
- Timestamp:
- 05/03/08 05:49:05 (8 months ago)
- Files:
-
- madwifi/trunk/ath/if_ath.c (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_input.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
madwifi/trunk/ath/if_ath.c
r3594 r3595 6850 6850 } else { 6851 6851 struct ieee80211vap *vap; 6852 struct sk_buff *tskb; 6852 6853 /* Create a new SKB copy for each VAP except the last 6853 6854 * one, which gets the original SKB. */ 6854 6855 TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { 6856 if (vap == TAILQ_LAST(&ic->ic_vaps, 6857 ieee80211vap_headtype)) 6858 tskb = skb; 6859 else 6860 tskb = skb_copy(skb, GFP_ATOMIC); 6861 6862 if (!tskb) 6863 /* XXX: Brilliant OOM handling. */ 6864 vap->iv_devstats.tx_dropped++; 6865 else 6855 6866 type = ieee80211_input(vap, NULL, skb, 6856 6867 rs->rs_rssi, bf->bf_tsf); madwifi/trunk/net80211/ieee80211_input.c
r3594 r3595 196 196 int 197 197 ieee80211_input(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null, 198 struct sk_buff * original_skb, int rssi, u_int64_t rtsf)198 struct sk_buff *skb, int rssi, u_int64_t rtsf) 199 199 { 200 200 #define HAS_SEQ(type) ((type & 0x4) == 0) … … 205 205 struct ieee80211_key *key; 206 206 struct ether_header *eh; 207 struct sk_buff *skb = NULL;208 207 #ifdef ATH_SUPERG_FF 209 208 struct llc *llc; … … 221 220 ni = ieee80211_ref_node(vap->iv_bss); 222 221 } 223 KASSERT( original_skb != NULL, ("null skb"));222 KASSERT(skb != NULL, ("null skb")); 224 223 KASSERT(ni != NULL, ("null node")); 225 224 ni->ni_inact = ni->ni_inact_reload; … … 231 230 if (vap->iv_opmode == IEEE80211_M_MONITOR) 232 231 goto out; 233 if ( original_skb->len < sizeof(struct ieee80211_frame_min)) {232 if (skb->len < sizeof(struct ieee80211_frame_min)) { 234 233 IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_ANY, 235 234 ni->ni_macaddr, NULL, 236 "too short (1): len %u", original_skb->len);235 "too short (1): len %u", skb->len); 237 236 vap->iv_stats.is_rx_tooshort++; 238 237 goto out; 239 238 } 240 /* Copy the SKB... we assume somewhere in this driver that we 'own'241 * the skbuff passed into hard start and we do a lot of messing with it242 * but bridges under some cases will not clone for the first pass of skb243 * to a bridge port, but will then clone for subsequent ones. This is244 * odd behavior but it means that if we have trashed the skb we are given245 * then other ports get clones of the residual garbage. */246 if ((skb = skb_copy(original_skb, GFP_ATOMIC)) == NULL) {247 vap->iv_devstats.tx_dropped++;248 original_skb = NULL; /* protect caller's skb */249 goto out;250 }251 ieee80211_skb_copy_noderef(original_skb, skb);252 original_skb = NULL; /* protect caller's skb */253 239 254 240 /* Bit of a cheat here, we use a pointer for a 3-address … … 854 840 vap->iv_devstats.rx_errors++; 855 841 out: 856 if (skb != NULL) 857 ieee80211_dev_kfree_skb(&skb); /* This is a copy! */ 842 ieee80211_dev_kfree_skb(&skb); 858 843 if (ni_or_null == NULL) 859 844 ieee80211_unref_node(&ni);
