On Tue, 2012-04-17 at 10:46 -0700, greearb@xxxxxxxxxxxxxxx wrote: > + /* Get survey stats for current channel */ > + survey.filled = 0; > + if (drv_get_survey(local, 0, &survey) != 0) { > + survey.filled = 0; > + data[i++] = 0; > + } else { > + /* ath9k (and maybe others??) only updates internal stats > + * when you get channel index 0, so if > + * we are NOT on channel zero, get the real stats > + * now. > + */ > + int ch_idx = ieee80211_get_channel_idx(local->hw.wiphy, > + local->oper_channel->center_freq); > + if (ch_idx == 0) { > + data[i++] = survey.channel->center_freq; > + } else { > + survey.filled = 0; > + if (drv_get_survey(local, ch_idx, &survey) != 0) { > + survey.filled = 0; > + data[i++] = 0; > + } else { > + data[i++] = survey.channel->center_freq; > + } > + } > + } This is completely incomprehensible to me. I don't think the channel index is what you think it is? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html