PERFORCE change 77023 for review
Sam Leffler
sam at FreeBSD.org
Sun May 15 15:44:10 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=77023
Change 77023 by sam at sam_laptop on 2005/05/15 22:43:46
bg scan stuff; may want to change names
Affected files ...
.. //depot/projects/vap/sbin/ifconfig/Makefile#2 edit
.. //depot/projects/vap/sbin/ifconfig/ifieee80211.c#3 edit
Differences ...
==== //depot/projects/vap/sbin/ifconfig/Makefile#2 (text+ko) ====
@@ -24,7 +24,7 @@
SRCS+= ifieee80211.c # SIOC[GS]IEEE80211 support
SRCS+= ifcarp.c # SIOC[GS]VH support
-SRCS+= ifpfsync.c # pfsync(4) support
+#SRCS+= ifpfsync.c # pfsync(4) support
.if !defined(RELEASE_CRUNCH)
SRCS+= af_ipx.c # IPX support
==== //depot/projects/vap/sbin/ifconfig/ifieee80211.c#3 (text+ko) ====
@@ -422,6 +422,12 @@
}
static void
+set80211bgscan(const char *val, int d, int s, const struct afswtch *rafp)
+{
+ set80211(s, IEEE80211_IOC_BGSCAN, d, 0, NULL);
+}
+
+static void
set80211chanlist(const char *val, int d, int s, const struct afswtch *rafp)
{
struct ieee80211req_chanlist chanlist;
@@ -592,6 +598,18 @@
set80211(s, IEEE80211_IOC_BEACON_INTERVAL, atoi(val), 0, NULL);
}
+static
+DECL_CMD_FUNC(set80211bgscanidle, val, d)
+{
+ set80211(s, IEEE80211_IOC_BGSCAN_IDLE, atoi(val), 0, NULL);
+}
+
+static
+DECL_CMD_FUNC(set80211bgscanintvl, val, d)
+{
+ set80211(s, IEEE80211_IOC_BGSCAN_INTERVAL, atoi(val), 0, NULL);
+}
+
static void
set80211macmac(int s, int op, const char *val)
{
@@ -1339,7 +1357,7 @@
{
static const uint8_t zerobssid[IEEE80211_ADDR_LEN];
enum ieee80211_opmode opmode = get80211opmode(s);
- int i, num, wpa, wme;
+ int i, num, wpa, wme, bgscan;
struct ieee80211req ireq;
u_int8_t data[32];
const struct ieee80211_channel *c;
@@ -1642,6 +1660,26 @@
}
}
}
+ ireq.i_type = IEEE80211_IOC_BGSCAN;
+ if (ioctl(s, SIOCG80211, &ireq) != -1) {
+ bgscan = ireq.i_val;
+ if (!bgscan)
+ LINE_CHECK("%c-bgscan", spacer);
+ else if (verbose)
+ LINE_CHECK("%cbgscan", spacer);
+ if (bgscan || verbose) {
+ ireq.i_type = IEEE80211_IOC_BGSCAN_IDLE;
+ if (ioctl(s, SIOCG80211, &ireq) != -1)
+ LINE_CHECK("%cbgscanidle %u",
+ spacer, ireq.i_val / 1000);
+ }
+ if (bgscan || verbose) {
+ ireq.i_type = IEEE80211_IOC_BGSCAN_INTERVAL;
+ if (ioctl(s, SIOCG80211, &ireq) != -1)
+ LINE_CHECK("%cbgscanintvl %u",
+ spacer, ireq.i_val);
+ }
+ }
}
ireq.i_type = IEEE80211_IOC_BEACON_INTERVAL;
if (ioctl(s, SIOCG80211, &ireq) != -1) {
@@ -1863,6 +1901,10 @@
DEF_CMD("-turbo", 0, set80211turbo),
DEF_CMD_ARG("wlandev", set80211wlandev),
DEF_CMD_ARG("wlanmode", set80211wlanmode),
+ DEF_CMD("bgscan", 1, set80211bgscan),
+ DEF_CMD("-bgscan", 0, set80211bgscan),
+ DEF_CMD_ARG("bgscanidle", set80211bgscanidle),
+ DEF_CMD_ARG("bgscanintvl", set80211bgscanintvl),
};
static struct afswtch af_ieee80211 = {
.af_name = "af_ieee80211",
More information about the p4-projects
mailing list