1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 19:01:54 +02:00

iw: update to 0.9.21, add support for showing the in-use flag for survey data

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23155 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2010-09-29 15:16:21 +00:00
parent 3d7914783f
commit 0594958cad
4 changed files with 86 additions and 32 deletions

View File

@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=iw PKG_NAME:=iw
PKG_VERSION:=0.9.20 PKG_VERSION:=0.9.21
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/ PKG_SOURCE_URL:=http://wireless.kernel.org/download/iw/
PKG_MD5SUM:=1055799b544b3e08169d155bb6c21bb0 PKG_MD5SUM:=726db5f1fd6bc316434414770513ef81
PKG_BUILD_DEPENDS:=mac80211 PKG_BUILD_DEPENDS:=mac80211
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk

View File

@ -0,0 +1,73 @@
--- a/nl80211.h
+++ b/nl80211.h
@@ -295,7 +295,9 @@
* auth and assoc steps. For this, you need to specify the SSID in a
* %NL80211_ATTR_SSID attribute, and can optionally specify the association
* IEs in %NL80211_ATTR_IE, %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_MAC,
- * %NL80211_ATTR_WIPHY_FREQ and %NL80211_ATTR_CONTROL_PORT.
+ * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
+ * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
+ * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
* It is also sent as an event, with the BSSID and response IEs when the
* connection is established or failed to be established. This can be
* determined by the STATUS_CODE attribute.
@@ -686,6 +688,15 @@ enum nl80211_commands {
* request, the driver will assume that the port is unauthorized until
* authorized by user space. Otherwise, port is marked authorized by
* default in station mode.
+ * @NL80211_ATTR_CONTROL_PORT_ETHERTYPE: A 16-bit value indicating the
+ * ethertype that will be used for key negotiation. It can be
+ * specified with the associate and connect commands. If it is not
+ * specified, the value defaults to 0x888E (PAE, 802.1X). This
+ * attribute is also used as a flag in the wiphy information to
+ * indicate that protocols other than PAE are supported.
+ * @NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT: When included along with
+ * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE, indicates that the custom
+ * ethertype frames used for key negotiation must not be encrypted.
*
* @NL80211_ATTR_TESTDATA: Testmode data blob, passed through to the driver.
* We recommend using nested, driver-specific attributes within this.
@@ -951,6 +962,9 @@ enum nl80211_attrs {
NL80211_ATTR_RX_FRAME_TYPES,
NL80211_ATTR_FRAME_TYPE,
+ NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
+ NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -1006,6 +1020,8 @@ enum nl80211_attrs {
* @NL80211_IFTYPE_WDS: wireless distribution interface
* @NL80211_IFTYPE_MONITOR: monitor interface receiving all frames
* @NL80211_IFTYPE_MESH_POINT: mesh point
+ * @NL80211_IFTYPE_P2P_CLIENT: P2P client
+ * @NL80211_IFTYPE_P2P_GO: P2P group owner
* @NL80211_IFTYPE_MAX: highest interface type number currently defined
* @NUM_NL80211_IFTYPES: number of defined interface types
*
@@ -1022,6 +1038,8 @@ enum nl80211_iftype {
NL80211_IFTYPE_WDS,
NL80211_IFTYPE_MONITOR,
NL80211_IFTYPE_MESH_POINT,
+ NL80211_IFTYPE_P2P_CLIENT,
+ NL80211_IFTYPE_P2P_GO,
/* keep last */
NUM_NL80211_IFTYPES,
@@ -1382,6 +1400,7 @@ enum nl80211_reg_rule_flags {
* @__NL80211_SURVEY_INFO_INVALID: attribute number 0 is reserved
* @NL80211_SURVEY_INFO_FREQUENCY: center frequency of channel
* @NL80211_SURVEY_INFO_NOISE: noise level of channel (u8, dBm)
+ * @NL80211_SURVEY_INFO_IN_USE: channel is currently being used
* @NL80211_SURVEY_INFO_MAX: highest survey info attribute number
* currently defined
* @__NL80211_SURVEY_INFO_AFTER_LAST: internal use
@@ -1390,6 +1409,7 @@ enum nl80211_survey_info {
__NL80211_SURVEY_INFO_INVALID,
NL80211_SURVEY_INFO_FREQUENCY,
NL80211_SURVEY_INFO_NOISE,
+ NL80211_SURVEY_INFO_IN_USE,
/* keep last */
__NL80211_SURVEY_INFO_AFTER_LAST,

View File

@ -0,0 +1,11 @@
--- a/survey.c
+++ b/survey.c
@@ -46,6 +46,8 @@ static int print_survey_handler(struct n
if (sinfo[NL80211_SURVEY_INFO_FREQUENCY])
printf("\tfrequency:\t%u MHz\n",
nla_get_u32(sinfo[NL80211_SURVEY_INFO_FREQUENCY]));
+ if (sinfo[NL80211_SURVEY_INFO_IN_USE])
+ printf("\tin use\n");
if (sinfo[NL80211_SURVEY_INFO_NOISE])
printf("\tnoise:\t\t%d dBm\n",
(int8_t)nla_get_u8(sinfo[NL80211_SURVEY_INFO_NOISE]));

View File

@ -1,30 +0,0 @@
--- a/interface.c
+++ b/interface.c
@@ -260,6 +260,27 @@ static int print_iface_handler(struct nl
printf("%s\tifindex %d\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_IFINDEX]));
if (tb_msg[NL80211_ATTR_IFTYPE])
printf("%s\ttype %s\n", indent, iftype_name(nla_get_u32(tb_msg[NL80211_ATTR_IFTYPE])));
+ if (tb_msg[NL80211_ATTR_WIPHY_FREQ]) {
+ const char *mode;
+
+ if (tb_msg[NL80211_ATTR_WIPHY_CHANNEL_TYPE])
+ switch(nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_CHANNEL_TYPE])) {
+ case NL80211_CHAN_HT20:
+ mode = "HT20";
+ break;
+ case NL80211_CHAN_HT40PLUS:
+ mode = "HT40+";
+ break;
+ case NL80211_CHAN_HT40MINUS:
+ mode = "HT40-";
+ break;
+ default:
+ mode = "";
+ }
+
+ printf("%s\tfrequency %d MHz %s\n", indent, nla_get_u32(tb_msg[NL80211_ATTR_WIPHY_FREQ]), mode);
+ }
+
return NL_SKIP;
}