qcacmn: Avoid race condition while modifying connection list

In case of STA-AP case, new thread is created to call the func
policy_mgr_check_sta_ap_concurrent_ch_intf() that calls
policy_mgr_get_pcl_for_existing_conn() that modifies
pm_conc_connection_list table. The mc_thread calls
policy_mgr_get_valid_chan_weights() that also modifies
pm_conc_connection_list table. But the race condition is
created that mess up the pm_conc_connection_list table.

This race condition also leads to the scenario where the STA
connection to the AP is not updated properly . This shall lead
to the improper PCL update for a STA+SAP concurrency and thus
the channel switch fails.

The fix is to protect the whole sequence of the function
policy_mgr_check_sta_ap_concurrent_ch_intf() with mutex to avoid
race condition.

Change-Id: Ibb6d804afa70ef45d99e7ec9fc7fecc4993c7621
CRs-Fixed: 2047765
1 file changed