carl9170 firmware: update pram size comment
[carl9170fw.git] / carlfw / src / rf.c
index be705a7934b49c75f345e8bb41762ac4ba67982a..7bcff275fc22232029322b294273ee74781eab94 100644 (file)
@@ -136,7 +136,7 @@ static uint32_t AGC_calibration(uint32_t loop)
        uint32_t wrdata;
        uint32_t ret;
 
-#define AGC_CAL_NF     (AR9170_PHY_AGC_CONTROL_CAL | AR9170_PHY_AGC_CONTROL_NF);
+#define AGC_CAL_NF     (AR9170_PHY_AGC_CONTROL_CAL | AR9170_PHY_AGC_CONTROL_NF)
 
        wrdata = get_async(AR9170_PHY_REG_AGC_CONTROL) | AGC_CAL_NF;
        set(AR9170_PHY_REG_AGC_CONTROL, wrdata);
@@ -144,14 +144,10 @@ static uint32_t AGC_calibration(uint32_t loop)
        ret = get_async(AR9170_PHY_REG_AGC_CONTROL) & AGC_CAL_NF;
 
        /* sitesurvey : 100 ms / current connected 200 ms */
-       while (loop && ret != 0x0) {
-               ret = get_async(AR9170_PHY_REG_AGC_CONTROL) & AGC_CAL_NF;
-
-               if (ret == 0)
-                       break;
-
+       while ((ret != 0) && loop--) {
                udelay(100);
-               loop--;
+
+               ret = get_async(AR9170_PHY_REG_AGC_CONTROL) & AGC_CAL_NF;
        }
 
        /* return the AGC/Noise calibration state to the driver */
@@ -221,15 +217,6 @@ void rf_cmd(const struct carl9170_cmd *cmd, struct carl9170_rsp *resp)
 
        resp->hdr.len = sizeof(struct carl9170_rf_init_result);
        resp->rf_init_res.ret = cpu_to_le32(ret);
-
-       resp->rf_init_res.regs[0] = get(AR9170_PHY_REG_CCA);
-       resp->rf_init_res.regs[3] = get(AR9170_PHY_REG_EXT_CCA);
-
-       resp->rf_init_res.regs[1] = get(AR9170_PHY_REG_CH1_CCA);
-       resp->rf_init_res.regs[4] = get(AR9170_PHY_REG_CH1_EXT_CCA);
-
-       resp->rf_init_res.regs[2] = get(AR9170_PHY_REG_CH2_CCA);
-       resp->rf_init_res.regs[5] = get(AR9170_PHY_REG_CH2_EXT_CCA);
 }
 
 #ifdef CONFIG_CARL9170FW_PSM