summaryrefslogtreecommitdiffstats
path: root/package/iwinfo/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'package/iwinfo/src/include')
-rw-r--r--package/iwinfo/src/include/iwinfo.h21
-rw-r--r--package/iwinfo/src/include/iwinfo/lua.h3
-rw-r--r--package/iwinfo/src/include/iwinfo/madwifi.h4
-rw-r--r--package/iwinfo/src/include/iwinfo/nl80211.h4
-rw-r--r--package/iwinfo/src/include/iwinfo/utils.h2
-rw-r--r--package/iwinfo/src/include/iwinfo/wext.h4
-rw-r--r--package/iwinfo/src/include/iwinfo/wl.h4
7 files changed, 40 insertions, 2 deletions
diff --git a/package/iwinfo/src/include/iwinfo.h b/package/iwinfo/src/include/iwinfo.h
index 824b94536..86bf8b1b6 100644
--- a/package/iwinfo/src/include/iwinfo.h
+++ b/package/iwinfo/src/include/iwinfo.h
@@ -95,7 +95,26 @@ struct iwinfo_iso3166_label {
uint8_t name[28];
};
+struct iwinfo_hardware_id {
+ uint16_t vendor_id;
+ uint16_t device_id;
+ uint16_t subsystem_vendor_id;
+ uint16_t subsystem_device_id;
+};
+
+struct iwinfo_hardware_entry {
+ const char *vendor_name;
+ const char *device_name;
+ uint16_t vendor_id;
+ uint16_t device_id;
+ uint16_t subsystem_vendor_id;
+ uint16_t subsystem_device_id;
+ int16_t txpower_offset;
+ int16_t frequency_offset;
+};
+
extern const struct iwinfo_iso3166_label IWINFO_ISO3166_NAMES[];
+extern const struct iwinfo_hardware_entry IWINFO_HARDWARE_ENTRIES[];
struct iwinfo_ops {
@@ -113,6 +132,8 @@ struct iwinfo_ops {
int (*ssid)(const char *, char *);
int (*bssid)(const char *, char *);
int (*country)(const char *, char *);
+ int (*hardware_id)(const char *, char *);
+ int (*hardware_name)(const char *, char *);
int (*encryption)(const char *, char *);
int (*assoclist)(const char *, char *, int *);
int (*txpwrlist)(const char *, char *, int *);
diff --git a/package/iwinfo/src/include/iwinfo/lua.h b/package/iwinfo/src/include/iwinfo/lua.h
index 65a3a5cb9..d976c0cf4 100644
--- a/package/iwinfo/src/include/iwinfo/lua.h
+++ b/package/iwinfo/src/include/iwinfo/lua.h
@@ -71,11 +71,10 @@
return 1; \
}
-#define LUA_WRAP_LIST(type,op) \
+#define LUA_WRAP_STRUCT(type,op) \
static int iwinfo_L_##type##_##op(lua_State *L) \
{ \
return iwinfo_L_##op(L, type##_get_##op); \
}
#endif
-
diff --git a/package/iwinfo/src/include/iwinfo/madwifi.h b/package/iwinfo/src/include/iwinfo/madwifi.h
index 4de48557d..ecbe749c8 100644
--- a/package/iwinfo/src/include/iwinfo/madwifi.h
+++ b/package/iwinfo/src/include/iwinfo/madwifi.h
@@ -46,6 +46,8 @@ int madwifi_get_freqlist(const char *ifname, char *buf, int *len);
int madwifi_get_countrylist(const char *ifname, char *buf, int *len);
int madwifi_get_hwmodelist(const char *ifname, int *buf);
int madwifi_get_mbssid_support(const char *ifname, int *buf);
+int madwifi_get_hardware_id(const char *ifname, char *buf);
+int madwifi_get_hardware_name(const char *ifname, char *buf);
void madwifi_close(void);
static const struct iwinfo_ops madwifi_ops = {
@@ -63,6 +65,8 @@ static const struct iwinfo_ops madwifi_ops = {
.ssid = madwifi_get_ssid,
.bssid = madwifi_get_bssid,
.country = madwifi_get_country,
+ .hardware_id = madwifi_get_hardware_id,
+ .hardware_name = madwifi_get_hardware_name,
.encryption = madwifi_get_encryption,
.assoclist = madwifi_get_assoclist,
.txpwrlist = madwifi_get_txpwrlist,
diff --git a/package/iwinfo/src/include/iwinfo/nl80211.h b/package/iwinfo/src/include/iwinfo/nl80211.h
index dce508cf0..3df25d34b 100644
--- a/package/iwinfo/src/include/iwinfo/nl80211.h
+++ b/package/iwinfo/src/include/iwinfo/nl80211.h
@@ -77,6 +77,8 @@ int nl80211_get_freqlist(const char *ifname, char *buf, int *len);
int nl80211_get_countrylist(const char *ifname, char *buf, int *len);
int nl80211_get_hwmodelist(const char *ifname, int *buf);
int nl80211_get_mbssid_support(const char *ifname, int *buf);
+int nl80211_get_hardware_id(const char *ifname, char *buf);
+int nl80211_get_hardware_name(const char *ifname, char *buf);
void nl80211_close(void);
static const struct iwinfo_ops nl80211_ops = {
@@ -94,6 +96,8 @@ static const struct iwinfo_ops nl80211_ops = {
.ssid = nl80211_get_ssid,
.bssid = nl80211_get_bssid,
.country = nl80211_get_country,
+ .hardware_id = nl80211_get_hardware_id,
+ .hardware_name = nl80211_get_hardware_name,
.encryption = nl80211_get_encryption,
.assoclist = nl80211_get_assoclist,
.txpwrlist = nl80211_get_txpwrlist,
diff --git a/package/iwinfo/src/include/iwinfo/utils.h b/package/iwinfo/src/include/iwinfo/utils.h
index 57958b1b5..e897b2718 100644
--- a/package/iwinfo/src/include/iwinfo/utils.h
+++ b/package/iwinfo/src/include/iwinfo/utils.h
@@ -37,4 +37,6 @@ int iwinfo_ifmac(const char *ifname);
void iwinfo_close(void);
+struct iwinfo_hardware_entry * iwinfo_hardware(struct iwinfo_hardware_id *id);
+
#endif
diff --git a/package/iwinfo/src/include/iwinfo/wext.h b/package/iwinfo/src/include/iwinfo/wext.h
index 69b7a8e3d..4d2f4aa0a 100644
--- a/package/iwinfo/src/include/iwinfo/wext.h
+++ b/package/iwinfo/src/include/iwinfo/wext.h
@@ -47,6 +47,8 @@ int wext_get_freqlist(const char *ifname, char *buf, int *len);
int wext_get_countrylist(const char *ifname, char *buf, int *len);
int wext_get_hwmodelist(const char *ifname, int *buf);
int wext_get_mbssid_support(const char *ifname, int *buf);
+int wext_get_hardware_id(const char *ifname, char *buf);
+int wext_get_hardware_name(const char *ifname, char *buf);
void wext_close(void);
static const struct iwinfo_ops wext_ops = {
@@ -64,6 +66,8 @@ static const struct iwinfo_ops wext_ops = {
.ssid = wext_get_ssid,
.bssid = wext_get_bssid,
.country = wext_get_country,
+ .hardware_id = wext_get_hardware_id,
+ .hardware_name = wext_get_hardware_name,
.encryption = wext_get_encryption,
.assoclist = wext_get_assoclist,
.txpwrlist = wext_get_txpwrlist,
diff --git a/package/iwinfo/src/include/iwinfo/wl.h b/package/iwinfo/src/include/iwinfo/wl.h
index e931f7c6e..10be96aeb 100644
--- a/package/iwinfo/src/include/iwinfo/wl.h
+++ b/package/iwinfo/src/include/iwinfo/wl.h
@@ -47,6 +47,8 @@ int wl_get_freqlist(const char *ifname, char *buf, int *len);
int wl_get_countrylist(const char *ifname, char *buf, int *len);
int wl_get_hwmodelist(const char *ifname, int *buf);
int wl_get_mbssid_support(const char *ifname, int *buf);
+int wl_get_hardware_id(const char *ifname, char *buf);
+int wl_get_hardware_name(const char *ifname, char *buf);
void wl_close(void);
static const struct iwinfo_ops wl_ops = {
@@ -64,6 +66,8 @@ static const struct iwinfo_ops wl_ops = {
.ssid = wl_get_ssid,
.bssid = wl_get_bssid,
.country = wl_get_country,
+ .hardware_id = wl_get_hardware_id,
+ .hardware_name = wl_get_hardware_name,
.encryption = wl_get_encryption,
.assoclist = wl_get_assoclist,
.txpwrlist = wl_get_txpwrlist,