|
@@ -200,8 +200,20 @@ QDF_STATUS reg_send_scheduler_msg_sb(struct wlan_objmgr_psoc *psoc,
|
|
|
{
|
|
|
struct scheduler_msg msg = {0};
|
|
|
struct reg_sched_payload *payload;
|
|
|
+ struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
|
|
QDF_STATUS status;
|
|
|
|
|
|
+ pdev_priv_obj = reg_get_pdev_obj(pdev);
|
|
|
+ if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
|
|
+ reg_alert("pdev reg component is NULL");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!pdev_priv_obj->chan_list_recvd) {
|
|
|
+ reg_err("channel list is empty");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_SB_ID);
|
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
reg_err("error taking psoc ref cnt");
|
|
@@ -245,8 +257,20 @@ QDF_STATUS reg_send_scheduler_msg_nb(struct wlan_objmgr_psoc *psoc,
|
|
|
{
|
|
|
struct scheduler_msg msg = {0};
|
|
|
struct reg_sched_payload *payload;
|
|
|
+ struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj;
|
|
|
QDF_STATUS status;
|
|
|
|
|
|
+ pdev_priv_obj = reg_get_pdev_obj(pdev);
|
|
|
+ if (!IS_VALID_PDEV_REG_OBJ(pdev_priv_obj)) {
|
|
|
+ reg_alert("pdev reg component is NULL");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!pdev_priv_obj->chan_list_recvd) {
|
|
|
+ reg_err("channel list is empty");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
status = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_REGULATORY_NB_ID);
|
|
|
if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
reg_err("error taking psoc ref cnt");
|