From owner-svn-src-user@FreeBSD.ORG Sun Jun 24 06:00:29 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDE1E106564A; Sun, 24 Jun 2012 06:00:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA5128FC08; Sun, 24 Jun 2012 06:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5O60T56090786; Sun, 24 Jun 2012 06:00:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5O60TmJ090784; Sun, 24 Jun 2012 06:00:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206240600.q5O60TmJ090784@svn.freebsd.org> From: Adrian Chadd Date: Sun, 24 Jun 2012 06:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237520 - user/adrian/ath_radar_stuff/lib/libradarpkt X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jun 2012 06:00:29 -0000 Author: adrian Date: Sun Jun 24 06:00:29 2012 New Revision: 237520 URL: http://svn.freebsd.org/changeset/base/237520 Log: Use the "right" RSSI for AR9280, so the RSSI value is positive rather than the radiotap generated signal level. Modified: user/adrian/ath_radar_stuff/lib/libradarpkt/ar9280_radar.c Modified: user/adrian/ath_radar_stuff/lib/libradarpkt/ar9280_radar.c ============================================================================== --- user/adrian/ath_radar_stuff/lib/libradarpkt/ar9280_radar.c Sun Jun 24 05:59:32 2012 (r237519) +++ user/adrian/ath_radar_stuff/lib/libradarpkt/ar9280_radar.c Sun Jun 24 06:00:29 2012 (r237520) @@ -65,7 +65,7 @@ ar9280_radar_decode(struct ieee80211_rad * XXX which rssi should we use? * XXX ext rssi? */ - comb_rssi = rx->wr_antsignal; + comb_rssi = rx->wr_v.vh_rssi; /* Combined RSSI */ pri_rssi = rx->wr_v.rssi_ctl[0]; ext_rssi = rx->wr_v.rssi_ext[0]; nf = rx->wr_antnoise; @@ -76,6 +76,15 @@ ar9280_radar_decode(struct ieee80211_rad return (0); } + /* + * XXX TODO: there's lots of other things that need to be + * done with the RSSI and pulse durations. It's quite likely + * that the pkt format should just have all of those + * (pri/ext/comb RSSI, flags, pri/ext pulse duration) and then + * the "decided" values to match the logic in the current + * HAL/DFS code, so they can all be plotted as appropriate. + */ + #if 0 printf("tsf: %lld", tsf); printf(" len: %d", len); @@ -91,10 +100,10 @@ ar9280_radar_decode(struct ieee80211_rad #endif re->re_timestamp = tsf; - re->re_rssi = comb_rssi; /* XXX extension rssi? */ + re->re_rssi = pri_rssi; /* XXX extension rssi? */ re->re_dur = pkt[len - 3]; /* XXX extension duration? */ + re->re_freq = 0; /* XXX flags? */ - /* XXX freq? */ return(1); }