X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Fsrc%2Frf.c;h=9537c2a747f4d3d48849c4b36e45884f6ccd4e0e;hb=e8d747355467293087e6818a19073627b0528fce;hp=10220481d3e8514e04c1ab1010dd73a81ae87538;hpb=bf38ae52cd2ec91f5abeadc00c4e17fc647c2bc0;p=carl9170fw.git diff --git a/carlfw/src/rf.c b/carlfw/src/rf.c index 1022048..9537c2a 100644 --- a/carlfw/src/rf.c +++ b/carlfw/src/rf.c @@ -199,6 +199,9 @@ void rf_cmd(const struct carl9170_cmd *cmd, struct carl9170_rsp *resp) fw.phy.ht_settings = cmd->rf_init.ht_settings; fw.phy.frequency = cmd->rf_init.freq; + /* + * Is the clock controlled by the PHY? + */ if ((fw.phy.ht_settings & EIGHTY_FLAG) == EIGHTY_FLAG) clock_set(AHB_80_88MHZ, true); else @@ -243,7 +246,7 @@ void rf_psm(void) /* Synthesizer off + RX off */ bank3 = 0x00400018; - clock_set(true, AHB_20_22MHZ); + clock_set(AHB_20_22MHZ, false); } else { /* advance to the next PSM step */ fw.phy.psm.state--; @@ -261,15 +264,15 @@ void rf_psm(void) bank3 = 0x01420098; if ((fw.phy.ht_settings & EIGHTY_FLAG) == EIGHTY_FLAG) - clock_set(true, AHB_80_88MHZ); + clock_set(AHB_80_88MHZ, true); else - clock_set(true, AHB_40_44MHZ); + clock_set(AHB_40_44MHZ, true); } else { return ; } } - if (fw.phy.frequency < 30000000) + if (fw.phy.frequency < 3000000) bank3 |= 0x00800000; set(0x1c58f0, bank3);