diff --git a/core/hdd/src/wlan_hdd_object_manager.c b/core/hdd/src/wlan_hdd_object_manager.c index be626202026e..a2c7b7490684 100644 --- a/core/hdd/src/wlan_hdd_object_manager.c +++ b/core/hdd/src/wlan_hdd_object_manager.c @@ -37,6 +37,8 @@ #define HIGH_5GHZ_FREQ 5930 #endif +#define HIGH_5GHZ_FREQ_NO_6GHZ 5930 + static void hdd_init_pdev_os_priv(struct hdd_context *hdd_ctx, struct pdev_osif_priv *os_priv) { @@ -156,6 +158,11 @@ int hdd_objmgr_create_and_store_pdev(struct hdd_context *hdd_ctx) reg_cap_ptr->low_5ghz_chan = LOW_5GHZ_FREQ; reg_cap_ptr->high_5ghz_chan = HIGH_5GHZ_FREQ; + if (!wlan_reg_is_6ghz_supported(psoc)) { + hdd_debug("disabling 6ghz channels"); + reg_cap_ptr->high_5ghz_chan = HIGH_5GHZ_FREQ_NO_6GHZ; + } + pdev = wlan_objmgr_pdev_obj_create(psoc, priv); if (!pdev) { hdd_err("pdev obj create failed"); @@ -163,6 +170,7 @@ int hdd_objmgr_create_and_store_pdev(struct hdd_context *hdd_ctx) goto free_priv; } + status = wlan_objmgr_pdev_try_get_ref(pdev, WLAN_HDD_ID_OBJ_MGR); if (QDF_IS_STATUS_ERROR(status)) { hdd_err("Failed to acquire pdev ref; status:%d", status); diff --git a/core/mac/src/pe/lim/lim_process_action_frame.c b/core/mac/src/pe/lim/lim_process_action_frame.c index 6bc8b1ee7f52..001830da3700 100644 --- a/core/mac/src/pe/lim/lim_process_action_frame.c +++ b/core/mac/src/pe/lim/lim_process_action_frame.c @@ -160,7 +160,7 @@ lim_process_ext_channel_switch_action_frame(struct mac_context *mac_ctx, status, frame_len); } - if (!wlan_reg_is_6ghz_supported(mac_ctx->pdev) && + if (!wlan_reg_is_6ghz_supported(mac_ctx->psoc) && (wlan_reg_is_6ghz_op_class(mac_ctx->pdev, ext_channel_switch_frame-> ext_chan_switch_ann_action.op_class))) { diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c index f774222ab7f5..469df5287cf1 100644 --- a/core/mac/src/pe/rrm/rrm_api.c +++ b/core/mac/src/pe/rrm/rrm_api.c @@ -371,7 +371,7 @@ rrm_process_neighbor_report_response(struct mac_context *mac, fMobilityDomain = pNeighborRep->NeighborReport[i].MobilityDomain; - if (!wlan_reg_is_6ghz_supported(mac->pdev) && + if (!wlan_reg_is_6ghz_supported(mac->psoc) && (wlan_reg_is_6ghz_op_class(mac->pdev, pNeighborRep->NeighborReport[i]. regulatoryClass))) { @@ -660,7 +660,7 @@ rrm_process_beacon_report_req(struct mac_context *mac, SYS_TU_TO_MS(pBeaconReq->measurement_request.Beacon.randomization); psbrr->measurement_idx = pCurrentReq->measurement_idx; - if (!wlan_reg_is_6ghz_supported(mac->pdev) && + if (!wlan_reg_is_6ghz_supported(mac->psoc) && (wlan_reg_is_6ghz_op_class(mac->pdev, pBeaconReq->measurement_request.Beacon.regClass))) { pe_nofl_err("RX: [802.11 BCN_RPT] Ch belongs to 6 ghz spectrum, abort"); @@ -723,7 +723,7 @@ rrm_process_beacon_report_req(struct mac_context *mac, for (tmp_idx = 0; tmp_idx < ie_ap_chan_rpt->num_channelList; tmp_idx++) { - if (!wlan_reg_is_6ghz_supported(mac->pdev) && + if (!wlan_reg_is_6ghz_supported(mac->psoc) && (wlan_reg_is_6ghz_op_class(mac->pdev, ie_ap_chan_rpt->regulatoryClass))) { pe_nofl_err("RX: [802.11 BCN_RPT] Ch belongs to 6 ghz spectrum, abort");