|
@@ -1808,7 +1808,8 @@ bool policy_mgr_is_concurrency_allowed(struct wlan_objmgr_psoc *psoc,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (!policy_mgr_allow_sap_go_concurrency(psoc, mode, channel)) {
|
|
|
+ if (!policy_mgr_allow_sap_go_concurrency(psoc, mode, channel,
|
|
|
+ WLAN_INVALID_VDEV_ID)) {
|
|
|
policy_mgr_err("This concurrency combination is not allowed");
|
|
|
goto done;
|
|
|
}
|
|
@@ -3117,62 +3118,42 @@ uint32_t policy_mgr_get_connection_info(struct wlan_objmgr_psoc *psoc,
|
|
|
|
|
|
bool policy_mgr_allow_sap_go_concurrency(struct wlan_objmgr_psoc *psoc,
|
|
|
enum policy_mgr_con_mode mode,
|
|
|
- uint8_t channel)
|
|
|
+ uint8_t channel,
|
|
|
+ uint32_t vdev_id)
|
|
|
{
|
|
|
- uint32_t sap_cnt;
|
|
|
- uint32_t go_cnt;
|
|
|
enum policy_mgr_con_mode con_mode;
|
|
|
uint8_t con_chan;
|
|
|
int id;
|
|
|
+ uint32_t vdev;
|
|
|
+ bool dbs;
|
|
|
|
|
|
- sap_cnt = policy_mgr_mode_specific_connection_count(psoc,
|
|
|
- PM_SAP_MODE,
|
|
|
- NULL);
|
|
|
- go_cnt = policy_mgr_mode_specific_connection_count(psoc,
|
|
|
- PM_P2P_GO_MODE,
|
|
|
- NULL);
|
|
|
-
|
|
|
- if ((mode == PM_SAP_MODE || mode == PM_P2P_GO_MODE) &&
|
|
|
- (sap_cnt || go_cnt)) {
|
|
|
- if (policy_mgr_dual_beacon_on_single_mac_mcc_capable(psoc))
|
|
|
+ if (mode != PM_SAP_MODE && mode != PM_P2P_GO_MODE)
|
|
|
+ return true;
|
|
|
+ if (policy_mgr_dual_beacon_on_single_mac_mcc_capable(psoc))
|
|
|
+ return true;
|
|
|
+ dbs = policy_mgr_is_hw_dbs_capable(psoc);
|
|
|
+ for (id = 0; id < MAX_NUMBER_OF_CONC_CONNECTIONS; id++) {
|
|
|
+ if (!pm_conc_connection_list[id].in_use)
|
|
|
+ continue;
|
|
|
+ vdev = pm_conc_connection_list[id].vdev_id;
|
|
|
+ if (vdev_id == vdev)
|
|
|
+ continue;
|
|
|
+ con_mode = pm_conc_connection_list[id].mode;
|
|
|
+ if (con_mode != PM_SAP_MODE && con_mode != PM_P2P_GO_MODE)
|
|
|
+ continue;
|
|
|
+ con_chan = pm_conc_connection_list[id].chan;
|
|
|
+ if (policy_mgr_dual_beacon_on_single_mac_scc_capable(psoc) &&
|
|
|
+ (channel == con_chan)) {
|
|
|
+ policy_mgr_debug("SCC enabled, 2 AP on same channel, allow 2nd AP");
|
|
|
return true;
|
|
|
- if (policy_mgr_dual_beacon_on_single_mac_scc_capable(psoc)) {
|
|
|
- for (id = 0; id < MAX_NUMBER_OF_CONC_CONNECTIONS;
|
|
|
- id++) {
|
|
|
- if (pm_conc_connection_list[id].in_use) {
|
|
|
- con_mode =
|
|
|
- pm_conc_connection_list[id].mode;
|
|
|
- con_chan =
|
|
|
- pm_conc_connection_list[id].chan;
|
|
|
- if (((con_mode == PM_SAP_MODE) ||
|
|
|
- (con_mode == PM_P2P_GO_MODE)) &&
|
|
|
- (channel == con_chan)) {
|
|
|
- policy_mgr_debug("Scc is supported, allow second SAP interface");
|
|
|
- return true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
- if (!policy_mgr_is_hw_dbs_capable(psoc)) {
|
|
|
- policy_mgr_debug("DBS is not supported, mcc and scc are not supported too, don't allow second SAP interface");
|
|
|
+ if (!dbs) {
|
|
|
+ policy_mgr_debug("DBS unsupported, mcc and scc unsupported too, don't allow 2nd AP");
|
|
|
return false;
|
|
|
}
|
|
|
- /* If DBS is supported then allow second SAP/GO session only if
|
|
|
- * the freq band of the second SAP/GO interface is different
|
|
|
- * than the first SAP/GO interface.
|
|
|
- */
|
|
|
- for (id = 0; id < MAX_NUMBER_OF_CONC_CONNECTIONS; id++) {
|
|
|
- if (pm_conc_connection_list[id].in_use) {
|
|
|
- con_mode = pm_conc_connection_list[id].mode;
|
|
|
- con_chan = pm_conc_connection_list[id].chan;
|
|
|
- if (((con_mode == PM_SAP_MODE) ||
|
|
|
- (con_mode == PM_P2P_GO_MODE)) &&
|
|
|
- (WLAN_REG_IS_SAME_BAND_CHANNELS(channel,
|
|
|
- con_chan))) {
|
|
|
- policy_mgr_debug("DBS is supported, but first SAP and second SAP are on same band, So don't allow second SAP interface");
|
|
|
- return false;
|
|
|
- }
|
|
|
- }
|
|
|
+ if (WLAN_REG_IS_SAME_BAND_CHANNELS(channel, con_chan)) {
|
|
|
+ policy_mgr_debug("DBS supported, 2 SAP on same band, reject 2nd AP");
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
|