|
@@ -8369,7 +8369,7 @@ static QDF_STATUS wma_mc_process_msg(struct scheduler_msg *msg)
|
|
|
break;
|
|
|
case SIR_HAL_PDEV_SET_PCL_TO_FW:
|
|
|
wma_send_pdev_set_pcl_cmd(wma_handle,
|
|
|
- (struct wmi_pcl_chan_weights *)msg->bodyptr);
|
|
|
+ (struct set_pcl_req *)msg->bodyptr);
|
|
|
qdf_mem_free(msg->bodyptr);
|
|
|
break;
|
|
|
case SIR_HAL_PDEV_SET_HW_MODE:
|
|
@@ -8637,7 +8637,7 @@ static wmi_pcl_chan_weight wma_map_pcl_weights(uint32_t pcl_weight)
|
|
|
* Return: Success if the cmd is sent successfully to the firmware
|
|
|
*/
|
|
|
QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
|
|
|
- struct wmi_pcl_chan_weights *msg)
|
|
|
+ struct set_pcl_req *msg)
|
|
|
{
|
|
|
uint32_t i;
|
|
|
QDF_STATUS status;
|
|
@@ -8649,26 +8649,33 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
|
|
|
}
|
|
|
|
|
|
for (i = 0; i < wma_handle->saved_chan.num_channels; i++) {
|
|
|
- msg->saved_chan_list[i] =
|
|
|
+ msg->chan_weights.saved_chan_list[i] =
|
|
|
wma_handle->saved_chan.channel_list[i];
|
|
|
}
|
|
|
|
|
|
- msg->saved_num_chan = wma_handle->saved_chan.num_channels;
|
|
|
+ msg->chan_weights.saved_num_chan = wma_handle->saved_chan.num_channels;
|
|
|
status = policy_mgr_get_valid_chan_weights(wma_handle->psoc,
|
|
|
- (struct policy_mgr_pcl_chan_weights *)msg);
|
|
|
+ (struct policy_mgr_pcl_chan_weights *)&msg->chan_weights);
|
|
|
|
|
|
- for (i = 0; i < msg->saved_num_chan; i++) {
|
|
|
- msg->weighed_valid_list[i] =
|
|
|
- wma_map_pcl_weights(msg->weighed_valid_list[i]);
|
|
|
+ for (i = 0; i < msg->chan_weights.saved_num_chan; i++) {
|
|
|
+ msg->chan_weights.weighed_valid_list[i] =
|
|
|
+ wma_map_pcl_weights(
|
|
|
+ msg->chan_weights.weighed_valid_list[i]);
|
|
|
/* Dont allow roaming on 2G when 5G_ONLY configured */
|
|
|
- if ((wma_handle->bandcapability == BAND_5G) &&
|
|
|
- (msg->saved_chan_list[i] <= MAX_24GHZ_CHANNEL)) {
|
|
|
- msg->weighed_valid_list[i] =
|
|
|
+ if (((wma_handle->bandcapability == BAND_5G) ||
|
|
|
+ (msg->band == BAND_5G)) &&
|
|
|
+ (WLAN_REG_IS_24GHZ_CH(
|
|
|
+ msg->chan_weights.saved_chan_list[i]))) {
|
|
|
+ msg->chan_weights.weighed_valid_list[i] =
|
|
|
WEIGHT_OF_DISALLOWED_CHANNELS;
|
|
|
}
|
|
|
+ if ((msg->band == BAND_2G) &&
|
|
|
+ WLAN_REG_IS_5GHZ_CH(msg->chan_weights.saved_chan_list[i]))
|
|
|
+ msg->chan_weights.weighed_valid_list[i] =
|
|
|
+ WEIGHT_OF_DISALLOWED_CHANNELS;
|
|
|
WMA_LOGD("%s: chan:%d weight[%d]=%d", __func__,
|
|
|
- msg->saved_chan_list[i], i,
|
|
|
- msg->weighed_valid_list[i]);
|
|
|
+ msg->chan_weights.saved_chan_list[i], i,
|
|
|
+ msg->chan_weights.weighed_valid_list[i]);
|
|
|
}
|
|
|
|
|
|
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
|
@@ -8676,7 +8683,8 @@ QDF_STATUS wma_send_pdev_set_pcl_cmd(tp_wma_handle wma_handle,
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
- if (wmi_unified_pdev_set_pcl_cmd(wma_handle->wmi_handle, msg))
|
|
|
+ if (wmi_unified_pdev_set_pcl_cmd(wma_handle->wmi_handle,
|
|
|
+ &msg->chan_weights))
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
|
|
|
return QDF_STATUS_SUCCESS;
|