Date: Mon, 20 Jun 2016 16:12:27 +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: r302030 - head/sys/contrib/dev/ath/ath_hal/ar9300 Message-ID: <201606201612.u5KGCR1c093472@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Mon Jun 20 16:12:27 2016 New Revision: 302030 URL: https://svnweb.freebsd.org/changeset/base/302030 Log: [ath] implement TX queue configuration extensions for the AR9380 HAL. Among other things, this introduces the idea of DBA-gated queues that aren't the CABQ. The TDMA support requires this. Tested: * AR9580 (hostap mode) * AR9380 (sta mode) Approved by: re (gjb) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c Mon Jun 20 15:45:50 2016 (r302029) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c Mon Jun 20 16:12:27 2016 (r302030) @@ -368,19 +368,40 @@ ar9300_reset_tx_queue(struct ath_hal *ah OS_REG_WRITE(ah, AR_DCHNTIME(q), SM(qi->tqi_burstTime, AR_D_CHNTIME_DUR) | (qi->tqi_burstTime ? AR_D_CHNTIME_EN : 0)); - if (qi->tqi_burstTime && - (qi->tqi_qflags & HAL_TXQ_RDYTIME_EXP_POLICY_ENABLE)) - { + if (qi->tqi_readyTime && + (qi->tqi_qflags & HAL_TXQ_RDYTIME_EXP_POLICY_ENABLE)) qmisc |= AR_Q_MISC_RDYTIME_EXP_POLICY; + if (qi->tqi_qflags & HAL_TXQ_DBA_GATED) + qmisc = (qmisc &~ AR_Q_MISC_FSP) | AR_Q_MISC_FSP_DBA_GATED; + if (MS(qmisc, AR_Q_MISC_FSP) != AR_Q_MISC_FSP_ASAP) { + /* + * These are meangingful only when not scheduled asap. + */ + if (qi->tqi_qflags & HAL_TXQ_CBR_DIS_BEMPTY) + qmisc |= AR_Q_MISC_CBR_INCR_DIS0; + else + qmisc &= ~AR_Q_MISC_CBR_INCR_DIS0; + if (qi->tqi_qflags & HAL_TXQ_CBR_DIS_QEMPTY) + qmisc |= AR_Q_MISC_CBR_INCR_DIS1; + else + qmisc &= ~AR_Q_MISC_CBR_INCR_DIS1; } - if (qi->tqi_qflags & HAL_TXQ_BACKOFF_DISABLE) { + if (qi->tqi_qflags & HAL_TXQ_BACKOFF_DISABLE) dmisc |= AR_D_MISC_POST_FR_BKOFF_DIS; - } - - if (qi->tqi_qflags & HAL_TXQ_FRAG_BURST_BACKOFF_ENABLE) { + if (qi->tqi_qflags & HAL_TXQ_FRAG_BURST_BACKOFF_ENABLE) dmisc |= AR_D_MISC_FRAG_BKOFF_EN; - } + if (qi->tqi_qflags & HAL_TXQ_ARB_LOCKOUT_GLOBAL) + dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL, + AR_D_MISC_ARB_LOCKOUT_CNTRL); + else if (qi->tqi_qflags & HAL_TXQ_ARB_LOCKOUT_INTRA) + dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_INTRA_FR, + AR_D_MISC_ARB_LOCKOUT_CNTRL); + if (qi->tqi_qflags & HAL_TXQ_IGNORE_VIRTCOL) + dmisc |= SM(AR_D_MISC_VIR_COL_HANDLING_IGNORE, + AR_D_MISC_VIR_COL_HANDLING); + if (qi->tqi_qflags & HAL_TXQ_SEQNUM_INC_DIS) + dmisc |= AR_D_MISC_SEQ_NUM_INCR_DIS; switch (qi->tqi_type) { case HAL_TX_QUEUE_BEACON: /* beacon frames */ @@ -433,9 +454,8 @@ ar9300_reset_tx_queue(struct ath_hal *ah SM(TU_TO_USEC(value), AR_Q_RDYTIMECFG_DURATION) | AR_Q_RDYTIMECFG_EN); } - - dmisc |= (AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL << - AR_D_MISC_ARB_LOCKOUT_CNTRL_S); + dmisc |= SM(AR_D_MISC_ARB_LOCKOUT_CNTRL_GLOBAL, + AR_D_MISC_ARB_LOCKOUT_CNTRL); break; case HAL_TX_QUEUE_PSPOLL: /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606201612.u5KGCR1c093472>