#define WLC_GET_SSID 25
#define WLC_GET_CHANNEL 29
#define WLC_GET_PASSIVE 48
+#define WLC_GET_REVINFO 98
#define WLC_GET_AP 117
#define WLC_GET_RSSI 127
#define WLC_GET_WSEC 133
uint32_t needed; /* bytes needed (optional) */
} wl_ioctl_t;
+/* Revision info */
+typedef struct wlc_rev_info {
+ uint vendorid; /* PCI vendor id */
+ uint deviceid; /* device id of chip */
+ uint radiorev; /* radio revision */
+ uint chiprev; /* chip revision */
+ uint corerev; /* core revision */
+ uint boardid; /* board identifier (usu. PCI sub-device id) */
+ uint boardvendor; /* board vendor (usu. PCI sub-vendor id) */
+ uint boardrev; /* board revision */
+ uint driverrev; /* driver version */
+ uint ucoderev; /* microcode version */
+ uint bus; /* bus type */
+ uint chipnum; /* chip number */
+} wlc_rev_info_t;
+
#endif
LUA_WRAP_INT(wl,noise)
LUA_WRAP_INT(wl,quality)
LUA_WRAP_INT(wl,quality_max)
+LUA_WRAP_INT(wl,mbssid_support)
LUA_WRAP_STRING(wl,mode)
LUA_WRAP_STRING(wl,ssid)
LUA_WRAP_STRING(wl,bssid)
LUA_WRAP_INT(madwifi,noise)
LUA_WRAP_INT(madwifi,quality)
LUA_WRAP_INT(madwifi,quality_max)
+LUA_WRAP_INT(madwifi,mbssid_support)
LUA_WRAP_STRING(madwifi,mode)
LUA_WRAP_STRING(madwifi,ssid)
LUA_WRAP_STRING(madwifi,bssid)
LUA_WRAP_INT(wext,noise)
LUA_WRAP_INT(wext,quality)
LUA_WRAP_INT(wext,quality_max)
+LUA_WRAP_INT(wext,mbssid_support)
LUA_WRAP_STRING(wext,mode)
LUA_WRAP_STRING(wext,ssid)
LUA_WRAP_STRING(wext,bssid)
LUA_REG(wl,bssid),
LUA_REG(wl,enctype),
LUA_REG(wl,assoclist),
+ LUA_REG(wl,mbssid_support),
{ NULL, NULL }
};
LUA_REG(madwifi,bssid),
LUA_REG(madwifi,enctype),
LUA_REG(madwifi,assoclist),
+ LUA_REG(madwifi,mbssid_support),
{ NULL, NULL }
};
LUA_REG(wext,bssid),
LUA_REG(wext,enctype),
LUA_REG(wext,assoclist),
+ LUA_REG(wext,mbssid_support),
{ NULL, NULL }
};
return -1;
}
+int madwifi_get_mbssid_support(const char *ifname, int *buf)
+{
+ /* We assume that multi bssid is always possible */
+ *buf = 1;
+ return 0;
+}
int madwifi_get_quality_max(const char *ifname, int *buf);
int madwifi_get_enctype(const char *ifname, char *buf);
int madwifi_get_assoclist(const char *ifname, char *buf, int *len);
+int madwifi_get_mbssid_support(const char *ifname, int *buf);
#endif
return -1;
}
+int wext_get_mbssid_support(const char *ifname, int *buf)
+{
+ /* No multi bssid support atm */
+ return -1;
+}
+
int wext_get_quality_max(const char *ifname, int *buf);
int wext_get_enctype(const char *ifname, char *buf);
int wext_get_assoclist(const char *ifname, char *buf, int *len);
+int wext_get_mbssid_support(const char *ifname, int *buf);
#endif
return -1;
}
+int wl_get_mbssid_support(const char *ifname, int *buf)
+{
+ wlc_rev_info_t revinfo;
+
+ /* Multi bssid support only works on corerev >= 9 */
+ if( !wl_ioctl(ifname, WLC_GET_REVINFO, &revinfo, sizeof(revinfo)) )
+ {
+ if( revinfo.corerev >= 9 )
+ {
+ *buf = 1;
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
int wl_get_quality_max(const char *ifname, int *buf);
int wl_get_enctype(const char *ifname, char *buf);
int wl_get_assoclist(const char *ifname, char *buf, int *len);
+int wl_get_mbssid_support(const char *ifname, int *buf);
#endif