From owner-p4-projects@FreeBSD.ORG Fri Jun 29 07:40:34 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B47B16A46B; Fri, 29 Jun 2007 07:40:34 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00BFC16A400 for ; Fri, 29 Jun 2007 07:40:34 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E4F7913C45E for ; Fri, 29 Jun 2007 07:40:33 +0000 (UTC) (envelope-from thompsa@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l5T7eXSr068768 for ; Fri, 29 Jun 2007 07:40:33 GMT (envelope-from thompsa@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l5T7eXUM068765 for perforce@freebsd.org; Fri, 29 Jun 2007 07:40:33 GMT (envelope-from thompsa@freebsd.org) Date: Fri, 29 Jun 2007 07:40:33 GMT Message-Id: <200706290740.l5T7eXUM068765@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 122521 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: Fri, 29 Jun 2007 07:40:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=122521 Change 122521 by thompsa@thompsa_heff on 2007/06/29 07:39:58 - change bchan back to an integer - rename chan -> curchan This commit doesnt yet optimise the calls to ieee80211_chan2ieee. Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#108 edit .. //depot/projects/wifi/sys/net80211/ieee80211_scan.c#16 edit .. //depot/projects/wifi/sys/net80211/ieee80211_scan.h#11 edit .. //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#22 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#108 (text+ko) ==== @@ -2090,8 +2090,8 @@ scan.tstamp = frm; frm += 8; scan.bintval = le16toh(*(uint16_t *)frm); frm += 2; scan.capinfo = le16toh(*(uint16_t *)frm); frm += 2; - scan.bchan = ic->ic_curchan; - scan.chan = scan.bchan; + scan.bchan = ieee80211_chan2ieee(ic, ic->ic_curchan); + scan.curchan = ic->ic_curchan; while (efrm - frm > 1) { IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return); @@ -2108,7 +2108,7 @@ case IEEE80211_ELEMID_FHPARMS: if (ic->ic_phytype == IEEE80211_T_FH) { scan.fhdwell = LE_READ_2(&frm[2]); - scan.chan = IEEE80211_FH_CHAN(frm[4], frm[5]); + scan.bchan = IEEE80211_FH_CHAN(frm[4], frm[5]); scan.fhindex = frm[6]; } break; @@ -2118,7 +2118,7 @@ * is problematic for multi-mode devices. */ if (ic->ic_phytype != IEEE80211_T_FH) - scan.chan = frm[2]; + scan.bchan = frm[2]; break; case IEEE80211_ELEMID_TIM: /* XXX ATIM? */ @@ -2194,7 +2194,7 @@ return; } #endif - if (scan.chan != scan.bchan && + if (ieee80211_chan2ieee(ic, scan.curchan) != scan.bchan && ic->ic_phytype != IEEE80211_T_FH) { /* * Frame was received on a channel different from the @@ -2210,7 +2210,8 @@ IEEE80211_MSG_ELEMID | IEEE80211_MSG_INPUT, wh, ieee80211_mgt_subtype_name[subtype >> IEEE80211_FC0_SUBTYPE_SHIFT], - "for off-channel %u", scan.chan); + "for off-channel %u", + ieee80211_chan2ieee(ic, scan.curchan)); ic->ic_stats.is_rx_chanmismatch++; return; } ==== //depot/projects/wifi/sys/net80211/ieee80211_scan.c#16 (text+ko) ==== @@ -848,8 +848,7 @@ printf("[%s] %s%s on chan %u (bss chan %u) ", ether_sprintf(mac), isnew ? "new " : "", ieee80211_mgt_subtype_name[subtype >> IEEE80211_FC0_SUBTYPE_SHIFT], - ieee80211_chan2ieee(ic, sp->chan), - ieee80211_chan2ieee(ic, sp->bchan)); + ieee80211_chan2ieee(ic, sp->curchan), sp->bchan); ieee80211_print_essid(sp->ssid + 2, sp->ssid[1]); printf("\n"); ==== //depot/projects/wifi/sys/net80211/ieee80211_scan.h#11 (text+ko) ==== @@ -118,8 +118,8 @@ struct ieee80211_scanparams { uint16_t capinfo; /* 802.11 capabilities */ uint16_t fhdwell; /* FHSS dwell interval */ - struct ieee80211_channel *chan; - struct ieee80211_channel *bchan; + struct ieee80211_channel *curchan; + uint8_t bchan; /* channel# advertised inside beacon */ uint8_t fhindex; uint8_t erp; uint16_t bintval; ==== //depot/projects/wifi/sys/net80211/ieee80211_scan_sta.c#22 (text+ko) ==== @@ -257,7 +257,7 @@ memcpy(ise->se_tstamp.data, sp->tstamp, sizeof(ise->se_tstamp)); ise->se_intval = sp->bintval; ise->se_capinfo = sp->capinfo; - ise->se_chan = sp->chan; + ise->se_chan = sp->curchan; ise->se_fhdwell = sp->fhdwell; ise->se_fhindex = sp->fhindex; ise->se_erp = sp->erp;