Date: Mon, 11 Feb 2008 03:43:11 GMT From: Sepherosa Ziehau <sephe@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 135189 for review Message-ID: <200802110343.m1B3hB6l024445@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=135189 Change 135189 by sephe@sephe_zealot:sam_wifi on 2008/02/11 03:42:55 - Embed current channel's rate table in ieee80211com - When set current channel (no matter whether channel switching really happens or not), update current channel's rate table accordingly Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211.c#63 edit .. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#90 edit .. //depot/projects/wifi/sys/net80211/ieee80211_var.h#65 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211.c#63 (text+ko) ==== @@ -191,7 +191,7 @@ ic->ic_bsschan = IEEE80211_CHAN_ANYC; ic->ic_prevchan = NULL; /* arbitrarily pick the first channel */ - ic->ic_curchan = &ic->ic_channels[0]; + ieee80211_update_curchan(ic, &ic->ic_channels[0]); /* fillin well-known rate sets if driver has not specified */ DEFAULTRATES(IEEE80211_MODE_11B, ieee80211_rateset_11b); @@ -1227,8 +1227,15 @@ } void +ieee80211_update_curchan(struct ieee80211com *ic, struct ieee80211_channel *c) +{ + ic->ic_curchan = c; + ic->ic_currates = ieee80211_get_ratetable(c); +} + +void ieee80211_set_channel(struct ieee80211com *ic, struct ieee80211_channel *c) { - ic->ic_curchan = c; + ieee80211_update_curchan(ic, c); ic->ic_set_channel(ic); } ==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.c#90 (text+ko) ==== @@ -1760,7 +1760,7 @@ if (ic->ic_state == IEEE80211_S_RUN) ieee80211_set_channel(ic, ic->ic_des_chan); else - ic->ic_curchan = ic->ic_des_chan; + ieee80211_update_curchan(ic, ic->ic_des_chan); } else { /* * Need to go through the state machine in case we @@ -1775,7 +1775,7 @@ * been specified fix the current channel so * there is immediate feedback; e.g. via ifconfig. */ - ic->ic_curchan = ic->ic_des_chan; + ieee80211_update_curchan(ic, ic->ic_des_chan); } } return error; ==== //depot/projects/wifi/sys/net80211/ieee80211_var.h#65 (text+ko) ==== @@ -85,6 +85,7 @@ #define IEEE80211_TU_TO_MS(x) (((x) * 1024) / 1000) #define IEEE80211_TU_TO_TICKS(x)(((x) * 1024 * hz) / (1000 * 1000)) +struct ieee80211_rate_table; struct ieee80211_aclator; struct sysctl_ctx_list; @@ -145,6 +146,8 @@ uint8_t ic_chan_avail[IEEE80211_CHAN_BYTES]; uint8_t ic_chan_active[IEEE80211_CHAN_BYTES]; uint8_t ic_chan_scan[IEEE80211_CHAN_BYTES]; + /* current channel ratetable */ + const struct ieee80211_rate_table *ic_currates; struct ieee80211_channel *ic_curchan; /* current channel */ struct ieee80211_channel *ic_bsschan; /* bss channel */ struct ieee80211_channel *ic_prevchan; /* previous channel */ @@ -430,6 +433,8 @@ enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *); void ieee80211_set_channel(struct ieee80211com *, struct ieee80211_channel *); +void ieee80211_update_curchan(struct ieee80211com *, + struct ieee80211_channel *); /* * Key update synchronization methods. XXX should not be visible.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802110343.m1B3hB6l024445>