qca-wifi: Introduce radar param translation for 160/165Mhz Agile channel

The radar parameter received from FW for Pine is based on the 160MHz
channel center. In Host a preprocessing to convert this radar parameters
based on 160MHz channel center into parameters based on 80MHz channel
center is done. This translation is present for the current channel but is
absent for the agile channel.

Also, for the 165MHz agile channel, the radar parameters are always sent
to host based on the left 80MHz center frequency 5690MHz.

Introduce a radar parameter translation function for 160/165MHz Agile
channel such that

1) If the radar hit frequency is left to the center of 160MHz center
frequency, then the segment id should be primary segment. The offset
frequeny that was with respect to the 160MHz channel center should be
converted into offset frequency based on the left 80MHz center by adding
40MHz on the offset received.

2) If the radar hit frequency is right to the center of 160MHz center
frequency, then the segment id should besecondary segment. The offset
frequeny that was with respect to the 160MHz channel center should be
converted offset frequency based on the right 80MHz center by subtracting
40MHz on the offset received.

3) If the radar hit frequency is on the left 80MHz segment of the
165MHz channel then do nothing because, the radar paramters are sent by
FW with respect to the left 80MHz center frequency of the 165MHz channel.

4) If the radar hit frequency is on the right 80MHz segment of the
165MHz channel then the segment id should be secondary segment id and the
offset should be converted to be based on the right 80MHz center frequency
5775MHz by subtracting 85MHz.

Change-Id: I47471e65c5831c0aa9c2c36338021a55d4dc7c7b
CRs-Fixed: 2784515
1 file changed