diff --git a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h index ba473ce7d4..d7f9fa24dd 100644 --- a/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h +++ b/components/tdls/dispatcher/inc/wlan_tdls_public_structs.h @@ -878,9 +878,10 @@ struct tdls_ch_params { * @peer_chan: peer channel list * @peer_oper_classlen: peer operating class length * @peer_oper_class: peer operating class - * @pref_off_channum: peer offchannel number + * @pref_off_channum: preferred offchannel number * @pref_off_chan_bandwidth: peer offchannel bandwidth * @opclass_for_prefoffchan: operating class for offchannel + * @pref_offchan_freq: preferred offchannel frequency */ struct tdls_peer_params { uint8_t is_peer_responder; @@ -897,6 +898,7 @@ struct tdls_peer_params { uint8_t pref_off_channum; uint8_t pref_off_chan_bandwidth; uint8_t opclass_for_prefoffchan; + uint32_t pref_offchan_freq; }; /** @@ -922,6 +924,7 @@ struct tdls_peer_update_state { * @tdls_off_ch: Target Off Channel * @oper_class: Operating class for target channel * @is_responder: Responder or initiator + * @tdls_off_chan_freq: Target Off Channel frequency */ struct tdls_channel_switch_params { uint32_t vdev_id; @@ -931,6 +934,7 @@ struct tdls_channel_switch_params { uint8_t tdls_sw_mode; uint8_t oper_class; uint8_t is_responder; + uint32_t tdls_off_chan_freq; }; /** diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 7abf10ea41..b6110ae76d 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -4476,6 +4476,26 @@ static int wma_mgmt_rx_process(void *handle, uint8_t *data, return -EINVAL; } + if (!mgmt_rx_params->chan_freq) { + /* + * It indicates that FW is legacy and is operating on + * channel numbers and it also indicates that BAND_6G support + * is not there as BAND_6G works only on frequencies and channel + * numbers can be treated as unique. + */ + if (mgmt_rx_params->channel >= WLAN_REG_MIN_24GHZ_CH_NUM && + mgmt_rx_params->channel <= WLAN_REG_MAX_24GHZ_CH_NUM) + mgmt_rx_params->chan_freq = + wlan_reg_chan_to_freq( + wma_handle->pdev, + mgmt_rx_params->channel); + else + mgmt_rx_params->chan_freq = + wlan_reg_chan_to_freq( + wma_handle->pdev, + mgmt_rx_params->channel); + } + mgmt_rx_params->pdev_id = 0; mgmt_rx_params->rx_params = NULL;