From owner-freebsd-wireless@FreeBSD.ORG Tue Jul 12 15:22:34 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 389E8106567A for ; Tue, 12 Jul 2011 15:22:34 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id F319E8FC1E for ; Tue, 12 Jul 2011 15:22:33 +0000 (UTC) Received: by gxk28 with SMTP id 28so2472442gxk.13 for ; Tue, 12 Jul 2011 08:22:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=Ec9JLf9KxiNDajzjpOqWIdCpP9DZbrOmhSh/JlL9js4=; b=gDkqi9I3/dYCooPeaT1SybzrPbGp52d6E8z5nzYGr+Zl6W+cU/Mt5NlWwHaADK9hn5 3+MM755sJoHN1wyRqSAagnlKgz/5V+nb2AORR3Rq5SCtZ+vmMS+4IsmEvQ0OPU0GigQO uZb5losML4ONn0+ZI16yz/rJrDZ45kLa0aSkE= MIME-Version: 1.0 Received: by 10.151.6.3 with SMTP id j3mr266632ybi.44.1310484153241; Tue, 12 Jul 2011 08:22:33 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.150.189.1 with HTTP; Tue, 12 Jul 2011 08:22:33 -0700 (PDT) Date: Tue, 12 Jul 2011 23:22:33 +0800 X-Google-Sender-Auth: 0yHdv-RtR8iG83AwtKlHXpfcut4 Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [patch] ifconfig: display DFS related information X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2011 15:22:34 -0000 Hi, I'd like to extend the channel list output in ifconfig to include the DFS flags. These include: * D: channel is DFS enabeld * R: radar event has been detected on this channel * I: interference has been detected on this channel * C: CAC has completed on this channel (and thus can be used) This is primarily to aid IBSS/hostap developers who are tinkering with DFS/radar detection, but will be useful moving forward when users are configuring ibss/hostap in DFS enabled areas (when DFS is fully supported, that is.) Thanks, Adrian Index: ifieee80211.c =================================================================== --- ifieee80211.c (revision 223861) +++ ifieee80211.c (working copy) @@ -3451,9 +3451,13 @@ { char buf[14]; - printf("Channel %3u : %u%c MHz%-14.14s", + printf("Channel %3u : %u%c%c%c%c%c MHz%-14.14s", ieee80211_mhz2ieee(c->ic_freq, c->ic_flags), c->ic_freq, IEEE80211_IS_CHAN_PASSIVE(c) ? '*' : ' ', + IEEE80211_IS_CHAN_DFS(c) ? 'D' : ' ', + IEEE80211_IS_CHAN_RADAR(c) ? 'R' : ' ', + IEEE80211_IS_CHAN_CWINT(c) ? 'I' : ' ', + IEEE80211_IS_CHAN_CACDONE(c) ? 'C' : ' ', get_chaninfo(c, verb, buf, sizeof(buf))); }