Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Mar 2008 16:35:46 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137923 for review
Message-ID:  <200803171635.m2HGZkVh009064@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137923

Change 137923 by sam@sam_ebb on 2008/03/17 16:35:19

	unbreak adhoc mode when joining an existing ibss; must program
	the bssid register as otherwise it's left w/ our mac address
	and we don't get unicast frames

Affected files ...

.. //depot/projects/vap/sys/dev/ath/if_ath.c#45 edit

Differences ...

==== //depot/projects/vap/sys/dev/ath/if_ath.c#45 (text+ko) ====

@@ -5490,7 +5490,7 @@
 	struct ath_vap *avp = ATH_VAP(vap);
 	struct ath_hal *ah = sc->sc_ah;
 	struct ieee80211_node *ni = NULL;
-	int i, error;
+	int i, error, stamode;
 	u_int32_t rfilt;
 	static const HAL_LED_STATE leds[] = {
 	    HAL_LED_INIT,	/* IEEE80211_S_INIT */
@@ -5524,7 +5524,9 @@
 
 	ni = vap->iv_bss;
 	rfilt = ath_calcrxfilter(sc);
-	if (vap->iv_opmode == IEEE80211_M_STA && nstate == IEEE80211_S_RUN) {
+	stamode = (vap->iv_opmode == IEEE80211_M_STA ||
+		   vap->iv_opmode == IEEE80211_M_IBSS);
+	if (stamode && nstate == IEEE80211_S_RUN) {
 		sc->sc_curaid = ni->ni_associd;
 		IEEE80211_ADDR_COPY(sc->sc_curbssid, ni->ni_bssid);
 		ath_hal_setassocid(ah, sc->sc_curbssid, sc->sc_curaid);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803171635.m2HGZkVh009064>