本文整理汇总了C++中AR5416DESC函数的典型用法代码示例。如果您正苦于以下问题:C++ AR5416DESC函数的具体用法?C++ AR5416DESC怎么用?C++ AR5416DESC使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AR5416DESC函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ar9002_hw_set_clrdmask
static void ar9002_hw_set_clrdmask(struct ath_hw *ah, void *ds, bool val)
{
struct ar5416_desc *ads = AR5416DESC(ds);
if (val)
ads->ds_ctl0 |= AR_ClrDestMask;
else
ads->ds_ctl0 &= ~AR_ClrDestMask;
}
示例2: ar9002_hw_set11n_aggr_first
static void ar9002_hw_set11n_aggr_first(struct ath_hw *ah, void *ds,
u32 aggrLen)
{
struct ar5416_desc *ads = AR5416DESC(ds);
ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
ads->ds_ctl6 &= ~AR_AggrLen;
ads->ds_ctl6 |= SM(aggrLen, AR_AggrLen);
}
示例3: ar5416Set11nAggrLast
void
ar5416Set11nAggrLast(struct ath_hal *ah, void *ds)
{
struct ar5416_desc *ads = AR5416DESC(ds);
ads->ds_ctl1 |= AR_IsAggr;
ads->ds_ctl1 &= ~AR_MoreAggr;
ads->ds_ctl6 &= ~AR_PadDelim;
}
示例4: ar5416Set11nBurstDuration
void
ar5416Set11nBurstDuration(struct ath_hal *ah, void *ds,
u_int burst_duration)
{
struct ar5416_desc *ads = AR5416DESC(ds);
ads->ds_ctl2 &= ~AR_BurstDur;
ads->ds_ctl2 |= SM(burst_duration, AR_BurstDur);
}
示例5: ath9k_hw_cleartxdesc
void ath9k_hw_cleartxdesc(struct ath_hw *ah, void *ds)
{
struct ar5416_desc *ads = AR5416DESC(ds);
ads->ds_txstatus0 = ads->ds_txstatus1 = 0;
ads->ds_txstatus2 = ads->ds_txstatus3 = 0;
ads->ds_txstatus4 = ads->ds_txstatus5 = 0;
ads->ds_txstatus6 = ads->ds_txstatus7 = 0;
ads->ds_txstatus8 = ads->ds_txstatus9 = 0;
}
示例6: ar5416Set11nAggrFirst
void
ar5416Set11nAggrFirst(struct ath_hal *ah, void *ds, u_int aggr_len)
{
struct ar5416_desc *ads = AR5416DESC(ds);
ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
ads->ds_ctl6 &= ~AR_AggrLen;
ads->ds_ctl6 |= SM(aggr_len, AR_AggrLen);
}
示例7: ar5416Set11nVirtualMoreFrag_20
void ar5416Set11nVirtualMoreFrag_20(struct ath_hal *ah, struct ath_tx_desc *ds,
a_uint32_t vmf)
{
struct ar5416_desc *ads = AR5416DESC(ds);
if (vmf) {
ads->ds_ctl0 |= AR_VirtMoreFrag;
} else {
ads->ds_ctl0 &= ~AR_VirtMoreFrag;
}
}
示例8: ar5416Set11nAggrFirst_20
void ar5416Set11nAggrFirst_20(struct ath_hal *ah, struct ath_tx_desc *ds, a_uint32_t aggrLen,
a_uint32_t numDelims)
{
struct ar5416_desc *ads = AR5416DESC(ds);
ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
ads->ds_ctl6 &= ~(AR_AggrLen | AR_PadDelim);
ads->ds_ctl6 |= SM(aggrLen, AR_AggrLen) |
SM(numDelims, AR_PadDelim);
}
示例9: ar5416Set11nRateScenario_20
void ar5416Set11nRateScenario_20(struct ath_hal *ah, struct ath_tx_desc *ds,
a_uint32_t durUpdateEn, a_uint32_t rtsctsRate,
a_uint32_t rtsctsDuration,
HAL_11N_RATE_SERIES series[], a_uint32_t nseries,
a_uint32_t flags)
{
struct ar5416_desc *ads = AR5416DESC(ds);
a_uint32_t ds_ctl0;
HALASSERT(nseries == 4);
(void)nseries;
/*
* Rate control settings override
*/
if (flags & (HAL_TXDESC_RTSENA | HAL_TXDESC_CTSENA)) {
ds_ctl0 = ads->ds_ctl0;
if (flags & HAL_TXDESC_RTSENA) {
ds_ctl0 &= ~AR_CTSEnable;
ds_ctl0 |= AR_RTSEnable;
} else {
ds_ctl0 &= ~AR_RTSEnable;
ds_ctl0 |= AR_CTSEnable;
}
ads->ds_ctl0 = ds_ctl0;
}
ads->ds_ctl2 = set11nTries(series, 0)
| set11nTries(series, 1)
| set11nTries(series, 2)
| set11nTries(series, 3)
| (durUpdateEn ? AR_DurUpdateEn : 0);
ads->ds_ctl3 = set11nRate(series, 0)
| set11nRate(series, 1)
| set11nRate(series, 2)
| set11nRate(series, 3);
ads->ds_ctl4 = set11nPktDurRTSCTS(series, 0)
| set11nPktDurRTSCTS(series, 1);
ads->ds_ctl5 = set11nPktDurRTSCTS(series, 2)
| set11nPktDurRTSCTS(series, 3);
ads->ds_ctl7 = set11nRateFlags(series, 0)
| set11nRateFlags(series, 1)
| set11nRateFlags(series, 2)
| set11nRateFlags(series, 3)
| SM(rtsctsRate, AR_RTSCTSRate);
}
示例10: ar9002_hw_set11n_aggr_middle
static void ar9002_hw_set11n_aggr_middle(struct ath_hw *ah, void *ds,
u32 numDelims)
{
struct ar5416_desc *ads = AR5416DESC(ds);
unsigned int ctl6;
ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
ctl6 = ads->ds_ctl6;
ctl6 &= ~AR_PadDelim;
ctl6 |= SM(numDelims, AR_PadDelim);
ads->ds_ctl6 = ctl6;
}
示例11: ath9k_hw_setuprxdesc
void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds,
u32 size, u32 flags)
{
struct ar5416_desc *ads = AR5416DESC(ds);
struct ath9k_hw_capabilities *pCap = &ah->caps;
ads->ds_ctl1 = size & AR_BufLen;
if (flags & ATH9K_RXDESC_INTREQ)
ads->ds_ctl1 |= AR_RxIntrReq;
ads->ds_rxstatus8 &= ~AR_RxDone;
if (!(pCap->hw_caps & ATH9K_HW_CAP_AUTOSLEEP))
memset(&(ads->u), 0, sizeof(ads->u));
}
示例12: ar5416FillTxDesc_20
HAL_BOOL ar5416FillTxDesc_20(struct ath_hal *ah, struct ath_tx_desc *ds,
a_uint32_t segLen, HAL_BOOL firstSeg, HAL_BOOL lastSeg,
const struct ath_tx_desc *ds0)
{
struct ar5416_desc *ads = AR5416DESC(ds);
// a_uint32_t offset = 70;
// char *data_ptr = ds->ds_data;
// data_ptr[offset+0] = 'w';
// data_ptr[offset+1] = 'e';
// data_ptr[offset+2] = 'a';
// data_ptr[offset+3] = 'r';
// data_ptr[offset+4] = 'e';
// data_ptr[offset+5] = 'h';
// data_ptr[offset+6] = 'e';
// data_ptr[offset+7] = 'r';
// data_ptr[offset+8] = 'e';
HALASSERT((segLen &~ AR_BufLen) == 0);
if (firstSeg) {
/*
* First descriptor, don't clobber xmit control data
* setup by ar5416SetupTxDesc.
*/
ads->ds_ctl1 |= segLen | (lastSeg ? 0 : AR_TxMore);
} else if (lastSeg) {
/*
* Last descriptor in a multi-descriptor frame,
* copy the multi-rate transmit parameters from
* the first frame for processing on completion.
*/
ads->ds_ctl0 = 0;
ads->ds_ctl1 = segLen;
ads->ds_ctl2 = AR5416DESC_CONST(ds0)->ds_ctl2;
ads->ds_ctl3 = AR5416DESC_CONST(ds0)->ds_ctl3;
} else {
/*
* Intermediate descriptor in a multi-descriptor frame.
*/
ads->ds_ctl0 = 0;
ads->ds_ctl1 = segLen | AR_TxMore;
ads->ds_ctl2 = 0;
ads->ds_ctl3 = 0;
}
ads->ds_txstatus0 = ads->ds_txstatus1 = 0;
return AH_TRUE;
}
示例13: ar5416Set11nTxDesc
void
ar5416Set11nTxDesc(struct ath_hal *ah, void *ds,
u_int pktLen, HAL_PKT_TYPE type, u_int txPower,
u_int key_ix, HAL_KEY_TYPE keyType,
u_int flags)
{
struct ar5416_desc *ads = AR5416DESC(ds);
u_int32_t ctl0, ctl1, ctl6;
HALASSERT(isValidPktType(type));
HALASSERT(isValidKeyType(keyType));
/*
* If descriptor-based tpc, tx power is controlled by
* ar5416Set11nRateScenario().
* If not, what you put in the descriptor is ignored anyway.
*/
txPower = 0;
ctl0 = (pktLen & AR_FrameLen)
| (flags & HAL_TXDESC_VMF ? AR_VirtMoreFrag : 0)
| SM(txPower, AR_XmitPower0)
| (flags & HAL_TXDESC_VEOL ? AR_VEOL : 0)
| (flags & HAL_TXDESC_CLRDMASK ? AR_ClrDestMask : 0)
| (flags & HAL_TXDESC_INTREQ ? AR_TxIntrReq : 0)
| (key_ix != HAL_TXKEYIX_INVALID ? AR_DestIdxValid : 0)
| (flags & HAL_TXDESC_LOWRXCHAIN ? AR_LowRxChain : 0);
ctl1 = (key_ix != HAL_TXKEYIX_INVALID ? SM(key_ix, AR_DestIdx) : 0)
| SM(type, AR_FrameType)
| (flags & HAL_TXDESC_NOACK ? AR_NoAck : 0)
| (flags & HAL_TXDESC_EXT_ONLY ? AR_ExtOnly : 0)
| (flags & HAL_TXDESC_EXT_AND_CTL ? AR_ExtAndCtl : 0);
ctl6 = SM(keyType, AR_EncrType);
ads->ds_ctl0 = ctl0;
ads->ds_ctl1 = ctl1;
ads->ds_ctl6 = ctl6;
/* For Kite set the tx antenna selection */
if (AR_SREV_KITE(ah) || AR_SREV_K2(ah)) {
/* FIXME: For now set the tx antenna to always 0,
* till tx selection diverisity is implementated
*/
ads->ds_ctl8 = 0;
ads->ds_ctl9 = 0;
ads->ds_ctl10 = 0;
ads->ds_ctl11 = 0;
}
}
示例14: ar5416Set11nVirtualMoreFrag
void
ar5416Set11nVirtualMoreFrag(struct ath_hal *ah, void *ds,
u_int vmf)
{
struct ar5416_desc *ads = AR5416DESC(ds);
if (vmf)
{
ads->ds_ctl0 |= AR_VirtMoreFrag;
}
else
{
ads->ds_ctl0 &= ~AR_VirtMoreFrag;
}
}
示例15: ar5416Set11nAggrMiddle_20
void ar5416Set11nAggrMiddle_20(struct ath_hal *ah, struct ath_tx_desc *ds, a_uint32_t numDelims)
{
struct ar5416_desc *ads = AR5416DESC(ds);
a_uint32_t ctl6;
ads->ds_ctl1 |= (AR_IsAggr | AR_MoreAggr);
/*
* We use a stack variable to manipulate ctl6 to reduce uncached
* read modify, modfiy, write.
*/
ctl6 = ads->ds_ctl6;
ctl6 &= ~AR_PadDelim;
ctl6 |= SM(numDelims, AR_PadDelim);
ads->ds_ctl6 = ctl6;
}