On 16 July 2014 16:35, Sven Eckelmann <sven@xxxxxxxxxxxxx> wrote: > On Wednesday 16 July 2014 11:30:12 Michal Kazior wrote: [...] >> >> What happens when an interface is removed without spectral scan being >> stopped? > > This is a question for the QCA firmware guys. Not really. My problems is this: - have 2 interfaces (vdev 0 and vdev 1) - start spectral (using vdev 0 which happens to be the first one) - remove 1 interface (vdev 0) Now spectral scan on vdev 0 is not stopped and if you request to stop it you effectively call spectral commands with vdev 1 (the other interface which is the only one left). Yuck. I don't even want to know how firmware (or different versions and branches of it) handle this clumsiness. >> > +int ath10k_spectral_scan_config(struct ath10k *ar, enum spectral_mode >> > mode) +{ >> > + int count, ret; >> >> We tend to use `res` in ath10k. > > Thanks, will be changed. But actually, I found a lot of ret stuff in the > ath10k code. Ah, sorry. You're right. I had a brain fart. `ret` is good. [...] >> > + __be16 freq1; >> > + __be16 freq2; >> > + __be16 noise; >> > + __be16 max_magnitude; >> > + __be16 total_gain_db; >> > + __be16 base_pwr_db; >> > + __be64 tsf; >> > + s8 max_index; >> > + u8 rssi; >> > + u8 relpwr_db; >> > + u8 avgpwr_db; >> > + >> > + u8 data[SPECTRAL_ATH10K_HT20_NUM_BINS]; >> >> And as pointed out the size/count of bins is most likely not >> bandwidth-dependant. It's just a matter of resolution configured with >> fft_size + bin_scale. Maybe this should be a variable-sized array? > > Ok, bin_scale didn't make a difference in my tests (I've just repeated them). > But 2 ** (fft_size - 1) seems to be relevant. We have to change the format > accordingly. > > But currently we don't see any change in the bandwidth (20MHz/40MHz) for the > different bin numbers. This has to be checked later in detail. Yes. Apparently number of bins does *not* change with bandwidth but in that case I'm guessing bin data does refer to the given bandwidth which implies different bandwidths end up with different bin data *resolution*. Michał -- 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