implement conditional dependencies for generating the Depends: field of ipkgs
[openwrt.git] / package / madwifi / patches / 380-noderef_fix.patch
1 --- a/net80211/ieee80211_node.c
2 +++ b/net80211/ieee80211_node.c
3 @@ -316,7 +316,7 @@
4          */
5         ni = ieee80211_find_node(&ic->ic_sta, vap->iv_myaddr);
6         if (ni == NULL) {
7 -               ni = ieee80211_alloc_node_table(vap, vap->iv_myaddr);
8 +               ni = ieee80211_alloc_node(vap, vap->iv_myaddr);
9                 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
10                                   "%s: ni:%p allocated for " MAC_FMT "\n",
11                                   __func__, ni, MAC_ADDR(vap->iv_myaddr));
12 @@ -421,14 +421,14 @@
13         /* XXX multi-bss wrong */
14         ieee80211_reset_erp(ic, ic->ic_curmode);
15  
16 -       ni = ieee80211_alloc_node_table(vap, vap->iv_myaddr);
17 +       ni = ieee80211_alloc_node(vap, vap->iv_myaddr);
18         IEEE80211_DPRINTF(vap, IEEE80211_MSG_ASSOC,
19                           "%s: ni:%p allocated for " MAC_FMT "\n",
20                           __func__, ni, MAC_ADDR(vap->iv_myaddr));
21         KASSERT(ni != NULL, ("unable to setup inital BSS node"));
22  
23         vap->iv_bss = PASS_NODE(ni);
24 -       KASSERT((atomic_read(&vap->iv_bss->ni_refcnt) == 2), 
25 +       KASSERT((atomic_read(&vap->iv_bss->ni_refcnt) == 1),
26                 ("wrong refcount for new node."));
27  
28         if (obss != NULL) {
29