Date: Sat, 30 Jun 2007 10:01:52 GMT From: Andrew Thompson <thompsa@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 122568 for review Message-ID: <200706301001.l5UA1qw9006352@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=122568 Change 122568 by thompsa@thompsa_heff on 2007/06/30 10:01:50 Provide a macro which directly dereferences ic_ieee from the channel. This can only be used in places where the channel is always valid. Suggested by: sam Affected files ... .. //depot/projects/wifi/sys/net80211/_ieee80211.h#24 edit .. //depot/projects/wifi/sys/net80211/ieee80211_input.c#109 edit .. //depot/projects/wifi/sys/net80211/ieee80211_scan.c#17 edit Differences ... ==== //depot/projects/wifi/sys/net80211/_ieee80211.h#24 (text+ko) ==== @@ -229,6 +229,8 @@ (IEEE80211_IS_CHAN_2GHZ(_c) && \ ((_c)->ic_flags & IEEE80211_CHAN_HT) != 0) +#define IEEE80211_CHAN2IEEE(_c) (_c)->ic_ieee + /* ni_chan encoding for FH phy */ #define IEEE80211_FH_CHANMOD 80 #define IEEE80211_FH_CHAN(set,pat) (((set)-1)*IEEE80211_FH_CHANMOD+(pat)) ==== //depot/projects/wifi/sys/net80211/ieee80211_input.c#109 (text+ko) ==== @@ -2090,7 +2090,7 @@ scan.tstamp = frm; frm += 8; scan.bintval = le16toh(*(uint16_t *)frm); frm += 2; scan.capinfo = le16toh(*(uint16_t *)frm); frm += 2; - scan.bchan = ieee80211_chan2ieee(ic, ic->ic_curchan); + scan.bchan = IEEE80211_CHAN2IEEE(ic->ic_curchan); scan.curchan = ic->ic_curchan; while (efrm - frm > 1) { @@ -2194,7 +2194,7 @@ return; } #endif - if (ieee80211_chan2ieee(ic, scan.curchan) != scan.bchan && + if (IEEE80211_CHAN2IEEE(scan.curchan) != scan.bchan && ic->ic_phytype != IEEE80211_T_FH) { /* * Frame was received on a channel different from the @@ -2211,7 +2211,7 @@ wh, ieee80211_mgt_subtype_name[subtype >> IEEE80211_FC0_SUBTYPE_SHIFT], "for off-channel %u", - ieee80211_chan2ieee(ic, scan.curchan)); + IEEE80211_CHAN2IEEE(scan.curchan)); ic->ic_stats.is_rx_chanmismatch++; return; } ==== //depot/projects/wifi/sys/net80211/ieee80211_scan.c#17 (text+ko) ==== @@ -840,7 +840,7 @@ #ifdef IEEE80211_DEBUG static void -dump_probe_beacon(struct ieee80211com *ic, uint8_t subtype, int isnew, +dump_probe_beacon(uint8_t subtype, int isnew, const uint8_t mac[IEEE80211_ADDR_LEN], const struct ieee80211_scanparams *sp) { @@ -848,7 +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->curchan), sp->bchan); + IEEE80211_CHAN2IEEE(sp->curchan), sp->bchan); ieee80211_print_essid(sp->ssid + 2, sp->ssid[1]); printf("\n"); @@ -894,7 +894,7 @@ return; #ifdef IEEE80211_DEBUG if (ieee80211_msg_scan(ic) && (ic->ic_flags & IEEE80211_F_SCAN)) - dump_probe_beacon(ic, subtype, 1, wh->i_addr2, sp); + dump_probe_beacon(subtype, 1, wh->i_addr2, sp); #endif if (ss->ss_ops != NULL && ss->ss_ops->scan_add(ss, sp, wh, subtype, rssi, noise, rstamp)) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706301001.l5UA1qw9006352>