From ed5856be0354128d44828d18d335b8fec64f2a69 Mon Sep 17 00:00:00 2001 From: Hariharan Basuthkar Date: Thu, 16 Jul 2020 21:39:42 +0530 Subject: [PATCH] qcacmn: Modify hal_rx_radiotap_num_to_freq for 6G frequencies When an AP operates on a 6G channel. The channel frequency in the radiotap header, in the beacon frame, shows an incorrect 6G frequency. This is because, the function hal_rx_radiotap_num_to_freq is not updated to handle the 6G channelization spec update ( IEEE 802.11 11AX Draft 6.1). To fix this issue, update the function hal_rx_radiotap_num_to_freq to handle the 6G channelization spec update (increase the 6G frequencies by an offset of 10MHz). Change-Id: I342dcb46b2627b3a2c3f12524077e63d811a5feb CRs-Fixed: 2733367 --- hal/wifi3.0/hal_generic_api.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hal/wifi3.0/hal_generic_api.h b/hal/wifi3.0/hal_generic_api.h index ba8d58f0d2..1801035d8f 100644 --- a/hal/wifi3.0/hal_generic_api.h +++ b/hal/wifi3.0/hal_generic_api.h @@ -485,9 +485,11 @@ static inline void hal_get_radiotap_he_gi_ltf(uint16_t *he_gi, uint16_t *he_ltf) #define CHANNEL_FREQ_2407 2407 #define CHANNEL_FREQ_2512 2512 #define CHANNEL_FREQ_5000 5000 -#define CHANNEL_FREQ_5940 5940 +#define CHANNEL_FREQ_5950 5950 #define CHANNEL_FREQ_4000 4000 #define CHANNEL_FREQ_5150 5150 +#define CHANNEL_FREQ_5920 5920 +#define CHANNEL_FREQ_5935 5935 #define FREQ_MULTIPLIER_CONST_5MHZ 5 #define FREQ_MULTIPLIER_CONST_20MHZ 20 /** @@ -500,7 +502,10 @@ static inline void hal_get_radiotap_he_gi_ltf(uint16_t *he_gi, uint16_t *he_ltf) static uint16_t hal_rx_radiotap_num_to_freq(uint16_t chan_num, qdf_freq_t center_freq) { - if (center_freq < CHANNEL_FREQ_5940) { + if (center_freq > CHANNEL_FREQ_5920 && center_freq < CHANNEL_FREQ_5950) + return CHANNEL_FREQ_5935; + + if (center_freq < CHANNEL_FREQ_5950) { if (chan_num == CHANNEL_NUM_14) return CHANNEL_FREQ_2484; if (chan_num < CHANNEL_NUM_14) @@ -520,7 +525,7 @@ hal_rx_radiotap_num_to_freq(uint16_t chan_num, qdf_freq_t center_freq) return CHANNEL_FREQ_5000 + (chan_num * FREQ_MULTIPLIER_CONST_5MHZ); } else { - return CHANNEL_FREQ_5940 + + return CHANNEL_FREQ_5950 + (chan_num * FREQ_MULTIPLIER_CONST_5MHZ); } }