On 06/18/2015 04:13 PM, Nick Kossifidis wrote:
> [...]
> I have NDA documents as well stating that the indices are from -64 to
> 63 (-64 to -1, 1 to 63 and 0 is DC), you can check out for yourself
> that we get 128bins on dynamic HT20/40, see the header files too:
> 
> #define SPECTRAL_HT20_40_NUM_BINS               128
> 
Right, there are 128 in total, combined from 2 individual 64-bin sets. That's 
why
you need to swap upper and lower when operating in HT40MINUS, since chip always
puts primary channel to lower bin set.

> and/or the received packet length. Maybe you are talking about
> "static" HT40 (I don't see anything about that on the documents I
> have) or something else.
> 
Yes, maybe different documents. Mine says that interpretation of upper/lower bin
values (max_magnitude, bitmap_weight, max_index) is the same in static and 
dynamic
modes - only the bin values differ.

>> I used the proposed method with the chirp detector for FFTs provided for long
>> radar pulses on an AR9590 (patch posted the same day). Max bin index is used 
>> there
>> the same way as with spectral, but now I realize my mistake: for chirp 
>> detection,
>> the relative max_index is sufficient, while for spectral the absolute value 
>> is needed.
>>
>> Toggling the MSB in HT20 shifts the signed values by 32 and leaves the index 
>> with
>> an offset of 4, therefore the correct operation should be:
>> ht20_max_index_absolute = (ht20_max_index ^ 0x20) - 4
>>
> 
> Have in mind that on earlier chips (I did the testing on an AR9820) we
> get corrupted frames sometimes so we also need the sanity check I put
> there or else we can end up reading data out of bounds which is pretty
> dangerous so please leave the current implementation there as is.
> 
> 
The sanity checks / fixes are done before you look at the bin attributes and,
which therefore is not relevant for interpreting them.

But never mind - as said before, I proposed this to use the 3 functions for DFS
chirp detection. I'm fine not touching the running system and instead keep a 
local
copy of those.


Thanks,
Zefir
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to