return buf;
}
- ADD(buf, *len, bufsize, "Chain 1: %10d dBm, ext. chan.:%10d dBm\n",
- ar->noise[1], ar->noise[4]);
+ ADD(buf, *len, bufsize, "Chain 0: %10d dBm, ext. chan.:%10d dBm\n",
+ ar->noise[0], ar->noise[2]);
ADD(buf, *len, bufsize, "Chain 2: %10d dBm, ext. chan.:%10d dBm\n",
- ar->noise[2], ar->noise[5]);
- ADD(buf, *len, bufsize, "Combined %10d dBm, ext. chan.:%10d dBm\n",
- ar->noise[0], ar->noise[3]);
+ ar->noise[1], ar->noise[3]);
return buf;
}
int carl9170_get_noisefloor(struct ar9170 *ar)
{
static const u32 phy_regs[] = {
- AR9170_PHY_REG_CCA, AR9170_PHY_REG_CH1_CCA,
- AR9170_PHY_REG_CH2_CCA, AR9170_PHY_REG_EXT_CCA,
- AR9170_PHY_REG_CH1_EXT_CCA, AR9170_PHY_REG_CH2_EXT_CCA };
+ AR9170_PHY_REG_CCA, AR9170_PHY_REG_CH2_CCA,
+ AR9170_PHY_REG_EXT_CCA, AR9170_PHY_REG_CH2_EXT_CCA };
u32 phy_res[ARRAY_SIZE(phy_regs)];
int err, i;
if (err)
return err;
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < 2; i++) {
ar->noise[i] = carl9170_calc_noise_dbm(
(phy_res[i] >> 19) & 0x1ff);
- ar->noise[i + 3] = carl9170_calc_noise_dbm(
- (phy_res[i + 3] >> 23) & 0x1ff);
+ ar->noise[i + 2] = carl9170_calc_noise_dbm(
+ (phy_res[i + 2] >> 23) & 0x1ff);
}
return 0;