mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
Add a new HAL capability - check and enforce whether the NIC supports
enforcing the TXOP and TBTT limits: * Frames which will overlap with TBTT will not TX; * Frames which will exceed TXOP will be filtered. This is not enabled by default; it's intended to be enabled by the TDMA code on 802.11n capable chipsets.
This commit is contained in:
parent
39aa926bb3
commit
e5d63a99bc
2 changed files with 18 additions and 0 deletions
|
|
@ -192,6 +192,7 @@ typedef enum {
|
|||
HAL_CAP_LONG_RXDESC_TSF = 243, /* hardware supports 32bit TSF in RX descriptor */
|
||||
HAL_CAP_BB_READ_WAR = 244, /* baseband read WAR */
|
||||
HAL_CAP_SERIALISE_WAR = 245, /* serialise register access on PCI */
|
||||
HAL_CAP_ENFORCE_TXOP = 246, /* Enforce TXOP if supported */
|
||||
} HAL_CAPABILITY_TYPE;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -451,6 +451,10 @@ ar5416GetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
|
|||
HAL_OK : HAL_ENOTSUPP;
|
||||
case HAL_CAP_DIVERSITY: /* disable classic fast diversity */
|
||||
return HAL_ENXIO;
|
||||
case HAL_CAP_ENFORCE_TXOP:
|
||||
(*result) =
|
||||
!! (AH5212(ah)->ah_miscMode & AR_PCU_TXOP_TBTT_LIMIT_ENA);
|
||||
return (HAL_OK);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -480,6 +484,19 @@ ar5416SetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
|
|||
else
|
||||
pCap->halTxStreams = 1;
|
||||
return AH_TRUE;
|
||||
case HAL_CAP_ENFORCE_TXOP:
|
||||
if (setting) {
|
||||
AH5212(ah)->ah_miscMode
|
||||
|= AR_PCU_TXOP_TBTT_LIMIT_ENA;
|
||||
OS_REG_SET_BIT(ah, AR_MISC_MODE,
|
||||
AR_PCU_TXOP_TBTT_LIMIT_ENA);
|
||||
} else {
|
||||
AH5212(ah)->ah_miscMode
|
||||
&= ~AR_PCU_TXOP_TBTT_LIMIT_ENA;
|
||||
OS_REG_CLR_BIT(ah, AR_MISC_MODE,
|
||||
AR_PCU_TXOP_TBTT_LIMIT_ENA);
|
||||
}
|
||||
return AH_TRUE;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue