driver_madwifi: Fix build with old driver versions
authorJouni Malinen <j@w1.fi>
Sun, 22 Mar 2009 13:53:46 +0000 (15:53 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 22 Mar 2009 13:54:26 +0000 (15:54 +0200)
Do not reference ie.rsn_ie in wpa_hexdump outside #ifdef MADWIFI_NG.
[Bug 302]

hostapd/driver_madwifi.c

index a532ee2..a40f731 100644 (file)
@@ -853,14 +853,14 @@ madwifi_new_sta(struct madwifi_driver_data *drv, u8 addr[IEEE80211_ADDR_LEN])
        }
        wpa_hexdump(MSG_MSGDUMP, "madwifi req WPA IE",
                    ie.wpa_ie, IEEE80211_MAX_OPT_IE);
        }
        wpa_hexdump(MSG_MSGDUMP, "madwifi req WPA IE",
                    ie.wpa_ie, IEEE80211_MAX_OPT_IE);
-       wpa_hexdump(MSG_MSGDUMP, "madwifi req RSN IE",
-                   ie.rsn_ie, IEEE80211_MAX_OPT_IE);
        iebuf = ie.wpa_ie;
        /* madwifi seems to return some random data if WPA/RSN IE is not set.
         * Assume the IE was not included if the IE type is unknown. */
        if (iebuf[0] != WLAN_EID_VENDOR_SPECIFIC)
                iebuf[1] = 0;
 #ifdef MADWIFI_NG
        iebuf = ie.wpa_ie;
        /* madwifi seems to return some random data if WPA/RSN IE is not set.
         * Assume the IE was not included if the IE type is unknown. */
        if (iebuf[0] != WLAN_EID_VENDOR_SPECIFIC)
                iebuf[1] = 0;
 #ifdef MADWIFI_NG
+       wpa_hexdump(MSG_MSGDUMP, "madwifi req RSN IE",
+                   ie.rsn_ie, IEEE80211_MAX_OPT_IE);
        if (iebuf[1] == 0 && ie.rsn_ie[1] > 0) {
                /* madwifi-ng svn #1453 added rsn_ie. Use it, if wpa_ie was not
                 * set. This is needed for WPA2. */
        if (iebuf[1] == 0 && ie.rsn_ie[1] > 0) {
                /* madwifi-ng svn #1453 added rsn_ie. Use it, if wpa_ie was not
                 * set. This is needed for WPA2. */