From owner-svn-src-user@FreeBSD.ORG Wed Sep 21 13:15:18 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D30106567D; Wed, 21 Sep 2011 13:15:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C3528FC17; Wed, 21 Sep 2011 13:15:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8LDFIhW077065; Wed, 21 Sep 2011 13:15:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8LDFIq3077060; Wed, 21 Sep 2011 13:15:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109211315.p8LDFIq3077060@svn.freebsd.org> From: Adrian Chadd Date: Wed, 21 Sep 2011 13:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225713 - in user/adrian/if_ath_tx/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2011 13:15:18 -0000 Author: adrian Date: Wed Sep 21 13:15:18 2011 New Revision: 225713 URL: http://svn.freebsd.org/changeset/base/225713 Log: Save and restore the associate id on a reset. This is a candidate to merge into -HEAD. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212.h user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Sep 21 07:31:16 2011 (r225712) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Sep 21 13:15:18 2011 (r225713) @@ -252,6 +252,7 @@ struct ath_hal_5212 { uint8_t ah_macaddr[IEEE80211_ADDR_LEN]; uint8_t ah_bssid[IEEE80211_ADDR_LEN]; uint8_t ah_bssidmask[IEEE80211_ADDR_LEN]; + uint16_t ah_assocId; /* * Runtime state. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Sep 21 07:31:16 2011 (r225712) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Sep 21 13:15:18 2011 (r225713) @@ -218,8 +218,10 @@ ar5212WriteAssocid(struct ath_hal *ah, c { struct ath_hal_5212 *ahp = AH5212(ah); - /* XXX save bssid for possible re-use on reset */ + /* save bssid for possible re-use on reset */ OS_MEMCPY(ahp->ah_bssid, bssid, IEEE80211_ADDR_LEN); + ahp->ah_assocId = assocId; + OS_REG_WRITE(ah, AR_BSS_ID0, LE_READ_4(ahp->ah_bssid)); OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid+4) | ((assocId & 0x3fff)<ah_bssid)); - OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4)); + OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4) | + (ahp->ah_assocId & 0x3fff) << AR_BSS_ID1_AID_S); /* Restore bmiss rssi & count thresholds */ OS_REG_WRITE(ah, AR_RSSI_THR, ahp->ah_rssiThr); Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Wed Sep 21 07:31:16 2011 (r225712) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Wed Sep 21 13:15:18 2011 (r225713) @@ -278,9 +278,10 @@ ar5416Reset(struct ath_hal *ah, HAL_OPMO /* Restore previous antenna */ OS_REG_WRITE(ah, AR_DEF_ANTENNA, saveDefAntenna); - /* then our BSSID */ + /* then our BSSID and associate id */ OS_REG_WRITE(ah, AR_BSS_ID0, LE_READ_4(ahp->ah_bssid)); - OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4)); + OS_REG_WRITE(ah, AR_BSS_ID1, LE_READ_2(ahp->ah_bssid + 4) | + (ahp->ah_assocId & 0x3fff) << AR_BSS_ID1_AID_S); /* Restore bmiss rssi & count thresholds */ OS_REG_WRITE(ah, AR_RSSI_THR, ahp->ah_rssiThr);