update madwifi to latest trunk (refcount and hal-0.9.30.13 got merged) and include...
[openwrt.git] / package / madwifi / patches / 112-keycache_PR_962.patch
1 diff -ur madwifi.old/ath/if_ath.c madwifi.dev/ath/if_ath.c
2 --- madwifi.old/ath/if_ath.c 2007-05-21 07:33:42.392925296 +0200
3 +++ madwifi.dev/ath/if_ath.c 2007-05-21 07:35:51.933232176 +0200
4 @@ -5660,7 +5660,8 @@
5 * frame; it'll be dropped where it's not wanted.
6 */
7 if (rs->rs_keyix != HAL_RXKEYIX_INVALID &&
8 - (ni = sc->sc_keyixmap[rs->rs_keyix]) != NULL) {
9 + ((ni = sc->sc_keyixmap[rs->rs_keyix]) != NULL) &&
10 + ieee80211_check_rxnode(ni, (const struct ieee80211_frame_min *) skb->data)) {
11 struct ath_node *an;
12 /*
13 * Fast path: node is present in the key map;
14 diff -ur madwifi.old/net80211/ieee80211_node.c madwifi.dev/net80211/ieee80211_node.c
15 --- madwifi.old/net80211/ieee80211_node.c 2007-05-21 07:33:42.371928488 +0200
16 +++ madwifi.dev/net80211/ieee80211_node.c 2007-05-21 07:34:13.689167544 +0200
17 @@ -1272,8 +1272,6 @@
18 IEEE80211_NODE_TABLE_UNLOCK_IRQ(nt);
19
20 return ni;
21 -#undef IS_PSPOLL
22 -#undef IS_CTL
23 }
24 #ifdef IEEE80211_DEBUG_REFCNT
25 EXPORT_SYMBOL(ieee80211_find_rxnode_debug);
26 @@ -1281,6 +1279,20 @@
27 EXPORT_SYMBOL(ieee80211_find_rxnode);
28 #endif
29
30 +int
31 +ieee80211_check_rxnode(struct ieee80211_node *ni,
32 + const struct ieee80211_frame_min *wh)
33 +{
34 + if (IS_CTL(wh) && !IS_PSPOLL(wh) /*&& !IS_RTS(ah)*/)
35 + return IEEE80211_ADDR_EQ(ni->ni_macaddr, wh->i_addr1);
36 + else
37 + return IEEE80211_ADDR_EQ(ni->ni_macaddr, wh->i_addr2);
38 +}
39 +
40 +EXPORT_SYMBOL(ieee80211_check_rxnode);
41 +#undef IS_PSPOLL
42 +#undef IS_CTL
43 +
44 /*
45 * Return a reference to the appropriate node for sending
46 * a data frame. This handles node discovery in adhoc networks.
47 diff -ur madwifi.old/net80211/ieee80211_node.h madwifi.dev/net80211/ieee80211_node.h
48 --- madwifi.old/net80211/ieee80211_node.h 2007-05-21 07:33:42.372928336 +0200
49 +++ madwifi.dev/net80211/ieee80211_node.h 2007-05-21 07:34:13.689167544 +0200
50 @@ -317,6 +317,8 @@
51 *pni = NULL; /* guard against use */
52 }
53
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 *);
This page took 0.059371 seconds and 5 git commands to generate.