From owner-p4-projects@FreeBSD.ORG Sat May 17 21:04:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8FBDE106579B; Sat, 17 May 2008 21:04:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 363211065779 for ; Sat, 17 May 2008 21:04:12 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 252698FC1F for ; Sat, 17 May 2008 21:04:12 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m4HL4CQ0028455 for ; Sat, 17 May 2008 21:04:12 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m4HL4CsP028453 for perforce@freebsd.org; Sat, 17 May 2008 21:04:12 GMT (envelope-from thompsa@freebsd.org) Date: Sat, 17 May 2008 21:04:12 GMT Message-Id: <200805172104.m4HL4CsP028453@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to thompsa@freebsd.org using -f From: Andrew Thompson To: Perforce Change Reviews Cc: Subject: PERFORCE change 141786 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 May 2008 21:04:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=141786 Change 141786 by thompsa@thompsa_burger on 2008/05/17 21:03:43 The NEW_BCM2050_RSSI calcs work, remove old version. Affected files ... .. //depot/projects/vap/sys/dev/bwi/bwirf.c#7 edit Differences ... ==== //depot/projects/vap/sys/dev/bwi/bwirf.c#7 (text+ko) ==== @@ -2416,8 +2416,6 @@ flags1 = le16toh(hdr->rxh_flags1); flags3 = le16toh(hdr->rxh_flags3); -#define NEW_BCM2050_RSSI -#ifdef NEW_BCM2050_RSSI if (flags1 & BWI_RXH_F1_OFDM) { if (rssi > 127) rssi -= 256; @@ -2475,40 +2473,6 @@ default: panic("impossible lna gain %d", lna_gain); } -#else /* !NEW_BCM2050_RSSI */ - lna_gain = 0; /* shut up gcc warning */ - - if (flags1 & BWI_RXH_F1_OFDM) { - if (rssi > 127) - rssi -= 256; - rssi = (rssi * 73) / 64; - - if (flags3 & BWI_RXH_F3_BCM2050_RSSI) - rssi += 25; - else - rssi -= 3; - return rssi; - } - - if (mac->mac_sc->sc_card_flags & BWI_CARD_F_SW_NRSSI) { - struct bwi_rf *rf = &mac->mac_rf; - - if (rssi >= BWI_NRSSI_TBLSZ) - rssi = BWI_NRSSI_TBLSZ - 1; - - rssi = ((31 - (int)rf->rf_nrssi_table[rssi]) * -131) / 128; - rssi -= 57; - } else { - rssi = ((31 - rssi) * -149) / 128; - rssi -= 68; - } - - if (mac->mac_phy.phy_mode != IEEE80211_MODE_11G) - return rssi; - - if (flags3 & BWI_RXH_F3_BCM2050_RSSI) - rssi += 25; -#endif /* NEW_BCM2050_RSSI */ return rssi; }