wpa_supplicant AP: Add preliminary support for WPS Internal Registrar
[wpasupplicant] / src / drivers / driver_broadcom.c
index 9a465ca..1044cd7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * WPA Supplicant - driver interaction with Broadcom wl.o driver
+ * WPA Supplicant - driver interaction with old Broadcom wl.o driver
  * Copyright (c) 2004, Nikki Chumkov <nikki@gattaca.ru>
  * Copyright (c) 2004, Jouni Malinen <j@w1.fi>
  *
  * license.
  *
  * See README and COPYING for more details.
+ *
+ * Please note that the newer Broadcom driver ("hybrid Linux driver") supports
+ * Linux wireless extensions and does not need (or even work) with this old
+ * driver wrapper. Use driver_wext.c with that driver.
  */
 
 #include "includes.h"
@@ -375,12 +379,12 @@ static int wpa_driver_broadcom_set_drop_unencrypted(void *priv, int enabled)
 {
        struct wpa_driver_broadcom_data *drv = priv;
        /* SET_EAP_RESTRICT, SET_WEP_RESTRICT */
-       int restrict = (enabled ? 1 : 0);
+       int _restrict = (enabled ? 1 : 0);
        
        if (broadcom_ioctl(drv, WLC_SET_WEP_RESTRICT, 
-                          &restrict, sizeof(restrict)) < 0 ||
+                          &_restrict, sizeof(_restrict)) < 0 ||
            broadcom_ioctl(drv, WLC_SET_EAP_RESTRICT,
-                          &restrict, sizeof(restrict)) < 0)
+                          &_restrict, sizeof(_restrict)) < 0)
                return -1;
 
        return 0;
@@ -488,8 +492,9 @@ wpa_driver_broadcom_get_scan_results(void *priv,
                wbi = (wl_bss_info_t *) ((u8 *) wbi + wbi->length);
        }
 
-       wpa_printf(MSG_MSGDUMP, "Received %d bytes of scan results (%d BSSes)",
-                  wsr->buflen, ap_num);
+       wpa_printf(MSG_MSGDUMP, "Received %d bytes of scan results (%lu "
+                  "BSSes)",
+                  wsr->buflen, (unsigned long) ap_num);
        
        os_free(buf);
        return ap_num;
@@ -511,7 +516,7 @@ static int wpa_driver_broadcom_disassociate(void *priv, const u8 *addr,
                                            int reason_code)
 {
        struct wpa_driver_broadcom_data *drv = priv;
-       return broadcom_ioctl(drv, WLC_DISASSOC, 0, 0);
+       return broadcom_ioctl(drv, WLC_DISASSOC, NULL, 0);
 }
 
 static int