Fix dereferencing NULL in debug messages
[madwifi/.git] / net80211 / ieee80211_node.c
index 1bed7ed863cf479f37414056cc7567fdbe87fa22..6a20940fba9113875ee0c9de871683a7b74afa5c 100644 (file)
@@ -38,7 +38,7 @@
 /*
  * IEEE 802.11 node handling support.
  */
-#ifndef AUTOCONF_INCLUDED
+#if !defined(AUTOCONF_INCLUDED) && !defined(CONFIG_LOCALVERSION)
 #include <linux/config.h>
 #endif
 #include <linux/version.h>
@@ -702,7 +702,7 @@ ieee80211_sta_join(struct ieee80211vap *vap,
                if (ni == NULL) {
                        IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE,
                        "%s: Unable to allocate node for BSS: " MAC_FMT "\n", __func__,
-                       MAC_ADDR(ni->ni_macaddr));
+                       MAC_ADDR(se->se_macaddr));
                        return 0;
                }
        }