Date: Wed, 21 Sep 2011 13:15:18 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r225713 - in user/adrian/if_ath_tx/sys/dev/ath/ath_hal: ar5212 ar5416 Message-ID: <201109211315.p8LDFIq3077060@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)<<AR_BSS_ID1_AID_S)); Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Wed Sep 21 07:31:16 2011 (r225712) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5212/ar5212_reset.c Wed Sep 21 13:15:18 2011 (r225713) @@ -428,9 +428,10 @@ ar5212Reset(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); 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109211315.p8LDFIq3077060>