Date: Thu, 24 Apr 2014 23:11:19 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264899 - head/sys/dev/ath/ath_hal/ar5210 Message-ID: <201404242311.s3ONBJhg089127@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Apr 24 23:11:18 2014 New Revision: 264899 URL: http://svnweb.freebsd.org/changeset/base/264899 Log: Fix the AR5210 HAL code to store the association ID and restore it upon reset. Tested: * AR5210, STA mode Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210.h Thu Apr 24 23:10:24 2014 (r264898) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210.h Thu Apr 24 23:11:18 2014 (r264899) @@ -120,6 +120,8 @@ struct ath_hal_5210 { u_int ah_slottime; /* user-specified slot time */ u_int ah_acktimeout; /* user-specified ack timeout */ u_int ah_ctstimeout; /* user-specified cts timeout */ + + uint16_t ah_associd; /* association id */ }; #define AH5210(ah) ((struct ath_hal_5210 *)(ah)) Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Thu Apr 24 23:10:24 2014 (r264898) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_misc.c Thu Apr 24 23:11:18 2014 (r264899) @@ -315,6 +315,7 @@ ar5210WriteAssocid(struct ath_hal *ah, c /* XXX 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: head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Thu Apr 24 23:10:24 2014 (r264898) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210_reset.c Thu Apr 24 23:11:18 2014 (r264899) @@ -152,8 +152,12 @@ ar5210Reset(struct ath_hal *ah, HAL_OPMO /* Restore previous led state */ OS_REG_WRITE(ah, AR_PCICFG, OS_REG_READ(ah, AR_PCICFG) | ledstate); +#if 0 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)); +#endif + /* BSSID, association id, ps-poll */ + ar5210WriteAssocid(ah, ahp->ah_bssid, ahp->ah_associd); OS_REG_WRITE(ah, AR_TXDP0, 0); OS_REG_WRITE(ah, AR_TXDP1, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404242311.s3ONBJhg089127>