From owner-p4-projects@FreeBSD.ORG Sun May 15 22:44:09 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6F9D016A4D1; Sun, 15 May 2005 22:44:09 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29C0316A4CE for ; Sun, 15 May 2005 22:44:09 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1076F43DAE for ; Sun, 15 May 2005 22:44:09 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j4FMi6fO033498 for ; Sun, 15 May 2005 22:44:06 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j4FMi6XJ033495 for perforce@freebsd.org; Sun, 15 May 2005 22:44:06 GMT (envelope-from sam@freebsd.org) Date: Sun, 15 May 2005 22:44:06 GMT Message-Id: <200505152244.j4FMi6XJ033495@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 77023 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 May 2005 22:44:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=77023 Change 77023 by sam@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",