Commit 1fc3ce91 authored by Zhiping Jiang (蒋志平)'s avatar Zhiping Jiang (蒋志平) 💬

more robust fs computation

parent 7ce5b5ec
......@@ -66,8 +66,8 @@ struct ExtraInfo {
bool hasTxNess;
bool hasTuningPolicy;
bool hasPLLRate;
bool hasPLLClkSel;
bool hasPLLRefDiv;
bool hasPLLClkSel;
bool hasAGC;
bool hasAntennaSelection;
uint16_t length;
......@@ -87,8 +87,8 @@ struct ExtraInfo {
uint8_t tx_ness;
uint8_t tuningPolicy;
uint16_t pll_rate;
uint8_t pll_clock_select;
uint8_t pll_refdiv;
uint8_t pll_clock_select;
uint8_t agc;
uint8_t ant_sel[3];
......
......@@ -99,7 +99,7 @@ int parse_rxs_enhanced(const uint8_t * inBytes, struct RXS_enhanced *rxs, enum R
}
}
}
if (rxs->isAR9300) {
if (rxs->isAR9300 && rxs->rxExtraInfo.hasPLLRate && rxs->rxExtraInfo.hasPLLRefDiv && rxs->rxExtraInfo.hasPLLClkSel) {
rxs->basebandFs = ath9kPLLSamplingRateComputation(rxs->rxExtraInfo.pll_rate, rxs->rxExtraInfo.pll_refdiv, rxs->rxExtraInfo.pll_clock_select, rxs->rxs_basic.channelBonding);
} else {
rxs->basebandFs = (rxs->rxs_basic.channelBonding == 0 ? 40e6 : 80e6);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment