1 Index: madwifi-ng-r2420-20070602/ath/if_ath.c
2 ===================================================================
3 --- madwifi-ng-r2420-20070602.orig/ath/if_ath.c 2007-07-02 23:49:33.450710750 +0200
4 +++ madwifi-ng-r2420-20070602/ath/if_ath.c 2007-07-02 23:50:43.107064000 +0200
5 @@ -8197,16 +8197,15 @@
6 wds_ni->ni_rates = vap->iv_bss->ni_rates;
7 /* Depending on the sequence of bringing up devices
8 * it's possible the rates of the root bss isn't
11 - if (vap->iv_ic->ic_newassoc != NULL &&
12 - wds_ni->ni_rates.rs_nrates != 0) {
14 + if ((vap->iv_ic->ic_newassoc != NULL) &&
15 + (wds_ni->ni_rates.rs_nrates != 0)) {
16 /* Fill in the rates based on our own rates
17 * we rely on the rate selection mechanism
18 - * to find out which rates actually work!
20 + * to find out which rates actually work! */
21 vap->iv_ic->ic_newassoc(wds_ni, 1);
23 + ieee80211_unref_node(&wds_ni);
27 Index: madwifi-ng-r2420-20070602/net80211/ieee80211_output.c
28 ===================================================================
29 --- madwifi-ng-r2420-20070602.orig/net80211/ieee80211_output.c 2007-07-02 23:49:31.574593500 +0200
30 +++ madwifi-ng-r2420-20070602/net80211/ieee80211_output.c 2007-07-02 23:50:37.462711250 +0200
32 * We'll get the frame back when the time is right.
34 ieee80211_pwrsave(ni, skb);
35 + ieee80211_unref_node(&ni);
40 vap->iv_xrvap->iv_sta_assoc) {
42 ni = ieee80211_find_txnode(vap->iv_xrvap, eh->ether_dhost);
43 - skb1 = skb_clone(skb,GFP_ATOMIC);
44 + skb1 = skb_clone(skb, GFP_ATOMIC);
46 cb = (struct ieee80211_cb *) skb1->cb;
48 Index: madwifi-ng-r2420-20070602/net80211/ieee80211_wireless.c
49 ===================================================================
50 --- madwifi-ng-r2420-20070602.orig/net80211/ieee80211_wireless.c 2007-07-02 23:49:31.566593000 +0200
51 +++ madwifi-ng-r2420-20070602/net80211/ieee80211_wireless.c 2007-07-02 23:49:34.126753000 +0200
53 /* locate a node, read its rssi, check if updated, convert to dBm */
54 for (i = 0; i < number; i++) {
55 ni = ieee80211_find_node(nt, &vap->iv_spy.mac[i * IEEE80211_ADDR_LEN]);
56 - /* TODO: free node ? */
57 /* check we are associated w/ this vap */
58 if (ni && (ni->ni_vap == vap)) {
59 set_quality(&spy_stat[i], ni->ni_rssi, ic->ic_channoise);
62 spy_stat[i].updated = IW_QUAL_ALL_INVALID;
64 + ieee80211_unref_node(&ni);
67 /* copy results to userspace */
69 /* NB: this also checks ik->ik_keylen > sizeof(wk->wk_key) */
70 if (ik->ik_keylen > sizeof(ik->ik_keydata))
74 if (kix == IEEE80211_KEYIX_NONE) {
75 /* XXX unicast keys currently must be tx/rx */
77 if ((ik->ik_flags & IEEE80211_KEY_XMIT) == 0) /* XXX */
78 ik->ik_flags |= IEEE80211_KEY_GROUP; /* XXX */
82 flags = ik->ik_flags & IEEE80211_KEY_COMMON;
83 ieee80211_key_update_begin(vap);
84 @@ -3190,12 +3192,13 @@
85 memset(wk->wk_key, 0, sizeof(wk->wk_key));
86 memcpy(wk->wk_key, ik->ik_keydata, ik->ik_keylen);
87 if (!ieee80211_crypto_setkey(vap, wk,
88 - ni != NULL ? ni->ni_macaddr : ik->ik_macaddr, ni))
89 + (ni != NULL) ? ni->ni_macaddr : ik->ik_macaddr, ni))
91 else if ((ik->ik_flags & IEEE80211_KEY_DEFAULT))
92 vap->iv_def_txkey = kix;
96 ieee80211_key_update_end(vap);
98 ieee80211_unref_node(&ni);