1 diff -urN madwifi-ng-refcount-r2313-20070505.old/ath/if_ath.c madwifi-ng-refcount-r2313-20070505.dev/ath/if_ath.c
2 --- madwifi-ng-refcount-r2313-20070505.old/ath/if_ath.c 2007-05-13 18:17:55.691102704 +0200
3 +++ madwifi-ng-refcount-r2313-20070505.dev/ath/if_ath.c 2007-05-13 18:17:55.783088720 +0200
5 * frame; it'll be dropped where it's not wanted.
7 if (ds->ds_rxstat.rs_keyix != HAL_RXKEYIX_INVALID &&
8 - (ni = sc->sc_keyixmap[ds->ds_rxstat.rs_keyix]) != NULL) {
9 + (ni = sc->sc_keyixmap[ds->ds_rxstat.rs_keyix]) != NULL &&
10 + ieee80211_check_rxnode(ni, (const struct ieee80211_frame_min *) skb->data)) {
13 * Fast path: node is present in the key map;
14 diff -urN madwifi-ng-refcount-r2313-20070505.old/net80211/ieee80211_node.c madwifi-ng-refcount-r2313-20070505.dev/net80211/ieee80211_node.c
15 --- madwifi-ng-refcount-r2313-20070505.old/net80211/ieee80211_node.c 2007-05-13 18:17:55.773090240 +0200
16 +++ madwifi-ng-refcount-r2313-20070505.dev/net80211/ieee80211_node.c 2007-05-13 18:17:55.784088568 +0200
18 IEEE80211_NODE_TABLE_UNLOCK_IRQ(nt);
24 #ifdef IEEE80211_DEBUG_REFCNT
25 EXPORT_SYMBOL(ieee80211_find_rxnode_debug);
26 @@ -1277,6 +1275,20 @@
27 EXPORT_SYMBOL(ieee80211_find_rxnode);
31 +ieee80211_check_rxnode(struct ieee80211_node *ni,
32 + const struct ieee80211_frame_min *wh)
34 + if (IS_CTL(wh) && !IS_PSPOLL(wh) /*&& !IS_RTS(ah)*/)
35 + return IEEE80211_ADDR_EQ(ni->ni_macaddr, wh->i_addr1);
37 + return IEEE80211_ADDR_EQ(ni->ni_macaddr, wh->i_addr2);
40 +EXPORT_SYMBOL(ieee80211_check_rxnode);
45 * Return a reference to the appropriate node for sending
46 * a data frame. This handles node discovery in adhoc networks.
47 diff -urN madwifi-ng-refcount-r2313-20070505.old/net80211/ieee80211_node.h madwifi-ng-refcount-r2313-20070505.dev/net80211/ieee80211_node.h
48 --- madwifi-ng-refcount-r2313-20070505.old/net80211/ieee80211_node.h 2007-04-04 04:39:58.000000000 +0200
49 +++ madwifi-ng-refcount-r2313-20070505.dev/net80211/ieee80211_node.h 2007-05-13 18:17:55.784088568 +0200
51 *pni = NULL; /* guard against use */
54 +int ieee80211_check_rxnode(struct ieee80211_node *ni,
55 + const struct ieee80211_frame_min *wh);
56 int ieee80211_add_wds_addr(struct ieee80211_node_table *, struct ieee80211_node *,
57 const u_int8_t *, u_int8_t);
58 void ieee80211_remove_wds_addr(struct ieee80211_node_table *, const u_int8_t *);