svn commit: r188107 - in projects/vap7/sys: . contrib/pf dev dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210 dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...

Sam Leffler sam at FreeBSD.org
Tue Feb 3 14:38:06 PST 2009


Author: sam
Date: Tue Feb  3 22:38:05 2009
New Revision: 188107
URL: http://svn.freebsd.org/changeset/base/188107

Log:
  merge r188106: fix media setting in vap_attach

Modified:
  projects/vap7/sys/   (props changed)
  projects/vap7/sys/contrib/pf/   (props changed)
  projects/vap7/sys/dev/   (props changed)
  projects/vap7/sys/dev/ath/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5210/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5211/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5212/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5312/   (props changed)
  projects/vap7/sys/dev/ath/ath_hal/ar5416/   (props changed)
  projects/vap7/sys/dev/cxgb/   (props changed)
  projects/vap7/sys/dev/usb2/   (props changed)
  projects/vap7/sys/i386/conf/USB2   (props changed)
  projects/vap7/sys/modules/usb2/   (props changed)
  projects/vap7/sys/net80211/   (props changed)
  projects/vap7/sys/net80211/ieee80211.c

Modified: projects/vap7/sys/net80211/ieee80211.c
==============================================================================
--- projects/vap7/sys/net80211/ieee80211.c	Tue Feb  3 22:32:26 2009	(r188106)
+++ projects/vap7/sys/net80211/ieee80211.c	Tue Feb  3 22:38:05 2009	(r188107)
@@ -472,7 +472,8 @@ ieee80211_vap_attach(struct ieee80211vap
 	    vap->iv_opmode == IEEE80211_M_STA, media_change, media_stat);
 	ieee80211_media_status(ifp, &imr);
 	/* NB: strip explicit mode; we're actually in autoselect */
-	ifmedia_set(&vap->iv_media, imr.ifm_active &~ IFM_MMASK);
+	ifmedia_set(&vap->iv_media,
+	    imr.ifm_active &~ (IFM_MMASK | IFM_IEEE80211_TURBO));
 	if (maxrate)
 		ifp->if_baudrate = IF_Mbps(maxrate);
 
@@ -857,16 +858,16 @@ addmedia(struct ifmedia *media, int caps
 	ifmedia_add(media, \
 		IFM_MAKEWORD(IFM_IEEE80211, (_s), (_o), 0), 0, NULL)
 	static const u_int mopts[IEEE80211_MODE_MAX] = { 
-		IFM_AUTO,
-		IFM_IEEE80211_11A,
-		IFM_IEEE80211_11B,
-		IFM_IEEE80211_11G,
-		IFM_IEEE80211_FH,
-		IFM_IEEE80211_11A | IFM_IEEE80211_TURBO,
-		IFM_IEEE80211_11G | IFM_IEEE80211_TURBO,
-		IFM_IEEE80211_11A | IFM_IEEE80211_TURBO,
-		IFM_IEEE80211_11NA,
-		IFM_IEEE80211_11NG,
+	    [IEEE80211_MODE_AUTO]	= IFM_AUTO,
+	    [IEEE80211_MODE_11A]	= IFM_IEEE80211_11A,
+	    [IEEE80211_MODE_11B]	= IFM_IEEE80211_11B,
+	    [IEEE80211_MODE_11G]	= IFM_IEEE80211_11G,
+	    [IEEE80211_MODE_FH]		= IFM_IEEE80211_FH,
+	    [IEEE80211_MODE_TURBO_A]	= IFM_IEEE80211_11A|IFM_IEEE80211_TURBO,
+	    [IEEE80211_MODE_TURBO_G]	= IFM_IEEE80211_11G|IFM_IEEE80211_TURBO,
+	    [IEEE80211_MODE_STURBO_A]	= IFM_IEEE80211_11A|IFM_IEEE80211_TURBO,
+	    [IEEE80211_MODE_11NA]	= IFM_IEEE80211_11NA,
+	    [IEEE80211_MODE_11NG]	= IFM_IEEE80211_11NG,
 	};
 	u_int mopt;
 
@@ -996,7 +997,8 @@ ieee80211_media_init(struct ieee80211com
 		ieee80211com_media_change, ieee80211com_media_status);
 	/* NB: strip explicit mode; we're actually in autoselect */
 	ifmedia_set(&ic->ic_media,
-		media_status(ic->ic_opmode, ic->ic_curchan) &~ IFM_MMASK);
+	    media_status(ic->ic_opmode, ic->ic_curchan) &~
+		(IFM_MMASK | IFM_IEEE80211_TURBO));
 	if (maxrate)
 		ifp->if_baudrate = IF_Mbps(maxrate);
 


More information about the svn-src-projects mailing list